Hi people
Trying to play with XML but first with load that XML.
my code:
function loadxml(file)
{
var my_xml = new XML();
my_xml.onLoad = function(success)
{
if (success){
_root.bar._visible=false; // only for debug
}
}
my_xml.load(file);
this.onEnterFrame = function()
{
if (!this.target) return (0);
var loaded = target.getBytesLoaded();
var total = target.getBytesTotal();
var percent = Math.floor(loaded/total*100);
_root.infox.text = percent;
if (percent>=100)
{
_root.infox.text = "Done";
}
}
this.target = my_xml;
}
loadxml("list.xml")
with this code I can load and make the preloading perfect, but… how i show some error if list.xml not available?