Quote Originally Posted by 5Five555 View Post
That depends on how you named your sound files.

If you named each sound the same as the keyCode of the key that it's assigned to then you can use getDefinitionByName to create the sound just by the keyCode of the key that is pressed.

If you named the sounds differently than above, then you'll probably need an array of every sound and an array of every keyCode. When a key is pressed you find the index in the keyCode array of the pressed key then use that index to find the appropriate sound.
i dont have a sound yet but when i get one i just want that one sound to play every time a key is pressed. for example like the sound on the iphone keyboard when typing. how would one go about doing so