PDA

View Full Version : sound problems with attatch sound


purplefish32
07-23-2003, 12:02 PM
I want to make a sound fade out when i change frames and when i use

bgSound = new Sound(this);
bgSound.attachSound("djs");
bgSound.start(0, 99);

and in my new frame:

bgSound.setVolume(0);

for one my sound dosent fade (Normal) but all the sounds i use are set to 0 instead of just "djs"

can someone please help me, and give me a little pointer to make a sound fade out...
Thanks.

Billy T
07-23-2003, 01:29 PM
all sounds created on "this" will be effect by the setVolume

to fade a sound out you will need to start an enterframe script

eg

this.onEnterFrame=function(){
if(bgSound.getVolume()>0){
bgSound.setVolume(bgSound.getVolume()-5);
}
}

cheers

purplefish32
07-30-2003, 08:38 AM
works like a charm thanks a lot...

Billy T
07-30-2003, 10:42 AM
no problem