Since 3>2, is AS3>AS2?
Today I needed to give myself a crash course in ActionScript 3, I honestly haven't had an opportunity to utilize it at work so I placed AS3 on the learning shelf. At my last job, we didn't need anything with more functionality than in Flash MX 2004, heck we could have gotten by with Flash MX to be honest. But I have an opportunity, which I cannot afford to not to miss out on and I'm almost 100% certain they already utilize AS3 on a daily basis. I have a lot of catching up to do, but thankfully from prior experience I find I learn things quickly.
I'm going to point out a few things which changed with AS3 that I felt would have been things to know since I was familiar with AS2.
Throw'n that " _***** " away
I totally dig losing "_" in front of _x & _y. I always thought that was wierd. But I did kinda like _root for some reason.
Variables are now so strict
myvariable = 0; // flash thinks you suck! It even tells you you suck.
var myvariable = 0; // flash still thinks you suck =(
var myvariable :Number = 0; // yippy! flash love me long time
onEnterFrame i knew ye well
All the old methods are going bub bye, now you have to create listeners to react to events. I totally shunned this when I first saw it, I thought it was a "pooty" way to do events, but I guess I'll have to get used it. I just keep practicing over and over so that I can memorize the new syntax.
from 0-100, to 0-1
Oh yeah, nothing is 100 based anymore... it's all 0 thru 1. So if you want 50% alpha:
myClip.alpha = .5;
code on the timeline please
When you write code in Flash using ActionScript 3, you're only allowed to write code on the timeline. So no more coding on movieclips or objects, only timelines. This doesn't really bother me, because I always perferred coding via the timeline.
Until I'm more familiar on AS3 I won't be able to talk about the debugging, but it looks like it gives much better output than just having to rely on traces.
I didn't build a whole website or anything in AS3, but I did write a little program which draws a whole bunch of boxes to make a checkerboard by myself. Just needed help on syntax, so that's really where I'm rusty I'm not sure what the "new" phrases are. It's really not that drastically different.
Oh I also just used an api from Yahoo to show the weather, I did it from This is Portable blog. I then practice making my own version!
Tagged with: ActionScript, Adobe, AS2, AS3, Flash

Leave a comment