Re: Animated Gifs on Other Cards

2017-01-03 Thread hh
TMHO it is much better to animate gifs by an own handler (send in
'regular' time intervals, for example every next full second).
Only by that you have full control on the animation speed on different
hardware. I have a lot of gifs whose speed is set to "fastest", not this
perfect on fast machines, only fine old PowerPCs.

And by setting ONE "check" (variable) you can start/stop
the animation:
= stop at once/ after finishing the loop/ after a certain time amount
= don't stop but pause only
= stop forever after a certain number of repeats
= pause for a certain amount of time
= pause while the suspended
= stopping if the cycle becomes too slow
etc ...
As usual this may all be done by one handler for each gif or
by ONE handler up in the message hierarchy for several gifs.

___
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


Re: Animated Gifs on Other Cards

2017-01-03 Thread Sannyasin Brahmanathaswami
Good input… off screen or on top card of open window behind the top stack: GIF 
is still running…

Given that we might be instantiating the appearance of these GIFs (icons of 
buttons) "here and there and everywhere" via some low level back script or lib 
that was brought into the msg path with start using… it makes sense then to 
hide it as a "best practice" … with a generalized behavior… this would avert 
the need for additional "sensor code" to be have to check if the window was 
open but behind etc.  

I haven't tried it recently, but I once (years ago) had a number of animated 
GIFs on my desktop (mac)… and the Finder ran slow as molasses.  Put them all 
into a folder, Finder became responsive again.

This got me to thinking the other day, if they slow down LC performance when 
running.

The other term use case beside brief appearance of indicators that come and go, 
 would be even more intensive: in this case we know what is happening, they are 
all there, running on top: set 4-8 animated GIF figures to start moving around 
on the screen, with some voice over story line… will this "die" on a cheap 
Android phone? TBD

Of course we can benchmark this now that we know when the GIF still runs or not.

BR

--
 
Jacque wrote:
I've hidden "busy" gifs before without any repercussions.



___
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

Re: Animated Gifs on Other Cards

2017-01-03 Thread Bob Sneidar
Makes sense. There really is no "off screen" to the modern computer.
On Jan 3, 2017, at 13:03 , J. Landman Gay 
mailto:jac...@hyperactivesw.com>> wrote:

Clever. So I got curious, what would happen if the stack is moved offscreen? 
Result: it still updates. What happens if you hide the image? Result: it 
doesn't update.

I kind of knew that last one already, I've hidden "busy" gifs before without 
any repercussions.

--
Jacqueline Landman Gay | 
jac...@hyperactivesw.com
HyperActive Software   | 
http://www.hyperactivesw.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


Re: Animated Gifs on Other Cards

2017-01-03 Thread hh
Yet another option.

One may use for the 'it-pauses-until-coming-back'-test a gif that
counts in seconds from 0 up to 100:

giphy.com/gifs/TCJTqRAxRbhGU   (repeatCount=-1)

Note. If you go to a different window (of LC or not), leaving the
running gif on the top card of its window, then the gif keeps going
on, whether hidden by another window or not.


___
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


Re: Animated Gifs on Other Cards

2017-01-03 Thread J. Landman Gay

On 1/3/17 2:07 PM, Richard Gaskin wrote:

Richmond Mathewson wrote:


If a GIF is running on another card I really wonder how you determine
that.


Put an animated GIF on a card, and this in the stack script:

on idle
   put the currentFrame of img 1 of cd 1
end idle

Then go to another card.

Here, a quick test confirms Jacque's hunch; the Message Box only updates
when I'm on the card with the GIF.



Clever. So I got curious, what would happen if the stack is moved 
offscreen? Result: it still updates. What happens if you hide the image? 
Result: it doesn't update.


I kind of knew that last one already, I've hidden "busy" gifs before 
without any repercussions.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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


Re: Animated Gifs on Other Cards

2017-01-03 Thread Richard Gaskin

Richmond Mathewson wrote:

> If a GIF is running on another card I really wonder how you determine
> that.

Put an animated GIF on a card, and this in the stack script:

on idle
   put the currentFrame of img 1 of cd 1
end idle

Then go to another card.

Here, a quick test confirms Jacque's hunch; the Message Box only updates 
when I'm on the card with the GIF.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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


Re: Animated Gifs on Other Cards

2017-01-03 Thread Richmond Mathewson



On 1/3/17 9:47 pm, Peter Bogdanoff wrote:

I suppose one way to test, is to go to the card where the GIF is running—does 
it start at the beginning every time you go there?


I'm not sure if that would work: as if you left a card while a GIF was 
in mid-cycle it might be paused at that frame until you returned to that 
card.


Richmond.


pb

On Jan 3, 2017, at 11:33 AM, J. Landman Gay  wrote:


On 1/2/17 9:23 PM, Sannyasin Brahmanathaswami wrote:

When are on Card 1… is that GIF still running and taking up CPU
cycles even though it is effectively "hidden" by virtue of being on
Card 3?

I don't believe so, LC only draws what is on the current card.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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



___
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


Re: Animated Gifs on Other Cards

2017-01-03 Thread Richmond Mathewson

If a GIF is running on another card I really wonder how you determine that.

Richmond.

On 1/3/17 9:33 pm, J. Landman Gay wrote:

On 1/2/17 9:23 PM, Sannyasin Brahmanathaswami wrote:

When are on Card 1… is that GIF still running and taking up CPU
cycles even though it is effectively "hidden" by virtue of being on
Card 3?


I don't believe so, LC only draws what is on the current card.


___
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

Re: Animated Gifs on Other Cards

2017-01-03 Thread Peter Bogdanoff
I suppose one way to test, is to go to the card where the GIF is running—does 
it start at the beginning every time you go there?

pb

On Jan 3, 2017, at 11:33 AM, J. Landman Gay  wrote:

> On 1/2/17 9:23 PM, Sannyasin Brahmanathaswami wrote:
>> When are on Card 1… is that GIF still running and taking up CPU
>> cycles even though it is effectively "hidden" by virtue of being on
>> Card 3?
> 
> I don't believe so, LC only draws what is on the current card.
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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


Re: Animated Gifs on Other Cards

2017-01-03 Thread J. Landman Gay

On 1/2/17 9:23 PM, Sannyasin Brahmanathaswami wrote:

When are on Card 1… is that GIF still running and taking up CPU
cycles even though it is effectively "hidden" by virtue of being on
Card 3?


I don't believe so, LC only draws what is on the current card.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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

Animated Gifs on Other Cards

2017-01-02 Thread Sannyasin Brahmanathaswami
if we import an animated gif into a card called "image-resources" which might 
be e.g. card 3. with repeat set to -1… i.e it is running continuously…

When are on Card 1… is that GIF still running and taking up CPU cycles even 
though it is effectively "hidden" by virtue of being on Card 3?

OR

is best practice to always stop, start and stop them programmatically so that, 
when not actually shown, they are not repeating?

Use case would be to use an animated give as the icon for a button… if you set 
the icon ID of  a button on cd 1 that is an animated running GIF stored on card 
3  it works, but I'm concerned about any performance degradation that these 
might have if left repeating "behind the scenes"

perhaps there are none, if not, that would keep life simple and you don't have 
to commands to stop and start the GIF every time you want to show it.

BR



___
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