Move to AS3 (too dangerous?)
We found ourselves asking the question that seems to have been on many people’s minds, “should we move to Adobe Flash CS3 ?”
Although most people think upgrading is always a must, through past experiences in the production environment, we have come to know that the upgrading process should only be initiated after considerable deliberation - if it is done hastily it can lead to massive (and costly) project downtimes.
Some of the key factors considered as we were deciding to upgrade to Flash CS3 included;
- Performance increases to the flash player (+),
- Improvement of actionscript with the new actionscript3 language (+),
- Marketplace adoption of Flash Player 9 - how many consumers had the new flash player (?),
- Whether older Flash 8 files could be ported to Flash CS3 (-),
- Extent AS2 code could be maintained as AS3, rather than having to be rewritten (-).
Upgrading to Flash CS3:

Out of all these considerations, the biggest one was the complete overhaul of actionScript2 to actionScript3, and how to accommodated it into our projects.
After initial investigation of the new AS3 language, it was decided that a good way to explore the new methods of programming and performance improvements that it offered, was to get stuck into a small project using the AS3 scripting language.
Before the project could begin, we first had to familiarise ourselves with the application, this involved testing to see how tasks performed in Flash 8 were accomlished in Flash CS3.
Attachment of library symbols at runtime:
The major change with regards to symbols and movie clips, is that they are now created and managed through the new display object system, containing the top level stage display objects and its child nodes. Because of this new system, the code to attach library symbols to the stage has changed significantly, instead of using the old attachMovie function, programmers now have to use the new addChild method of the displayObject class, this also does away with the old depth system, which is now automatically ordered when adding child nodes.
Attach symbols to stage example:

Another change with regards to library symbols, is the new class linkage in the symbol properties dialog, users can now specify a custom class to associate with their library symbols.
Attach symbols to stage example:

Another common task is adding keyboard and mouse functionality to projects, this task has also dramatically changed. AS3 now contains an event driven system for these tasks. The big difference is obvious with enterframe interval functions, and button handler scripts. The old way has been done away with, and these activities are now incorporated into the new event system.
New event code example:

Another important task performed within flash 8, was the use of shared objects to load external graphic assets into the main file, the problem with this old setup was that in order to attach the external assets to the main swf at runtime, they first needed to be placed into a symbol on the main file in order for the resource to be loaded and accessible in linkage attachment to the stage.
In AS3, to accomplish import of external assest at runtime, the use of class.getDefinitions was used. This was done by using a loader class to load a external file, and within the events load complete listener, applicationDomain.getDefinition was used to load symbols from the external file using their linakage identifiers.
Load external assets code example:

Another important aspect to consider was the support for executable development programmes such as Zinc, a rapid application development programme for flash, and the encryption software available to encode AS3 swf files and protect them from de-encryption software.
There are also a lot more changes and new features to discover within Adobe Flash CS3, but our experience (on the whole) has been largely positive.
Although still relatively early days, the tests seem to suggest that the upgrade to CS3 is a positive move, and as it is fast becoming the standard, it was only a matter of time before the transistion was made.
AS3 is now a truer object orientated programming language and we highly recommend upgrading to it if you haven’t already. ![]()
0 comments
Kick things off by filling out the form below.
You must log in to post a comment.