Quote from: Snarky on Thu 28/08/2008 06:06:05
That snippet doesn't exactly make a strong case for the superiority of AS 3.0. They went from some kind of enum for the keycodes to having to manually define constants using magic numbers? Is time moving backwards in Flash-land?
Wasn't making a case for any superiority, just providing an example and stating my personal preferences. They made changes in ActionScript in HOPES of making it better, not guaranteeing the results.
The "Magic Numbers" and the keys they stand for are listed online here:
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001686.html
Some of them follow their ASCII counter parts, but there are some exceptions.
Yeah, having constants for the keys like they did in the past would be nice... but life goes on.
Quote from: Kinoko on Thu 28/08/2008 02:43:11
And everything has gone smoothly until it came to adding the code into the movie clip's action panel. From what I can gather, I need (with 3.0) to add the code into my main timeline in an 'actions' layer, but I need to change the code to indicate what I want it to act on.
Sorry, didn't mean to leave you hanging there...
Remember, the ActionScript is going to stop working if there is a keyframe that comes after it on the same layer.
Best to place the ActionScript on its own separate layer with the same number of frames as the entire movie, but only one keyframe at the beginning if you want it to be used throughout the entire movie. If you want it to just apply to a few frames, put in a key frame where you want it to start, put in the actionscript, and have another keyframe at the point where you want it to stop on the same layer. It should work for both AS2.0 and AS3.0.
Hope it helps.