I remember reading one time that you can play frames backwards. I have this ball going along this line, and when it reaches the end I want it to go back exactly the same. Isnt there some kinda code to play the frames backwards? Thanks
Also, the line is curved, so I cant just move it straight across real easy like. I had to do a lot of tweening.
Thanks
Yeah, there was a whole fun thread on that.
i cant get it it to work. Do I have to put this code on any frame in the MC? Or do I have to put it on a certain spot? I was using this one since I understand it the best… by lostinbeta
_root.onEnterFrame = function() {
if (this._currentframe == 1) {
playMe = true;
}
if (this._currentframe == this._totalframes) {
playMe = false;
}
if (playMe == true) {
this.nextFrame();
}
if (playMe == false) {
this.prevFrame();
}
};
For that one you need Flash MX and it needs to go in the first frame of your animation.
If you use Flash 5, the script in the first post is what you will need to use.
That goes on a movie clip… and inside the movie clip is your animation.
Argh, it wont work. Right now I have a MC called BallMovement. In that MC on the first frame is where I put the code. Now then I take that MC and place it inside another MC. Will that effect it since it is inside another MC?
Try changing _root.onEnterFrame to this.onEnterFrame.
Any luck?
that fixed it. Thank you.
One more thing though. I just want this certain MC to replay. With this code, it is replaying my whole animation. Any way to make it only work for this MC?
OK, lostinbeta, back to work you go.
But the code in the timeline of the movie clip you want to play back and forth.
Or maybe try using _parent instead of “this” for all of the “this” locators in the script.
It is kinda hard to diagnose without an fla. If this doesn’t work can you post one?