To push a button in Actionscript 2 (As2), example:
on (release) {
play();
}
To push a button in Actionscript 3 (As3), example:
stop();
start_button1.addEventListener(MouseEvent.CLICK, clickFunction);
function clickFunction(event:MouseEvent):void {
gotoAndPlay(2);
}
Other difference between aAS2 and AS3:
AS2
btn_play._visible = false;
AS3
btn_play.visible = false;
vol_slider.visible = false;
AS2
target = _parent;
target = _parent;
AS3
target = this.parent;
target = this.parent;
AS2
do_pause = function():Void{
AS3
var do_pause:Function = function():void{
var do_pause:Function = function():void{
AS2
if(mc._currentframe != mc._totalframes){
AS3
if(mc.currentFrame != mc.totalFrames){
No comments:
Post a Comment