Help - Search - Members - Calendar
Full Version: Nested Movie clips
Pixel2Life Forum > Help Section > Adobe Flash
kylamon1
Hey I have a problem...I have a series of nested movie clips and I am having trouble accessing some of the frames through AS3.

My case:

on the stage i have a movie 'n1'.
in 'n1' on frame 1 is a textbox, on frame 2 is another movie clip 'myShapes'.
in myShapes is 4 frames of random shapes..triangle, square, circle, etc.

n1:frame 1=text, frame 2=myShapes
myShapes:frame 1=square, frame 2=circle,...

I am having trouble with AS3 playing anything from the 'myShapes' movie clip.

Here is some of the basic code:

n1.gotoAndStop(2);//because frame 1 'myShapes' does not exist.
n1.myShapes.gotoAndStop(2);<--this is the line of code that AS3 doesnt like. I get the "Error #1009: Cannot access a property or method of a null object reference."

I want to be able to call forth any of those random shapes from the 'myShapes' mc.


Could anyone tell me how this could be fixed?
Thanks
austen
if you upload your flash file i could help you faster, otherwise it sounds like you didn't define an instance name for the myShapes instance on the stage.

-austen victory.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.