Jump to content
GreenSock

TweenLite

.delay()

.delay( value:Number ) : *

Gets or sets the animation's initial delay which is the length of time in seconds (or frames for frames-based tweens) before the animation should begin.

Parameters

value: Number

(default = NaN) — Omitting the parameter returns the current value (getter), whereas defining the parameter sets the value (setter) and returns the instance itself for easier chaining.

Returns : *

Omitting the parameter returns the current value (getter), whereas defining the parameter sets the value (setter) and returns the instance itself for easier chaining.

Details

Gets or sets the animation's initial delay which is the length of time in seconds (or frames for frames-based tweens) before the animation should begin. A tween's starting values are not recorded until after the delay has expired (except in from() tweens which render immediately by default unless immediateRender:false is set in the varsparameter). An animation's delay is unaffected by its timeScale, so if you were to change timeScale from 1 to 10, for example, it wouldn't cause the delay to grow tenfold.

This method serves as both a getter and setter. Omitting the parameter returns the current value (getter), whereas defining the parameter sets the value (setter) and returns the instance itself for easier chaining, likemyAnimation.delay(2).timeScale(0.5).play(1);

var currentDelay = myAnimation.delay(); //gets current delay
myAnimation.delay(2); //sets delay
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.
×