Hi,
I am currently building a music player. I haven’t been working with flash very long (a few months only) and i’m unsure how to switch between a play and pause button on the stage (i reckon it’s a newbie queston!! lol).
This is the function i’m using to pause and play the track (which works fine… i just duno how to toggle the buttons when you click on them).
function toggle_pause() {
_global.currently_playing;
_global.write_debug;
_global.track_name;
if(currently_playing){
pos = my_song.position;
my_song.stop();
currently_playing = false;
write_debug = track_name + ': Paused';
// Display Play Button
} else {
if(isset(pos)){
my_song.start(pos / 1000);
currently_playing = true;
write_debug = track_name + ': Resume';
//Display Pause Button
}
}
}
Any help appreciated,
Cheers M