2 actionscript-2 button actionscript-3
如何将这些AS2按钮转换为AS3?
on (press) {
nextFrame();
}
on (press) {
prevFrame();
}
Run Code Online (Sandbox Code Playgroud)
import flash.events.MouseEvent;
this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
public function mouseDownHandler(event:MouseEvent):void{
nextFrame();
}
Run Code Online (Sandbox Code Playgroud)
但您可能还应阅读此内容以了解事件模型的更改方式:
http://www.flashvalley.com/fv_tutorials/mouse_events_in_actionscript_3.0/