# Problem with music

**URL:** <https://forum.kirupa.com/t/problem-with-music/37103>\
**Category:** flash\
**Created:** [December 5, 2003, 7:52pm UTC](https://forum.kirupa.com/t/problem-with-music/37103 "2003-12-05T19:52:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mango](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mango](https://forum.kirupa.com/u/Mango)\
**Post date:** [December 5, 2003, 7:52pm UTC](https://forum.kirupa.com/t/problem-with-music/37103/1 "2003-12-05T19:52:07Z")

</div>

Ah… so many problems hey? Lol. Sorry! Also not sure if I posted this in the right forum…

This time its the music…

Ok on one layer I have some AS for music to play…

On another layer I got a play and a stop button…

If there is background music playing already, and I press the play button, another layer of music starts playing on top… How do i fix it so that this does not happen when music is already playing?

These are the codes I used in my fla…

```php

mySound = new Sound();
mySound.attachSound("song");
_root.mySound.start(0,999);

```

for the play button…

```php

on (press) {
	if (playing!=true) {
		_root.mySound.start(0,999);
		playing=true;
	}
}

```
