# Stopping double sound play

**URL:** https://forum.kirupa.com/t/stopping-double-sound-play/96265
**Category:** Uncategorized
**Created:** [December 7, 2003, 1:35am UTC](https://forum.kirupa.com/t/stopping-double-sound-play/96265 "2003-12-07T01:35:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![minimalistik](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@minimalistik](https://forum.kirupa.com/u/minimalistik)
#### Post date: [December 7, 2003, 1:35am UTC](https://forum.kirupa.com/t/stopping-double-sound-play/96265/1 "2003-12-07T01:35:03Z")

</div>

I have assigned actions to a button i have used, to play an mp3 file.

However, I don’t want the mp3 to play over and over if you keep pressing the button more than once.

How do you stop the recurring sound action?

i have assigned the stop button’s action window with:

on(release) {  
stopAllSounds();  
}

and play button with:

on (release) {  
kirupaSound = new Sound(this);  
kirupaSound.attachSound(“music”);  
kirupaSound.start(0, 99);  
}
