i have this code wich tween rotation of a mc.
import com.greensock.*
var myMC:MovieClip = new MovieClip();
myMC.graphics.beginFill(0x00ff00);
myMC.graphics.drawRect(0, 0, 400, 300);
myMC.graphics.endFill();
myMC.x = myMC.y = 00;
addChild(myMC);
var Flecha:flecha = new flecha;
addChild(Flecha);
Flecha.x = Flecha.y = 200;
var rotacion:int = 0;
myMC.addEventListener(MouseEvent.MOUSE_DOWN, drag);
function drag(e:MouseEvent){
myMC.startDrag();
}
myMC.addEventListener(MouseEvent.MOUSE_UP, drop);
function drop(e:MouseEvent){
myMC.stopDrag();
myMC.x = myMC.y = 00;
}
this.addEventListener(Event.ENTER_FRAME,myFunction);
function myFunction(event:Event) {
rotacion += myMC.x /60;
TweenMax.to(Flecha,5, {rotation:rotacion});
//Flecha.rotation += myMC.x/20;
trace(rotacion);
trace(rotacion + "cono")
}
when i don't use the tween it rotate fine but when using tween and pressing the mouse for a couple of seconds or doing a big rotation the tween enters in a loop.
any idea about this?