movie in a standalone

Klaus on-rev klaus at major.on-rev.com
Sat Nov 13 07:30:55 EST 2010


Hi Edward,

> Well thanks to the list have a much better understanding of getting things into a bundle. I didn't know you could place a file directly into the resource in the bundle, instead of letting the standalone maker do it. It is working fine now in finding the files.
> But now a new problem, i play a short video movie with the following script:
> on openCard
>   global pname,pic
>   set filename of image "1" to "Resources/BKG.paneling.jpg"
>   show image 1
>     set the currentTime of player 1 to 0
>  set the filename of  player 1 to "resources/flight3.mov"
>  set the showController of player 1 to false
>  play player 1 --"flight3.mov"
> end openCard
> 
> 
> on playstopped
>   set the currentTime of player 1 to 0
> go cd "pool 13-a"
> end playstopped
> 
> It works fine on the  desktop but in the standalone the cd opens, I can see the first frame of the movie, but then it goes right to the next card without playing the movie. Any ideas?

from the docs about "playstopped":
...
Note:  The playStopped message is sent when a card containing the player closes and when the player's filename property is changed...!!!
  To prevent a playStopped handler from being executed inappropriately, set the lockMessages to true before changing the filename or switching cards:
...

And the docs also show the workaround:
on openCard
  global pname,pic
  set filename of image "1" to "Resources/BKG.paneling.jpg"
  show image 1

  lock messages -- prevent sending playStopped
  set the currentTime of player 1 to 0
 set the filename of  player 1 to "resources/flight3.mov"
 set the showController of player 1 to false
 unlock messages ##!!!
 start player 1
end openCard

Looks like the IDE catches the playstopped messages somehow!?


Best

Klaus

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




More information about the use-livecode mailing list