i am making a shooting game through flash cs3 and i want to have the sound make noise when you shoot the target and then goes onto the next ... how do i do that?
ive tired for ages and for some reason i doesnt work
please help
i am making a shooting game through flash cs3 and i want to have the sound make noise when you shoot the target and then goes onto the next ... how do i do that?
ive tired for ages and for some reason i doesnt work
please help
here is a quick and easy way to achive it.
var snd = new Sound();//create a varable to hold the new sound object
snd.attachSound("mysound"); //attaches the sound to the varible with the name mysound
myBtn_btn.onPress = function() { //assuming u have a btn or mc on the stage called myBtn_btn
snd.play();// play the sound
};
myBtn_btn.onRelease = function() { //assuming u have a btn or mc on the stage called myBtn_btn
snd.stop();// stop the sound
};
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks