Fade out sound

onClipEvent (load) {
mySound = new Sound();
mySound.loadSound(“sound1.mp3”, false);
mySound.start(0,2);
var pos = mySound.position;
if (!pos || pos == mySound.duration) {

    }

}

I have this code and I don’t know how to finish it. What I want to have happen is when the sound is on the 2nd loop I want to see if it is almost at the end of the loop and fade the sound out if it is. Any thoughts or suggestions?
Thanks
:b: