Access button inside of movieclip?
I'm sure this has been asked and answered plenty of times, but I've been searching off and on for days and haven't found a solution that works.
I have a movieclip that loads inside of a scrollpane when the flash document is published. Inside of that movieclip are buttons that I want to control the main timeline. Here is the code that I am using for this:
PipeStr_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopFromFrame);
function fl_ClickToGoToAndStopFromFrame(event:MouseEvent):void
{
myContent(root).gotoAndStop("PiperStretcher");
}
However, when I go to test everything, I get this error:
"
| Scene 1, Layer 'Actions', Frame 1, Line 17 | 1120: Access of undefined property PipeStr_btn. |
So I'm not sure how to proceed. I thought about adding the code to the movieclip itself in an actionscript layer, but that's what you would do in AS2. I like how in AS3, you just have the one layer of actions that control everything. However, if I need to add AS inside my movieclip, I will. I'm just not sure what is going on here. I've been trying different things for days and nothing is working.
