# Fade in volume on dinamic songs

**URL:** <https://forum.kirupa.com/t/fade-in-volume-on-dinamic-songs/280463>\
**Category:** Uncategorized\
**Created:** [January 27, 2009, 10:29pm UTC](https://forum.kirupa.com/t/fade-in-volume-on-dinamic-songs/280463 "2009-01-27T22:29:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![uni](https://avatars.discourse-cdn.com/v4/letter/u/9d8465/32.png) [@uni](https://forum.kirupa.com/u/uni)\
**Post date:** [January 27, 2009, 10:29pm UTC](https://forum.kirupa.com/t/fade-in-volume-on-dinamic-songs/280463/1 "2009-01-27T22:29:51Z")

</div>

hello there, i want to make a fade volume between songs to songs…  
this is the function i have made… what’s wrong?

```auto
fade.onEnterFrame = function() {
        new_volume = 0;
        var sameVar = setInterval(fadeIn, 5000);
        function fadeIn() {
            if (new_volume<=100) {
                new_volume += 3;
            } else if (new_volume>=100) {
                new_volume = 100;
                clearInterval(sameVar);
                delete fade.onEnterFrame;
            }
        }
    };

```

thanks
