I have a weird problem, and I don't know why this is happening.
I have a movieClip with the name of wellcomeMenu
. It is exported for AS with the name of WellcomeMenu
, and in the document class I do this:
public var _welcome:WellcomeMenu = new WellcomeMenu();
public function MainTest()
{
_welcome.x = stage.stageWidth * 0.5
_welcome.y = stage.y
addChild(_welcome);
}
All simple stuff. Then I go into the WellcomeMenu
movieClip and make a shape with the name Box
, then I make it a movieClip too, and give its Instance Name the name specialItem
.
To sum up: I dynamically call a wellcomeMenu
movieclip, which contains another movieClip with an instance name of specialItem
. Then I compile and get this error:
ReferenceError: Error #1056: Cannot create property specialItem on WellcomeMenu.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at WellcomeMenu()
at MainTest()
what am I doing wrong?
When I remove its instance name, it shows just fine, but I can't manipulate the movieclip within the WellcomeMenu
.