[Laszlo-user] Improving animation
openlaszlo at wingspread.imap-mail.com
Fri Apr 21 16:44:26 EDT 2006
I'm trying to use animation to display a dialog in my application. I like
the way Laszlo Mail displays it's settings dialog where you click a
button, the screen dims and the dialog slides down from the top of the
screen. I've implemented something similar, but it doesn't look nearly as
nice, nor does it display nearly as smoothly. My major problem is getting
the dialog to smoothly 'drop down'. What I've done sort of goes like this:
1. I have a dialog view which by default is made invisible with a y
location of -600 (the height of the dialog).
2. When the user requests the dialog, I first use an animator to display a
mask over the entire application.
3. I then make the dialog visible, bring it to the front and start the
The animator for the dialog adjusts the y location going from 0 to the
height of the dialog like this:
<animator name="_dialogAnimator" attribute="y" to="600" duration="550"
The dialog appears, but it sort of appears in two chunks with most of the
dialog appearing in the first chunk, followed by the last chunk. What I
want is to have the appearance of the dialog dropping/unrolling from the
top of the application. Also, once I've displayed the dialog, the next
time it is requested, it just pops up, even though I have a second
animation which reduces the y value back to "-600".
What obvious thing am I missing?
Any help/examples would be appreciated.
More information about the Laszlo-user