AS2 to AS3
I was working on a project today and I was getting NaN as a return value for a trace up until a certain point in time. I figured that a quick check in an if/else statement would solve my issue but I was wrong. Here I will outline what I initially did and the quick […]
Download Example Files Gone are the days of having to create objects to act as listeners for mouse events. The nasty, unruly way of AS2 has been replaced like everything else with the AS3 event model and writing mouse listeners is similar to everything else you’re now used to in AS3.
Download Example Files Using the keys on your keyboard to interact with the Flash environment has changed from AS2 to AS3. While some of the AS3 code takes a couple of more lines than the AS2 stuff to get done, this is not the case with this example. The AS3 code is not only shorter […]
Download Example Files AS3 no longer has an attachSound() method in the Sound object so attaching sounds from the library is a little different. It’s actually more intuitive (as usual with AS3) because it acts just like attaching bitmaps and other objects out of the library.
Download Example Files I was recently working on the Image Slider that I posted here a couple of days ago and I realized I didn’t know how to access FlashVars in AS3. I quickly did a Google search and came up with the solution rather easily.
Download Example Files The more migrating I do to AS3 the more little nuances (at least nuances when I am migrating) I find. A lot of small little methods have been switched or moved into new classes and it’s always a bit of a drag to find them. Such is the case with the setMask() […]
Download Example Files Managing depths in AS2 was pretty cumbersome and annoying. You had to use methods like getNextHighestDepth() or keeping track of depths manually to make sure everything appeared on the stage properly and didn’t overwrite each other. Enter AS3 FTW!
Download Example Files The Color class has been deprecated since Flash 8 but was still usable in AS2 to set/get a MovieClip’s RGB values. That has since changed in AS3 and here is the new way of doing things.
Download Example Files ActionScript 3 has done away with the LoadVars class and when I was updating my ContactForm for AS3 I was trying to figure out how to mimic the sendAndLoad() method that LoadVars provided. I stumbled upon an article by Peter Elst which explained how to do this so I’m going to outline […]
Download Example Files Loading and playing external sounds in AS3 is not far off from its AS2 counterpart. The code, as usual in AS3, is a little different because of the new event model, but really boils down to the same thing.