Geoff Canyon kindly advised:
> 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
This script (in a button) works, kind of. Hitting the button results in
only one sound-file playing (1.au). When, instead, I type "send
'playStopped' to button x" in the Message Box, the sound files do play
(1.au, 2.au, 3.au... lastSound.au), however, not self-sequentially as
I'd expected (i.e., they play only upon each re-send from Message Box,
until whichsound > lastSound).
FWiW, I figure that the ghost in Geoff Canyon's imaginative loop is
perhaps the non-performing playStopped message. In the more likely
event, though, that it's my rescripting that's the problem, here it is
in all its brazen ugliness:
global gPrepReaderCardsPaths -- stores the directory for the stack
local twhichSound, tThisSound, tlastSound
on mouseUp
put 1 into tWhichSound
put the cSentences of this card into tLastSound
put gPrepReaderCardsPaths["sounds"] & "/page" & (field "fCardNumber"
of this card) & "/" &\
tWhichSound & ".au" into tThisSound
play tThisSound
end mouseUp
on playStopped
add 1 to tWhichSound
if tWhichSound > tLastSound then exit playStopped
put gPrepReaderCardsPaths["sounds"] & "/page" & (field "fCardNumber"
of this card) & "/" &\
tWhichSound & ".au" into tThisSound
play tThisSound
end playStopped
As always, thank you in advance.
Cheers.
--
Nicolas R Cueto
Takakura JHS/SHS
Nagoya, Japan
This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm