vendredi 19 février 2016

Actionscript 3 - How to stop rotation from changing movieclip's position

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:

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

Aucun commentaire:

Enregistrer un commentaire