Jump to content


Photo

Nested Movie clips


  • Please log in to reply
1 reply to this topic

#1 kylamon1

kylamon1

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 09 December 2008 - 10:46 PM

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

#2 austen

austen

    P2L Jedi

  • Members
  • PipPipPip
  • 910 posts
  • Location:Montana, US
  • Interests:Web design, snowboarding (lots of it), Computer science related.

Posted 14 January 2009 - 05:56 PM

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 :rolleyes:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users