Class YAHOO.ext.Animator

Object
   |
   +--YAHOO.ext.Element
         |
         +--YAHOO.ext.Animator

class YAHOO.ext.Animator
extends YAHOO.ext.Element


Provides support for syncing animations for multiple YAHOO.ext.Actors.



This example can be seen in action here by clicking on "Click here and I will point it out".


var animator = new YAHOO.ext.Animator();
var cursor = new YAHOO.ext.Actor('cursor-img', animator);
var click = new YAHOO.ext.Actor('click-img', animator);
var resize = new YAHOO.ext.Actor('resize-img', animator);

// start capturing
animator.startCapture();

// these animations will be run in sequence
cursor.show();
cursor.moveTo(500,400);
cursor.moveTo(20, getEl('navbar').getY()+10, true, .75);
click.show();
click.alignTo(cursor, 'tl', [-4, -4]);

// Add an async function call, pass callback to argument 1
animator.addAsyncCall(Blog.navbar.undockDelegate, 1);

// pause .5 seconds
animator.pause(.5);

// again, these animations will be run in sequence
click.hide(true, .7);
cursor.alignTo('splitter', 'tr', [0, +100], true, 1);
resize.alignTo('splitter', 'tr', [-12, +100]);

// start sync block: these animations will run at the same time
animator.beginSync();
cursor.hide();
resize.show();
animator.endSync();

// play the captured animation sequences, call myCallback when done
animator.play(myCallback);
 

Defined in Animator.js

Requires:


Nested Class Summary
<static class> YAHOO.ext.Animator.AnimSequence
<static class> YAHOO.ext.Animator.CompositeSequence
   
Fields inherited from class YAHOO.ext.Element
id, defaultUnit, onVisibilityChanged, onMoved, onResized, autoBoxAdjust
 
Constructor Summary
YAHOO.ext.Animator ()
  
 
Method Summary * Parameter types in italic indicate optional parameters
 void addActor(<YAHOO.ext.Actor> actor)
   Add an actor.
 void addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope)
   Add an async function call to the playlist.
 void addCall(<Function> fcn, <Array> args, <Object> scope)
   Add a function call to the playlist.
 void beginSync()
   Start a multi-actor sync block.
 void clear()
   Clear the playlist
 void endSync()
   End the multi-actor sync block
 Object isCapturing(<YAHOO.ext.Actor> actor)
   Checks whether this animator is listening to a specific actor.
 Object isPlaying()
   Check if this animator is currently playing
 void pause(<Number> seconds)
   Add a pause to the playlist (in seconds)
 void play(<Function> oncomplete)
   Starts playback of the playlist, also stops any capturing.
 void startCapture(<Boolean> clearPlaylist)
   Start capturing actions on the added actors.
 void stop()
   Stop at the next available stopping point
 void stopCapture()
   Stop capturing on all added actors.
 
Methods inherited from class YAHOO.ext.Element
setVisibilityMode, enableDisplayMode, animate, isVisible, setVisible, toggle, focus, addClass, radioClass, removeClass, toggleClass, hasClass, replaceClass, getStyle, setStyle, getX, getY, getXY, setX, setY, setLeft, setTop, setRight, setBottom, setXY, setLocation, moveTo, getRegion, getHeight, getWidth, getSize, setWidth, setHeight, setSize, setBounds, setRegion, addListener, addHandler, on, addManagedListener, mon, removeListener, removeAllListeners, setOpacity, getLeft, getRight, getTop, getBottom, setAbsolutePositioned, setRelativePositioned, clearPositioning, getPositioning, getBorderWidth, getPadding, setPositioning, move, clip, unclip, alignTo, clearOpacity, hide, show, beginMeasure, endMeasure, update, getUpdateManager, getCenterXY, getChildrenByTagName, getChildrenByClassName, isBorderBox, getBox, setBox
 

Constructor Detail

YAHOO.ext.Animator

YAHOO.ext.Animator()

Method Detail

addActor

void addActor(<YAHOO.ext.Actor> actor)

addAsyncCall

void addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope)

addCall

void addCall(<Function> fcn, <Array> args, <Object> scope)

beginSync

void beginSync()

clear

void clear()

endSync

void endSync()

isCapturing

Object isCapturing(<YAHOO.ext.Actor> actor)

isPlaying

Object isPlaying()

pause

void pause(<Number> seconds)

play

void play(<Function> oncomplete)

startCapture

void startCapture(<Boolean> clearPlaylist)

stop

void stop()

stopCapture

void stopCapture()


Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006