
24.07.2003, 16:55
|
|
Регистрация: May 2003
Адрес: Moscow
Сообщений: 957
|
isPlaying=false;
mySound = new Sound;
mySound.attachSound("snd");
playbtn.onRelease = function () {
if (!isPlaying) {
isPlaying=true;
mysound.start( position/1000 );
}
// если звук закончен, начинаем играть его сначала
if (mysound.position==mysound.duration) {
isPlaying=true;
mysound.start();
}
}
stopbtn.onRelease = function () {
isPlaying=false;
position=mysound.position;
trace("stop at " add position add " ms");
mySound.stop("snd");
}
|