Name
animatorgroup (LzAnimatorGroup) — Coordinates the behavior of several animators.
Description
An LzAnimatorGroup
wraps several
LzAnimator
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.
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.
Details
Properties (14)
-
animatorProps
-
<attribute name="animatorProps" value="{ ... }" />
public var animatorProps = { ... };
-
attribute
-
<attribute name="attribute" type="token" />
public var attribute : String;
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
-
<attribute name="duration" type="xsd:float {minInclusive="0"} | constraint" />
public var duration : Number;
The duration of the animation, in milliseconds (1000 = 1 second).
-
from
-
<attribute name="from" type="number" />
public var from : Number;
The start value for the animation. Defaults to the
targeted attribute's current value.
-
indirect
-
<attribute name="indirect" type="boolean" />
public var indirect : Boolean = false;
-
motion
-
<attribute name="motion" type=""linear" | "easein" | "easeout" | "easeboth"" />
public var motion : String = easeboth;
-
paused
-
<attribute name="paused" type="boolean" />
public var paused : boolean;
If true, the running animator will pause. If false
it will resume
-
process
-
<attribute name="process" type="string" />
public var process : string = sequential;
- "simultaneous" or none
- means process animators
simultaneously
- "sequential"
- means process animators
sequentially;
Animators other than animatorgroups ignore this attribute
-
relative
-
<attribute name="relative" type="boolean" value=""false"" />
public var relative : Boolean = false;
Whether the to value is relative to the initial value of the
attribute (
true
), or is absolute (
false
).
-
repeat
-
<attribute name="repeat" type="expression" />
public var repeat : String;
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
-
<attribute name="start" type="boolean" value=""true"" />
public var start : Boolean = true;
Whether to start the animation instantly (the default),
or wait for a script command.
-
started
-
<attribute name="started" type="boolean" />
public var started : Boolean;
Value of the animator's start attribute.
-
target
-
<attribute name="target" type="string" />
public var target : string;
-
to
-
<attribute name="to" type="number" />
The final value for the targeted attribute.
Setters (3)
Setters for virtual properties, to be used with setAttribute. A setter may or may not have a corresponding getter method;
consult the Methods list in this section.
-
paused
-
start
-
target
Methods (17)
-
checkRepeat()
-
<method name="checkRepeat" />
private function checkRepeat();
-
construct()
-
<method name="construct" args="parent, args" />
private function construct(parent, args);
-
destroy()
-
<method name="destroy" />
private function destroy();
-
doStart()
-
<method name="doStart" />
public function doStart();
called to set starting flags and values, send onstart event, and register
animator for processing on the main idle loop.
-
init()
-
-
__LZaddToStartTime()
-
<method name="__LZaddToStartTime" args="ptime" />
private function __LZaddToStartTime(ptime);
-
__LZfinalizeAnim()
-
<method name="__LZfinalizeAnim" />
private function __LZfinalizeAnim();
-
__LZhalt()
-
<method name="__LZhalt" />
private function __LZhalt();
-
pause()
-
<method name="pause" args="dop" />
public function pause(dop : Boolean);
Temporarily pauses or restarts the animator
-
prepareStart()
-
<method name="prepareStart" />
private function prepareStart();
-
resetAnimator()
-
<method name="resetAnimator" />
private function resetAnimator();
-
setStart()
-
<method name="setStart" args="start" />
private function setStart(start);
setter for the start attribute
-
setTarget()
-
<method name="setTarget" args="new_target" />
public function setTarget(new_target);
setter for the target attribute
-
start()
-
private function start();
-
stop()
-
Stop is called when the animation is complete, or when the animator is
destroyed. It can also be called to halt a running animation.
-
toString()
-
<method name="toString" />
private function toString();
-
update()
-
<method name="update" args="time" />
private function update(time);
in order to repeat an animtorGroup its animators cannot be deleted from the
animator array.
Events (8)
-
onduration
-
<attribute name="onduration" />
-
onfinish
-
<attribute name="onfinish" />
public deprecated event onfinish;
Use of 'onfinish' event
is deprecated. Use 'onstop' event instead.
-
onpaused
-
<attribute name="onpaused" />
-
onrepeat
-
<attribute name="onrepeat" />
Event sent at the beginning of each new repeat.
-
onstart
-
<attribute name="onstart" />
Executed when the animator starts. This code is executed
multiple times if the animator repeats.
-
onstarted
-
<attribute name="onstarted" />
-
onstop
-
<attribute name="onstop" />
Executed when the animator finishes.
-
ontarget
-
<attribute name="ontarget" />
LZX Synopsis
<class name="
LzAnimatorGroup" extends="
LzNode
">
<attribute name="
attribute
" type="
token" />
<attribute name="
duration
" type="
xsd:float {minInclusive="0"} | constraint" />
<attribute name="
from
" type="
number" />
<attribute name="
indirect
" type="
boolean" />
<attribute name="
motion
" type="
"linear" | "easein" | "easeout" | "easeboth"" />
<attribute name="
paused
" type="
boolean" />
<attribute name="
process
" type="
string" />
<attribute name="
relative
" type="
boolean" value="
"false"" />
<attribute name="
repeat
" type="
expression" />
<attribute name="
start
" type="
boolean" value="
"true"" />
<attribute name="
started
" type="
boolean" />
<attribute name="
target
" type="
string" />
<attribute name="
to
" type="
number" />
<method name="
construct
" args="
parent,
args" />
<method name="
pause
" args="
dop" />
<method name="
setStart
" args="
start" />
<method name="
setTarget
" args="
new_target" />
<method name="
start
" />
<method name="
update
" args="
time" />
</class>
JavaScript Synopsis
public
LzAnimatorGroup extends
LzNode
{
public var
from
:
Number;
public var
motion
:
String = easeboth;
public var
process
:
string = sequential;
public var
start
:
Boolean = true;
prototype private function
construct
(
parent,
args);
prototype private function
destroy
();
prototype public function
doStart
();
prototype private function
init
();
prototype public deprecated event
onfinish
;
prototype public event
onstop
;
prototype public function
pause
(
dop : Boolean);
prototype private function
setStart
(
start);
prototype public function
setTarget
(
new_target);
prototype private function
start
();
prototype public function
stop
();
prototype private function
update
(
time);
}