# Fade out audio clip when clicking a button?

**URL:** https://forum.kirupa.com/t/fade-out-audio-clip-when-clicking-a-button/327959
**Category:** flash
**Created:** [April 9, 2012, 3:17am UTC](https://forum.kirupa.com/t/fade-out-audio-clip-when-clicking-a-button/327959 "2012-04-09T03:17:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lazerbrains](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@lazerbrains](https://forum.kirupa.com/u/lazerbrains)
#### Post date: [April 9, 2012, 3:17am UTC](https://forum.kirupa.com/t/fade-out-audio-clip-when-clicking-a-button/327959/1 "2012-04-09T03:17:22Z")

</div>

I have intro audio music playing on a project I am working on. The audio is in the timeline (but doesn’t necessarily have to be), and when I click a button to move away from it, it just keeps playing. I can use SoundMixer.stopAll(); to make is stop as you click the button, but this makes a rather harsh abrupt stop to the music that is undesirable. I would like to have it fade the audio track out once the button is clicked.

Does anybody know how would I go about doing this?
