Jump to content
GreenSock

TweenMax.globalTimeScale()

TweenMax.globalTimeScale( value:Number ) :

[static] Gets or sets the global timeScale which is a multiplier that affects ALL animations equally. This is a great way to globally speed up or slow down all animations at once.

Parameters

value: Number

A multiplier that affects all animations, so 1 is normal speed, 0.5 is half-speed, 2 is double-speed, etc. Omitting the parameter returns the current value (getter), whereas defining the parameter sets the value (setter).

Details

Gets or sets the global timeScale which is a multiplier that affects ALL animations equally. This doesn't actually set the timeScale() of each individual tween/timeline, but rather it affects the rate at which the root timeline plays (that timeline contains all other animations). This is a great way to globally speed up or slow down all animations at once. For example:

TweenMax.globalTimeScale(0.5); //plays at half-speed
TweenMax.globalTimeScale(2); //plays twice the normal speed
var currentTimeScale = TweenMax.globalTimeScale(); //returns the current global timeScale
Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×