Waiting until a player is loaded

J. Landman Gay jacque at hyperactivesw.com
Sat Sep 30 22:05:33 EDT 2006


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?

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



More information about the use-livecode mailing list