Revision: 5104
Updated Code
at February 22, 2008 02:15 by chrisaiv
Updated Code
var assetLoader:URLLoader = new URLLoader(); assetLoader.addEventListener(ProgressEvent.PROGRESS, progressHandler); assetLoader.addEventListener(Event.COMPLETE, completeHandler); function progressHandler(e:Event):void { trace(e.currentTarget.bytesLoaded + " / " + e.currentTarget.bytesTotal); } function completeHandler(e:Event):void { trace("completeHandler:" + e.currentTarget + " :: " + e.currentTarget.dataFormat + " :: " + e.currentTarget.data); }
Revision: 5103
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 11, 2008 17:46 by chrisaiv
Initial Code
var assetLoader:URLLoader = new URLLoader(); assetLoader.addEventListener(ProgressEvent.PROGRESS, progressHandler); assetLoader.addEventListener(Event.COMPLETE, completeHandler); function progressHandler(e:Event):void { trace(e.currentTarget.bytesLoaded + " / " + e.currentTarget.bytesTotal); } function completeHandler(e:Event):void { trace(e.currentTarget.data); }
Initial URL
Initial Description
URLLoader is not the same as Loader. It is meant to load text, html, sound, xml, and swf content. If you want to load an image, use Loader().
Initial Title
AS3: Using URLLoader for Text and XML
Initial Tags
Initial Language
ActionScript 3