Share Posted March 8, 2010 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 More sharing options...
Share Posted March 8, 2010 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 More sharing options...
Author Share Posted March 8, 2010 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 Link to comment Share on other sites More sharing options...
Share Posted March 8, 2010 Sorry, I don't understand your question. Could you restate it with more details or an example? Link to comment Share on other sites More sharing options...
Author Share Posted March 8, 2010 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 More sharing options...
Share Posted March 8, 2010 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. Link to comment Share on other sites More sharing options...
Author Share Posted March 8, 2010 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 More sharing options...
Share Posted March 8, 2010 Thought those were seconds :S Yep, they are seconds UNLESS useFrames is true Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now