# Fade volume on frame

**URL:** <https://forum.kirupa.com/t/fade-volume-on-frame/6157>\
**Category:** Uncategorized\
**Created:** [September 30, 2002, 9:31pm UTC](https://forum.kirupa.com/t/fade-volume-on-frame/6157 "2002-09-30T21:31:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fla999](https://avatars.discourse-cdn.com/v4/letter/f/aeb1de/32.png) [@fla999](https://forum.kirupa.com/u/fla999)\
**Post date:** [September 30, 2002, 9:31pm UTC](https://forum.kirupa.com/t/fade-volume-on-frame/6157/1 "2002-09-30T21:31:33Z")

</div>

Having trouble figuring out how to make the audio automatically fade once it reaches a certain point in the flash movie.

The audio is loaded as an MP3 using…

mySound = new Sound();  
mySound.loadSound("/Camden.mp3",true);

:-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2002, 9:34pm UTC](https://forum.kirupa.com/t/fade-volume-on-frame/6157/2 "2002-09-30T21:34:38Z")

</div>

you could do one of two things

1. edit the sound file itself so you can make it taper off into silence exactly how you want it to … i would recommend this because it’s the easiest

2. put a controller variable to lower the volume of the movie … but i am pretty sure the volume variable in flash will apply globally to the movie … i.e. you won’t hear your other sounds (if you have any) either.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2002, 9:44pm UTC](https://forum.kirupa.com/t/fade-volume-on-frame/6157/3 "2002-09-30T21:44:55Z")

</div>

All other sounds would be finished so I’d be interested to know about the second option.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2002, 10:13pm UTC](https://forum.kirupa.com/t/fade-volume-on-frame/6157/4 "2002-09-30T22:13:45Z")

</div>

Found the answer, but in case anyone else wondered how it turned out…

Towards the end of the flash movie, I added the following about every 10 frames:

mySound.setVolume(80 )

mySound.setVolume(60 )

mySound.setVolume(40 )

mySound.setVolume(20 )

mySound.setVolume(0 )

The normal volume being 100, it fades the sound in about 4 - 5 seconds, or 50 frames.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2002, 10:58pm UTC](https://forum.kirupa.com/t/fade-volume-on-frame/6157/5 "2002-09-30T22:58:53Z")

</div>

i wonder Would this work?? no time to check now, sorry.

onClipEvent (load) {  
i = 100;

}  
onClipEvent (enterFrame) {  
sonido = new Sound();  
sonido.setVolume(i–);  
}

if u tell me it works, i will think i had my moment of inspiration today:P 😛
