diegohamaz 0 Denunciar post Postado Maio 10, 2013 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 setuppauseBut._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 setupvolBut.wave._visible = false;volBut.onPress = function(){if(this.wave._visible == false){videoDisplay.volume =0;this.wave._visible = true;}else {videoDisplay.volume =100;this.wave._visible = false;}}//preloading barpercentBar.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 barprogressBar.onEnterFrame = function(){this._xscale = videoDisplay.playheadTime/videoDisplay.totalTime*100;scrubBut._x = this._x+this._width;}//video controlbackBar.onPress = function(){this.onEnterFrame = function(){//call pause buttonpauseBut.onRelease();//set scrubut positionscrubBut._x = this._xmouse-scrubBut._width;sclew = this._xmouse/this._width;//play videovideoDisplay.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();};videoDisplay.addEventListener("complete", myListener);[/inline] 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 notvar 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 you//didn't use mouse coordinates and set barVisual = false.you will only use mouseWheel scroll//content.var space = 5;//between list item space .var path = "list1.xml";//xml pathcontentMain.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) {for (var i:Number = 0; ivar 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.tname = item.attributes.name;temp_mc.tlink = item.attributes.link;temp_mc.videotitle =item.attributes.videotitle;temp_mc.thumb = item.firstChild.firstChild.nodeValue;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. Compartilhar este post Link para o post Compartilhar em outros sites
Elektra 102 Denunciar post Postado Maio 11, 2013 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. Compartilhar este post Link para o post Compartilhar em outros sites
diegohamaz 0 Denunciar post Postado Maio 12, 2013 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? Compartilhar este post Link para o post Compartilhar em outros sites