# (F5) Sound help again

**URL:** <https://forum.kirupa.com/t/f5-sound-help-again/9471>\
**Category:** flash\
**Created:** [December 12, 2002, 1:42pm UTC](https://forum.kirupa.com/t/f5-sound-help-again/9471 "2002-12-12T13:42:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ToddziLLa](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@ToddziLLa](https://forum.kirupa.com/u/ToddziLLa)\
**Post date:** [December 12, 2002, 1:42pm UTC](https://forum.kirupa.com/t/f5-sound-help-again/9471/1 "2002-12-12T13:42:20Z")

</div>

OK guys, this code works, but I would like the sound to play on when the ` key is pressed (that key is left of 1) Can I do that, or is this button unusable in Flash?

onClipEvent (enterFrame) {  
if (Key.isDown(Key.SPACE)) {  
s1 = new Sound();  
s1.attachSound(“sound1”);  
s1.start();  
}  
}

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 13, 2002, 2:58am UTC](https://forum.kirupa.com/t/f5-sound-help-again/9471/2 "2002-12-13T02:58:49Z")

</div>

what you want to do is use this code to find the number value of that key.

Step 1:

onClipEvent(keyDown) {  
trace(Key.getCode());  
}  
once you’ve figured out what that number is

Step 2:

onClipEvent(enterFrame) {  
if(Key.isToggled(put the number you found from the first step));  
s1 = new Sound();  
s1.attachSound(“sound1”);  
s1.start();  
}  
}  
just add these changes to your code, its basically the second line that needed to be altered.

That should work, hope it helps.

Kyle

\<:}
