Hi i got this swf file on my site that will load xml data to a textbox. But i cant get the data to load. Im using Flash Professional 8.
This is the code:
_root.text_mc.swiftText = "loading..";
var my_xml = new XML();
my_xml.ignoreWhite = true;
preloadbar_mc.target = my_xml;
my_xml.load("logotext.xml");
preloadbar_mc.onEnterFrame = function() {
if (!this.target) {
return (0);
}
var loaded = my_xml.getBytesLoaded();
var total = my_xml.getBytesTotal();
var scale = 0;
if (loaded && total) {
var percent = loaded/total;
scale = 100*percent;
}
this._xscale = scale;
};
my_xml.onLoad = function(success) {
if (success) {
//_root.inventor = my_xml.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
//_root.text_mc.swiftText = _root.inventor;
_root.text_mc.swiftText = "done";
}
};
The xml file and the swf is in the same folder. So it will find it. The problem is i never reach the
my_xml.onLoad = function(success) {
if (success) {
//_root.inventor = my_xml.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
//_root.text_mc.swiftText = _root.inventor;
_root.text_mc.swiftText = "done";
}
“Succes” -state. When i run it from within Flash everything works fine, but when i try it from my site i never get to “succes”-state.
Any ideas?