Player Object problem

Barry Levine themacguy at macosx.com
Sun Nov 10 10:52:00 CST 2002


I have a few Player Objects in my stack that contain QT movies. I have 
no problem triggering the playing of the movies at the appropriate 
times. However, I do have a problem getting the movies to maintain the 
display of their last frames or even to set them to the last frames via 
Transcript. This occurs when I leave the current card, move to another, 
and then return. The movie's currentTime resets to 0. Okay, I can 
understand that might happen so I'll add some code to my stack script. 
Here is my code:

on doThis
	go next card
	-- (then do something there)
	go prev card
	-- (now we're back on the card where the movie is)
	set the currentTime of player "player1" to the duration of player 
"player1"
end doThis

The problem is that the currentTime remains at 0 when I test this using 
the messageBox.

However, if I add a button (named "setMaxDuration") on the card with 
the code:

on mouseUp
	set the currentTime of player "player1" to the duration of player 
"player1
end mouseUp

...that works! So I have to change my stack code to:

on doThis
	go next card
	-- (then do something there)
	go prev card
	-- (now we're back on the card where the movie is)
	send mouseUp to button "setMaxDuration"
end doThis

Have I found a bug (or found one that has already been identified 
months ago)? The bootm line is that I'd like to have the card remain 
exactly as I left it when I return to it. It seems that the player 
objects do not have persistency. Am I not setting the various options 
correctly?

BTW - The lista who recommended setting the UI to Mac (away from 
Appearance Manager) if running in Jaguar was quite correct. Rev 1.1.1 
has stopped crashing as long as I set this properly immediately upon 
launch.

Thanks,
Barry




More information about the use-livecode mailing list