On the root timeline, place this code:
Code:
fadespeed = 1;
mysound = new Sound();
mysound.attachsound("spooky");
onEnterFrame = function(){
if((fadeout)&&(mysound.getVolume() > 0)){
mysound.setVolume(mysound.getVolume() - fadespeed);
if(mysound.getVolume() <= 0){
mysound.stop();
mysound.setVolume(100);
fadeout = false;
}
}
}
And in the button where your sound.stop action is at, replace with this code:
Code:
on(rollOver){
mysound.start(0, 1);
}
on(rollOut){
fadeout = true;
}
As far as I can see this should work.
XFM