# Music

**URL:** <https://forum.kirupa.com/t/music/323237>\
**Category:** Uncategorized\
**Created:** [June 22, 2011, 6:23am UTC](https://forum.kirupa.com/t/music/323237 "2011-06-22T06:23:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![simo\_85](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@simo\_85](https://forum.kirupa.com/u/simo_85)\
**Post date:** [June 22, 2011, 6:23am UTC](https://forum.kirupa.com/t/music/323237/1 "2011-06-22T06:23:31Z")

</div>

hey guys,

I have a bit of a problem currently using the sound class. I have a mp3 that i have placed into a movie clip with play and stop buttons that works no problems. the issue is that I need this to display and work on every frame in my animation. if i drag the movie clip into a different frame each time the play and stop will only work for that instance of the movie clip. I really need the mp3 to be controllable throughout the entire animation.

below is the current code i have in the movie clip:

var songOne = new Music();  
var channel:SoundChannel;

function Clickhandler(event:MouseEvent):void  
{  
channel = songOne.play();  
}  
btOn.addEventListener(MouseEvent.CLICK, Clickhandler);

function Clickhandler1(event:MouseEvent):void  
{  
channel.stop();  
}  
btOff.addEventListener(MouseEvent.CLICK, Clickhandler1);

Any help would be greatly appreciated.  
Simon
