Return to Snippet

Revision: 10158
at December 10, 2008 11:46 by klunkatronic


Updated Code
private function loadContent(path:String, x:Number = 0, y:Number = 0):void
{
	var ldr:Loader = new Loader();	
	var url:String = path;
	var urlReq:URLRequest = new URLRequest(url);
	ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
	ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
	ldr.load(urlReq);
        ldr.x = x;
	ldr.y = y;
	addChild(ldr);
}

// callbacks 

private function onLoadComplete(e:Event):void
{
	
	
}

private function onLoadProgress(e:ProgressEvent):void
{
	var kbl:Number = e.bytesLoaded;
	var tkb:Number = e.bytesTotal;
	
}

Revision: 10157
at December 10, 2008 11:46 by klunkatronic


Updated Code
private function loadContent(path:String, x:Number = 0, y:Number = 0):void
{
	var ldr:Loader = new Loader();	
	var url:String = path;
	var urlReq:URLRequest = new URLRequest(url);
	ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
	ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
	ldr.load(urlReq);
	addChild(ldr);
}

// callbacks 

private function onLoadComplete(e:Event):void
{
	
	
}

private function onLoadProgress(e:ProgressEvent):void
{
	var kbl:Number = e.bytesLoaded;
	var tkb:Number = e.bytesTotal;
	
}

Revision: 10156
at December 10, 2008 11:43 by klunkatronic


Initial Code
private function loadContent(path:String):void
{
	var ldr:Loader = new Loader();	
	var url:String = path;
	var urlReq:URLRequest = new URLRequest(url);
	ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
	ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
	ldr.load(urlReq);
	addChild(ldr);
}

// callbacks 

private function onLoadComplete(e:Event):void
{
	
	
}

private function onLoadProgress(e:ProgressEvent):void
{
	var kbl:Number = e.bytesLoaded;
	var tkb:Number = e.bytesTotal;
	
}

Initial URL

                                

Initial Description

                                

Initial Title
External File Load Methods

Initial Tags
textmate

Initial Language
Other