I'm trying to detect when an animator has completed changing an
attribute to the "to" value. In the example below what I want to happen
is that when you move the mouse into the red area then the area grows
and if the grow completes then the text will become visible. When you
move the mouse out of the red area then the text becomes invisible and
the view shrinks back. This works fine if you hold the mouse inside the
red are until the "max" animation completes. But if you move the mouse
back out of the view before it completes then an "onstop" event is
generated for "max" and it does not act as desired. So what I'm looking
for is something like and "oncomplete" event that is only called if the
animation makes it to the to value. Is there some way to detect that?
<canvas>
<view width="100" height="100" bgcolor="red"
onmouseover="max.doStart()" onmouseout="min.doStart()">
<animator name="max" attribute="width" to="200" duration="2000"
start="false" onstop="parent.content.setAttribute('visible', true);"/>
<animator name="min" attribute="width" to="100" duration="2000"
start="false" onstart="parent.content.setAttribute('visible', false);"/>
<text name="content" text="Text" visible="false"/>
</view>
</canvas>
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev