Animated Gifs - Keep them Running

Sannyasin Brahmanathaswami brahma at hindu.org
Fri Dec 13 11:28:20 EST 2019


@richard: I don't think *anything* including widget, run in a different thread on LC

@HH and Tom

Great idea!  (using send)

----------  aside
fyi dictionary is confused:

 rotate:  
OS	mac, windows, linux
Platforms desktop, server, mobile

It should say, (hopefully) iOS and Android..whatever..
-----------
I assume you can make an independent handler for each svg…or GIF and send in time… how much time do you give? Do you set flags like AnimationEngine? I found them problematic if we use repeat loops on mobile. (can't break a looping repeat if by (un)setting a flag) @tom can you send a snippet of you code? Because you have worked out the kinks.   I imagine something like this,

local sRotateFlag   # 1 or 0

command startSpinner
	put 1 into sRotateFlag
	show widget "spinner"
	rotateBusySpinner
end startSpinner

command stopSpinner
	put 0 into sRotateSpinner
	hide widget "spinner"
command stopSpinner 

command rotateBusySpinner
	if sRotateFlag = 1 then
		  rotate widget "spinner" by -10
	end if
	send rotateBusySpinner to me in 10  millisecond
end rotateBusySpinner

I suppose you can use an array to poke image names, to set them several going an once. How are you doing that?

I really don't know how much the CPU for engine on mobile can take before you see performance issues. What is the  minimum time "idle" time where you poke a "send" before you interfere with the engine on mobile:   rotate 10 millisecond, 200 milliseconds? Of course I can try it …. my Moto6 is good "middle" ground between high end android cpu and low end

BR


.i rotate an svg using send it time and it seems to work really well.
i can rotate many sgs simultaneously....so maybe svg is the answer
here....as far as a progress indicator.

On Thu, Dec 12, 2019 at 5:47 PM hh via use-livecode <
mailto:use-livecode at lists.runrev.com> wrote:

> @BR
>
> Don't run the gif as animation but do your own animation
> by setting the (or some) frames using "send in time".
> By that you can control better the "animation".



More information about the use-livecode mailing list