By Aaron Benson - GalleryCMS

© 2010 - GalleryCMS, All rights reserved.
License: MIT

This content requires Adobe Flash Player 9

Download Adobe Flash

PureGallery is a Flash/AS3 image gallery that uses GalleryCMS as the backend. A static XML file is provided if you do not intend on using GalleryCMS.

Loading PureGallery into your web page:

Edit the line of JavaScript to link to the XML output URL in your GalleryCMS installation, or to your own static XML file.

Be sure that your Flash gallery and your CMS installation both reside on the same server, or you will receive a security sandbox violation.

var flashvars = { dataPath: "/gallerycms/index.php/view/xml" };


var flashvars = { dataPath: "assets/xml/gallery.xml" };

Loading PureGallery as a SWF in your application:

Pure Gallery also supports being loaded as a SWF. View fla/loading_as_a_swf.fla to see how this is done. Inside it contains all the code for you to do this.

	var file:String = "PureGallery.swf";
	var loader:Loader = new Loader();
	var urlRequest:URLRequest = new URLRequest( file );
	loader.contentLoaderInfo.addEventListener( Event.INIT, _onInit );
	loader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, _onIOError );
	loader.load( urlRequest );

	function _onInit( e:Event ):void
		this.addChild( LoaderInfo( e.currentTarget ).loader );
		// You can change this to be the path to your gallerycms installation directory
		Object( loader.content ).dataPath = "assets/xml/gallery.xml";
		loader.contentLoaderInfo.removeEventListener( Event.INIT, _onInit );
		loader.contentLoaderInfo.removeEventListener( IOErrorEvent.IO_ERROR, _onIOError );
	function _onIOError( e:IOErrorEvent ):void
		trace( "Cannot load " + file );