Waiting until a player is loaded
revdev at pdslabs.net
Sat Sep 30 21:26:41 CDT 2006
Have you tried setting the filename of the players to empty between movies? I've
seen that solve similar problems.
J. Landman Gay wrote:
> 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
> Anyone know how to solve this?
More information about the use-livecode