# Problems with mp3 player

**URL:** https://forum.kirupa.com/t/problems-with-mp3-player/304913
**Category:** flash
**Created:** [February 16, 2010, 12:27pm UTC](https://forum.kirupa.com/t/problems-with-mp3-player/304913 "2010-02-16T12:27:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![oreiah](https://avatars.discourse-cdn.com/v4/letter/o/ac91a4/32.png) [@oreiah](https://forum.kirupa.com/u/oreiah)
#### Post date: [February 16, 2010, 12:27pm UTC](https://forum.kirupa.com/t/problems-with-mp3-player/304913/1 "2010-02-16T12:27:21Z")

</div>

I have a flash movie that loads an mp3 layer when the btn\_2 is clicked and also I have an external swf files that will load when btn\_1 is clicked and it will load over the main movie.The buttons below will be unclickable everytime the external swf file is loaded and also once the btn\_2 for the mp3 player is clicked the btn\_2 will be unclikcable but then when I close the external swf file even if the mp3 player is playing the btn\_2 becomes clickable, it shouldn’t be like that it should be while the mp3 player even if I close the swf file the btn\_2 shouldn’t be clickable unless I close the mp3 player.Can anyone tell me what should I include in the action script 2 to make that possible?I would appreciate any help.Thanks in advance

here is the script for the buttons:

stop();  
btn\_1.onRelease = function() {  
twoButtons();  
dimbtn\_1.\_visible = true;  
dimbtn\_2.\_visible = true;  
btn\_1.enabled = false;  
btn\_2.enabled= false;  
loadMovie(“mock2.swf”,myLoader);

}  
btn\_2.onRelease = function() {  
twoButtons();  
dimbtn\_1.\_visible = false;  
dimbtn\_2.\_visible = true;  
btn\_1.enabled = true;  
btn\_2.enabled= false;  
gotoAndPlay(2);

}

dimbtn\_1.enabled = false;  
dimbtn\_2.enabled = false;  
function twoButtons() {  
btn\_1.\_visible = true;  
btn\_2.\_visible = true;  
}

for the mp3 player close button:  
on (release) {  
twoButtons();  
dimbtn\_2.\_visible = false;  
dimbtn\_1.\_visible = false;  
btn\_2.enabled = true;  
btn\_1.enabled = true;  
gotoAndStop(1);  
stopAllSounds();  
}

for the external swf file close button:  
on (release) {  
\_root.twoButtons();  
\_root.dimbtn\_1.\_visible = false;  
\_root.dimbtn\_2.\_visible = false;  
\_root.btn\_1.enabled = true;  
\_root.btn\_2.enabled = true;  
gotoAndStop(2);  
}
