I want a gunshot sound to activate when the SPACE bar is
It works fine, however the short sound is within the
onEnterFrame event handler, and it repeats many times whilst the
user holds down the space bar for a fraction of a second.
How do I make that sound activate just once per SPACE bar
press, regardless of how long SPACE bar is held down ?
You could check for the propertys position and duration of
Look for example code in the Flash help (Sound.duration). If
position is smaller than the duration you should not trigger
or you just check if the position is below a specific value
to make it
possible to trigger the sound again before it ends.