kcos Posted April 3, 2012 Posted April 3, 2012 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
Carl Posted April 4, 2012 Posted April 4, 2012 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.
kcos Posted April 4, 2012 Author Posted April 4, 2012 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(); }
kcos Posted April 7, 2012 Author Posted April 7, 2012 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
Carl Posted April 7, 2012 Posted April 7, 2012 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.
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