Código:
stop(); video_tmp="invitado.flv" var conexion:NetConnection = new NetConnection(); conexion.connect(null); var stream:NetStream = new NetStream(conexion); mi_video.attachVideo(stream); stream.play(video_tmp); //aseguramos 10 seg de reproduccion stream.setBufferTime(10); // barra._xscale = 0; onEnterFrame = function () { bu_cargado.text = stream.bufferLength; bu_trans.text = stream.time; bu_total.text = Math.round(stream.bytesTotal/1024)/1000+" mb"; }; //botones_----------------------------------- seg.restrict = 1-9; btn1.onPress = function() { stream.play(video_tmp); }; btn1_1.onPress = function() { stream.close(); }; btn2.onPress = function() { stream.pause(); //obvio, para hacer pausa, ojo q es lo mismo para avanzar }; btn3.onPress = function() { stream.seek(0); // va al inicio (cero segundos) }; btn4.onPress = function() { stream.seek(seg.text); // va al segundo q nosotros escribamos }; //status stream.onStatus = function(infoObject:Object) { if (infoObject.code == "NetStream.Play.Stop") { trace("acabo"); } if (infoObject.code == "NetStream.Play.StreamNotFound") { trace("encontro error"); } };