Форум 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)
-   -   NetStream seek (http://www.flasher.ru/forum/showthread.php?t=113154)

telit 20.06.2008 10:26

NetStream seek
 
Вложений: 1
Здравствуйте!
Делаю FMS mp3 плеер:
http://yo002.narod.ru/v1.html

Когда скроллится то прыгает скроллер

Код:

pos_mc.onPress = function(){
        clearInterval(time)
        pressIt = true;
        ns.pause();

        this.mask_mc._x = this._xmouse;
        this.bar_mc._x = this._xmouse;
        pos = this.mask_mc._x*duration/225000;

        this.mask_mc._visible = true;

                        this.onMouseMove = function(){
                                this.mask_mc._x = this._xmouse;
                                this.bar_mc._x = this._xmouse;
                               
                                if (this._xmouse >=225) {
                                        this.mask_mc._x = 225;
                                this.bar_mc._x = 225;
                                        }
                                if (this._xmouse <=0) {
                                        this.mask_mc._x = 0;
                                this.bar_mc._x = 0;
                                        }
                                pos = this.mask_mc._x*duration/225000;
                       
                        updateAfterEvent();
                        }
        }
       
pos_mc.onRelease = pos_mc.onReleaseOutside = function(){
        pos = this.mask_mc._x*duration/225000;
       
        time = setInterval(sound_int, 100);
        ns.pause(false);
        ns.seek(pos);
        pressIt = false;

        delete(this.onMouseMove);
        }

Вложение 19784
И ещё один вопрос: как сделать прелоадер как в youtube плеере?

silin 20.06.2008 10:39

seek работает по кейфрамам видео (ставит на ближайший).

telit 20.06.2008 10:42

А как тогда сделать? play(time)?
(Это mp3 плеер)

silin 20.06.2008 10:50

позор, канешно, полный: но не знаю

mixery 20.06.2008 13:43

прелоадер - например полупрозрачная полоска под бегунком, "load":
Код:

var pcl;
pcl = Math.round(sound.getBytesLoaded() / sound.getBytesTotal() * 100);
load._xscale = pcl;

А прыгает тогда, когда трек полностью не загружен?

telit 20.06.2008 15:19

Прыгает всегда! это с стримом играет.


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

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