I have a 10 frame movieClip which I can put on the timeline in a new movie like this:
var impPanel:MovieClip = new ImpPanel();
addChild(impPanel);
var btn:SimpleButton = new TBtn();
btn.addEventListener(MouseEvent.MOUSE_UP, setFrame);
addChild(btn);
function setFrame(myFrame:String):void {
myFrame = "i4";
impPanel.goto(myFrame);
}
the impPanel clip contains the function:
function goto(val:String):void{
gotoAndStop(val);
hideStuff();
}
so sending the variable myFrame to impPanel changes the frame in the clip and hides some subclips. This all works fine.
However if I do the same thing in a more populated FLA (impPanel is one of 6 objects on the stage), I get the following: 1120: Access of undefined property impPanel..
Any idea why this should be happening?