There are now new ways to produce old results. In older versions of ActionScript, one would use the setInterval() function. Now, as actionscript 3 serves as the community model citizen of OOP (Object Oriented Programming) we are given the new Timer class in the flash.utils package.

Read the rest of this entry »

Today I have decided to build a simple ActionScript 3.0 horizontal menu based on an array. This is a fairly common practice in Flash development as we are often using data provided from a XML file to dynamically update content within our movies. To simplify this tutorial I am going to use an array that is written within my code instead of parsing it from a XML file.

The following example will demonstrate how to loop through an array and draw a button for each item in that array. Each button will have a label, an up state and an over state. I have read that it is good practice to use the SimbleButton object whenever possible, but I am not going to use the it in this tutorial because I am interested in learning more about addChild(), getChildByName(), currentTarget, mouseChildren and other features of ActionScript 3.0 that could be avoided using SimpleButtons. Read the rest of this entry »