Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2006, 06:12
Avatar de jerkan
jerkan
 
Fecha de Ingreso: septiembre-2005
Mensajes: 1.607
Antigüedad: 18 años, 7 meses
Puntos: 19
banners aleatorios dentro de un MC

Quiero reproducir banners (movie clips) aleatoriamente dentro de un movie clip uno seguido de otro. De momento, tengo el siguiente código:
Código:
banners = new Array("mc1.swf", "mc2.swf");
var indice:Number = Math.round(Math.random()*(banners.length-1));

this.loadMovie(banners[indice], 1);

this.onEnterFrame = function() {
	if( this._currentframe == this._totalframes ){
		trace("evento");
	}
}
El código escoge un MC aleatorio y lo reproduce correctamente. Nada más comenzar se muestra el mensaje 'evento' por lo que me imagino que no está mirando las propiedades _currentframe y/o _totalframes del MC cargado sino del continente. ¿Alguna ayuda? Gracias de antemano.