This script is use for the button link for a specific animation : -
btn1.addEventListener(MouseEvent.ROLL_OVER,btn1Over);
btn1.addEventListener(MouseEvent.ROLL_OUT, btn1Out);
btn1.addEventListener(MouseEvent.CLICK, btn1Click);
function btn1Over(event:Event):void{
btn1.gotoAndPlay("over");
}
function btn1Out(event:Event):void{
btn1.gotoAndPlay("out");
}
function btn1Click(event:Event):void{
btn1.gotoAndPlay("click");
}
btn1.addEventListener(MouseEvent.ROLL_OVER,btn1Over);
btn1.addEventListener(MouseEvent.ROLL_OUT, btn1Out);
btn1.addEventListener(MouseEvent.CLICK, btn1Click);
function btn1Over(event:Event):void{
btn1.gotoAndPlay("over");
}
function btn1Out(event:Event):void{
btn1.gotoAndPlay("out");
}
function btn1Click(event:Event):void{
btn1.gotoAndPlay("click");
}

0 comments:
Post a Comment