3/08/2013

Flash - AS2 or AS3

I've started programming Flash since june 2011 and I like AS2 programming.

I've seen all the advantages of using AS2 like:
- faster programming due to a more direct coding (e.g. no need to typify each variable or to instantiate a class to use it)
- easy to include code (like instance code) from which I dont recommend anyway
- dont need to create classes with restraining attributes like 'public/private'
- Variables has a unicque father called _root
- Easier to convert to HTML5

However, AS3 has:
- more control using classes -> less bugs
- Support for different framerate setting in every movieclip
- Decouple of 'Display Lists' (MCs) from main code (root)
- More external components (you can have components that alter a given Mp3 music or even load a MIDI music)
- use of currentLabel (AS2 does not have that)
- more modular objects (actually it uses a more optimized pool of objects, making it possible to have a game with thousands of animated objects without hogging CPU resources
- Its more up-to-date and supported
- Support for BONE tool (armature) and 3D transformations.

However, I'm slowly converting my AS2 games and appications to AS3. One of the most necessary actions is to create classes and to refer _root as (root as MovieClip). I'll put my progress in this post.