Flash Professional and Flash Builder: The Perfect Pair

In the past, working with a flash file’s library inside a separate IDE such as Eclipse or Flex has been overly complex, but it’s now effortless using Flash Builder 4 (provided you have Flash Professional as well). Workarounds have ranged from cumbersome to haphazard. Thankfully, Adobe showed their support by coming up with a solution which pairs Flash Professional and Flash Builder like peanut butter and jelly.

I started moving my ActionScript 3.0 code away from fla’s and into separate actionscript files when I first learned about the feature in 2009.  The advantages granted from this switch included but were not limited to:

  • increased control (making and moving display objects programmatically means I have all the control I choose to exercise when developing games or applications)
  • increased code-find-ability (no more must I wade through an entire library and cumbersome display object hierarchy to find some random piece of code I need to change)
  • increased portability (once I’ve grown tired of the familiar Flash IDE I can find separate, more powerful or lightweight, IDE’s to write my code in)

Writing ActionScript in IDE’s other than Flash’s default IDE grants it’s own set of advantages as well. In most IDE’s you’ll find code completion, code generation, and interfaces elements and shortcuts geared towards programming. Finding one and learning how to use it will catipult your ability and cut in half the time it takes you to write flash logic. My favorite features of Flash Builder 4 include but are not limited to:

  • automatic imports (create a variable of any type and Flash Builder 4 will automatically write the import statement)
  • code generation for class files and getter/setter functions (boilerplate code like the package syntax and getter & setter functions is accomplished with the click up a button)
  • class linking (a great shortcut for jumping to different class files, if you hold shift and hover over a variable’s type, the “Widget” part of “var widget:Widget”, it becomes a link to that class’s .as file)

If you’re still working in the traditional Flash IDE and want control, code generation, and a code-centric development environment I strongly suggest you make the switch, preferably to Flash Builder 4.

As I mentioned before, other methods of accessing MovieClip, Sprite, and other objects imported into fla files were cumbersome or overly complex. My buzz post explained how to use external libraries in Flash Builder, but that only partially solved the problem since I couldn’t access class definitions to find text fields, movieClips, and other dynamic properties of my flash symbols. This was solved by using Grant Skinner’s FlashLib which gets the job done, but it lengthens the amount of code you need to write making writing ActionScript a convoluted chore.

I was elated to find a well supported solution to this problem after clicking this little button in Flash Professional.

Advertisements

~ by dverlege on June 23, 2010.

 
%d bloggers like this: