turn off auto play
i have this code for my music player but i only want to music to play if the play button is pushed. what should i add or how should i modify this code to make that happen?
var url:String = "";
var urlRequest:URLRequest = new URLRequest(url);
var sound:Sound = new Sound();
sound.load(urlRequest);
var sc:SoundChannel=sound.play();
var startTime:uint=0;
play_btn.addEventListener(MouseEvent.CLICK,playF);
stop_btn.addEventListener(MouseEvent.CLICK,stopF);
pause_btn.addEventListener(MouseEvent.CLICK,pauseF);
function playF(e:Event){
sc=sound.play(startTime);
}
function stopF(e:Event){
sc.stop();
startTime=0;
}
function pauseF(e:Event){
startTime=sc.position;
sc.stop();
}