Gunds Elf
05-13-2002, 05:16 PM
I've programmed a song player with Flash, following an example in the chapter 18 of the "Flash 5 Magic with actionscript" book. It has a selector from a list of songs, and four buttons: play, stop, rewind and pause.
Now, if you pause the sound you're supposed to start it on the very place that you paused it, using basically the mysound.start(secondoffset,loop) method. The issue is that it is not working, not even in the solved example in the book's cd Rom. I'm convinved that it is a bug, I've been searching for reports on a bug in this method on the internet, to no avail.
You can try for yourselves:
the pause button has this code
on (release) {
Musica.stop();
algo = getTimer();
TiempoMusicaPausa = (algo-TiempoMI)/1000;
Pausado = true;
Tocando = false;
}
//the play button:
on (release) {
if (tocando==false){
if (TiempoMusicaPausa == 0) {
Musica.start(0, 100);
} else {
Musica.start(TiempoMusicaPausa, 1);
}
TiempoMI = getTimer();
TiempoMusicaPausa = 0;
Pausado = false;
Tocando = true;
}
}
there´s also a frame script that initializates Pausado, Tocando and TiempoMusicaPausa, And that attaches the sound to the Musica Variable. The songs are 30 seconds samples, linkage is correctly directed, everything works fine except that when i pause the sound it always starts back in the 4 second, no matter where I pause.
Is anybody aware of this problem? is there a solution? a workaround?
Thanks
Now, if you pause the sound you're supposed to start it on the very place that you paused it, using basically the mysound.start(secondoffset,loop) method. The issue is that it is not working, not even in the solved example in the book's cd Rom. I'm convinved that it is a bug, I've been searching for reports on a bug in this method on the internet, to no avail.
You can try for yourselves:
the pause button has this code
on (release) {
Musica.stop();
algo = getTimer();
TiempoMusicaPausa = (algo-TiempoMI)/1000;
Pausado = true;
Tocando = false;
}
//the play button:
on (release) {
if (tocando==false){
if (TiempoMusicaPausa == 0) {
Musica.start(0, 100);
} else {
Musica.start(TiempoMusicaPausa, 1);
}
TiempoMI = getTimer();
TiempoMusicaPausa = 0;
Pausado = false;
Tocando = true;
}
}
there´s also a frame script that initializates Pausado, Tocando and TiempoMusicaPausa, And that attaches the sound to the Musica Variable. The songs are 30 seconds samples, linkage is correctly directed, everything works fine except that when i pause the sound it always starts back in the 4 second, no matter where I pause.
Is anybody aware of this problem? is there a solution? a workaround?
Thanks