Fastest Frame Rate?

Rick Harrison harrison at
Sat Mar 23 18:44:58 EDT 2019

You are switching the layers instead of using show and hide.

I added a quit button to stop the animation.

I tried this with both 16 milliseconds and 8 milliseconds.
(I think 8 might be slightly better.)  I still see some flicker
though, even when I turn off the development tools.
If it were fast enough I would just observe a solid purple

When I tried it as a standalone on a Mac it was even worse.
What’s up with that!  One would think it should be more
efficient not less.

Your thoughts?


> On Mar 23, 2019, at 5:31 PM, Niggemann, Bernd via use-livecode <use-livecode at> wrote:
> Hi Rick,
> rename your red and blue  graphic according to this script or change the names in this script and try this. It works quite well for me.
> -------------------------------------------
> local sRed = "255,0,0"
> local sBlue = "17,137,255"
> local sRunning = false
> on mouseUp
>   if not sRunning then
>      put true into sRunning
>      set the backgroundColor of grc "gRed" to sRed
>      set the backgroundColor of grc "gBlue" to sBlue
>      goRun
>   else
>      put false into sRunning
>   end if
> end mouseUp
> on goRun
>   if not sRunning then exit goRun
>   if "goRun" is among the lines of the pendingMessages then exit goRun
>   lock screen -- pushes screen refresh after handler
>   if the layer of grc "gRed" > the layer of grc "gBlue" then 
>      set the layer of grc "gBlue" to top
>   else
>      set the layer of grc "gRed" to top
>   end if
>   send "goRun" to me in 16 milliseconds
> end goRun
> -------------------------------------------
> Kind regards
> Bernd
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list