# Cant get XML to load

**URL:** <https://forum.kirupa.com/t/cant-get-xml-to-load/212592>\
**Category:** flash\
**Created:** [January 12, 2007, 11:48am UTC](https://forum.kirupa.com/t/cant-get-xml-to-load/212592 "2007-01-12T11:48:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rave\_t](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rave\_t](https://forum.kirupa.com/u/rave_t)\
**Post date:** [January 12, 2007, 11:48am UTC](https://forum.kirupa.com/t/cant-get-xml-to-load/212592/1 "2007-01-12T11:48:40Z")

</div>

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:

```auto
_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

```auto
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?
