Animator(LzAnimator)
出自OpenFace
目录 |
<animator>
Changes the value of another object's attribute over time. JavaScript: LzAnimator
Extends Animatorgroup Animators change the value of an object's attribute over a specified duration in milliseconds. For example, the following program defines an animator for a window that moves it to a position of x=100 over 1 second (1000 milliseconds).
<canvas> <view width="20" height="20" bgcolor="red"> <animator attribute="x" to="100" duration="1000"/> </view> </canvas>
See the Guide for a complete discussion of animators and animation in Laszlo applications.
Attributes
Attributes inherited from Animatorgroup
attribute, duration, ease, from, indirect, motion, onfinish, onrepeat, onstart, onstop, paused, process, relative, repeat, start, started, target, to
Attributes inherited from Node
id, name, parent, subnodes
Methods
setMotion()
LzAnimator.setMotion(eparam) Sets the motion style for the animator.
Parameters Name Type Desc eparam String One of "easein", "easeout" , "linear" or "easeboth" to describe how the animator accelerates and decelerates. The default is "easeboth".
setTo()
LzAnimator.setTo(eparam) Sets the destination value for the animator
Parameters Name Type Desc eparam Number The destination value for the animator.
Methods inherited from LzAnimatorGroup
doStart, pause, setTarget, stop
Methods inherited from LzNode
getAttribute, setAttribute,applyConstraint
Events
Events inherited from LzNode
ondata, oninit

