Click to See Complete Forum and Search --> : Flash - Speeding up a yoyo-ing rotating class tween on rollover


jacobdesch
07-23-2008, 02:50 PM
Bascially, I have movie clip that is rotating, then reversing and looping with a Tween.yoyo(); command. It looks like this:
markOarTween = new Tween(this.boatMovie.mOarArm, "_rotation", easeOut, this.boatMovie.mOarArm._rotation, 100, 15, false);
markArmTween = new Tween(this.boatMovie.mOtherArm, "_rotation", easeOut, this.boatMovie.mOtherArm._rotation, 110, 15, false);
markOarTween.onMotionFinished = function() {
markOarTween.yoyo();
markArmTween.yoyo();
};
What I want to have is the ability to speed up the tween when I roll over it and have it return to its original speed when rolled out, all while still looping. I've tried using the .duration command, but when I do that it seems like if I roll over the movie while it is near the end of one of its rotation cycles, it throws it all out of whack and rotates it to a different angle (one outside of its normal range). I don't know why it would do this, though because I wouldn't thinking duration would be at all related to the rotation coordinates.....

I've even tried stopping the tween and dynamically changing the speed within the tween parameters and restarting the tween, but to no avail.

Does anyone have any suggestions on what I could to do accomplish this? Any help that anyone could provide would be much appreciated. Thanks in advance!