//blog_btn建議監聽器
blog_btn.addEventListener(MouseEvent.CLICK, clickBLOG);
blog_btn.addEventListener(MouseEvent.MOUSE_OVER, overBLOG);
blog_btn.addEventListener(MouseEvent.MOUSE_OUT, outBLOG);
function clickBLOG(event:MouseEvent) {
stage.dispatchEvent(new Event("GOBLOG"));
}
function overBLOG(event:MouseEvent) {
blog_btn.gotoAndPlay(2);
}
function outBLOG(event:MouseEvent) {
blog_btn.gotoAndStop(1);
}
//recomment_btn做超連結
recomment_btn.addEventListener(MouseEvent.CLICK, openUrl);
function openUrl(e:MouseEvent):void{
var targetName:String = e.target.name;
var showUrl:String = "http://www.youtube.com/watch?v=LYHBV3f7G3k";
var url:URLRequest = new URLRequest(showUrl);
navigateToURL(url);
}
No comments:
Post a Comment