fl packages in flex/flash builder

< back to overview

Recently I tried using Five3D in a pure AS3 project using flex builder 3. Everything went well upon compiling, it was nagging that it (FB) couldn’t find the fl.motion.Color class. I looked into the Five3D code and it is indeed using the Color class to simulate basic shading.
And actually that error wasn’t so weird because the fl.motion package is a package specific for the flash IDE. It is used to create playback from a motion xml.

Now how do we fix this, I googled around a little bit and found a ’solution’: but basically the trick there was to remove all the useage of the Color class :-) Which is not what I wanted because I do want the shading to work and maybe for the future use other classes that are specifically for the flash IDE.
So next thing was to go and find the actual path to the specific SWC file with all the classes for the Flash IDE. Then I can just add the library path to that folder in the project settings and I’m good to go :-) .

First you look up the player.swc file which can be found here:

C:\Program Files\Adobe\Adobe Flash CS4\Common\Configuration\ActionScript 3.0\libs

The swc we need in this case is the flash.swc file. As you can see there is also (cs4 only) an ik.swc file. My guess is that this holds all the classes for inverse kinematics.

Next thing is to go to the compiler settings of your flex/as3 project (right click project > properties) > Actionscript build path > library path > add swc > navigate and select the correct swc.

Next thing you know, no more compiler errors and we can use the fl.motion package!
The fl.video package however is something else. Therefor you will have to export your own swc and include it in flex.

< back to overview

Comments

Syed Mazhar Hasan on November 9, 2009 at 8:57 pm

Very clever :)


Adobe Flex on November 12, 2009 at 1:01 am

Flex is highly productive, and will dramatically accelerate development.


Make a comment