Jump to content
GreenSock

Timeline

.startTime()

.startTime( value:Number ) : *

Gets or sets the time at which the animation begins on its parent timeline (after any delay that was defined).

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 time at which the animation begins on its parent timeline (after any delay that was defined). For example, if a tween starts at exactly 3 seconds into the timeline on which it is placed, the tween’s startTime would be 3.

The startTime may be automatically adjusted to make the timing appear seamless if the parent timeline’s smoothChildTiming property is true and a timing-dependent change is made on-the-fly, like reverse() is called or timeScale() is changed, etc. See the documentation for the smoothChildTiming property of timelines for more details.

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.

  1. var start = myAnimation.startTime(); //gets current start time
  2. myAnimation.startTime(2); //sets
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.
×