Jump to content
Search Community

Pause-Play-Rewind TweenLite/TweenMax

SarasotaSam test
Moderator Tag

Recommended Posts

I have a slide show that uses both TweenLite and TweenMax.

 

All the images in the show are on Frame 1 and there are 48 layers of images.

 

There are 840 lines of ActionScript 3 that controls the show.

 

The final version will be a SWF file.

 

The question:

 

Is there a way to pause, resume, rewind (10 seconds) the slideshow?

 

 

Thanks in advance for your help - Sam

Link to comment
Share on other sites

Absolutely. That's exactly what TimelineLite (and TimelineMax) is for. You can put all your tweens into a TimelineLite instance and then control the entire thing as a whole. gotoAndPlay() any time on the timeline. Heck, you can even tween the currentTime to fastforward/rewind. Tons of options. Watch the brief video at http://www.greensock.com/timeline-basics/ to learn more.

 

I also recently posted a slideshow example that uses LoaderMax and TweenLite at http://www.greensock.com/as/LoaderMax/slideshow.zip which may be helpful. It doesn't demonstrate rewinding or fastforwarding but you still may find it very useful. I'll leave the link up there for at least a week.

Link to comment
Share on other sites

Thanks for your quick reply.

 

Having not used TimelineLite or TimelineMax or LorderMax before, could you give me an example of their use with the following snippet of code?

 

animateTitle()
function animateTitle()
{
TweenMax.from(title_mc, 3, {autoAlpha:0, delay:1, repeat:1, yoyo:true, repeatDelay:1});
TweenMax.from(bldg_mc, 2, {autoAlpha:0, delay:3, repeat:1, yoyo:true, repeatDelay:1});
TweenMax.to(founders_mc, .1, {x:101, y:80, autoAlpha:1, scale:.333, delay:6});
TweenMax.to(founders_mc, 6, {x:-1050, y:-500, autoAlpha:1, scale:2, delay:10,
onComplete:animateAndy});

}

function animateAndy ()
{
TweenMax.from(andy_t_mc, 3, {scale:0, autoAlpha:0, delay:.2,
 repeat:1, yoyo:true,
repeatDelay:1,
onComplete:animateMoveKelly});
}

The slideshow goes on an on with the same structure of code.

 

How would I add pause, play and rewind with TimelineMax?

 

And how would I use LoaderMax to preload the slides?

 

Again, thanks for your help, You really are supportive of your users - Sam

Link to comment
Share on other sites

Did you watch the video that I linked you to above? That should explain things pretty well. And there's a bunch of code samples on the site for both the tweening classes and LoaderMax. Unfortunately, I'm on vacation all week with my family and don't have time to rewrite your code for you and explain all the details of how to work with LoaderMax and TimelineLite/Max. But please watch the video and poke around the site at all the examples and I think it'll become a lot more clear. Folks have said the video is particularly helpful. http://www.greensock.com/timeline-basics/

Link to comment
Share on other sites

Thanks for your reply during your vacation. Unfortunately, I have tried to watch the TimelineLite movie three times and each time I have gotten half way through and my G4 Mac froze (last one today). Thought you should know. I will try and watch it on my laptop.

 

Sam

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