Importing Spritesheets in Flash to Export them as MovieClips in SWC Libraries

There are several reasons we might have to export resources from flash: to create libraries to reuse them in other flash projects to use Flash Builder or Flash Develop for writing code and Flash to create graphical assets to use swc libraries in haxe projects Lets take the following sprite:

Center/Align Vertically Text in a TextField Control

Depending whether you are using the classic TextField control and the TLFTextField newly introduced in Flash 10, you can choose one of the following options:

If we are using an TLFTextField instead of the classic TextField, it’s getting easier, because we have the vertical align feature implemented by the… Read more »

Shuffle/Randomize Array/Vector in AS3

As3 Array/Vector classes don’t provide an implemented method to shuffle/randomize them. However, that’s not a hard task to do and there are quite a few methods to implement such an algorithm. One of the easiest methods is called Fisher-Yates shuffle. Probably it’s not the fastest way to shuffle an array,… Read more »

Bounding Box of a Rotated Rectangle

      No Comments on Bounding Box of a Rotated Rectangle

In action script is possible to find out the bounding box of a rotated sprite(rectangles can be used as well) using DisplayObject.getBounds method. In this post I’ll show a pure mathematic/geometrical approach. It has the advantages that can be ported in other languages, can be used independently of AS3 display… Read more »

Add Auto-Hide functionality to Sprite and MovieClip objects in AS3

Auto-Hide might be useful when you deal with situations when you have too many controls on a screen and you just want to hide those which are not used so often to have enough space in the main screen. A simple option to implement would be to use MouseEvent.MOUSE_OVER and… Read more »