Similarities Between Actionscript 1.0 and 2.0


Okay, up to this point we've only talked about everything that's different between the two versions of ActionScript. But what about them is the same? What hard-earned knowledge of ActionScript 1.0 that you currently have is still applicable to ActionScript 2.0? Fortunately, plenty!

You still control movie clips with this syntax:

 myMovieClip_mc.gotoAndPlay(15); 

You still create conditional statements the same way:

 if (myNumber1 + myNumber2 == 20 && enabled != true){   //actions; } 

or looping statements this way:

 for (i = 0; i <= myVariable; ++i){   //actions; } 

Expressions are still created the same way:

 myVariable = (myNumber1 / 2) + (myNumber2 + 15); 

And scripts can still be assigned to button and movie clip instances using the on() and onClipEvent() event handlers.



Macromedia Flash MX 2004 ActionScript(c) Training from the Source
Macromedia Flash MX 2004 ActionScript: Training from the Source
ISBN: 0321213432
EAN: 2147483647
Year: 2005
Pages: 182

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net