Skip to content

Flash Builder 4 and packaging

Dear Reader,

I am currently teaching a class for php|architect and Adobe, “Rich Internet Applications with Flex and PHP“. Today, one of the topics we covered was packaging classes. I was demonstrating how easy it was to create packages in Flash Builder 4 and going along nicely using my slides when a student asked a question.

“Why doesn’t it actually create the sub packages for me? Do I need to do that myself?”


At first I was taken aback. I was looking at one of my projects and it looked normal. I had a com.calevans package and a com.blueparabola package, under each were their respective classes.

It did not occur to me or my students that Flash Builder 4 changes the display ever so slightly if you only have one subpackage. Deleting the com.blueparabola package showed me the behavior that my student was experiencing. I do agree with him, it is puzzling but in the grand scheme of Flex development, it is of no consequence.

With only one subpackage, the display changes to that tcom is no longer a menu but com.calevans is the name of the package. While this is correct, it is inconsistent and confusing to new users of the interface. I will say that I am not sure this is a shortcoming of Flash Builder 4. It could possibly be an issue with Eclipse, on which Flash Builder 4 is built.

Once over the confusion of the changing display, everyone quickly grasped the ideas behind packages. Other than the fact that you have to explicitly declare a package in a ActionScript class but the package seems to be inferred by directory position in MXML components, I really like how Flex packages work and how easy Flash Builder 4 makes it to manage them.

Until next time,
I <3 |<
=C=

Disclosure: I work with Blue Parabola. Adobe is a client of Blue Parabola.