[Laszlo-user] Improving animation

William Krick wkrick at eio-online.com
Fri Apr 21 17:13:38 EDT 2006

This is the kind of this we're doing in our app.  It's pretty smooth for


  <class name="helpshade" bgcolor="yellow">
    <animator name="slideout" attribute="y" to="0" duration="1000"
    <animator name="slidein" attribute="y" to="-400" duration="1000"
    <button text="close" x="300" y="300"
    <method name="show">

  <class name="helpbutton" extends="button">
    <attribute name="shade" type="expression"/>
    <method event="onclick">

  <helpbutton text="open" shade="${hs1}" x="50" y="50"/>
  <helpshade id="hs1" y="-400" height="400" width="400" />


-----Original Message-----
From: James Howe [mailto:openlaszlo at wingspread.imap-mail.com]
Sent: Friday, April 21, 2006 4:44 PM
To: laszlo-user at openlaszlo.org
Subject: [Laszlo-user] Improving animation

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.


James Howe

Contact: http://public.xdi.org/=James.Howe

Laszlo-user mailing list
Laszlo-user at openlaszlo.org

More information about the Laszlo-user mailing list