# AS2 dynamic blog - xml - minor problem

**URL:** <https://forum.kirupa.com/t/as2-dynamic-blog-xml-minor-problem/232460>\
**Category:** flash\
**Created:** [July 13, 2007, 10:33pm UTC](https://forum.kirupa.com/t/as2-dynamic-blog-xml-minor-problem/232460 "2007-07-13T22:33:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrizzle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chrizzle](https://forum.kirupa.com/u/chrizzle)\
**Post date:** [July 13, 2007, 10:33pm UTC](https://forum.kirupa.com/t/as2-dynamic-blog-xml-minor-problem/232460/1 "2007-07-13T22:33:24Z")

</div>

Hi Folks

I am having a weird issue. For the most part my process is working fine. I am using a text field in flash to dynamically load an xml file for my blog. The feed/xml technically exists online, but for local testing, as well as remotely, I download the actual xml file for testing.

With the actual blog.xml in my local folder or on my server, the xml loads fine. But when i go to publish my movie, i change in the actionscript… “blog.xml” to “[http://www.domain.com/blog.xml](http://www.domain.com/blog.xml)” i get an error that screws everything up - “a script trying to run is slowing down the flash movie” or something like that. If i say YES cancel the error, my script doesnt load and the movie runs whack after that. If i say NO keep loading script, it eternally repeats the error.

Here is my AS in case anyone has a chance to have a look.

```auto
blog = new XML();
blog.ignoreWhite = true;
blog.onLoad = convertXML;
//
blog.load("blog.xml");
commentNode = new Array();
//the xml function
function convertXML() {
	if (this.loaded) {
		trace("RSS feed loaded");
	}
	// **NOW THE REAL TAGS**
	channelTag = new XML();
	itemTag = new XML();
	titleTag = new XML();
	descTag = new XML();
	// **START ASSIGNING NODES**
	ttlIgnore = this.firstChild.firstChild.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling;
	channelTag = this.firstChild.firstChild.childNodes;
	//remove 6 from channelTag.length to ignore the
	//rss description tags before the first ITEM tag
	for (i = 0; i <= channelTag.length - 6; i++) {
		//start getting content of ITEM tag
		itemTag = ttlIgnore.nextSibling;
		titleTag = itemTag.firstChild;
		descTag = titleTag.nextSibling;
		//now define the parts of the post
		//get the title
		title = "<b>" + titleTag.firstChild.nodeValue + "</b><br />";
		//get the blog content
		blog = descTag.firstChild.nodeValue;
		finalblog = title + blog;
		blogfield.htmlText += finalblog;
		itemTag.removeNode();
	}
}

```

So again, where “blog.xml” is at top, to load, the final code would be replacing “blog.xml” with “[http://www.domain/blog.xml](http://www.domain/blog.xml)”. When using “blog.xml”, works fine. When using the actual URL is gets error. BY THE WAY, the url i am linking to is NOT on my domain.

thanks
