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 »
In as3 it might be a simple and convenient way to store all sort of variables as String. When you have to store or transfer intergers (int or uint) it’s very easy to keep them in hexadecimal values. For example an array of integer can be stored in a comma… Read more »
In this simple Starling tutorial we’re gonna load a simple texture and display it on the screen. Starling is a trendy as3 framework wrote by the same person who wrote parrow for iOS. It uses GPU but is created for 2d games with the idea in mind that speed matters… Read more »
In the above flash box you can press any key to find its code along with the other parameters from the KeyboardEvent event.
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 »
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 »
Cloning objects in as3 is a useful method that is not implemented directly in language but that can be implemented in a few lines of code, easier than in other languages like java. Before starting we should mention that there are 2 way of cloning object: shallow cloning and deep… Read more »
If you used to work with reflection in other languages like c# or java, you know that getting the object type might be useful. In addition with the operators “is” and “as” that are used to check if an object is a of a specific class or to cast it… Read more »
There are a few options to display images in flash applications. Load directly from code an image file from and url location. Embed the images directly in the as3 code using Embed annotation Import resources in flash and export them as swc files, then use them where you need them.