Mar 27 2008

to Flash or to Flex that is the question…

Published by john at 7:21 am under ActionScript 3, Flex

Since Flash CS3 and AS3 came out I been thinking about Flex, most of the projects I seen in Flex were impressive from an architecture/programming point of view but not visually. So that discourage me from using flex.At the same time in AS2 I was used to not having to have a FLA for my projects but instead I would compile the SWFs using MTASC, this way it was easier to automate the compile process (using ANT or nANT), and also that forced me to keep all assets outside of the flash library which made it easier to update/replace by the designers in the team.In AS3 you cannot compile using MTASC but there is the FLEX compiler (mxmlc.exe) that basically allows you to compile AS and MXML files as SWFs.  mxmlc allows you to compile AS files without the need of MXML files.The other advantage of using the command line compiler (mxmlc) is that it allows you to use many classes not available in flash cs3. For some reason ADOBE decided to include certain things in FLEX and not in Flash and also decided to remove some classes that were available in as2. Here is some stuff I found that ADOBE has in Flex and not in Flash:

  • Ability to exclude classes at compile time
  • Export a subset of characters for a particular font
  • Webservice API
  • Flash Remoting API

 I created a small project using flash and as3 and to compile it with mxmlc all I had to do were two small changes:

  1. The main class has to extend Sprite
  2. Add a SWF meta data: (ie.:[SWF(width="900", height="320", backgroundColor="#ffffff", frameRate="30")])

In conclusion I think that by compiling with the flex command line program I get the benefits of flex, ability to automate the compile process, and if you combine this with external assets and the use of a flash library (if necessary) you can also create a project that is visually impressive as well.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]


One Response to “to Flash or to Flex that is the question…”

  1. johnon 27 Mar 2008 at 8:50 am

    It is also interesting that the same project exported with flash was 42k and with mxmlc was only 18k

Trackback URI | Comments RSS

Leave a Reply