joeble Posted October 8, 2017 Share Posted October 8, 2017 I'm building a game and I want a song to fade out music when I switch states. Currently, it just keeps playing the music and ignoring the fadeout even if I use song.fadeOut() and then start the next state. Link to comment Share on other sites More sharing options...
jjwallace Posted October 9, 2017 Share Posted October 9, 2017 You might want to use this: (see documentation) fadeTo(duration, volume) Fades the volume of this Sound from its current value to the given volume over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (volume) as the second parameter. Link to comment Share on other sites More sharing options...
Recommended Posts