The new-n-fancy ActionScript 3, however, is gonna require some code-changes. In previous incarnations of ActionScript, it'd happily allow me to put ActionScript code anywhere I wanted. For example, I could click on a button and add the following code to the button itself:
on(release){ trace("somebody just clicked me");}
As expected, if I compiled the code and clicked on the button, I'd get a message in the trace window. Once Flash started becoming more of a development tool than an animation tool, the Flash folks realized that such a construct, while convenient, was pretty unruly for all but the most trivial of projects, as you end up having little bits of code all over the place.
But in the name of avoiding broken code, they allowed it to live for ActionScript 2. They did, however, add "listeners". It's basically a standardized way of having code call code in other objects. So instead of adding code to the button itself. You'd add this code to the parent frame.
myButton.addEventListener(MouseEvent.RELEASE, clickHandler);function clickHandler(event:MouseEvent):void{ trace("somebody just clicked me");}
It's not quite as trivial as the old way. The main thing it does is allow you to put all of your code in one place rather than little snippets all over your objects. And you were encouraged to do things this way rather than the old way.
Well, now you're REALLY encouraged to do things the new way, because the old way won't compile and any event code you've added to buttons or movieclips on the stage will be ignored.
So I'm gonna need to make a few changes before I can try out my stuff in the new optimized ActionScript 3.0 VM.
Judging from some of the Flash abortions I've seen, that can only be a good thing.