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.
Tweening a text message: the MsgPanel_RIGHT class
March 9th, 2010 · AS3 Custom Classes
→ No CommentsTags:class·text·tween
Prototyping the Bookshelves function
March 5th, 2010 · 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 shelf holding a different category e.g. history, biography, art & photography…
The buttons that control the movement of the shelves automatically show/hide themselves based on the status of the uppermost shelf visible.
→ No CommentsTags:bookshelf·bookshelves·class·transition·tween
Improving the ImageManager class
March 2nd, 2010 · 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 event dispatcher. To accomplish this, the ButtonPressedEvent class is used.
The buttonEvent – dispatched by the instance of the ButtonPressedEvent class – is used to pass the current image’s id to a function that displays the title of the image.
The behavior of the previous and next arrows has been changed to indicate on which side of the image the mouse is on. When the mouse is on the right half of the image, the next arrow is at full brightness (alpha=1) while the previous arrow is transparent (alpha=0.3) and vice versa.
→ No CommentsTags:class·fly·image·loader·next·previous·transition
Using a fly transition to load images: the ImageManager class
February 25th, 2010 · AS3 Custom Classes
The ImageManager class displays a series of images with the transition from one image to the next actuated by a mouse click. Otherwise hidden next and previous arrows are displayed when the mouse is hovered over the image – clicking on the right half of the image navigates to the next image and clicking on the left half to the previous.
→ No CommentsTags:class·fly·image·loader·next·previous·transition
Saving XML to disk using ByteArray and FileReference
February 18th, 2010 · Tutorials
This post examines a method for saving a modified XML file to disk. To accomplish this task, the XML is first converted to binary data using byteArray – and then saving the byteArray to disk using fileReference.
Modifying XML files
February 16th, 2010 · Tutorials
In earlier posts, I discussed various methods to read XML data (here, here). In this post we’ll look at various means of modifying existing XML files.
→ No CommentsTags:appendchild·edit·insertchildafter·insertchildbefore·xml
Programming Conway’s Game of Life
February 1st, 2010 · AS3 Custom Classes, Apps
I first read about the study of self-replicating systems or Cellular Automata almost twenty years ago. The great mathematician John von Neumann studied the problem during the 1940’s while working at Los Alamos. In the 1970’s, another mathematician, John Conway devised the Game of Life, which was intended as a study of Cellular Automata, was then implemented on mainframes, at first, and then onto PC’s.
Generating random numbers with Math.random()
January 19th, 2010 · Tutorials
Last week I was working on a project that relied on generating random numbers. I went online to research the Math.random() function but could not find a single, definitive site explaining the many variations of the random function. I thought it might be of some value to consolidate the variety of forms I found.