Hi, I need to reference an array created in doc class that consists of Navigation Movie Clip objects.
When the mouse over happens on one of those Nav Objects, I need to reference the array that I created in Doc Class.
Doc Class Code:
var newPageNav:NavButton = new NavButton(sId,sTitle,sStatus);
menuItems.push(newPageNav);
addChild(newPageNav);
Now I need to remove them from the stage:
So when the NavButton is clicked I need to go back through that array and remove items from the stage. But when I call a function from the NavButton:
public function onButtonClick(e:MouseEvent):void
{
removeSlide();
}
the function that lives in the DocClass, removeSlide()
public function removeSlide():void {
trace(menuItems.length.toString());
}
trace returns 0, saying the array doesn’t exist.
Logically I understand that I am inside a NavButton class that has a handler, so even when I call removeSlide function at the Doc Class, I am still inside Nav Button Class.
So how do I get access to that array so I can remove elements from the stage.
Thank you very much for your time.
-d.