Large picture anmation
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 25
- Joined: Wed Aug 28, 2019 4:58 pm
Large picture anmation
I am a long time Director user making the switch to Livecode. I am developing on a Mac using Livecode 9. The final program is to run on a Windows 10 PC in portrait mode. I have installed quick time and LAV filters.
I am trying to set up a video screensaver for a project. I first tried using an mp4. But got different issues popping up. Video only played top half or didn't play at all or I couldn't get a mouseUp to work. Tried animated Gif but it wouldn't play. So I decided to go with a repeat statement by updating an image to create a video playing effect. It works but there is a little lag in starting to play on startup and when the program times out to go back to it. Any suggestions on what I can do to make this work more efficient?
Thank you so much for any help!!
Derrick
I am trying to set up a video screensaver for a project. I first tried using an mp4. But got different issues popping up. Video only played top half or didn't play at all or I couldn't get a mouseUp to work. Tried animated Gif but it wouldn't play. So I decided to go with a repeat statement by updating an image to create a video playing effect. It works but there is a little lag in starting to play on startup and when the program times out to go back to it. Any suggestions on what I can do to make this work more efficient?
Thank you so much for any help!!
Derrick
Re: Large picture anmation
Hi,
Check "prepare image" in dictionary, maybe is useful in this case
Best
Jean-Marc
Check "prepare image" in dictionary, maybe is useful in this case
Best
Jean-Marc
https://alternatic.ch
-
- Posts: 25
- Joined: Wed Aug 28, 2019 4:58 pm
Re: Large picture anmation
Ok, thank you. I will give it a shot and let you know if that helps!
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Large picture anmation
I don't think Quicktime is a good idea as it is an obviated technology.
Personally I'd go for an image series displayed as backGroundPatterns inside a graphic object.
This will mean that you are NOT dependent on your end-users having to install anything extra onto
their Windows OS installs.
Here's a very crude example stack just to demonstrate how this sort of thing works:
-
Personally I'd go for an image series displayed as backGroundPatterns inside a graphic object.
This will mean that you are NOT dependent on your end-users having to install anything extra onto
their Windows OS installs.
Here's a very crude example stack just to demonstrate how this sort of thing works:
-
- Attachments
-
- Animation Example.livecode.zip
- Here's the stack.
- (145.84 KiB) Downloaded 240 times
-
- Posts: 25
- Joined: Wed Aug 28, 2019 4:58 pm
Re: Large picture anmation
Hey richmond62,
Thank you for the response.
I did go away from quick time. As I said in my previous post, I decided on an image series using the repeat command. It updates a button icon every three ticks. This works pretty well but it seems to drag loading the screensaver. Once it loads it runs fine but this happens even if it times out to go back to screensaver. I actually took the video and exported it out as sequential png images. I am just wanting to know if there is a way to take the lag out of this.
On another note...
I have noticed that a video playing in Windows 10 under Livecode has been a on going issue. Is this something that is trying to be resolved?
Thank you for the response.
I did go away from quick time. As I said in my previous post, I decided on an image series using the repeat command. It updates a button icon every three ticks. This works pretty well but it seems to drag loading the screensaver. Once it loads it runs fine but this happens even if it times out to go back to screensaver. I actually took the video and exported it out as sequential png images. I am just wanting to know if there is a way to take the lag out of this.
On another note...
I have noticed that a video playing in Windows 10 under Livecode has been a on going issue. Is this something that is trying to be resolved?
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Large picture anmation
I really couldn't tell you, I'm afraid, because I work on Linux and Macintosh,a video playing in Windows 10 under Livecode has been a on going issue
and have done no serious work on Windows since doing something with
Toolbook on Windows 2000.
However, although I did quite a bit of work with LiveCode (or, Runtime Revolution
as it was then called) in 2001-2002 involving Quicktime for a commercial thing
targetting both Windows and Macintosh (I developed on MacOS 10.1 and my employers
undertook to organise beta testing of the Windows version - something they never did,
and paid the price); when I have, subsequently tried stuff with video in LiveCode I seem
to have just ended up wasting my time.
Having said that, there are a lot of developers who do use LiveCode with video on Windows . . .

