Waiting until a player is loaded

Klaus Major klaus at major-k.de
Sun Oct 1 05:04:27 EDT 2006


Hi Jaqueline,

> I am trying to load a series of movies into players in a loop, in  
> order to make thumbnails. Inside a repeat loop, I set each player's  
> filename, then take a snapshot of it to get a thumbnail image. This  
> works just fine when I step through it in the debugger.
>
> However, if I let the loop run at its natural speed, I get a bunch  
> of blank snapshots, either because the content isn't fully loaded  
> before the script continues, or because the screen isn't refreshing  
> (I can't tell which.) I need a way to force the loop to wait until  
> the player is fully loaded, and also something that will refresh  
> the screen so that a snapshot has something to take a picture of.
>
> I have tried locking and unlocking the screen to force a redraw,  
> tried "go this card" to force a redraw, tried waiting various  
> amounts of time both with and without messages, tried "set the  
> currentTime of player 1 to the duration of player 1" to force a  
> full load, and everything else I can think of. In no case does the  
> player content display. I am not sure if this is because the screen  
> simply isn't redrawing (likely), or because the content isn't fully  
> loading before the script continues (possible.)
>
> Anyone know how to solve this?

can't you just use Trevors extraordinary EnhancedQT External for this  
(and other extremely handy) task(s)?
No problems in a loop :-)

And with the new version (already uploaded this one, Trevor?) there  
is no need for exporting a thumbnail
to an external file, just put it into a variable and do whatever you  
want with the data.

> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the Use-livecode mailing list