PDA

View Full Version : problem with an addChild item!?!



anix
August 11th, 2008, 12:16 PM
hi all i am having a minor issue with a child that i am trying to add to a movieclip on the stage the movielip is the basic menu and colours and im trying to add the menu txt and set it to the right position however i keep getting an error and i cant spotwhy and its doing my head in the rror says:

TypeError: Error #1010: A term is undefined and has no properties.

i have found the 2 lines of code that are causing the issue and they are highlighted in red below and i hope someone can help me with this. thanks.


var navTxt:MovieClip = new MenuText();

menuHolder.x = 0;
menuHolder.y = 595;
menuHolder.width = stage.stageWidth;
menuHolder.height = stage.stageHeight / 2.5;
menuHolder.addChild(navTxt);
menuHolder.navTxt.x = menuHolder.width / 2;
menuHolder.navTxt.y = 30;

REEFˇ
August 11th, 2008, 12:27 PM
You can type something as a MovieClip and then render it as a new MenuText :h:?

anix
August 11th, 2008, 12:39 PM
its ok i have solved it now thanks anyway!