Bernd - thanks for this idea. Yes, it's a little sticky but if nothing else comes along I might be able to massage it somewhat.

On 2/10/2016 3:46 PM, BNig wrote:
Hi Ray,

not pretty but seems to work:

----------------------------------------
local sGifName
local sLastFrame
local sRepeatTimesFrames
local sCount

on mouseUp
    put "myGif" into sGifName
    put the currentFrame of img sGifName into sLastFrame
    put 7 into tRepeatCount
    put tRepeatCount * the frameCount of img sGifName into sRepeatTimesFrames
    put 0 into sCount
    put the milliseconds into sMS
    set the repeatCount of img sGifName to tRepeatCount
    send "checkGifAnimation" to me in 0 milliseconds
end mouseUp

on checkGifAnimation
    if "checkGifAnimation" is in the pendingMessages then exit
checkGifAnimation
    if the optionKey is down then exit checkGifAnimation -- just a precaution
    put the currentFrame of img sGifName into tCurrFrame
    if tCurrFrame <> sLastFrame then
       add 1 to sCount
       put tCurrFrame into sLastFrame
       if sCount >= sRepeatTimesFrames then
          answer "Animation Stopped"
          exit checkGifAnimation
       end if
    end if
    send "checkGifAnimation" to me in 40 milliseconds -- 40 ms seems to be
plenty
end checkGifAnimation
----------------------------------------

Kind regards
Bernd



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Motion-Graphic-in-LiveCode-tp4682250p4701009.html
Sent from the Revolution - User mailing list archive at Nabble.com.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to