PDA

View Full Version : changing actionscript 2 to 3


clesueur
04-06-2008, 09:36 PM
Normally I would just learn myself but this a rush job for tomorrow.

Basically ive got a small button animation that I have just coded to move to certain frames when clicked. Now for various reasons I need this in actionscript 3.

What do I have to add/change for the code below to work in as3?


stop();

_bkToW.onRelease = function() {
gotoAndPlay("_welcome");
};


Would be great if someone could help!

cheers

chris

TomMalufe
04-06-2008, 11:28 PM
AS2:
stop();

_bkToW.onRelease = function() {
gotoAndPlay("_welcome");
};

AS3:
stop();

_bkToW.addEventListener(MouseEvent.MOUSE_UP, _onMouseUp);
function _onMouseUp(e:MouseEvent):void {
e.currentTarget.gotoAndPlay('_welcome');
}

Jeremy78
04-07-2008, 12:20 AM
bravo.. something I have still yet to accomplish.. converting as2 to as3 its murder with large files