Windows Misery

Cubist at aol.com Cubist at aol.com
Mon Nov 17 16:29:32 EST 2003


sez graham.samuel at wanadoo.fr:
>For those that remember, I've been trying to find out what makes an app
>of mine work in Windows XP and Mac but not Windows 95,98 or ME. ...
>If you were following this story, the GIFs turned up on this particular
>card because they caused some other problem when on a different card to
>the main one, where they were displayed via transparent buttons... anyway,
>I don't know what all this is about and worse, I don't know how to get what
>I want (the animated buttons without the glitches I experienced before).
>I still think I need the RunRev team to tell me something about the Windows
>engine, but of course I would be more than grateful for suggestions from
>the list.
   If certain Win flavors can't deal with animated GIFs, you might try to do 
the animation "by hand", as it were.
   One: Make each frame of an animated GIF into a separate graphic image unto 
itself, these images named things like "Anim.one.0", "Anim.one,1", 
"Anim.one.2", etc etc.
   Two: Give the button that's going to 'play' your 'animation', a custom 
property called FrameNum which contains a non-negative integer.
   Three: Give this button the following handler:

on AnimateMe
  put ("Anim.one." & the FrameNum of me) into DisFrame
  set the icon of me to graphic DisFrame
  -- syntax may be invalid, but the idea should be clear, right?
  put (((the FrameNum of me) mod 15) + 1) into the FrameNum of me
  -- assumes a 15-frame animation; adjust the value "15" as desired
  send "AnimateMe" to me in 50 milliseconds
  -- this yields a 20/sec frame rate; adjust as desired if you need a 
different frame rate
end AnimateMe

   Do all three things, and when you send "AnimateMe" to the button, it will 
cheerfully go thru the 15-frame (or however many it is) animation forever and 
ever. If you want the frames to *not* be displayed at an absolutely constant 
rate, you can do that; the necessary modifications to AnimateMe are left as an 
exercise for the reader.

   Hope this helps...


More information about the use-livecode mailing list