Skip to main content
Participant
November 2, 2006
Question

Move an entire object including keyframes

  • November 2, 2006
  • 2 replies
  • 286 views
I have an instance of a movie clip which has three keyframes to it and is positioned off the stage. At the beginning of the scene I calculate the position for the clip and then move it onto the stage via the following code:

var block = _root.Shape1;
block._x = calculatedX;
block._y = calculatedY;

That's fairly simple but it only moves the first keyframe for the movie clip. All of the other keyframes work with the object at it's original position.

How can I move the object so that it applies to ALL of it's keyframes?
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
November 2, 2006
do you have code controlling the _x,_y properties of Shape1 in those other keyframes? if so, and they execute after the code you posted, they'll override the code you posted.
Participating Frequently
November 2, 2006
This doesn't sound right. When you move a movieclip (a single object) you move all elements in that movieclip. Can you post your FLA so we can take a look at it?

Tim