# Sound scripting

**URL:** https://forum.kirupa.com/t/sound-scripting/122384
**Category:** Uncategorized
**Created:** [September 13, 2004, 10:22am UTC](https://forum.kirupa.com/t/sound-scripting/122384 "2004-09-13T10:22:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pucca](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pucca](https://forum.kirupa.com/u/pucca)
#### Post date: [September 13, 2004, 10:22am UTC](https://forum.kirupa.com/t/sound-scripting/122384/1 "2004-09-13T10:22:06Z")

</div>

Hi

I’ve put this scipting at the beginning of of my flash file, but now I want to add a music on/off button. One button. What scripting do I use for the button?

```auto
 
mySound.stop();
mySound = new Sound();
mySound.loadSound("sound_1.mp3", false);
mySound.setVolume(40);
mySound.start(0, 100000);

```
