Forum Topic: How Do You Trigger Sounds With Keys

(128 views • 1 reply)

This topic is 1 page long.

<< < > >>
None

DannyMac910

Reply To Post Reply & Quote

Posted at: 5/25/06 08:49 PM

DannyMac910 NEUTRAL LEVEL 05

Sign-Up: 01/08/06

Posts: 24

I want to Know how sound happen when you hit a certin key. i want to know how you trigger a sound with an animation when you hit a key


None

WolfAkela

Reply To Post Reply & Quote

Posted at: 5/26/06 12:19 AM

WolfAkela LIGHT LEVEL 08

Sign-Up: 12/19/05

Posts: 2,136

Create an MC then put the sound there. Put stop() in its frame AS.

Now do something like this on your main MC, assuming.

onClipEvent (enterFrame){
if (Key.isDown(Key.SPACE)){
_root.soundMC.play()}
}
else{
_root.soundMC.stop()}

The better people at NG can do something better though.


All times are Eastern Standard Time (GMT -5) | Current Time: 07:44 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!