-
- Posts: 25
- Joined: Wed Aug 28, 2019 4:58 pm
Re: Large picture anmation
I downloaded your example and it is exactly the code I ended up using. (Great minds think alike!
) I think that part of my issue may be the fact that there is 479 frames to make this "video" animation. I just don't know what to do to make it better.
I have always done my developing on a mac, but most of the people we do work for are Windows based and prefer everything to be on their systems. I have not had the opportunity to build for Linux and am not real familiar with it except some just poking around at it.

I have always done my developing on a mac, but most of the people we do work for are Windows based and prefer everything to be on their systems. I have not had the opportunity to build for Linux and am not real familiar with it except some just poking around at it.
-
- Posts: 25
- Joined: Wed Aug 28, 2019 4:58 pm
Re: Large picture anmation
I did just notice one thing that I did different and it might make a difference. I have all my frames invisible instead of placing them off the screen. Would that make a difference you think on the speed to load the card?
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Large picture anmation
Ha, Ha, Ha . . .
The ONLY reason I had all those 'frames' visible on the card was because
it was a goofy example stack. I would, normally have them at some
position on the card like -2000, -2000 so no-one would see them, and
the computer wouldn't have to draw the things to screen.
The mind boggles at how 479 'frames' might slow things down if the OS
is doing screen redraws of those all the time.
The ONLY reason I had all those 'frames' visible on the card was because
it was a goofy example stack. I would, normally have them at some
position on the card like -2000, -2000 so no-one would see them, and
the computer wouldn't have to draw the things to screen.
The mind boggles at how 479 'frames' might slow things down if the OS
is doing screen redraws of those all the time.
Last edited by richmond62 on Wed Aug 28, 2019 10:00 pm, edited 2 times in total.
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Large picture anmation
One of the marvellous things about LiveCode is that 90% of the time it really doesn't matterI have not had the opportunity to build for Linux and am not real familiar with it except some just poking around at it.
what sort of operating system you are developing on (Linux, Windows, Macintosh), and
one can then spin off standalones for the systems one is not developing for.
It is the 10% that you have to be careful with.

-
- Posts: 25
- Joined: Wed Aug 28, 2019 4:58 pm
Re: Large picture anmation
I seem to always fall into the 10% on our projects! HaHa!
I don't actuallly have the frames sitting off the screen. They are center of the screen and I just set the visible to false. I would think even if they are set to false that they are still recognized with being on the card.
I don't actuallly have the frames sitting off the screen. They are center of the screen and I just set the visible to false. I would think even if they are set to false that they are still recognized with being on the card.
Re: Large picture anmation
LC won't draw the image if it's either off screen or invisible, so I don't think that matters. I'd go with the preload suggestion. When the card opens, preload the first image. Then in your repeat loop, show the image and immediately preload the next one.
I'd think this would work fine with your original gif as well. Just preload it when the card opens or any time it may be needed (if the screen saver is using a timer, preload it shortly before the timer runs out.) That way it's in RAM before it needs to display.
One advantage of using a gif is that you don't need a repeat loop, which is slow and can be blocking unless you add instructions to yield time to the engine.
I'd think this would work fine with your original gif as well. Just preload it when the card opens or any time it may be needed (if the screen saver is using a timer, preload it shortly before the timer runs out.) That way it's in RAM before it needs to display.
One advantage of using a gif is that you don't need a repeat loop, which is slow and can be blocking unless you add instructions to yield time to the engine.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 25
- Joined: Wed Aug 28, 2019 4:58 pm
Re: Large picture anmation
Thank you for the post. I see what your saying. I will give that a try. I had trouble getting the gif to run well. But I am not sure if I was loading it or placing it properly. Does it just get imported and treated as an image?
Re: Large picture anmation
Yes, because in the end it IS an image.dpalmersce@gmail.com wrote: ↑Thu Aug 29, 2019 5:42 pmDoes it just get imported and treated as an image?

-
- Posts: 25
- Joined: Wed Aug 28, 2019 4:58 pm
Re: Large picture anmation
True! Haha.
Thank you for the help
Thank you for the help