Hi people, got a problem any insights, tutorials online or
clues gratefully received.
I'm using a KeyIsDown action to trigger a sound. This works
fine, however if the key is pressed down continuously it starts the
sound playing again and again. What I need is somekind of control
that detects the keydown, triggers the sound but then doesn't keep
re-starting the the sound whilst the key is depressed. Is there an
action in the sound commands that detects to see if a sound is
playing which I can use - like the old "soundIsBusy" command in
Try doing sound.onSoundComplete = function() - make a boolean
for sound playing, set it to true when the sound starts, only play
the sound if the boolean is false, set it to false when the sound
is done playing.
You can try that. The real only way to detect if a sound is
playing is to set up a boolean value for it; but be careful if you
use stopAllSounds- make sure to reset the boolean after.