Avatar of Eaddy Barnes
Eaddy Barnes
Flag for United States of America

asked on 

how do i get loading progress status

the lines of code attached to this file import an xml file and then uses the some of the data to display an image in a UIloader component.

i would like to know how to retrieve the loading information such as total bytes loaded and total bytes.
so i would be able to display the loading status of the image.

var xml:XML;
var xmlList:XMLList;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("xmldata/gallery.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
function xmlLoaded(event:Event):void {
	xml = XML(event.target.data);
	xmlList = xml.children();
	trace("xml loaded");
	mainImage_comp.load(new URLRequest(xmlList[0].attribute("source")));

Open in new window

Adobe Flash

Avatar of undefined
Last Comment

8/22/2022 - Mon