Cargar dinamicamente N videos y mostrarlos SIMULTANEAMENTE EN PANTALLA.
Para cargar 1 video utilizo el archiconocido código:
Código:
¿PERO Y PARA CARGAR N VIDEOS DE MANERA DINAMICA? (Perdón por las mayúsculas)var connection_nc:NetConnection = new NetConnection(); connection_nc.connect(null); var stream_ns:NetStream = new NetStream(connection_nc); stream_ns.setBufferTime(3); mivideo.attachVideo(stream_ns); lugar = "video"+i+".flv"; stream_ns.seek(0); stream_ns.play(lugar); stream_ns.seek(0);
por ejemplo yo lo estaba intentando asi:
Código:
Pero cuando sustituyoel nombre de los objetos por eval, ME FALLA, por ejemplo:for (var i=0; i<numerovideos; i++) {
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
stream_ns.setBufferTime(3);
elvideo="mivideo"+i;
eval(elvideo).attachVideo(stream_ns);
lugar = "video"+i+".flv";
stream_ns.seek(0);
stream_ns.play(lugar);
stream_ns.seek(0);
}
Código:
Tambien me falla si creo el objeto en una funcion, ya que si hago el eval donde recibo me pasa lo mismo.for...{
...
laconexion="connection_nc"+i
var eval(laconexion):NetConnection = new NetConnection();
...
}
¿Que hago mal?
Muchisimas gracias si podeis echarme una manita.

