PDA

View Full Version : Adding a sound clip to a collision senarios - How??



lyman12
April 24th, 2002, 01:12 AM
Can someone tell how to add a soundclip (*.wav) to the following scenario:


if (_root.yellow, hitTest(_root.white)) {

&nbsp &nbsp &nbsp &nbsp speedx = -bounce*80;
&nbsp &nbsp &nbsp &nbsp speedy = -bounce*90;

....PLAY A SOUND CLIP HERE !!!
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
&nbsp &nbsp &nbsp &nbsp }


THANKS.

sinfiniti
April 24th, 2002, 10:06 AM
import your sound, then create a movie clip and set it up like this:
frame 1:
stop();
frame 2:
put your sound in it.

now, put that clip on the stage and give it a name.
then:
if (_root.yellow, hitTest(_root.white)) {
speedx = -bounce*80;
speedy = -bounce*90;
_root.mcSoundClip.play();
}

where 'mcSoundClip' is the name of the clip with the sound in it.
:)
jeremy

lyman12
April 25th, 2002, 12:29 AM
Thanks Jeremy!