Still stuck on playing a sound with a player

J. Landman Gay jacque at hyperactivesw.com
Tue Dec 17 14:44:29 EST 2013


On 12/17/13 3:52 AM, Graham Samuel wrote:

> The script of the card I want to be showing while the sound plays just says:
>
>   on openCard
>       set the playrate of player "playPoem" of cd 1 of stack "sounds" to 1
>       play "playPoem" of cd 1 of stack "Sounds" -- this just carries on until the player gets a 'playstopped' message
>       put the result
>   end openCard

Do this:

   set the playrate of player "playPoem" of cd 1 of stack "sounds" to 1
   start player "playPoem" of cd 1 of stack "sounds"

You don't really need the "start" command if you aren't dealing with 
callbacks, I only needed that because the playrate alone doesn't trigger 
them.

Alternately you can just use the "start" command without the playrate if 
the player is working okay without it. My app had some issues but my 
setup was much different than yours.

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




More information about the Use-livecode mailing list