hola, bueno, he intentado hacer mis pruebas.
pero no funcionan, no se porque:
el codigo del .fla, en el primer fotograma me quedo asi:
Código :
video_tmp="agronacion.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");
}
};
//----------------------------------------------------------------------------
//ACA EMPIEZA EL COMBOBOX
import prueba.as;
//ACA TERMINA EL COMBOBOXen este caso, en vez de que cargue manualmente cada item de los videos, intento hacerlo de un xml.
el archivo prueba.as tiene el siguiente codigo:
Código :
//create a new XML object
thisXML = new XML();
//ignore whitespace in the file
thisXML.ignoreWhite = true;
//call the LoadChartData function when the XML file is loaded
thisXML.onLoad = LoadCombo;
//load the xml file
thisXML.load("sites.xml");
function LoadCombo(success) {
if (success) {
//set variables
var BaseNode=thisXML.childNodes[0];
var ComboSites = new Array();
var ComboURLs = new Array();
var ThisNode;
//add a default item to the combo box
mi_combo.addItem("video_1");
//get sites information
for (i=0; i < BaseNode.childNodes.length; i++) {
ThisNode = BaseNode.childNodes[i];
ComboSites[i] = ThisNode.attributes["siteName"];
ComboURLs[i] = ThisNode.attributes["siteURL"];
//add to combo box
mi_combo.addItem(ComboSites[i],ComboURLs[i]);
}
}
}
stop();y finalmente, el archivo sites.xml, creado:
Código :
<?xml version="1.0" standalone="yes"?>
<AllSites>
<site siteName="agronacion" siteURL="http://www.agritotal.com.ar/videos/agronacion/agronacion.flv"></site>
<site siteName="bna" siteURL="http://www.agritotal.com.ar/videos/bna/bna.flv"></site>
<site siteName="guarani" siteURL="http://www.agritotal.com.ar/videos/guarani/guarani.flv"></site>
</AllSites>
bueno, esto luego de leer varias cosas es lo que pude hacer, espero me ayuden a resolver este problema.
saludos.
y desde ya muchas gracias