Jump to content
Search Community

Speed Up Animation

Maggical test
Moderator Tag

Recommended Posts

Hi there, I have an animated movieclip with 32 frames (animated using frame animation, not a tween), it loops as a normal movieclip according to the frameRate of the .fla

 

I wanted to accelerate this movieclip's animation on rollOver and thought a tween would be a good idea, any recommended way to do it instead of a tween + onComplete callback to start over?

 

Thanks,

 

Javier

Link to comment
Share on other sites

So it repeats? Maybe try something like this:

 

var myTween:TweenMax = new TweenMax(mc, 31, {frame:32, repeat:-1, useFrames:true});
function rollOver(event:MouseEvent):void {
   myTween.timeScale = 2;
}
function rollOut(event:MouseEvent):void {
   myTween.timeScale = 1;
}

Link to comment
Share on other sites

I added this:

 

var myTween:TweenMax = new TweenMax(line_mc, 1, {frame:32, repeat:-1, useFrames:true});

 

And the animation does not start, I tried adding this line:

 

myTween.play();

 

And also:

 

myTween.resume();

 

And nothing happens... Any ideas? From here I can start testing the other things...

Link to comment
Share on other sites

It's because you defined your duration as 1. That means it literally took one frame to complete the tween (since useFrames:true was in your vars object). My code indicated you should use a duration of 31, not 1.

 

Thought those were seconds :S

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...