Beachball cursor Help

Richard Gaskin ambassador at
Tue Nov 9 11:12:13 EST 2010

Devin Asay wrote:

 > I'm not sure exactly what's going on behind the scenes with the
 > 'busy' cursor. I got curious and looked into it. The cursor icons
 > are in a stack called "revCursors" for Windows and *nix, and a
 > stack called "revMacCursors" for Mac OS. They're just image objects.
 > I would think you could just replace the existing images with your
 > own colorized ones, making sure the image ids match, and it should
 > "just work".

Yep - they're image IDs 16 through 23.

 > That said, LiveCard 4.5 is supposed to have enhanced cursor
 > support, including cursors with alpha blending. So it seems like
 > you could just set the cursor to the image id of your choosing,
 > and increment it in a repeat loop, just like 'set cursor to busy'.
 > Not tested:
 > put 67890,67891,67892,67893,67894,67895,67896,67897 into tAnimCursor
 > repeat with i = 1 to 100
 >   put item i wrap (the number of items in tAnimCursor) of tAnimCursor 
 >       into tCurrentCursor
 >   set the cursor to tCurrentCursor
 >   wait 10
 > end repeat
 > Seems like this ought to work.

Or for reuse you could put that into a custom command that emulates the 
way the "busy" token works, internally incrementing it like this (note 
that this is off the cuff and as untested as yesterday's progress bar 
stuff, so it may need similar fixes <g>:

-- Main app code:
on DoSomething
     repeat with i = 1 to 1000
     end repeat
end DoSomething

-- Somewhere in your libraries:

local sCustomBusyCursors, sCurBusyCursor

on SetCustomBusyCursor
     -- Initialize if needed:
     if sCustomBusyCursors is empty then
        put  "67890,67891,67892,67893,67894,67895,67896,67897" \
           into sCustomBusyCursors
     end if
     -- Increment the cursor ID:
     add 1 to sCurBusyCursor
     if sCurBusyCursor > the number of items of sCustomBusyCursors then
        put 1 into sCurBusyCursor
     end if
     -- Do the deed:
     set the cursor to (item sCurBusyCursor of sCustomBusyCursors)
end SetCustomBusyCursor

  Richard Gaskin
  Fourth World
  LiveCode training and consulting:
  Webzine for LiveCode developers:
  LiveCode Journal blog:

More information about the Use-livecode mailing list