Print Friendly

# Class YAHOO.ext.AnimatorComposite

Package: | YAHOO.ext
Class: | AnimatorComposite
Extends: | Object
Defined In: | Animator.js

Composite class with synchronized animations. This is the class returned by getActors(selector) or YAHOO.ext.Animator.select().

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| addAsyncCall(`Function fcn`, `Number callbackIndex`, [`Array args`], [`Object scope`]) : AnimatorComposite | AnimatorComposite
Add an async function call to the playlist.
| addCall(`Function fcn`, [`Array args`], [`Object scope`]) : AnimatorComposite | AnimatorComposite
Add a function call to the playlist.
| addElements(`Array els`) : AnimatorComposite | AnimatorComposite
Adds elements to this composite.
| each(`Function fn`, [`Object scope`]) : AnimatorComposite | AnimatorComposite
Calls the passed function passing (el, this, index) for each element in this composite.
| getAnimator() : YAHOO.ext.Animator | AnimatorComposite
Get the YAHOO.ext.Animator that controls the animations for this composite.
| pause(`Number seconds`) : AnimatorComposite | AnimatorComposite
Add a pause
| play([`Function callback`]) : AnimatorComposite | AnimatorComposite
Play the actions queued in this composite.
| reset([`Function callback`]) : AnimatorComposite | AnimatorComposite
Clear all actions in the queue.
| sequence() : AnimatorComposite | AnimatorComposite
Operations called after sequence() will be performed one by one on each element in this composite.
| sync() : AnimatorComposite | AnimatorComposite
Operations called after sync() will be performed at the same time on each element in this composite.

## Public Events

This class has no public events.

## Method Details

### addAsyncCall

`public function addAsyncCall(`Function fcn`, `Number callbackIndex`, [`Array args`], [`Object scope`])`
Add an async function call to the playlist.
Parameters:

- `fcn` : Function
  The function to call
- `callbackIndex` : Number
  The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED.
- `args` : Array
  (optional) The arguments to call the function with
- `scope` : Object
  (optional) The scope of the function

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

### addCall

`public function addCall(`Function fcn`, [`Array args`], [`Object scope`])`
Add a function call to the playlist.
Parameters:

- `fcn` : Function
  The function to call
- `args` : Array
  (optional) The arguments to call the function with
- `scope` : Object
  (optional) The scope of the function

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

### addElements

`public function addElements(`Array els`)`
Adds elements to this composite.
Parameters:

- `els` : Array
  An array of elements to add

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

### each

`public function each(`Function fn`, [`Object scope`])`
Calls the passed function passing (el, this, index) for each element in this composite.
Parameters:

- `fn` : Function
  The function to call
- `scope` : Object
  (optional) The this object (defaults to the element)

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

### getAnimator

`public function getAnimator()`
Get the YAHOO.ext.Animator that controls the animations for this composite.
Parameters:

- None.

Returns:

- `YAHOO.ext.Animator`

This method is defined by AnimatorComposite.

### pause

`public function pause(`Number seconds`)`
Add a pause
Parameters:

- `seconds` : Number

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

### play

`public function play([`Function callback`])`
Play the actions queued in this composite.
Parameters:

- `callback` : Function
  (optional) callback is called when all animations have compelted

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

### reset

`public function reset([`Function callback`])`
Clear all actions in the queue.
Parameters:

- `callback` : Function
  (optional) callback is called when all animations have compelted

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

### sequence

`public function sequence()`
Operations called after sequence() will be performed one by one on each element in this composite.
Parameters:

- None.

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

### sync

`public function sync()`
Operations called after sync() will be performed at the same time on each element in this composite.
Parameters:

- None.

Returns:

- `AnimatorComposite`
  this

This method is defined by AnimatorComposite.

yui-ext - Copyright © 2006 Jack Slocum. | Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.