Flash | Retrospective

Flash tidbits, struggles, revelations, and teaching

Flex Builder/Eclipse MXML/AS3 Source Formatter

Way back in April, I had been looking for an Eclipse plugin to format MXML and came up blank.   Today I found one (thanks to Digital Media Minute) and it works great.  I just used to clean up some old code of mine, plus reformat some code I inherited from another developer.

Flex Formatter:   http://flexformatter.sourceforge.net/ Download the .jar file and place in your Flex Builder or Eclipse plugins folder and restart FB or Eclipse.   There is a pretty extensive configuration panel that you can use to modify the formatting to your standards (Window > Preferences > Flex Formatter).  Additional information on the formatting options is here: http://sourceforge.net/docman/display_doc.php?docid=137421&group_id=248408.  You can also import/export your settings so you can share with your team.


FXG Complex Rectangle Experiment

I’m a bit late to the party, but started really looking at Flex4 this week … FXG in particular.  I looked over the few basic FXG Shapes (Rect, Ellipsis, and Line) and thought it looked pretty limited.  I had used Degrafa on a few projects and really got used to the Round Rectangle Complex and the ability to set each rectangle corner with a different radius.   The FXG Rect has the ability to set corner radius, but its every corner and lacks the the control.   So… i figured with FXG the new standard for Adobe, I’d look at how hard it would be to create a custom FXG class.

Well, not too hard at all.   I started by looking at the Rect class in Flex, and then had to hunt around for simulate Cubic Beziers using the curveTo method (Thanks Senocular for that answer).

If you want to play around with it (requires Flash Player 10):  View Source


Flash CS4 3d rotation – ever changing Z and 3d coordinates

Up until today, I haven’t had much time to play with Flash CS4’s new 3d capabilities except some basic code examples.  Today, I played around in the IDE and was trying to work with the 3d tools.

I have to admit I’m a bit puzzled about the Z axis in Flash CS4 and how Flash chooses to rotate an object.  I was toying around with some animations just visually and then tried to set up some objects there were pointing in a particular direction and was running into issues.   The Z coordinates were changing while I was rotating the object.  It took a few minutes for me to figure out what was going on (I wasn’t my normal sharp self – haa haa).  The 3d rotation tool was always picking the center of my object to rotate around, instead of the registration point.   I guess I never noticed that its that same way for 2d transforms as well.   Of course, my limited experiments using just code of course using rotationY, rotationX, and rotationZ only rotate around the registration point.   I spent all these years forcing myself to work with 0,0 as a registation point because it was easier when working when working with dynamicaly sized objects and loading of assets, and it seeems if you want to play with 3d, at least in the IDE, you’re better off only using a center registration point.     It would be nice in a CS4.0.1 update if there was a way to set this as default in the system prefs.   Maybe a nice little toggle in 3d Center Point?  (Hint Hint Adobe)

The other part that is just sort of an annoyance is that the 3d position and view information only shows X,Y and Z coordinates but you have to get X,Y,Z rotation from the transform panel.  I know the Transform panel is where rotation has always been, but if you are going through the hassle of redoing the interface, it seems fairly logical to maybe cluster these pieces together finally.

I don’t want this to sound like I’m only complaining.  I really love Flash CS4.  Years ago, I dreamed of an After Effects timeline in Flash.  Seems like only yesterday that I was dreaming of what Flash CS4 was to become (Dec 2005:  Return of LiveMotion). Just need that motion vector Blur and I’ll be 3 for 3.