PDA

View Full Version : sound question


magicpie
11-22-2002, 03:16 AM
pass a variable choice to my movie. If choice = yes i want it to load a sound file and play it and if choice = no i dont want it to load at all. I know how to use if statments perfectly. But what code will make the sound file only load when choice is yes and only once. I am prolly retarded and it's right under my nose. but please help out.

subquark
11-22-2002, 03:59 PM
I have nowhere the expertise that most have but how about just a simple:

loadMovieNum("whatever.swf", level#Here);

on a button and you can stream if it's a big sound file.

To control volume and/or pan, on keyframe:

mySound = new Sound(_level#Here);
mySound.attachSound("");

and on slider(s):

onClipEvent (enterFrame) {
vol = _parent.volSlider.drag._x+50;
_parent.mySound.setVolume(vol);
}

and/or:

onClipEvent (enterFrame) {
pan = 2*_parent.panSlider.drag._x;
_parent.mySound.setPan(pan);
}


I'm sure there is a neater way, which I am quite open to seeing.

Good luck!