Jump to content
Search Community

Speed Up Animation

Maggical
Moderator Tag

Recommended Posts

Posted

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

Posted

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

Posted

And how can I use a new Tween in a package? I have several functions that need to trigger the use of the Tween and the scoops are different :S

Posted

Sorry, I don't understand your question. Could you restate it with more details or an example?

Posted

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...

Posted

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.

Posted
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

Posted
Thought those were seconds :S

 

Yep, they are seconds UNLESS useFrames is true :)

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...