When is a GIF Finished Playing?

Ray ray at linkit.com
Wed Feb 10 19:31:42 EST 2016


Guys - thanks for this input.  I'm going to experiment with 'rolling my 
own' GIF player as suggested.  I guess I was just looking for an easy 
way out.  There's a lot of time based events happening simultaneously in 
the project I'm working on so I'm already relying heavily on 'send' 
commands to get around Livecode's single thread environment.  I also 
have code which detects when end users interrupt a sequence of time 
based events so there's one more thing to code for, but it shouldn't be 
too hard.

Thanks again,

Ray

On 2/10/2016 5:59 PM, J. Landman Gay wrote:
> I had to manage gif playback manually once. It worked well to just set 
> the currentframe repeatedly, ignoring auto-playback entirely. That way 
> you can keep track of how many cycles you've done and you can control 
> the speed of playback by changing the "send in time" frequency. You 
> always know what frame you're on because the script sets it.
>
> I didn't bother to load individual images, just setting the 
> currentframe worked okay.
>
> On 2/10/2016 4:00 PM, Scott Rossi wrote:
>> Nope, you just have to "know"  :-)
>>
>> -HH makes a good point that I forgot about: if you control the playback
>> yourself, setting the GIF's currentFrame every so many millisecs, you'll
>> always know which frame you're on in the GIF.  This will work for most
>> GIFs, but can mess up playback of GIFs that use varying frame delays 
>> since
>> timing will differ from how the GIF was originally authored.
>
>





More information about the use-livecode mailing list