PDA

Просмотр полной версии : NetStream seek


telit
20.06.2008, 10:26
Здравствуйте!
Делаю 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
Прыгает всегда! это с стримом играет.