It sounds like your approach is about the same as what we do in  
Laszlo Mail, but there are subtleties of your animation to be tweaked.

You're going from y = -500 to y = 600, so let's call that 1000 pixels  
in 500 milliseconds. Let's say you're getting 20 frames per second,  
so 10 frames in 500 milliseconds, so if your motion was linear, you'd  
be moving 50 pixels per frame, which is a pretty big change.

The animators are ease-in and ease-out by default, which results in  
small changes at the beginning, big changes in the middle, then small  
changes at the end. This could easily mean you're jumping 200 pixels  
in a middle frame, so it would look really chunky.

Try setting motion="linear" on your animator, and extending the  
duration of the animator to maybe 5 seconds. That should make the  
animation go slowly and ultra-smoothly. motion="easeout" and a  
duration of maybe 800 milliseconds would probably look good.


On Apr 21, 2006, at 1:44 PM, James Howe wrote:

> 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
> animator.
>
> 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"
> start="false"/>
>
> 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.
>
> Thanks!
>
> -- 
> James Howe
>
> Contact: http://public.xdi.org/=James.Howe
>
> _______________________________________________
> 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

Reply via email to