Skip to main content
Participating Frequently
May 22, 2008
Answered

Making _rotate rotate smoothly

  • May 22, 2008
  • 1 reply
  • 399 views
I have this script:

on (release) {
mc1._rotation -=90;
}

it rotates the movieclip 1, but I want it to rotate smoothly (accelerate and then brake).

How can it be changed?

Rgds
This topic has been closed for replies.
Correct answer Newsgroup_User
Use a tweening class. You could even use an interval, but a class like
Tweener would work better. I use Tweener ( http://code.google.com/p/tweener/)
so using it you'd just do:

import caurina.transitions.Tweener;

on(release){
Tweener.addTween(mc1, {_rotation:-90, time:2});
}

--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


1 reply

Newsgroup_UserCorrect answer
Inspiring
May 22, 2008
Use a tweening class. You could even use an interval, but a class like
Tweener would work better. I use Tweener ( http://code.google.com/p/tweener/)
so using it you'd just do:

import caurina.transitions.Tweener;

on(release){
Tweener.addTween(mc1, {_rotation:-90, time:2});
}

--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


Participating Frequently
May 22, 2008
Thanks. I'll give it a try.
Participating Frequently
May 22, 2008
I tried:

import caurina.transitions.Tweener;

on(release){
Tweener.addTween(mc1, {_rotation:-90, time:2});
}

It did import the package but the button is not working.

on (release) {
mc1._rotation -=90;
}

was OK.

What is the difference?