1

This is really frustrating me. Let's say I have a simple MovieClip called Container, inside Container I have other MovieClips like Rectangle, Circle and Triangle. Container has 2 single frames on which the nested MovieClips are placed differently.

So something like:

-Container  
    -frame 1:  
        - 1 Rectangle, 1 Circle, 1 Triangle  
    -frame 2:  
        - 2 Rectangle, 1 Circle, 2 Triangle  

Now the problem is that whenever I add this simple line "this.rotation = 0" on any of the 3 MovieClips (Rectangle, Circle or Triangle) their positions will weirdly move when I switch frames using gotoAndStop, nextFrame or prevFrame.

I have no idea why this is happening so can somebody please explain this behavior?

This is the fla and Document class files that I'm using as sample test:
Main.fla
Main.as

Coder
  • 106
  • 1
  • 7
  • 2
    You should add a unique “Instance name” for each MovieClip inside Container. – Daniil Subbotin Feb 20 '16 at 13:02
  • 1
    I agree with @subdan. Code should be like example `triangleB.rotation = 0;`. – VC.One Feb 20 '16 at 16:14
  • Oki I'm gonna try that now but the thing is that in my real project I have a lot more MovieClips inside Container so is that really the only solution? Because it would be really tedious, since I would have to give at least +30 instance :( – Coder Feb 20 '16 at 17:21
  • Okay so I just tried it and it works when giving each nested symbols on every frame its own instance name. Can someone tell me why it works I'm not sure why. That way I might be able to come up with something else that doesn't involve naming +30 nested symbols. – Coder Feb 20 '16 at 17:36
  • I don't know why it works. – Daniil Subbotin Feb 20 '16 at 20:03

0 Answers0