Hey guys, I’ve been playing around with some Tween codes and stuck with an action i want to do but not sure how to do it.
I’m trying to find a function that will repeat my Rotational tween function. I found the yoyo() function to be what i want to do but i don’t want the tween to change the rotation to CCW while originally moving CW. Basically i want the animation to move CW at a steady rate continuously.
I’m using the following code at the moment, i’m not too sure if this is the most suitable code for this situation, maybe im off track.
From my thoughts, i assumed that i would need to put the stars function in a onEnterFrame to repeat the animation and change yoyo() to continueTo() function. or maybe some sort of if statement in the stars function?
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0000FF]import[/COLOR] mx.[COLOR=#000080]transitions[/COLOR].[COLOR=#000080]Tween[/COLOR];
[COLOR=#0000FF]import[/COLOR] mx.[COLOR=#000080]transitions[/COLOR].[COLOR=#000080]easing[/COLOR].*;
[COLOR=#000000]var[/COLOR] stars:Tween = [COLOR=#000000]new[/COLOR] Tween[COLOR=#000000]([/COLOR]ring, [COLOR=#FF0000]"_rotation"[/COLOR], Regular.[COLOR=#000080]easeInOut[/COLOR], [COLOR=#000080]0[/COLOR], [COLOR=#000080]360[/COLOR], [COLOR=#000080]4[/COLOR], [COLOR=#000000]true[/COLOR][COLOR=#000000])[/COLOR];
stars.[COLOR=#000080]onMotionFinished[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]this[/COLOR].[COLOR=#000080]yoyo[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR];
[/LEFT]
[/FONT]
Any help will be great!