Hello, everyone. I’ve got a major problem that I’ve spent the last 1.5 hours trying to figure out without any luck. Here is the setup:
I have a main movie with a navigation that loads movies into itself into level 13. In these external movies, there are text boxes that have action script loading external XML into them. When tested by themselves (as in, not loaded into the main movie) the XML is loaded just fine into the text boxes, and everyone is happy.
Unfortunatly, that’s about as far as the happiness goes. When I play the main movie (the one doing all the external loading), the XML files don’t load into their respective boxes, and I receive this error:
Error opening URL file:///C|/Documents%20and%20Settings/mgriffit/Desktop/web/xml/home.xml
Not good, I know. This is really weird, because the XML works just fine in their own movies.
The file/folder structure is like this: web>assets>xml. All the movies are in the assets folder, calling XML from the xml folder. The main movie is in the web folder, loading movies from the assets folder. Believe me, it’s not how the folders are organized, because it works just fine when playing movies from the assets folder.
For anyone interested, here is the code that is doing all the loading of XML.
Function that loads movies into the main movie:
function loader(movie) {
unloadMovie(13);
blank = createEmptyMovieClip("home", 13);
blank.loadMovie(movie);
blank._x = 0;
blank._y = 0;
stop();
}
Here is the actual XML-loading code, in one of the sub movies:
menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function(success) {
if (success) {
menuItem = this.firstChild.childNodes;
for (var i = 0; i<menuItem.length; i++) {
item = _root.attachMovie("item", "item"+i*75, i);
item._x = 83;
item._y = (22*i)+160;
item.itemHover.itemText.text = menuItem*.attributes.id;
}
};
menuXml.load("xml/projects.xml");
That code works fine, and makes a row of buttons going vertically down the page.
Any help is very much appreciated. Let me know if there is something that you don’t understand. I really need help on this, and am about to kill myself over it…
// For those who didn’t read all of that: Basically, when I load a movie into a main movie, the XML in the sub movies won’t display, and I get the error above.
Again, thanks in advance for any help. Sorry for the novel