A PHOTO

I’ve decided to start re-creating some of my favourite GUI elements from various sources in Flash.  As well as creating my own of course.  The first is the iPhoto Event Preview, where you move your cursor over the little pane from left to right to shuffle through the images contained within.  I wanted to show a video of this working, but I can’t seem to screen capture the Flash Player.

The class loads the assets from an XML you declare when creation an instance of it:

var pane:PreviewPane = new PreviewPane(RequiredSize, LocationofXML, CornerRounding);

for example:

var pane:PreviewPane = new PreviewPane(300, “myxml.xml”, 25);

Your assets will be loaded from tat XML and placed into the pane, automatically scaled and masked.  A MouseDown event is set up ready for whatever you wish to do with it.  This is the first iteration, and can only load images.  The next one will include video and SWF loaders as well as shadow and highlight effects (optional).

The class uses Greensock’s LoaderMax, taking full advantage of the XMLLoader and ImageLoader classes, and I wanted to thank Jack for his help getting this class written.

  1. fingerpuk posted this