Search code examples
actionscript-3flashactionscriptflash-buildergsap

why the starting mc rotates while bezier tween


i am using greensock bezier plugin tween. Hey i got another serious issue , now from the following pic you can see that the bezier path is set for the mc

Capture.png

and when you click tween the mc automatically turns upside down or anything based on the curve , like right now its around 180 degree and for a different curve the starting rotation is different , how can i find the first initial rotation so that i can reduce it and make it play from 0 rotation

Capture2.png

I hope you understand what i mean , i am trying to run the bezier where the initial rotation doesnt change , i know we can change the autorotate array for bezier but for that i need to know the initial rotation or tell me how can i make my mc not rotate and auto rotate along the same initial rotation along the path ?


Solution

  • If you want to know the initial rotation, why not just check it directly on your mc? Like set immediateRender:true on your tween and then check mc.rotation. Or grab a reference to the tween and alter its progress() to whatever you want and check the rotation at that point. Also, you can offset the rotation by any amount you want by setting autoRotate to that number of degrees. It's super flexible.