Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Jakob Sternberg

Can i use TweenLite.pauseAll() ? (HTML5)

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi i'm creating a banner and using gsap to do some particle animation,

I need to keep the filesize down so i'm using TweenLite instead of TweenMax 

 

One thing that doesent seem to work with TweenLite is pauseAll?

 

Is that correct, or do i need to add a plugin or something?

 

Or, is there alternative way to mimick the TweenMax.pauseAll() with TweenLite

 

Thanks

Link to post
Share on other sites

pauseAll() is a method of TweenMax and not TweenLite.

 

Most banner networks don't count TweenMax against file size because it is CDN-hosted and widely cached. 

Curious which network or publisher is causing a problem?

 

By loading TweenMax you get TimelineLite and TimelineMax which will make your banners sooo much easier to produce than just TweenLite. 

 

If you need to pause all your animations you could try 

TweenLite.ticker.fps(0); 
  • Like 3
Link to post
Share on other sites

Ok, It didn't work, now the animation just moves really slow, aprox 1fps. 

But if i use 0.0000001 it works :) (good enough anyways)

Link to post
Share on other sites
  • 3 months later...

Hi just saw your topic.

 

When I want to pause all and shut everything down I often do this:

TweenMax.globalTimeScale(0);

Setting the globalTimeScale to (0) will stop the animation and any callback/events.

The problem with

TweenLite.ticker.fps(0); 

is that even though the timelines are paused they do seem to complete even though you can't see it happening. When you un-pause your animation will then jump to the end of the timeline.

 

Cheers

  • Like 1
Link to post
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.

×