import flash.media.Sound;
import flash.media.SoundChannel;
After that, put the following action script under the private KeyPress function:
var my_sound:drumsound = new drumsound();
var my_channel:SoundChannel = new SoundChannel();
if (event.keyCode==Keyboard.SPACE) {
my_channel = my_sound.play();
}
Its done! Drum sound will come out when SPACE bar is press. Its time for final set up!!!!
No comments:
Post a Comment