# Mp3 Player Problem =)

**URL:** <https://forum.kirupa.com/t/mp3-player-problem/243154>\
**Category:** flash\
**Created:** [November 3, 2007, 2:52pm UTC](https://forum.kirupa.com/t/mp3-player-problem/243154 "2007-11-03T14:52:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcliu11](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@marcliu11](https://forum.kirupa.com/u/marcliu11)\
**Post date:** [November 3, 2007, 2:52pm UTC](https://forum.kirupa.com/t/mp3-player-problem/243154/1 "2007-11-03T14:52:13Z")

</div>

Hi all,

I’m learning to use actionscript 3.0 and its been rather difficult.

I managed to come up with a simple mp3 player and it works fine.

however when i press on play TWICE, it will overlap the same song, meaning it will play 2 similar songs simultaneously. how can i prevent that?

any help is greatly appreciated. thanks =)

[SIZE=1]// mp3 player

var audio:Sound = new Sound();  
audio.load(new URLRequest(“song.mp3”));  
var channel:SoundChannel = new SoundChannel();  
channel = audio.play();

btn\_play.buttonMode = true;  
btn\_play.addEventListener(MouseEvent.MOUSE\_UP, function():void  
{  
channel = audio.play();  
playerAnim.gotoAndPlay(1);  
}  
);

btn\_stop.buttonMode = true;  
btn\_stop.addEventListener(MouseEvent.MOUSE\_UP, function():void  
{  
channel.stop();  
playerAnim.gotoAndStop(1);

}  
);[/SIZE]
