/ Published in: ActionScript 3

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().
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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); }
Comments
