Jump to content
Search Community

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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

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

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