Hi,
i have a MovieClip exported as CLangMenu:
i display it onto stage and i want to add next children to this MovieClip.
for that i have the following code:
var LgMenu:CLangMenu = new CLangMenu();
LgMenu.x = Lang.x;
LgMenu.y = Lang.y+Lang.height;
LgMenu.visible = false;
LgMenu.addEventListener(MouseEvent.MOUSE_OVER, DisplayLangMenu);
LgMenu.addEventListener(MouseEvent.MOUSE_OUT, HideLangMenu);
this.addChild(LgMenu);
var Lg1:CustomButton = new CustomButton(this.Display(lg,'Lg_English'));
Lg1.x = LgMenu.x + 10;
Lg1.y = LgMenu.y + 10;
Lg1.SetOverSound(CClickSound);
Lg1.SetTextFormatOver(myFont,10,0xFAC81E,true);
Lg1.SetTextFormatOut(myFont,10,0x5078B4,true);
LgMenu.addChild(Lg1);
i’ve tested Lg1 by just changing LgMenu.addchild(Lg1) to this.addchild(Lg1) and it works correctly.
so why LgMenu.addchild(Lg1) does not add Lg1 (extended sprite) to movieclip LgMenu ?
thanks a lot,
A.