views:

74

answers:

1

I need a very special component written in ActionScript 3. It is a rectangle filled with a bitmap. The bitmap is loaded from an external URL based on some programmed rules. The textured rectangle is then animated using Flash CS. Animation is performed using rotate/translate/scale/skew tools.

How to create such a component and add it to Flash CS library?

A: 

load the image using the Loader class, make sure you have permissions to alter the image, or else embed it into a Sprite to get around the permissions to alter the image.

the actual animation is supported in the Sprite/MovieClip/bitmap classes, have a look at the transformMatrix class and tween them with something like TweenLite.

shortstick
I understand your approach but the requirement is to use non-programmatic animation. Is that possible?
IB
So, you want a GUI to allow users to do the various transformations as though they were using the Transform tool in the Flash IDE?
Myk
No. I actually want to perform transformations on the component right in the Flash IDE using those tools.
IB
every time you reach a keyframe the object will go back to the settings it was given at that time, for instance it will override your scaling, transparency, and state of its children. anything you assign dynamically (including adding objects to it) will then be destroyed when it reaches its keyframe.
shortstick