Object
|
+--YAHOO.ext.Element
|
+--YAHOO.ext.Actor
Provides support for syncing and chaining of Element Yahoo! UI based animation and some common effects. Actors support "self-play" without an Animator.
Note: Along with the animation methods defined below, this class inherits and captures all of the "set" or animation methods of YAHOO.ext.Element. "get" methods are not captured and execute immediately.
Usage:
var actor = new YAHOO.ext.Actor('myElementId');
actor.startCapture(true);
actor.moveTo(100, 100, true);
actor.squish();
actor.play();
// or to start capturing immediately, with no Animator (the null second param)
var actor = new YAHOO.ext.Actor('myElementId', null, true);
actor.moveTo(100, 100, true);
actor.squish();
actor.play();
| Nested Class Summary | |
<static class> |
YAHOO.ext.Actor.Action |
<static class> |
YAHOO.ext.Actor.AsyncAction |
<static class> |
YAHOO.ext.Actor.PauseAction |
| Field Summary | |
Function |
addClass
Capturing override - See YAHOO.ext.Element.addClass() for method details. |
Function |
alignTo
Capturing and animation syncing override - See YAHOO.ext.Element.alignTo() for method details. |
Object |
capturing
Whether this actor is currently capturing |
Function |
clearOpacity
Capturing override - See YAHOO.ext.Element.clearOpacity() for method details. |
Function |
clearPositioning
Capturing override - See YAHOO.ext.Element.clearPositioning() for method details. |
Function |
clip
Capturing override - See YAHOO.ext.Element.clip() for method details. |
Object |
el
|
Function |
enableDisplayMode
Capturing override - See YAHOO.ext.Element.enableDisplayMode() for method details. |
Function |
focus
Capturing override - See YAHOO.ext.Element.focus() for method details. |
Function |
hide
Capturing and animation syncing override - See YAHOO.ext.Element.hide() for method details. |
Function |
move
Capturing and animation syncing override - See YAHOO.ext.Element.move() for method details. |
Function |
moveTo
Capturing and animation syncing override - See YAHOO.ext.Element.moveTo() for method details. |
Object |
onCapture
|
Object |
playlist
|
Function |
removeClass
Capturing override - See YAHOO.ext.Element.removeClass() for method details. |
Function |
replaceClass
Capturing override - See YAHOO.ext.Element.replaceClass() for method details. |
Function |
setAbsolutePositioned
Capturing override - See YAHOO.ext.Element.setAbsolutePositioned() for method details. |
Function |
setBounds
Capturing and animation syncing override - See YAHOO.ext.Element.setBounds() for method details. |
Function |
setHeight
Capturing and animation syncing override - See YAHOO.ext.Element.setHeight() for method details. |
Function |
setLeft
Capturing override - See YAHOO.ext.Element.setLeft() for method details. |
Function |
setLocation
Capturing and animation syncing override - See YAHOO.ext.Element.setLocation() for method details. |
Function |
setOpacity
Capturing and animation syncing override - See YAHOO.ext.Element.setHeight() for method details. |
Function |
setPositioning
Capturing override - See YAHOO.ext.Element.setPositioning() for method details. |
Function |
setRelativePositioned
Capturing override - See YAHOO.ext.Element.setRelativePositioned() for method details. |
Function |
setSize
Capturing and animation syncing override - See YAHOO.ext.Element.setSize() for method details. |
Function |
setStyle
Capturing override - See YAHOO.ext.Element.setStyle() for method details. |
Function |
setTop
Capturing override - See YAHOO.ext.Element.setTop() for method details. |
Function |
setVisibilityMode
Capturing override - See YAHOO.ext.Element.setVisibilityMode() for method details. |
Function |
setVisible
Capturing and animation syncing override - See YAHOO.ext.Element.setVisible() for method details. |
Function |
setWidth
Capturing and animation syncing override - See YAHOO.ext.Element.setWidth() for method details. |
Function |
setX
Capturing override - See YAHOO.ext.Element.setX() for method details. |
Function |
setXY
Capturing and animation syncing override - See YAHOO.ext.Element.setXY() for method details. |
Function |
setY
Capturing override - See YAHOO.ext.Element.setY() for method details. |
Function |
show
Capturing and animation syncing override - See YAHOO.ext.Element.show() for method details. |
Function |
toggle
Capturing and animation syncing override - See YAHOO.ext.Element.toggle() for method details. |
Function |
unclip
Capturing override - See YAHOO.ext.Element.unclip() for method details. |
Function |
update
Capturing override - See YAHOO.ext.Element.clearOpacity() for method details. |
| Fields inherited from class YAHOO.ext.Element |
id, defaultUnit, onVisibilityChanged, onMoved, onResized, autoBoxAdjust
|
| Constructor Summary | |
YAHOO.ext.Actor
(element, <YAHOO.ext.Animator> animator, <Boolean> selfCapture)
|
|
| Method Summary * Parameter types in italic indicate optional parameters | |
void
|
addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope)
Capture an async function call. |
void
|
addCall(<Function> fcn, <Array> args, <Object> scope)
Capture a function call. |
Function
|
animate(args, duration, onComplete, easing, animType)
Capturing and animation syncing override - See YAHOO.ext.Element.animate() for method details. |
void
|
appear(<Float> duration)
Fade an element in |
Object
|
blindHide(<String> anchor, <Float> duration, <Function> easing)
Hide the element using a "blinds" effect |
Object
|
blindShow(<String> anchor, <Number> newSize, <Float> duration, <Function> easing)
Show the element using a "blinds" effect |
void
|
bounce()
Bounce this element from up and down |
Object
|
capture(<YAHOO.ext.Actor.Action> action)
Captures an action for this actor. |
void
|
clear()
Clears any calls that have been self captured. |
void
|
dropOut(<Float> duration)
Fade the element as it is falling from it's current position |
void
|
fade(<Float> duration)
Fade an element out |
void
|
highlight(<String> color, <String> fromColor, <Float> duration, <String> attribute)
Highlight the element using a background color (or passed attribute) animation |
void
|
moveIn(<String> anchor, <Array> to, <Float> duration, <Function> easing)
Show the element in a way that it appears as if it is flying onto the screen |
void
|
moveOut(<String> anchor, <Float> duration, <Function> easing)
Hide the element in a way that it appears as if it is flying off the screen |
void
|
pause(<Number> seconds)
Capture a pause (in seconds). |
void
|
play(<Function> oncomplete)
Starts playback of self captured calls. |
void
|
pulsate(<Number> count, <Float> duration)
Fade the element in and out the specified amount of times |
void
|
shake()
Shake this element from side to side |
Object
|
slideHide(<String> anchor, <Float> duration, <Function> easing)
Hide the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindHide effect is rendered. |
Object
|
slideShow(<String> anchor, <Number> newSize, <Float> duration, <Function> easing)
Show the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindShow effect is rendered. |
Object
|
squish(<Float> duration)
Hide the element by "squishing" it into the corner |
void
|
startCapture()
Start self capturing calls on this Actor. |
void
|
stopCapture()
Stop self capturing calls on this Actor. |
void
|
switchOff(<Float> duration)
Blink the element as if it was clicked and then collapse on it's center |
| Field Detail |
Function addClass
Function alignTo
Object capturing
Function clearOpacity
Function clearPositioning
Function clip
Object el
Function enableDisplayMode
Function focus
Function hide
Function move
Function moveTo
Object onCapture
Object playlist
Function removeClass
Function replaceClass
Function setAbsolutePositioned
Function setBounds
Function setHeight
Function setLeft
Function setLocation
Function setOpacity
Function setPositioning
Function setRelativePositioned
Function setSize
Function setStyle
Function setTop
Function setVisibilityMode
Function setVisible
Function setWidth
Function setX
Function setXY
Function setY
Function show
Function toggle
Function unclip
Function update
| Constructor Detail |
YAHOO.ext.Actor(element, <YAHOO.ext.Animator> animator, <Boolean> selfCapture)
animator - (optional) The Animator that will capture this Actor's actions
selfCapture - (optional) Whether this actor should capture it's own actions to support self playback without an animator (defaults to false)
el - The dom element or element id
| Method Detail |
void addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope)
fcn - The function to call
callbackIndex - The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED.
args - The arguments to call the function with
scope - (optional) The scope of the function
void addCall(<Function> fcn, <Array> args, <Object> scope)
fcn - The function to call
args - (optional) The arguments to call the function with
scope - (optional) The scope of the function
Function animate(args, duration, onComplete, easing, animType)
void appear(<Float> duration)
duration - (optional) How long the effect lasts (in seconds)
Object blindHide(<String> anchor, <Float> duration, <Function> easing)
anchor - The part of the element that it should appear to collapse to. The short/long options are t/top, l/left, b/bottom, r/right.
duration - (optional) How long the effect lasts (in seconds)
easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn)
Object blindShow(<String> anchor, <Number> newSize, <Float> duration, <Function> easing)
anchor - The part of the element that it should appear to exapand from. The short/long options currently are t/top, l/left
newSize - (optional) The size to animate to. (Default to current size)
duration - (optional) How long the effect lasts (in seconds)
easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut)
void bounce()
Object capture(<YAHOO.ext.Actor.Action> action)
action -
void clear()
void dropOut(<Float> duration)
duration - (optional) How long the effect lasts (in seconds)
void fade(<Float> duration)
duration - (optional) How long the effect lasts (in seconds)
void highlight(<String> color, <String> fromColor, <Float> duration, <String> attribute)
color - (optional) The color to use for the highlight
fromColor - (optional) If the element does not currently have a background color, you will need to pass in a color to animate from
duration - (optional) How long the effect lasts (in seconds)
attribute - (optional) Specify a CSS attribute to use other than background color - camelCase
void moveIn(<String> anchor, <Array> to, <Float> duration, <Function> easing)
anchor - The part of the page that the element should appear to move from. The short/long options are t/top, l/left, b/bottom, r/right, tl/top-left, tr/top-right, bl/bottom-left or br/bottom-right.
to - (optional) Array of x and y position to move to like [x, y] (Defaults to center screen)
duration - (optional) How long the effect lasts (in seconds)
easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut)
void moveOut(<String> anchor, <Float> duration, <Function> easing)
anchor - The part of the page that the element should appear to move to. The short/long options are t/top, l/left, b/bottom, r/right, tl/top-left, tr/top-right, bl/bottom-left or br/bottom-right.
duration - (optional) How long the effect lasts (in seconds)
easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn)
void pause(<Number> seconds)
seconds - The seconds to pause
void play(<Function> oncomplete)
oncomplete - (optional) Callback to execute when playback has completed
void pulsate(<Number> count, <Float> duration)
count - (optional) How many times to pulse (Defaults to 3)
duration - (optional) How long the effect lasts (in seconds)
void shake()
Object slideHide(<String> anchor, <Float> duration, <Function> easing)
anchor - The part of the element that it should appear to slide to. The short/long options are t/top, l/left, b/bottom, r/right.
duration - (optional) How long the effect lasts (in seconds)
easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn)
Object slideShow(<String> anchor, <Number> newSize, <Float> duration, <Function> easing)
anchor - The part of the element that it should appear to slide from. The short/long options currently are t/top, l/left
newSize - (optional) The size to animate to. (Default to current size)
duration - (optional) How long the effect lasts (in seconds)
easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOuth)
Object squish(<Float> duration)
duration - (optional) How long the effect lasts (in seconds)
void startCapture()
void stopCapture()
void switchOff(<Float> duration)
duration - (optional) How long the effect lasts (in seconds)