On 2/2/00 3:47 AM, Nicolas R Cueto <[EMAIL PROTECTED]> wrote:

>Hi again,
>
>How do you phrase the playStopped message? From its description in the
>reference, I'm guessing playStopped is what I need to use in order to
>prevent a sound file from starting to play before another sound file has
>finished playing.
>
>FWiW, the reason I need something like playStopped is that I want to play a
>series of consecutively numbered sound files, via something like:
>
>  repeat with i = 1 to (the number of sound files)
>  wait until playStopped (???)
>  play (sound file i)
>  end repeat
>

It's much simpler (and better) than this. PlayStopped is sent when the 
sound stops, so you don't have to use the wait command, MetaCard does it 
for you. The following should play a series of sound files, from 1.au to 
lastSound.au:

local whichSound, lastSound

on mouseUp
put 1 into whichSound
put 30 into lastSound  --here you would put whatever the last sound is
play (whichSound & ".au")
end mouseUp

on playStopped
add 1 to whichSound
if whichSound > lastSound then exit playStopped
play (whichSound & ".au")
end playStopped


On the other hand, if you _want_ to lock out user interaction during 
playback, you'd have to do something different.

Hope this helps,

gc

Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>



This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm

Reply via email to