FiftyOneReasons

Interactive Media Development + Exploration

Duplicate Display Object Bug & Workaround

Since AS3 dropped support for the much loved AS2 duplicateMovieClip, most of us have been relying on a method posted by Senocular. While this works for the vast majority of instances, there are scenerios in which player 9 and 10 will crash trying to duplicate the transorm property. We identified this bug with the Adobe team and it is slated to be fixed. The simplest solution is to disable the duplication of the transform property by commenting out the line as below. continued…

The Case for Standardized AS3 Formatting

I will admit it – I’m fickle. I can’t stand opening up a class I’ve downloaded from great developers and finding a drastically different code format/style then the one we employ here. Granted, ours is slightly unique, but we have our reasons.

So I’d like to start a collaborative effort to standardize AS3 code formatting, so no one as anal as I am has to spend half an hour reformatting classes just so you feel you can read it. continued…

A51 Inks Deal with Sandylion Sticker Designs

We are pleased to announce Sandylion Sticker Designs has contracted A51 to develop a new face for their public facing website and to develop a B2B extranet that will gradually move more and more of their business process online.

We’ve proposed an Adobe Flex based solution for the B2B to take advantage of all the built in components and graphing utilities and a PHP5 backend. Security and scalability are priorities and our proposed architecture provides a solid foundation for both.

Sandylion Sticker Designs is the world’s largest sticker company, with retail space in over 100,000 locations in 60 countries, and is also a leader in the scrapbooking and home decor markets.

Loading Flex Modules into MDIWindows

Here at A51 we are currently working on a Flex project that requires many external modules to be loaded into our application.  Once a module has been loaded it needs to be displayed in a MDIWindow.  The MDIWindow class is part of the FlexLib project.  Because we are loading so many different modules we handle the loading of the modules through Actionscript rather than using the <mx:ModuleLoader /> tag.  continued…

Iterating Through AS3 Class Properties

Recently, we ran into a situation while building an application in Flash to generate runtime code to be consumed by Flash itself. To make a long story short, we needed a way to iterate through all the properties of any given class – or more specifically, any built in component in Flex. To accomplish this, we stumbled upon a little known reference in the AS language API:

package
{
    import flash.display.Sprite;
    import flash.utils.describeType;
 
    public class IterateThroughClass
    {
        public function IterateThroughClass()
        {
            var child:Sprite = new Sprite();
            var description:XMLList = describeType(child)..variable;
 
            for(var i:int; i < description.length(); i++)
            {
                //trace the name and value
                trace(description[i].@name + ':' + child[description[i].@name]);
            }
        }
    }
}

A very handy utility indeed.