Foros del Web » Creando para Internet » Flash y Actionscript »

Varios VIDEOS en pantalla a la vez

Estas en el tema de Varios VIDEOS en pantalla a la vez en el foro de Flash y Actionscript en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 06/08/2009, 09:23
Avatar de kazafun  
Fecha de Ingreso: diciembre-2003
Ubicación: Elda
Mensajes: 843
Antigüedad: 20 años, 4 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
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:02.