getTweenCount()

Availability

AS2 and AS3.

Usage

Tweener.getTweenCount(target:Object):Number;

Parameters

target:Object — The target object.

Description

Returns the number of tweenings that a given target object currently has. Delayed and paused tweenings are counted.

Returns

Number — total of tweenings active on a given object.

Examples

// Say how many tweenings an object has
trace ("Object myMC has " + Tweener.getTweenCount(myMC) + " tweenings.");
// Remove tweenings from an object if needed
if (Tweener.getTweenCount(myMC) > 0) Tweener.removeTweens(myMC);

See also

getTweens, isTweening