# Fading Sound Help

**URL:** <https://forum.kirupa.com/t/fading-sound-help/160418>\
**Category:** flash\
**Created:** [August 25, 2005, 7:39pm UTC](https://forum.kirupa.com/t/fading-sound-help/160418 "2005-08-25T19:39:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![East\_High](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@East\_High](https://forum.kirupa.com/u/East_High)\
**Post date:** [August 25, 2005, 7:39pm UTC](https://forum.kirupa.com/t/fading-sound-help/160418/1 "2005-08-25T19:39:43Z")

</div>

I’ve been running through the Kenny Bellew tutes dealing with fading sound, but I can’t get to work with my movie. Defining the sound and setting the volume works, but the fading function does not. The sound is defined in the root timeline and I set the fade function inside a movieclip. The fading function is in the very last frame of the movie to play. Here’s my AS:

Setting sound object:

```auto
comets = new Sound();
comets.attachSound("comets_on_fire.mp3");
cometsVolume = 70;
comets.setVolume(cometsVolume);

```

Fade function (Kenny Bellew):

```auto
stop();
this.onEnterFrame = function() {
	if (fadeOut01 == 1) {
		_root.comets.setVolume(cometsVolume);
		cometsVolume = cometsVolume-5;
		if (cometsVolume<5) {
			_root.comets.stop("comets_on_fire.mp3");
			fadeOut01 = 0;
		}
	}
};

```

As always, any help is much appreciated.

Thanks-
