Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/08/2009, 09:23
Avatar de kazafun
kazafun
 
Fecha de Ingreso: diciembre-2003
Ubicación: Elda
Mensajes: 843
Antigüedad: 21 años, 3 meses
Puntos: 13
Varios VIDEOS en pantalla a la vez

Hola me surje la siguiente DUDA:

Cargar dinamicamente N videos y mostrarlos SIMULTANEAMENTE EN PANTALLA.

Para cargar 1 video utilizo el archiconocido código:

Código:
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);
¿PERO Y PARA CARGAR N VIDEOS DE MANERA DINAMICA? (Perdón por las mayúsculas)

por ejemplo yo lo estaba intentando asi:


Código:
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);
			

}
Pero cuando sustituyoel nombre de los objetos por eval, ME FALLA, por ejemplo:
Código:
for...{
...
laconexion="connection_nc"+i
var eval(laconexion):NetConnection = new NetConnection();
...
}
Tambien me falla si creo el objeto en una funcion, ya que si hago el eval donde recibo me pasa lo mismo.

¿Que hago mal?

Muchisimas gracias si podeis echarme una manita.
__________________
MUERTE a Internet Explorer


Mi portfolio de diseño web en Elda