I’m trying to fade out one looping sound while fading in the other - so sound A will play full volume/sound B will be silent when mouseX is at 1 and sound B will play at full volume/sound A will be silent when mouseX is at 1000.
Here’s what I have - I have one of the sounds working ok, but I have no idea how to make an inversely proportional thing…
[COLOR=Blue]var[/COLOR] sunSound:sunnySound = [COLOR=Blue]new[/COLOR] sunnySound();
[COLOR=Blue]var[/COLOR] sunChannel:SoundChannel = [COLOR=Blue]new SoundChannel/COLOR;
[COLOR=Blue]var[/COLOR] sunTransform:[COLOR=Blue]SoundTransform[/COLOR] = [COLOR=Blue]new SoundTransform/COLOR;
sunChannel = sunSound.[COLOR=Blue]play[/COLOR](0, 1000, sunTransform);
[COLOR=Blue]var[/COLOR] rainSound:rainySound = [COLOR=Blue]new [/COLOR]rainySound();
[COLOR=Blue]var[/COLOR] rainChannel:[COLOR=Blue]SoundChannel[/COLOR] = [COLOR=Blue]new SoundChannel/COLOR;
[COLOR=Blue]var[/COLOR] rainTransform:[COLOR=Blue]SoundTransform[/COLOR] = [COLOR=Blue]new SoundTransform/COLOR;
rainChannel = rainSound.[COLOR=Blue]play[/COLOR](0, 1000, rainTransform);
sunTransform.[COLOR=Blue]volume[/COLOR] = [COLOR=Blue]mouseX[/COLOR]/1000;
sunChannel.[COLOR=Blue]soundTransform[/COLOR] = sunTransform;
[COLOR=SlateGray]// rainTransform.volume = ???
// rainChannel.soundTransform = rainTransform;[/COLOR]
Thanks in advance for any help!