There is another trick if you just want to set the view to invisible
when opacity have come to 0, which is to set to null the visible
parameter of your view.
myview.setVisible(null);
It does not destroy the view, which was our need, but ensures that it
really becomes invisible when the opacity is equal to 0. We had to do
that because when clicked with the mouse, the view was appearing again.
Hope it helps
William Krick a écrit :
> In my app, have a button that deletes a view using destroy().
> I want to be able to animate the view by fading it out before it is
> destroyed.
>
> Here's the code I have in the view...
>
> <animator name="anim_del" attribute="opacity" from="1" to="0"
> duration="500" start="false"/>
>
> ...and here's the button event...
>
> <method name="delView" args="v">
> v.anim_del.doStart();
> v.destroy();
> </method>
>
> The problem is that the destroy() method is called immedately before the
> animation gets a chance to finish.
>
> How do I solve this problem?
>
> Is there any sort of end of animation trigger that I can hook onto?
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
> __________ NOD32 1.1500 (20060421) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user