Animated GIFS

Shari shari at gypsyware.com
Fri Mar 18 11:45:12 EST 2005


I'm experimenting with animated GIFS in MC and have a question.

I created the frames as layers in Photoshop, opened ImageReady, and 
saved all the frames as an animated GIF.  This seems to work fairly 
well.  I can import the GIF.  Even though it is supposed to play only 
once (no looping), it loops over and over again.  But searching the 
archives offered a solution for that.

on mouseUp
   set the repeatcount of image  "kittycat.gif" to 0
   set the currentFrame of image "kittycat.gif" to 1
   wait 1 second
   show img "kittycat.gif"
   setTheFrame
exit mouseUp

on setTheFrame
   put "kittycat.gif" into MyGif
   set the currentFrame of image MyGIF to (the currentFrame of image MyGIF + 1)
   if the currentFrame of image MyGIF =  the frameCount of image MyGIF then
     hide img "kittycat.gif"
     exit setTheFrame
   else send setTheFrame to me in 50 milliseconds
end setTheFrame

This still leaves a question regarding the repeat looping:  If the 
GIF is hidden, it won't keep looping "behind the scenes" and hogging 
memory will it?





-- 
Mac and Windows shareware games
http://www.gypsyware.com


More information about the metacard mailing list