Thanks to Scott Rossi's help I am getting a bit of control
Over gifs. . 

The following works fine to stop an animated GIF and run it just once. But
my second set of handlers, where I am trying to pass the image name
In a variable along with a custom message doesn't work. Ultimately I would
want to get away from explicitly having to declare the image name in the
handler, but put the handlers in the project script and pass the image name
down from different cartoons in a variable to the one handler does all.

I must be doing something wrong.
Any hints?

This works where the image is explicity declared in each line

on mouseUp
  set the repeatcount of image  "SmallOm" to 0
  set the currentFrame of image "SmallOm" to 1
  wait 1 second
  setTheFrame
end mouseUp

on setTheFrame
  put "SmallOm" 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
exit setTheFrame
  send setTheFrame to me in 50 milliseconds
end setTheFrame

======The following doesn't work: =======
(Do we need to state a global to go across handlers that run in the same
process?)

on mouseUp
  put "SmallOm" into MyGIF
  set the repeatcount of image  MyGIF to 0
  set the currentFrame of image MyGIF to 1
  wait 1 second
  setTheFrame MyGIF
end mouseUp

on setTheFrame 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
exit setTheFrame
  send setTheFrame to me in 50 milliseconds
end setTheFrame


Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
www.HinduismToday.com
www.HimalayanAcademy.com
[EMAIL PROTECTED]


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to