Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Pessoal tudo bem ?
preciso de uma ajuda tenho o seguinte cod de uma galeria de videos em ACTION SCRIPT
BOTOES DE VIDEO
[inline]
//play and pause setup
pauseBut._visible =true;
pauseBut.onRelease = function(){
videoDisplay.pause();
this._visible = false;
playBut._visible = true;
}
playBut.onRelease = function(){
videoDisplay.play();
this._visible = false;
pauseBut._visible = true;
}
//volume setup
volBut.wave._visible = false;
volBut.onPress = function(){
if(this.wave._visible == false){
videoDisplay.volume =0;
this.wave._visible = true;videoDisplay.volume =100;
this.wave._visible = false;
}
}
//preloading bar
percentBar.onEnterFrame = function(){
var loaded = this._parent.videoDisplay.bytesLoaded;
var total = this._parent.videoDisplay.bytesTotal;
if(loaded == total && loaded>1000){
this._xscale =100;
}else{
this._xscale = int(loaded/total*100);
}
}
//play progress bar
progressBar.onEnterFrame = function(){
this._xscale = videoDisplay.playheadTime/videoDisplay.totalTime*100;
scrubBut._x = this._x+this._width;
}
//video control
backBar.onPress = function(){
this.onEnterFrame = function(){scrubBut._x = this._xmouse-scrubBut._width;
sclew = this._xmouse/this._width;videoDisplay.play(sclew*videoDisplay.totalTime);
}
}
backBar.onRelease = backBar.onReleaseOutside = function(){
delete this.onEnterFrame;
playBut.onRelease();
}
var myListener = new Object();
myListener.complete = function(eventObject) {
videoDisplay.play(0);
playBut._visible = true;
pauseBut._visible = false;
videoDisplay.pause();
};CARREGAMENTO POR XML
[inline]stop();
System.useCodepage = true;
//useage:
//you can modify the fellow code:
var easing = true;//true or false mean easing or not.
var auto = false;//true or false mean autoscroll or not
var mouseWheel = true;//true or fale mean support mousewheel or not.
var mouseCoord = true;//true or false mean use mouse coordinates or not.
var barVisual = true;//when useing mouse Coordinates you can set scroll bar hid or not. false mean hid.Note:If youvar path = "list1.xml";//xml path
contentMain.createEmptyMovieClip("back_mc", this.getNextHighestDepth());
contentMain.setMask(maskedView);
var myxml = new XML();
myxml.ignoreWhite = true;
myxml.onLoad = function(success) {
var item = this.firstChild.childNodes;
trace(this.firstChild.firstChild.attributes.videotitle);
if (success) {var temp_mc = contentMain.attachMovie("item", "item"+i, i);
temp_mc._y += i*(temp_mc._height+space);
contentMain.back_mc._height = i*(temp_mc._height+space);temp_mc.item_txt.text = temp_mc.tname;
temp_mc.item_thumb.loadMovie(temp_mc.thumb);
contentHolder_mc.contentinfo.htmlText = item[0].childNodes[1].firstChild.nodeValue;
temp_mc.onRelease = function() {
vtitle_txt.text = this.videotitle;
playBut.onRelease();
videoDisplay.setMedia(this.tlink,"FLV");
};
}
vtitle_txt.text = this.firstChild.firstChild.attributes.videotitle;
videoDisplay.setMedia(this.firstChild.firstChild.attributes.link,"FLV");
scrolling(easing, auto, mouseWheel, mouseCoord, barVisual);
} else {
trace("error");
}
};;>
myxml.load(path);[/inline]
*Precisava em vez de parar ali onde tem** videoDisplay.pause(); ele carregasse o proximo video do XML,o que eu pensei foi fazer um contador que acrescente o numero e em vez de pause ele desse videoDisplay.play(e o proximo no do xml**); e ficaria legal só que não funcionou não sei porque ele fica tocando sempre o mesmo vídeo . Alguem pode me dar uma força nesse cód?*
Agradeço de qualquer forma.
Caso os nós contenham 'url' do YouTube é mais trabalhoso. Vi um exemplo incompleto de curso, em AS3.
não é um arquivo flv mesmo,então .. seria mais ou menos isso um contador simples se começa do 0 o nó quando passar na hora que dá o pause , em vez de dar o pause reproduzir o outro nó deixando os flv com um sequencial 1.flv,2.flv , ou teria outro modo mais simples?
mais alguem pra dar um up?
Eu pensaria em obter o tempo total do vídeo em relação ao tempo de execução, ao igualar/concluir mandar ler o próximo nó do xml.
Caso os nós contenham 'url' do YouTube é mais trabalhoso. Vi um exemplo incompleto de curso, em AS3.