A quick note about compiling FIVe3D examples in Flex

One of my favorite FIVe3D examples is this AS3 banner by Bartek Drozdz.

I downloaded the source code graciously provided by the author but when I tried to compile in Flex Builder 3 w/ SDK 3.4, I kept getting errors that told me Flex can’t find classes found in the “fl.motion.*” package. Since that particular package only works in the Flash IDE, I had to make some small adjustments to the FIVe3D banner code to get it to compile as a Flex Builder Actionscript application. Basically, I had to substitute all “fl.motion” package classes with their equivalents from the TweenLite library. For example, when an easing function, such as “import fl.motion.Elastic” was required by line 6 of Screenplay.as, it was quick and easy to change that to “import gs.easing.Elastic,” while making sure the relevant “gs” packages are actually at the location you’re telling the application they’re located.

In Sprite3D.as and Shape3D.as I commented out these lines and most of the banner example’s functionality remained unaffected:

/* ... */ 
import fl.motion.Color;
/* ... */ 
var color:Color = new Color();
color.brightness = brightness;
color.alphaMultiplier = alpha;
transform.colorTransform = color;
/* ... */ 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s