A reader recently inquired if it was necessary to remove previously created class instances which were no longer being used. The simple answer is yes because it frees up memory – but there may be other reasons as well.
Entries Tagged as 'class'
Using patterned backgrounds and masks: the Perf class
May 4th, 2010 · No Comments · AS3 Custom Classes
The Perf class draws a regular grid of either squares or circles that can then be applied as either a background or as a mask. The parameters of the class constructor determine whether the pattern is composed of squares or circles, the spacing and size of the pattern and its color and transparency.
Drawing a checkerboard background: the Checkerboard class
April 27th, 2010 · No Comments · AS3 Custom Classes
This post introduces the Checkerboard drawing class. It is a simple and easy to use class that relies on Flash’s BitmapData class to draw the patterns.
Tags:checkerboard·class·drawing
Displaying time: the Clock class
March 16th, 2010 · 1 Comment · AS3 Custom Classes
The Clock class displays a digital clock with optional 24 hour display mode and optional display of seconds. Text properties are controlled by an array which define the text’s placement within the background and the display’s font, size and color.
Tags:class·clock·date·digital clock·time
Tweening a text message: the MsgPanel_RIGHT class
March 9th, 2010 · No Comments · AS3 Custom Classes
I recently saw a video of Microsoft’s upcoming Mobile 7 phone interface and, surpirisingly, was impressed with its bold 2D graphics – no 3D bevelled edges, no gradations, no faux glass reflective surfaces. The MsgPanel_RIGHT class is my interpretation of a 2D graphic approach to the interface.
Prototyping the Bookshelves function
March 5th, 2010 · No Comments · AS3 Custom Classes
I originally wrote this function in 2007 in Actionscript 2 (remember createEmptyMovieClip) and recently rewrote it in as3. The concept is to present a series of “shelves” that move together vertically as a group but move independently of each other when moving horizontally. Instead of a grid of rows and buttons imagine shelves of books with each [...]
Improving the ImageManager class
March 2nd, 2010 · No Comments · AS3 Custom Classes
The ImageManager class, introduced in the last post, has been modified to expand its usability. In the first iteration, the id of the image displayed was contained internally and could not be used by an outside function or class; in the modified version the current image id is announced to external event listeners via a custom [...]