# Music player questions

**URL:** <https://forum.kirupa.com/t/music-player-questions/38455>\
**Category:** flash\
**Created:** [December 23, 2003, 3:07am UTC](https://forum.kirupa.com/t/music-player-questions/38455 "2003-12-23T03:07:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LifeEnder](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@LifeEnder](https://forum.kirupa.com/u/LifeEnder)\
**Post date:** [December 23, 2003, 3:07am UTC](https://forum.kirupa.com/t/music-player-questions/38455/1 "2003-12-23T03:07:00Z")

</div>

Im making a music player and I was wondering if anyone knew the script to make it so when someone presses play on my movie they wont be able to press play again until its over? I just dont want them to be able to keep pressing the button and starting new versions of the song while the old one is going. this is the only code im using now

on (release) {  
kirupaSound = new Sound(this);  
kirupaSound.attachSound(“Not You”);  
kirupaSound.start(0, 99);  
}

any help would be great :hr:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2003, 2:24pm UTC](https://forum.kirupa.com/t/music-player-questions/38455/2 "2003-12-23T14:24:34Z")

</div>

// Create sound obj and attach from library.  
kirupaSound = new Sound();  
kirupaSound.attachSound(“Not You”);

// Target the button to play the sound.  
yourButton.onRelease = function() {  
kirupaSound.attachSound(“Not You”);  
kirupaSound.start(0, 99);  
yourButton.enabled = false;  
}

kirupaSound.onSoundComplete = function() {  
yourButton.enabled = true;  
}
