Jump to content
GreenSock

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

TweenMax

.repeatDelay()

.repeatDelay( value:Number ) : *

Gets or sets the amount of time in seconds (or frames for frames-based tweens) between repeats.

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 amount of time in seconds (or frames for frames-based tweens) between repeats. For example, if repeat is 2 andrepeatDelay is 1, the tween will play initially, then wait for 1 second before it repeats, then play again, then wait 1 second again before doing its final repeat. You can set the initial repeatDelay value via the vars parameter, like:

TweenMax.to(mc, 1, {x:100, repeat:2, repeatDelay:1});

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, likemyTween.repeat(2).yoyo(true).repeatDelay(0.5).play();

var repeatDelay = myTween.repeatDelay(); //gets current repeatDelay value
myTween.repeatDelay(2); //sets repeatDelay to 2
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.
×