Ben, In your note below you explain that some fancy stuff is needed using delegates and onstop events "because Flash is frame based."
Will this be necessary or appropriate in apps to be compiled to DHTML? Thanks, jrs Begin forwarded message: > From: Benjamin Shine <[EMAIL PROTECTED]> > Date: April 21, 2006 1:20:08 PM EDT (CA) > To: William Krick <[EMAIL PROTECTED]> > Cc: Laszlo-User <[email protected]> > Subject: Re: [Laszlo-user] how to animate a view, then delete it? > > > The easy answer is to add an onstop delegate to the animator. That > will do what you want in this case, because you're animating opacity > to 0. > > If you need to control the endpoint precisely, usually we do a trick > where we add an onstop delegate to the animator, and then in that > onstop delegate, we register an LzIdle delegate, and we take the post- > animation step in the first idle called after the onstop event. This > is all necessary because Flash is frame-based. > > On Apr 21, 2006, at 10:03 AM, William Krick wrote: > >> 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 > > _______________________________________________ > Laszlo-user mailing list > [email protected] > http://www.openlaszlo.org/mailman/listinfo/laszlo-user _______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
