[Laszlo-user] Improving animation

graphis1@mac.com graphis1 at mac.com
Fri Apr 21 18:29:58 EDT 2006


I thought I'd use this post to highlight the 31fps trick that's  
become a popular way of boosting performance within the Flash  
development community.

If it was possible to change Laszlo's default framerate to 31fps,  
this would really help smooth animation across platforms in many  
circumstances. Flash has some (not very well documented) routines  
that work on framerates of 16, 21 and 31 fps to force the client to  
work harder to honour framerates at 15, 20 and 30 fps respectively.  
So setting a framerate of 31 will most likely result in playback at  
30fps, whilst setting a rate of 30 generally causes playback at  
around 20. Strange, but true!

This performance increase is especially noticeable on Macs - having  
worked with OL on both platforms I've noticed that compiled Laszlo  
apps tend to perform better on PCs. Forcing the default framerate to  
31fps would likely solve the problem, or at least help performance  
greatly.

As far as I'm aware there's no way to change the default from 30 to  
31 - I assume it's hard coded?





On 21 Apr 2006, at 22:13, William Krick wrote:

> This is the kind of this we're doing in our app.  It's pretty  
> smooth for
> us...
>
>
> <canvas>
>
>   <class name="helpshade" bgcolor="yellow">
>     <animator name="slideout" attribute="y" to="0" duration="1000"
> start="false"/>
>     <animator name="slidein" attribute="y" to="-400" duration="1000"
> start="false"/>
>     <button text="close" x="300" y="300"
> onclick="parent.slidein.doStart()"/>
>     <method name="show">
>       this.slideout.doStart();
>     </method>
>   </class>
>
>   <class name="helpbutton" extends="button">
>     <attribute name="shade" type="expression"/>
>     <method event="onclick">
>       shade.show();
>     </method>
>   </class>
>
>   <helpbutton text="open" shade="${hs1}" x="50" y="50"/>
>   <helpshade id="hs1" y="-400" height="400" width="400" />
>
> </canvas>
>
>
>
> -----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
> 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
> Laszlo-user at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
>
> _______________________________________________
> Laszlo-user mailing list
> Laszlo-user at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user



More information about the Laszlo-user mailing list