Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
BladePoint

Event when TweenMax plays the next frame of a MovieClip?

Recommended Posts

My Flash runs at 60 fps and I have a MovieClip that is 10 frames long. I'm using TweenMax to play it over 10 seconds.

TweenMax.to(mc1,10,{frame:10});

I would like to call a function every time TweenMax advances to the next frame of the MovieClip. If I use onUpdate, the function gets called 60 times a second instead of being called 1 time per frame. Adding an Event.ENTER_FRAME listener to mc1 calls the callback 60 times a second as well instead of each time the MovieClip advances to the next frame. Is there a way to do this with TweenMax?

 

I'm trying to play two MovieClips synchronized. Using onUpdate with gotoAndStop works, but it gets called way more often than it needs to be.

Link to comment
Share on other sites

Sorry, there isn't an event that fires when the frame plugin changes frames.

You could use an onUpdate to track the current frame and see if it changed since the last update.

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