Flash with Action Script
With Flash CS3 comes support for ActionScript 3.0 - the newest, standards-based programming language for Adobe Flash (SWF) movies and applications. More so than in the past, you may find it difficult to get started with ActionScript 3.0 when compared to older versions of ActionScript. The transition to ActionScript 2 from ActionScript 1, for example, can probably be seen as a cakewalk compared to the leap to ActionScript 3.0, especially for someone who is prone to working and coding in the Flash IDE (Integrated Development Environment).
ActionScript 3 is different. Very different. So different, in fact, that it requires a completely new virtual machine to run it. But at its core, its still ActionScript and as ActionScript you'll notice that many of the commands and programming concepts that applied to ActionScript 1 and ActionScript 2 still pretty much apply to ActionScript 3. Very little, at least syntactically, has changed. And sometimes the ActionScript 3 equivalent of ActionScript 2 code will look very similar, if not exactly the same. However, this is not always the case. And in the end, there are enough changes to make a direct conversion between the two often very difficult.
These changes were necessary, though. ActionScript 3 was built with efficiency and productivity in mind. Not just efficiency in development (and this point can be argued for smaller projects but larger projects do benefit), but also playback performance where code in ActionScript 3 can be played back in the Flash Player up to 10 times (if not more) faster than ActionScript 2 code. Yes, you will find that many of the same menial tasks in ActionScript 1 and ActionScript 2 now seem to take twice as long to code in ActionScript 3, but in the end the extra speed and functionality. The casual coder may look to the sky shaking a fist, cursing, but the advanced programmer will jump with glee in rejoice.
Lets take a look at some of the new features ActionScript 3:
  • Runtime exceptions – errors that are thrown at runtime (during SWF playback) to help debug your project
  • Runtime variable typing – typing which goes beyond compilation and persists during playback
  • Sealed classes – classes based on a static definition for additional robustness and performance
  • Method closures – methods are now bound to their respective class instance so 'this' in methods will never change
  • E4X – a new, easy to work with implementation of XML
  • Regular expressions – native support for regular expressions
  • Namespaces – support for namespaces not only in XML but in class definitions to set custom access to class members
  • int and uint data types – new data types for Number values allowing ActionScript to use faster integer-based math for certain calculations
  • New display list model – a new, flexible approach to managing display objects to be viewed on the screen
  • New event model – a new, listener-based event model with support for event propagation
To find out more about RGB Web Solutions Flash Development expertise, please visit our work on
Flash portfolio.