# Stop sound when input text field is empty

**URL:** <https://forum.kirupa.com/t/stop-sound-when-input-text-field-is-empty/331418>\
**Category:** flash\
**Created:** [July 28, 2013, 12:17am UTC](https://forum.kirupa.com/t/stop-sound-when-input-text-field-is-empty/331418 "2013-07-28T00:17:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NikkiKat](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@NikkiKat](https://forum.kirupa.com/u/NikkiKat)\
**Post date:** [July 28, 2013, 12:17am UTC](https://forum.kirupa.com/t/stop-sound-when-input-text-field-is-empty/331418/1 "2013-07-28T00:17:04Z")

</div>

when somebody backspaces a clicking noise happens, and when the field is empty I want the noise to stop while they are still pressing backspace. Any ideas? (I’m still kinda a noob at scripting=)) But the solution should not be so difficult to identify.

Code:

var backSpace:Sound = new Sound();  
var myChannel:SoundChannel = new SoundChannel();  
backSpace.load(new URLRequest(“Sounds-Music/backSpace.mp3”));

…

if(textBox.length == 0){  
myChannel.stop();

}
