Hi, assistance appreciated.
I am attempting to set the propreties of a navigation button (movie clip) that has been built dynamically. The button contains a text field that I want to format and a movie clip that I want to adjust the alpha. I find the object using getChildByName(), however do not seem to be able to set the properties using the code below.
These lines throw errors:
navObj.mainNav_txt.setTextFormat(buttonFormat);
navObj.smallSun_mc.alpha = 1;
Any help appreciated
Patrick
private function setNavState(e:Event):void {
if(xml) {
var navObj:DisplayObject = getChildByName(onNav);
var buttonFormat:TextFormat = new TextFormat();
buttonFormat.bold = true;
navObj.mainNav_txt.setTextFormat(buttonFormat);
navObj.smallSun_mc.alpha = 1;
stage.removeEventListener(Event.ENTER_FRAME, setNavState);
}
}