Play sounds on a key press?

Does anyone know script for doing this?
I’m trying to play a sound on a space bar press.
I am using Flash MX
please help


//Define Sound object
var my_sound = new Sound(this);
//Attach sound symbol from the Library (don't forget to export it for ActionScript)
//Execute the code whenever a key is pressed
my_sound.onKeyDown = function() {
	//Check if the spacebar has been pressed
	if (Key.getCode() == 32) {
		//Play the sound
//Add the Sound object to the Key object listeners

thank you very much … helped a whole lot

No problem, sinner. :slight_smile: