attributes, duration, method, useSeconds, currentFrame, totalFrames, onStart, onTween, onComplete
Class YAHOO.util.Motion
Object | +--YAHOO.util.Anim | +--YAHOO.util.ColorAnim | +--YAHOO.util.Motion
class
YAHOO.util.Motion
Fields inherited from class YAHOO.util.Anim [top]
Method Summary [top]
Number |
doMethod
(<String> attr, <Number> start, <Number> end)
Returns the value computed by the animation's "method".
|
Object |
getAttribute
(<String> attr)
Sets the default value to be used when "from" is not supplied.
|
void |
setAttribute
(<String> attr, <Number> val, <String> unit)
Applies a value to an attribute
|
String |
toString
()
toString method
|
Methods inherited from class YAHOO.util.ColorAnim
Methods inherited from class YAHOO.util.Anim
Constructor Detail [top]
YAHOO.util.Motion
YAHOO.util.Motion
()
- Parameters:
-
String
- or HTMLElement} el Reference to the element that will be animated -
attributes
- The attribute(s) to be animated. Each attribute is an object with at minimum a "to" or "by" member defined. Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). All attribute names use camelCase. -
duration
- (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based -
method
- (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
Method Detail [top]
doMethod
Number
doMethod
(<String> attr, <Number> start, <Number> end)
Returns the value computed by the animation's "method".
- Parameters:
-
attr
- The name of the attribute. -
start
- The value this attribute should start from for this animation. -
end
- The value this attribute should end at for this animation.
- Returns:
- The Value to be applied to the attribute.
getAttribute
Object
getAttribute
(<String> attr)
Sets the default value to be used when "from" is not supplied.
- Parameters:
-
attr
- The attribute being set. -
val
- The default value to be applied to the attribute.
setAttribute
void
setAttribute
(<String> attr, <Number> val, <String> unit)
Applies a value to an attribute
- Parameters:
-
attr
- The name of the attribute. -
val
- The value to be applied to the attribute. -
unit
- The unit ('px', '%', etc.) of the value.
toString
String
toString
()
toString method
- Returns:
- string represenation of anim obj