hi,
anyone know any tween engine which can spin a movieclip multiple times.
I found “rotation” in many tween engines. but it can’t be used to spin a movieclip for 6-7 times.
If I added rotation angle more than 360. it rotates 360 in one direction and then reset and then again rotate 360.
anyone know about such engine?
thank in advance.
All a tween engine does is take the properties of an object and then tween the values of those properties to new values. So it’s not the tween engines fault that it isn’t working.
If you rotate something to, lets say, 720, and afterwards trace its rotation, what does it say?
- Author was Featured
- Sold between 50 000 and 100 000 dollars
- Author had a Free File of the Month
- Bought between 1 and 9 items
- Exclusive Author
- Europe
- Has been a member for 3-4 years
- Referred between 10 and 49 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
When you pass 360 reset rotation to 0 before applying new one.
How about
TweenMax.to(movieClip, 1, {rotation:360, repeat:6 }); (assuming it starts at 0)
,but I didn’t test it
var obj:Object={rotation:0}
Twee....to(obj, 4, {rotation:360*6,onUpdate:update,.....});
function update(){
mc.rotation=obj.rotation
}
...
.
.
or
class superRotationClip extends MovieClip{
private var _rotation_=0
public function get __rotation(){
return _rotation_
}
public function set __rotation(_r){
_rotation_=_r
rotation=_rotation_
}
}
TweenMax.to(movieClip, 4, {__rotation:360*6});
Something like this
var speed:Number = 5.0;
var amountOfLoops:int = 7;
var t:Number = 0.0;
// update loop
someObject.rotation = t+=speed;
if(t>amountOfLoops*360)
// stop looping
Or maybe Tweener can do it like this
Tweener.addTween(someObject,{rotation:amountOfLoops*360,time:amountOfLoops*speed});
