Home > Uncategorized > Flex 2 and Actionscript 3.0

Flex 2 and Actionscript 3.0

July 6th, 2006 Randy

Last week Adobe released Flash Player 9 into the wild. This new version supports swf content that is written and compiled using Actionscript 3.0. Adobe is changing the landscape significantly with this and upcoming releases.

Adobe is reinventing Flash as a development platform and is branding it as Flex. I think the new name is a smart move since Flash has the stigma of being all “flash” and no substance. It is important to stress that the Flash IDE with it’s timeline based development paradigm is not going away. Flex is a new addition to the Adobe stable of products.


From a technical perspective, the changes the AS3.0 bring are absolutely necessary if Flex is to be considered a serious development platform. AS2 applications support classes that have private and public properties and methods, but compile down to AS1 syntax in the resulting swf. This means that at runtime nothing is protected and there is nothing stopping access to properties and methods or injection of functionality. This is a serious security issue for real world application development. AS3 applications, on the other hand, compile to AS3 swfs and therefore make use of secure features such as sealed classes and protected properties/methods. These applications are no longer vulnerable to malicious runtime manipulation. These swf’s also run in a more optimized manner and it is reported that there is a (up to) 10 fold improvement in code execution.

THE PROBLEM with the current iteration of the Flash player is that, while it supports playback of AS1, AS2 and AS3 based swfs … it does not support mixing these in one application. This means that once you are in Flex world, you are stuck there. You cannot make use of funky components you developed and compiled in the Flash IDE. This also means that designers are excluded from the process until Adobe is able to create a Flash player where AS1 and AS3 based content can play together. And until this is done, Flex-developed applications will look … blah.

I understand that Adobe is trying to lure the millions of visual basic developers out there. Microsoft applications all are developed using MS tools and components and methodologies which force a way of programming and ultimately leads down a path of bland blahness.

I think Adobe is on the right path … when I can build things in the Flash IDE and include them in FLEX applications, I will join the party.

update (July 17, 2006)

It is possible to embed AS2 Flash-made content within a FLEX application. The current Flash Player (9,0,16,0 is what I have installed) runs dual AVMs (actionscript virtual machine) to support AS2 and AS3 content and therefore FLEX applications cannot directly reference objects in AS2 content. The solution for the time being is to use LocalConnection (kludge) and Peter Ent wrote a nice how-to blog post.

Also, Adobe has released a “Flash Professional 9 ActionScript 3.0 Preview” which is a public alpha version of Flash that supports AS3 development. Thanks Adobe … that helps tremendously. Final release of the new version is not slated until 2007.

Categories: Uncategorized Tags:
Comments are closed.