Hi!
Im building a flash menu who get its content from a xml fil. In my
final steps i got this problem with adding the [color=SandyBrown][color=Black]picHref[/color] [/color]variable to my
button.
Is it enyone out there who knows how i could do this?
[indent]function loadNodes (menu_xml) {
var node = menu_xml.firstChild.childNodes;
for (i=0; i < node.length; i++) {
var picTxt = node*.attributes.picTxt;
var picUrl = node*.attributes.picUrl;
[color=SandyBrown]var picHref = node*.attributes.picHref;[/color]
//trace (i);
//trace (picTxt);
//trace (picUrl);
//trace (picHref);
var menu = this.attachMovie ('holder', 'holder'+i, i);
menu.btn_txt.text = picTxt;
menu.mask.picture.loadMovie (picUrl);
menu._x = i * (menu._width + 1);
[color=SandyBrown] menu.btn_mc.onRelease = function () {
getURL (this.picHref, '_self');
[color=Black]trace (this.picHref);[/color]
}[/color]
}
}
var menu_xml = new XML ();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function (success) {
if (success) {
loadNodes (this);
} else {
trace ('hmmm.. can^t find xml');
}
}
menu_xml.load('menu_xml.xml');
ps!! sorry for my short description. but my english is extremley bad…
tanx.
Philip
[/indent]