1573 posts
  • 7 Years of Membership
  • Affiliate Level 1
  • Author Level 2
  • Collector Level 2
+2 more
rahulbist
says

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.

1955 posts
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 4
  • Collector Level 2
+3 more
Emroni
says

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?

1689 posts Envato Elite Author
  • Affiliate Level 2
  • Author Level 8
  • Collector Level 1
  • Top Monthly Author
+8 more
Tean
says

When you pass 360 reset rotation to 0 before applying new one.

1955 posts
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 4
  • Collector Level 2
+3 more
Emroni
says

How about

TweenMax.to(movieClip, 1, {rotation:360, repeat:6 }); 
(assuming it starts at 0)

1163 posts
  • Affiliate Level 2
  • Author Level 6
  • Collector Level 3
  • Top Monthly Author
+6 more
FlashTang
says
I have an idea :) ,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}); 
31 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 4
  • Collector Level 2
+4 more
SMeesters
says

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});
by
by
by
by
by
by