ActionScript changes in AS3
Ready to get into ActionScript 3 coding? Or maybe you just want to see what’s in store for coding for the Flash 9 player? Check out this nice table of differences between ActionScript 2 and ActionScript 3.
You'll be surprised to see how much has been removed, like:
duplicateMovieClip()Don't worry though most of the things that have been removed still exist from a functional standpoint, they have just been moved to other classes/packages.
removeMovieClip()
attachMovie()
_lockroot
toString()
_level
newline
sendAndLoad()
the entire Selection class
and more...
So far I am really excited to get my feet wet with these changes. I'll be honest though when I first heard it was changing so drastically I wasn't so excited. However it looks like Adobe (still sounds weird to say that) has done a great job in this new version. It definitely seems more logical...and more robust.

June 29th, 2006 at 11:15 pm
toString hasn’t gone anywhere
June 30th, 2006 at 7:07 pm
Sorry, I should have been more clear… toString() as part of the LoadVars class (which I guess is now flash.net.URLLoader) is gone… I should have looked closer I guess… might not have come across as dramatic then
August 27th, 2007 at 5:15 am
and what about _lockroot?
August 27th, 2007 at 6:58 pm
_lockroot is no more. root (notice the underscore is no longer present) now references the root of the swf file it was created on (which is what _lockroot provided). So now AS3 works with _lockroot being the default. It’s no longer that horrible to reference root anymore (thats going to take some getting used to for many ActionScript purists)
November 21st, 2007 at 1:45 am
attachmovie() is removed so how to handle in AS3?
November 24th, 2007 at 11:40 am
@Niraj – instead of attachMovie() you would now use addChild. When you set your item up in your library to export for actionscript you wil notice that the “Linkage Name” field is now replaced with a “class” field. For example if I draw a box on the stage and convert it to a MovieClip and give it a name of testClip, then check the “Export for ActionScript” box, I would see the following dialog box
.
When you click ok you will get a dialog box giving you a warning that it could not find a class named testClip so it will create one for you. The dialog box will look like:
Then to add the item to the stage you would refrence the class name given to your clip in the library. So in this example code would look like this:
var clip : testClip = new testClip();addChild(clip);
Hope that helps,
-Dave
December 17th, 2008 at 6:19 am
Well, Is it possible to load an AS 3.0 swf in an AS 2.0 file?
December 17th, 2008 at 9:43 am
@netto unfortunately you cannot load an AS3 SWF into an AS2 SWF. The separate AVM’s just dont work that way. The SWF files get loaded into one AVM or the other and cant communicate. You can load an AS2 file into and AS3 file however you’ll need to use LocalConnection to communicate between the files.
For Actionscript/AVM compatibility check out this chart on LiveDocs http://bit.ly/iCsw . Hope that helps,
-Dave