Beachball cursor Help
Peter Brigham MD
pmbrig at gmail.com
Tue Nov 9 12:33:07 EST 2010
On Nov 9, 2010, at 10:47 AM, Devin Asay wrote:
> On Nov 9, 2010, at 6:38 AM, Peter Brigham MD wrote:
>> I'm just fooling around with trying out an animated cursor, and I
>> can't get it to work. I tried importing an animated GIF then setting
>> the cursor to it, but I only get what looks like an opaque white mask
>> of the first frame of the GIF and no animation. Do I conclude that I
>> have to cycle through the frames of the GIF explicitly via script? I
>> would have thought that just setting the cursor to the image id
>> would take care of that. I can do this with a button icon -- just
>> setting the icon of the button to the image ID of the GIF results
>> in a
>> nice animated button image. Why doesn't his work with a cursor?
> When I have used animated gifs, I've just shown then hidden an image
> object. Of course, that's not really the same because they don't
> follow your mouse movement like a mouse cursor.
> 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
> That said, LiveCard 4.5 is supposed to have enhanced cursor support,
> including cursors with alpha blending.
I'm still using 4.0, since 4.5 crashes my most-often-used stack
(reported to the support team, no word yet on resolution). I just
tried out my little "test animated cursor" stack in 4.5 and what I get
is a fixed cursor image (I assume the first image of the set). The one
improvement over 4.0 is that the exact same handler in 4.0 changes the
cursor to the mask (white) of the first image. At least 4.5 fills in
the color. But no animation in either.
> 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.
Well, OK, but I went ahead and used the http://ajaxload.info/ site to
download a great animated GIF cursor. So what do I do with that to
extract the individual images and list them separately in a loop? It
does seem that setting a cursor to an animated GIF ought to work out
of the box the way setting a button icon to an animated GIF does....
But if there's a workaround for cursors I'd settle for that for now.
Peter M. Brigham
pmbrig at gmail.com
More information about the Use-livecode