系统提供按钮不大适合现在的很多实用,很多都是MC做的,很多情况要些很多代码……
代码
stop();
addEventListener(MouseEvent.MOUSE_OVER,MouseOver);
addEventListener(MouseEvent.MOUSE_UP,MouseOver);
addEventListener(MouseEvent.MOUSE_DOWN,MouseDown);
addEventListener(MouseEvent.MOUSE_OUT,MouseOut);
buttonMode = true;
mouseChildren = false;
function MouseOver(e:MouseEvent):void{
gotoAndPlay(2);
stop();
}
function MouseDown(e:MouseEvent):void{
gotoAndPlay(3);
stop();
}
function MouseOut(e:MouseEvent):void{
gotoAndPlay(1);
stop();
}
addEventListener(MouseEvent.MOUSE_OVER,MouseOver);
addEventListener(MouseEvent.MOUSE_UP,MouseOver);
addEventListener(MouseEvent.MOUSE_DOWN,MouseDown);
addEventListener(MouseEvent.MOUSE_OUT,MouseOut);
buttonMode = true;
mouseChildren = false;
function MouseOver(e:MouseEvent):void{
gotoAndPlay(2);
stop();
}
function MouseDown(e:MouseEvent):void{
gotoAndPlay(3);
stop();
}
function MouseOut(e:MouseEvent):void{
gotoAndPlay(1);
stop();
}
代码能重用就重用~~~!能copy就copy~~~!