This is a real general question but I'll explain what I'm trying to ask for.
I'm trying to make a button that when you press it, you continue on to the next "scene." I know how to do that now.
I also want music to play when clicking the button but the issue remains, how will the music keep up if the user is pressing it too soon? I don't want it to end abruptly so I need a code that fades the music out (or in).
So what code am I looking for?
you need to create a loop (like onEnterFrame) that decreases the volume of your sound with each loop iteration. terminate the sound when not needed.