Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   mp3 плеер: прокрутка трека (http://www.flasher.ru/forum/showthread.php?t=88276)

chotkiy 20.11.2006 18:56

mp3 плеер: прокрутка трека
 
Добрый вечер:
Никак не могу разобраться с прокруткой звука.
Звук работает; при нажатии на кнопки "Вперед/Назад" прогресс бар перескакивает на 5%. Но трек не перематывается((
Что делать?

Вот код
Код:

currentTrack.loadSound("../mp3/muz/PublicEnem.mp3", true)
my_interval = setInterval(updateProgressBar, 100, currentTrack);

function updateProgressBar(the_sound:Sound):Void {
        var pos:Number = Math.round(the_sound.position / the_sound.duration * 100);
        pb.bar_mc._xscale = pos;
        pb.controlsPlayhead._x = pb.bar_mc._width;
       
        if (_root.controlsNext == true) {
                var pos:Number = Math.round((the_sound.position / the_sound.duration * 100) + 5);
                  pb.bar_mc._xscale = pos;
                  pb.controlsPlayhead._x = pb.bar_mc._width;
        }
       
        if (_root.controlsPrev == true) {
                var pos:Number = Math.round((the_sound.position / the_sound.duration * 100) - 5);
                pb.bar_mc._xscale = pos;
                pb.controlsPlayhead._x = pb.bar_mc._width;
        }
}

на кнопках прописано:
Код:

on (press) {
        _root.controlsNext/Prev = true;
}
on (release) {
        _root.controlsNext/Prev = false;
}



Часовой пояс GMT +4, время: 12:51.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.