# Audio help needed again

**URL:** https://forum.kirupa.com/t/audio-help-needed-again/136027
**Category:** Uncategorized
**Created:** [February 1, 2005, 7:46pm UTC](https://forum.kirupa.com/t/audio-help-needed-again/136027 "2005-02-01T19:46:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![beamond](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@beamond](https://forum.kirupa.com/u/beamond)
#### Post date: [February 1, 2005, 7:46pm UTC](https://forum.kirupa.com/t/audio-help-needed-again/136027/1 "2005-02-01T19:46:46Z")

</div>

Ok, i have a sound volume bar working with a play, pause and stop button. i want to make it so that the audio plays automatically when the page is loaded (presently the audio only starts when pressing the play button). the problem i’m having is once its started playing (automatically) to be able to then control the audio with the 3 buttons.  
heres the code for the buttons

play:

on (press) {  
// Play Button  
if (playing != true) {  
if (paused != true) {  
stopped = false;  
myMusic.start(0, 9999);  
playing = true;  
}  
if (paused == true) {  
playing = true;  
paused = false;  
stopped = false;  
myMusic.start(myMusicPosition, 0);  
myMusic.onSoundComplete = function() {  
myMusic.start();  
};  
}  
}  
}

pause:

on (press) {  
// Pause button  
if (playing == true) {  
playing = false;  
paused = true;  
myMusicPosition = myMusic.position/1000;  
\_root.myMusic.stop();  
// trace("myMusicPosition: " + myMusicPosition)  
}  
}

stop:

on (press) {  
if (playing == true || paused == true) {  
// \_root.myMusic.stop(“myMusic01”);  
playing = false;  
stopped = true;  
\_root.myMusicPosition = 0;  
\_root.myMusicPositionText = 0;  
\_root.myMusic.stop();  
}  
}

i’m sure its really simple, but i’m kinda new to controlling sounds and i just cant figure it out…

thanks
