Jump to content


AS2 TweenMax Pause/Resume

Recommended Posts

Hi all, I've searched and searched to no avail for help with my problem.  I need to be able to pause some animations while others continue to play.  And then resume them again when needed.


And this needs to be done with TweenMax (I cannot use TimelineMax).  And AS2.


Ideally, there would be an easy way to create a function that I pass the movieclip location & whether or not it should be paused.  Something sort of like this?

public function pauseMC (MC:MovieClip, State:Boolean):Void{
	if (State){
		MC.pause ();
		MC.resume ();

Thanks for any help!


Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,


Yeah, timelines and TimelineLite's exportRoot() method are the most convenient for controlling groups of tweens.


However, you can probably get by with TweenMax.getTweensOf(). It allows you to gather all tweens on a particular object of objects. 


So if you want to see what 3 objects / MovieClips are up to you can use

var tweensArray:Array = TweenMax.getTweensOf([mc1, mc2, mc3]);

That line of code will give you an array of all the tweens that you can then loop through to play() or pause() them. 

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.