# mp3 play/stop button scope problem

**URL:** <https://forum.kirupa.com/t/mp3-play-stop-button-scope-problem/224252>\
**Category:** flash\
**Created:** [April 30, 2007, 4:58pm UTC](https://forum.kirupa.com/t/mp3-play-stop-button-scope-problem/224252 "2007-04-30T16:58:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcurrid](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pcurrid](https://forum.kirupa.com/u/pcurrid)\
**Post date:** [April 30, 2007, 4:58pm UTC](https://forum.kirupa.com/t/mp3-play-stop-button-scope-problem/224252/1 "2007-04-30T16:58:12Z")

</div>

Hi,  
I have an swf (jukebox) with a new sound variable which contains loads an mp3,  
there are 2 buttons that play/pause (code below):

var attach\_song:Sound = new Sound();  
attach\_song.attachSound(“track2”);  
playsong.onRelease = function() {  
attach\_song.start();  
};  
stopsong.onRelease = function() {  
attach\_song.stop();  
};

The play/stop buttons work fine here, and song plays.

Now I also have a main swf which loads the swf above into an empty movie clip (loadMovie(“jukebox.swf”) etc). when I hit the play button via this swf nothing happens.  
I have everything from the jukebox swf set up correctly I think, including linkage.

Anyone have any ideas? I presume its something to do with scope?  
its been a while since I’ve used Flash and a little rusty!
