[ANN] Animated gif for OSX progress
Joel Guillod
joel.guillod at net2000.ch
Mon Aug 22 04:49:30 EDT 2005
> You are most welcome, Joel.
>
> And Howard, you are not actually stopping the animation which
> continues in
> the background. As in the original posting and repeated when
> uploaded to ssBk
> Online, set the repeatCount of the image ID to -1 to start the
> animation and
> 0 to stop it.
On what platform do you run? I still dont see the animation during
script execution. Try this on MacOSX 10.4.2:
1.- Put this handler in the script of a card displaying your
animation image:
on doTheLongProcess pCount
repeat with i=1 to pCount
put i
end repeat
end doTheLongProcess
2.- Ensure that the image is animated, i.e. type in the msg box: "set
the repeatCount of the image X to -1"
3.- Type the following in the msg box "doTheLongProcess 4000"
4.- Here you notice that the msg box displays an increasing value but
the image is not animated.
Now, do you catch my former question? Or does your own computer
display the animation, mine does not...
So to allow for the animation to be displayed during the execution of
script, I do the following:
1.- Change the above script to:
on doTheLongProcess pCount
repeat with i=1 to pCount
put i
animateImg -- this is the fix to allow for the animation to
display.
end repeat
end doTheLongProcess
local llast_animate = 0
on animateImg i
-- dont do the wait for each iteration of the calling handler
since this will slow down the execution:
if millisecs()-llast_animate>100 then
wait 0 millisecs
put millisecs() into llast_animate
end if
end animateImg
2.- Note that calling "wait" allows for the screen to display.
3.- Dont use a "lockscreen" or "set lockscreen to true" in your
script because this will prevent the redisplay, of course.
That's my proposal. I build a test stack named "Display animation
process" which you find under username "imed". It will show you time
wasting depending of the settings (animate or not, screen locked or
not).
JG
More information about the use-livecode
mailing list