I had the code working with the attribute, now I am trying to get it to work with a tag. I would really appreciate some help, supposed to go live tomorrow
Thanks Mark
Here is a simple version of my xml and my button AS3
PHP Code:
<node title="ABOUT">
<picture>
<menu_label><![CDATA[ABOUT | <font color="#0073B2">SPANISH</FONT>]]></menu_label>
<thumb>1.jpg</thumb>
<img>img/images/USBank/About.swf</img>
<desc_label>DESCRIPTION:</desc_label>
<desc><![CDATA[ some formatted stuff ]]> </desc>
</picture>
</node>
here is the code that sets up the menu buttons
the commented out line is the one that successfully fed the node TITLE to the button.
Now I would like to feed it <menu_label>so I can use CDATA.
Do I need to have menu label defined in every <picture>?
I can not get it to appear, my buttons are blank
here is the AS3 code
PHP Code:
private function initButtonsLeft():void {//we attach all buttons from left and give them actions for roll over, out and press
for (var j:int = 0; j < xml.node.length(); j++) {
var but:btn = new btn();//btn is the movieclip from library, attached auto
but.y = j * (but.height);
menu_container.addChild(but);
but.buttonMode = true;
but.txt_mc.txt.selectable = false;
but.mouseChildren = false;
//var txtName:String = xml.node[j].@title;//title assigned from xml
var txtName:String = xml.node.picture.menu_label//my attempt
but.txt_mc.txt.htmlText = txtName.toUpperCase();
but.id = j;
but.addEventListener(MouseEvent.ROLL_OVER, overBtn);
but.addEventListener(MouseEvent.ROLL_OUT, outBtn);
but.addEventListener(MouseEvent.CLICK, clickBtn);
}
initThumbs(1);//first gallery initialized
}