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” 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.
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”. 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