Custom XML loader class

XMLLoaderEvent.as

/**
 * XMLLoaderEvent
 * Description: events sent by the XMLLoader
 */
package
{
 import flash.events.Event;

 public class XMLLoaderEvent extends Event
 {
 public static const XML_PROGRESS:String  = "XML_PROGRESS";
 public static const XML_COMPLETE:String  = "XML_COMPLETE";

 public var _data:*;

 public function XMLLoaderEvent($type:String, $data:* ,$bubbles:Boolean = false, $cancelable:Boolean = false )
 {
 super($type ,$bubbles, $cancelable);

 _data = $data;
 }

 override public function clone():Event
 {
 return new XMLLoaderEvent (type, bubbles, cancelable, _data);
 }

 }
}


XMLLoader.as


/**
 * XMLLoader
 * Description: xml loader
 */
package
{
 import flash.net.URLLoader;
 import flash.net.URLRequest;
 import flash.events.ProgressEvent;
 import flash.events.Event;
 import flash.events.EventDispatcher;

 import XMLLoaderEvent;

 public class XMLLoader extends EventDispatcher
 {
 protected var _loader:URLLoader = null;    // loader for the xml

 /** load the xml **/
 public function Load($path:String)
 {
 _loader = new URLLoader();
 _loader.load(new URLRequest($path));
 _loader.addEventListener(ProgressEvent.PROGRESS, XMLLoading, false, 0, true);
 _loader.addEventListener(Event.COMPLETE,         XMLComplete, false, 0, true);
 }

 /** xml loaded**/
 private function XMLComplete($e:Event):void
 {
 dispatchEvent(new XMLLoaderEvent(XMLLoaderEvent.XML_COMPLETE, _loader));
 }
 /** xml is loaded **/
 private function XMLLoading($e:ProgressEvent):void
 {
 dispatchEvent(new XMLLoaderEvent(XMLLoaderEvent.XML_PROGRESS,($e.bytesLoaded/$e.bytesTotal)));
 }
 /** destroy this **/
 public function Clear():void
 {
 _loader.removeEventListener(ProgressEvent.PROGRESS, XMLLoading);
 _loader.removeEventListener(Event.COMPLETE,         XMLComplete);
 _loader = null;
 }
 }
}

 

HOW TO USE IT:


var _xmlLoader:XMLLoader = new XMLLoader();
_xmlLoader.Load("test.xml");
_xmlLoader.addEventListener(XMLLoaderEvent.XML_COMPLETE, Complete, false, 0, true);
_xmlLoader.addEventListener(XMLLoaderEvent.XML_PROGRESS, Progress, false, 0, true);
function Complete($e:XMLLoaderEvent):void
{
 trace ($e._data.data)
}

function Progress($e:XMLLoaderEvent):void
{
//loading
}

Dynamic Resizable Grid Media Gallery

Dynamic Resizable Grid Media Gallery

Dynamic Resizable Grid Media Gallery

This Browser Media Gallery is the best solution for your portfolio or just your cool work.
It’s a fullyDynamic Resizable Grid Media Gallery that supports both photos, video files (flv, mov or any other h.264 format etc.) and YouTube videos.

No flash knowledge is required, everything is set through an XML file.

Key Features

XML driven content making it easy to customize, update and maintain
Flashvars support for the location of the configuration XML file.
Auto resizing grid ( the gird will fit your browser dimensions )
Advanced video player ( flv, mov or any other h.264 format & Youtube videos )

THREE modes to display the gallery: grid / mosaic / carousel

Unlimited number of galleries supported.
– Every gallery supports unlimited number of photos / videos
Pan and zoom large items images ( automatically )
Description supports HTML formatted text

————————————————————–

See the component in action here

You can buy it at full price from that site
or
message me at cilibiu_dragos@yahoo.com for a half of it’s price

 

XML Image / Photo Gallery With Resizable Grid

XML Image / Photo Gallery With Resizable Grid

XML Image / Photo Gallery With Resizable Grid

Browser based Resizable grid based imagephoto gallery with categories perfect for both experienced or casual photographers and artists.
No Flash knowledge required for setting up the gallery.
Everything is set from an external XML file making it easy to update and maintain.

Key Features:

– XML driven content making it easy to customize, update and maintain
– FlashVars support ( for the setup Xml )
– Unlimited number of categories
– Unlimited number of images / photos
– Advanced grid positioning ( with 3 effects )
– The entire color theme can be changed
– HTML formatting for description
– Zooming & panning on large images
– Fullscreen
– Ambient music
– OOP code.

————————————————————–

See the component in action here

You can buy it at full price from that site
or
message me at cilibiu_dragos@yahoo.com for a half of it’s price