PDA

View Full Version : AS 3.0 to 2.0



AscolA
February 2nd, 2008, 09:35 PM
I just built an entire presentation for a client with cs3 using as 3.0. However, the client needs it to play on Flash player 6.
When I publish down to as 2.0, all my code is shot. I'm assuming the syntax is written different.

Heres an example:

pause_btn.addEventListener(MouseEvent.MOUSE_DOWN, stopMC);

function stopMC(e:Event):void{
scene2_mc.stop();
}

The thing that suck for me is, I never really learned as 2.0, so I don't know what to do to correct the problem.

Any suggestions?

Thanks

therobot
February 3rd, 2008, 05:46 AM
I just built an entire presentation for a client with cs3 using as 3.0. However, the client needs it to play on Flash player 6.
When I publish down to as 2.0, all my code is shot. I'm assuming the syntax is written different.

Heres an example:

pause_btn.addEventListener(MouseEvent.MOUSE_DOWN, stopMC);

function stopMC(e:Event):void{
scene2_mc.stop();
}

The thing that suck for me is, I never really learned as 2.0, so I don't know what to do to correct the problem.

Any suggestions?

Thanks

Wow, why do they need it for flash player 6? Seems archaic.

Anyhow. Actionscript 2 is pretty easy. For your buttons, such as your pause button, use this syntax on the main timeline of your fla.

pathToButton.pause_btn.onRelease = function ()
{
pathToScene.scene2.stop();
}

You'll want to put this code on the main timeline of your fla. If you can code actionscript 3, you shouldn't have much of a problem with 2. It took me a few tough hours of learning 3 after having a good working knowledge of 2, I'd imagine the process for you would be similar. Good luck!

hatu
February 3rd, 2008, 06:15 AM
Most of the events are in the syntax of onAction
Like onEnterFrame, onMouseDown