# Fade out sound

**URL:** <https://forum.kirupa.com/t/fade-out-sound/95877>\
**Category:** Uncategorized\
**Created:** [December 1, 2003, 11:10pm UTC](https://forum.kirupa.com/t/fade-out-sound/95877 "2003-12-01T23:10:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenwhitie](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jenwhitie](https://forum.kirupa.com/u/jenwhitie)\
**Post date:** [December 1, 2003, 11:10pm UTC](https://forum.kirupa.com/t/fade-out-sound/95877/1 "2003-12-01T23:10:57Z")

</div>

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  
🅱
