ActionScript 3 如何使用按钮
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 如何使用按钮相关的知识,希望对你有一定的参考价值。
stop();
import flash.net.navigateToURL;
import flash.net.URLRequest;
import flash.events.MouseEvent;
var getYouTube:URLRequest = new URLRequest("http://www.youtube.com");
/// B Button Get a URL ///
B_btn.addEventListener(MouseEvent.CLICK, bClick);
function bClick(event:MouseEvent):void{
navigateToURL(getYouTube);
}
/// G Button Property ///
G_btn.addEventListener(MouseEvent.CLICK, gClick);
G_btn.addEventListener(MouseEvent.MOUSE_OUT, gOut);
function gClick(event:MouseEvent):void{
gotoAndStop("getJargon");
}
function gOut(event:MouseEvent):void{
gotoAndStop(1);
}
/// R Button Property ///
R_btn.addEventListener(MouseEvent.CLICK, rClick);
R_btn.addEventListener(MouseEvent.MOUSE_OUT, rOut);
function rClick(event:MouseEvent):void{
R_btn.alpha -= 0.1;
}
function rOut(event:MouseEvent):void{
R_btn.alpha = 1;
}
以上是关于ActionScript 3 如何使用按钮的主要内容,如果未能解决你的问题,请参考以下文章