all groups > flash (macromedia) > january 2006 >
You're in the

flash (macromedia)

group:

playing sounds by key press


playing sounds by key press muff1nm4n
1/15/2006 9:12:57 PM
flash (macromedia):
I'm trying to figure out how to play a sound when I press a key on the
keyboard. I made the button, and I attached a sound to it, but I want to be
able to play the sound (click the button) when I press keys on the numpad.
Re: playing sounds by key press MOLOKO
1/16/2006 10:20:43 AM
[quoted text, click to view]

to work out how to respond to keypress events, check out Key.addListener
in the documentation.
to force a button's eventHandler to run from another piece of code, you
use:
buttonInstanceName.onRelease()

--
MOLOKO
Macromedia Certified Flash MX 2004 Developer
Macromedia Certified Flash MX Developer
------------------------------------------------
::remove _underwear_ to reply::
'There ain't no devil - it's just God when he's drunk' Tom Waits
------------------------------------------------
GCM/CS/IT/MC d-- S++:- a- C++ U--- P+ L++ !E W+++$ N++ O? K+ w+++$ !O M+
AddThis Social Bookmark Button