AS2 → AS3: Running Actions On Intervals
Download Example Files
The new Timer class in AS3 gives you the ability to create and run actions at set intervals, much like the setInterval in AS2. The difference, however, is that now you can define how many times the timer runs right within the constructor. Let's take a look at the old, haggish [...]
AS2 → AS3: Button Event Handling
Download Example Files
In AS3, no longer are you able to do a simple onPress or onRelease handler to make a button (or a movie clip that acts as a button). As with pretty much everything else, all that is now event based. It may be a bit confusing at first but it's actually [...]
AS2 → AS3: Adding Linked Symbols To The Stage
Download Example Files
This is just a quick little tip on how to add symbols you've marked for linking in the library to the stage. There is a new way to handle adding things to the display list and this is the old way:
PLAIN TEXT
Actionscript:
var holder_mc:MovieClip = this.createEmptyMovieClip("holder_mc", this.getNextHighestDepth());
var box_mc:MovieClip = holder_mc.attachMovie("box", "box1_mc", holder_mc.getNextHighestDepth(), {_x: [...]
AS2 → AS3: Loading External Assets
Download Example Files
The MovieClipLoader is no longer available in AS3 and has been replaced by the new, hip kid on the block, the Loader class. Just like pretty much everything else in AS3, Loader has a bunch of events it fires off which you can listen to and react accordingly. Below is the [...]
AS2 → AS3: Main File Preloading
Download Example Files
When I coded in AS2 I had a preloader that I liked to use over and over again for pretty much every file I did which always worked well for me and never had any issues. One thing to note, however, is the comments I made in the download files on Frame [...]
AS2 → AS3: Basic XML Parsing
Download Example Files
XML in AS3 is very different from the old AS2 firstChild stuff that we are accustomed to. With the advent of E4X in AS3, traversing XML is now much cleaner and more closely resembles XPath. Before, parsing XML gave you a whole bunch of firstChilds and childNodes that you had no [...]










