An lz.animatorgroup wraps several
<animator>s, and runs them in sequence or
simultaneously. As an example, the code below animates a view first
along the x-axis and then the y.
<canvas>
<view bgcolor="red" width="100" height="100">
<animatorgroup process="sequential">
<animator attribute="x" to="100" duration="1000"/>
<animator attribute="y" to="100" duration="1000"/>
</animatorgroup>
</view>
</canvas>
Any attribute that is legal in <animator> is legal
in <animatorgroup>. These attributes are then
cascaded to the animators contained within.
Events (such as onstart, onstop,
etc.) and the name and
id attributes, however, are not cascaded.
Also, start defined at the group level is
effectively cascaded to the animators, meaning that the start
attribute is ignored in the animators themselves.
| Name | Type (tag) | Type (js) | Default | Category |
|---|---|---|---|---|
attribute
|
token | String | read/write | |
| The name of the attribute whose value is animated. This attribute is required on an animator, unless the animator is inside an animatorgroup that specifies an attribute. | ||||
duration
|
xsd:float {minInclusive="0"} | constraint | Number | read/write | |
| The duration of the animation, in milliseconds (1000 = 1 second). | ||||
from
|
number | Number | read/write | |
| The start value for the animation. Defaults to the targeted attribute's current value. | ||||
indirect
|
boolean | Boolean | read/write | |
isactive
|
boolean | Boolean | read/write | |
| The active-state of the animator. If true, the animator is currently processing its animation. This field is read-only. | ||||
motion
|
token | String | read/write | |
| One of "linear" | "easein" | "easeout" | "easeboth" | ||||
paused
|
boolean | Boolean | "false" | read/write |
| The paused state of the animator. If true, the animator will stop. When changed to false, the animator will resume from its current location. | ||||
process
|
string | String | read/write | |
|
||||
relative
|
boolean | Boolean | "false" | read/write |
Whether the to value is relative to the initial value of the
attribute (true), or is absolute (false).
|
||||
repeat
|
number | Number | 1 | read/write |
| The number of times to repeat the animation. This should be a positive integer, or 'Infinity'. Changes to the repeat value take effect, after the animation is finished and then restarted. | ||||
start
|
boolean | Boolean | "true" | read/write |
| Whether to start the animation instantly (the default), or wait for a script command. | ||||
started
|
boolean | Boolean | read/write | |
| Value of the animator's start attribute. | ||||
target
|
reference | String | read/write | |
| the object for which an attribute will be animated (by default, this is the immediateParent) | ||||
to
|
number | Number | read/write | |
| The final value for the targeted attribute. | ||||
classroot, cloneManager, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, subnodes
Methods
| doStart() |
|---|
| pause() |
|---|
| Parameter Name | Type | Description |
|---|---|---|
| dop | Boolean | If true, pauses the animator. If false, unpauses the animator. If null, toggles the paused state of the animator. |
| stop() |
|---|
animate, applyConstraint, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setData, setDatapath, setOption, setSelected, updateData
Copyright © 2002-2008 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.