Return to Snippet

Revision: 37304
at December 8, 2010 06:04 by adamcoulombe


Initial Code
import com.greensock.*;
import com.greensock.loading.*;
import com.greensock.events.LoaderEvent;
 
var queue:LoaderMax = new LoaderMax({name:"mainQueue", onComplete: onQueueComplete /*,onProgress:progressHandler */ });
queue.append( new XMLLoader("site.xml", {name:"siteXml", onComplete: onXMLReady }) );
queue.load();


function onXMLReady(e:LoaderEvent):void {

	var self = e.currentTarget.content;
	for(var i in self.myNode){
		var nodeContent = self.myNode[i];
		trace(nodeContent);
		
		// queue.append( new SWFLoader(self.myNode[i].@swf, {onComplete: onSWFLoaded }) );
		
	}
	
}

function onQueueComplete(e:LoaderEvent):void {
	trace("Loading Queue is Complete");
}
 
/*
function progressHandler(event:LoaderEvent):void {
    trace("progress: " + event.target.progress);
}
*/

Initial URL

                                

Initial Description

                                

Initial Title
Basic LoaderMax XML Loading setup

Initial Tags

                                

Initial Language
ActionScript 3