Jump to content
Search Community

pause/resume with TweenLite and TweenMax v10

kcos test
Moderator Tag

Recommended Posts

Hi

I am working on an AS3 slideshow developed with TweenLite10

I need to be able to pause/resume the slideshow

 

Is there an example/tutorial explaining how to add TweenMax10 pause() / resume() functionality to a project?

 

Thanks

Link to comment
Share on other sites

I haven't used v10 in ages. but from glancing at the TweenMax.as "key methods", I would suggest you use:

 

 

TweenMax.pauseAll(true, true)

TweenMax.resumeAll(true, true)

 

please keep in mind that there isn't any way that we can really diagnose how to make your project pause and resume. if the project uses Timers or setIntervals for delays, the TweenMax commands won't have any control over those.

Link to comment
Share on other sites

The project calls:TweenLite.to() and uses a Timer

The code below works!

 

 

function pause():void{
_delayTimer.stop();
_delayTimer.removeEventListener(TimerEvent.TIMER, durationExpired);
TweenMax.pauseAll(true, true);
}

function resume():void{
TweenMax.resumeAll(true, true)
_delayTimer.delay = getImageDuration(_currViewer.image);
_delayTimer.addEventListener(TimerEvent.TIMER, durationExpired, false, 0, true);
_delayTimer.start();
}

Link to comment
Share on other sites

I have a follow up question.

While the slideshow is paused, the user can select a new slide from the thumbnails.

When the slideshow is resumed, will it start at the paused point or the new selected slide?

ie. Does TweenMax know that the slideshow has moved while it is paused?

Thanks

Link to comment
Share on other sites

Does TweenMax know that the slideshow has moved while it is paused?

 

I really don't know much about how your slideshow works but if you are performing some action that isn't controlled by TweenMax, I would guess that TweenMax has no knowledge of it.

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