var a=0;
function playSong () {
mediaPlayer.Play();
a = 1;
}
function pauseSong(){
mediaPlayer.Pause();
a = 2;
}
function playPauseButton() {
if (a == 1) {
pauseSong();
}
else if(a==2) {
playMedia();
}
}
playSong() will play the song when i press play button on remote control. pauseSong() will pause the song when i press pause button on remote control. Since i want to create a new button & want this new button to have click 1st time to pause the song, then click 2nd time to play the song again, then click again to pause the song & so on...
So i write the playPauseButton() function. But i only can pause the song & cannot play the song with clicking the same button. Why?
2007-07-01
19:46:48
·
4 answers
·
asked by
scottcky1985
3
in
Computers & Internet
➔ Programming & Design