# Music Issue

**URL:** https://forum.kirupa.com/t/music-issue/295759
**Category:** flash
**Created:** [September 3, 2009, 9:48pm UTC](https://forum.kirupa.com/t/music-issue/295759 "2009-09-03T21:48:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Felipe1](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@Felipe1](https://forum.kirupa.com/u/Felipe1)
#### Post date: [September 3, 2009, 9:48pm UTC](https://forum.kirupa.com/t/music-issue/295759/1 "2009-09-03T21:48:13Z")

</div>

Hello!  
I have an issue with Music in AS3, i know i’m missing something but i don’t know what it is.  
Ok, I’m making an image gallery and i decided to add background music when i ope the gallery everything is fine the music is playing fine and the buttons stop and play works pretty nice, my problem is that when i return to the first frame(picture), the music starts over again and it mixes with the music that was actually playing.\<

Sorry if my english isn’t so good.

here’s the code and the .fla file

.FLA File:  
[http://www.mediafire.com/?i2yjzwkatye](http://www.mediafire.com/?i2yjzwkatye)

```auto
stop();

backbtn.addEventListener(MouseEvent.CLICK, backImage);
nextbtn.addEventListener(MouseEvent.CLICK, nextImage);

function backImage(e:MouseEvent)
{
     if(this.currentFrame>1)
     {prevFrame();}
     else
     {gotoAndStop(10);}
         
}

function nextImage(e:MouseEvent){
    
    if(this.currentFrame<10)
    {nextFrame();}
    else
    {gotoAndStop(1);}
}

function reset(e:MouseEvent){
    
    gotoAndStop(1);
    
}

//Inicia el código del reproductor
var music:Sound = new Sound(new URLRequest("Organ.mp3"));
var sc:SoundChannel = music.play();

stopmsc.addEventListener(MouseEvent.CLICK, stopImage);
function stopImage(e:Event):void
{
    sc.stop();
}

playmsc.addEventListener(MouseEvent.CLICK, playImage);
function playImage(e:Event):void
{
    sc=music.play();
}

```
