Does anybody know of an easy way to tell whether a GIF file is playing
or not?
If possible I'd like to avoid trying to write something involved using
the CurrentFrame and FrameCount properties. I'm not even sure how that
would be done.
I'd rather have something like the sound() function,
I have a similar need.
Seems we can set the repeatCount, but I don’t see a way to test for
“currentLoop”
Theoretically we need something like — where I am making up an unknown prop
called “currentLoop":
if (the currentFrame of img "myGif" = the frameCount of img “myGif”) AND \
(the
I haven't done this in a long time, but in theory you should be able to
compare the currentFrame of the GIF with the frameCount.
if the currentFrame of img "myGif" = the frameCount of img "myGif" then
answer "It's done"
Regards,
Scott Rossi
Creative Director
Tactile Media, UX/UI Design
On
Thanks Scott, but if you've set the RepeatCount to more than 1 and it's
looping through the frames, twice for example, isn't there a possibility
you'll get the CurrentFrame the same as the FrameCount too early?
On 2/10/2016 2:25 PM, Scott Rossi wrote:
I haven't done this in a long time, but
It would also be helpful if a message was sent each time a new frame is
displayed. We could trap for those messages, count them, and go from there.
On 2/10/2016 2:48 PM, Sannyasin Brahmanathaswami wrote:
I have a similar need.
Seems we can set the repeatCount, but I don’t see a way to
If you want the GIF to stop playing when it reaches the last frame, why
wouldn't you set the repeatCount to 1?
If your GIF can play multiple times through (repeatCount = -1), then I
believe the only way you can track its frames is to poll it, with a
frequency that slightly exceeds its frame
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 *
Hi Scott - In my case I let my users decide how many times the GIF
cycles, so it more than likely will be more than once through, but not
infinitely as in -1. I like your second option, below, but how are you
getting the GIF's frame delay? Did I miss that Livecode property somewhere?
On
Scott R. wrote:
> If you want the GIF to stop playing when it reaches the last frame, why
> wouldn't you set the repeatCount to 1?
>
> If your GIF can play multiple times through (repeatCount = -1), then I
> believe the only way you can track its frames is to poll it, with a
> frequency that
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
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
These methods work, of course, but surprisely “horsey” for something that
should be easy.
Assuming that the engineers are not following this thread, or at least not
jumping in with solutions.
I added this enhancement request.
BR - thanks for filing this report. I guess we'll see if any of the LC
team have time to accommodate this.
On 2/10/2016 4:39 PM, Sannyasin Brahmanathaswami wrote:
These methods work, of course, but surprisely “horsey” for something that
should be easy.
Assuming that the engineers are not
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
Scott R. wrote:
> -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
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
On 2016-02-10 22:52, Ray wrote:
BR - thanks for filing this report. I guess we'll see if any of the
LC team have time to accommodate this.
Probably not before LiveCode 8.0, and the LiveCode 8.1 development cycle
is filling up pretty fast too.
All y'all make quite a lot of feature requests.
17 matches
Mail list logo