Hello everyone. I used the search engine to look for answers but, despite i found some closer results, none of them helped me, so this is my last resort: to bother you people.
Ok, so here are the facts:
I have few buttons generated via XML, and the idea its that when the user click them, an external swf load into a placeholder. The path to the swf is on the XML file, but i cant get it to work. The path works, but within the onMouseDown function it doesnt. Thats it.
By the way, someone knows a better way to load a swf? a movieClipLoader perhaps? (I tried it on the function and didnt work)
Thanks in advance
Forgot to say, its AS 2.0
function menuBuild() {
var Root = this.firstChild;
var Item = Root.childNodes;
for (var i = 0; i<Item.length; i++) {
var currItem = Item*;
var currButton = attachMovie("menuBTN", "menuBTN"+i, 1+i);
currButton._x = 9.0;
currButton._y = 94+(30*i);
currButton.btnName.text = currItem.attributes.Title;
var urlPath = currItem.attributes.Path
trace (currItem.attributes.Path)
currButton.onMouseDown = function() {
holder.loadMovie(urlPath);
trace (currItem.attributes.Path)
};
}
}
var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = menuBuild;
xmlData.load("List.xml");
(in this case, currItem.attributes.Path, where Path, on the XML, is item1.swf, as a string)