Comunidad de diseño web y desarrollo en internet online

problema coen el trace

Citar            
MensajeEscrito el 14 Dic 2006 03:02 pm
Como puede ser que teniendo :

Código :

for (var i:Number = 0; i<imagenes.length; i++) {
   this.createEmptyMovieClip("clip"+i, this.getNextHighestDepth());
   this["clip"+i]._x = posicionesX[i];
   this["clip"+i]._y = posicionesY[i];
   this["clip"+i].createEmptyMovieClip("contenedor", 6);
   this["clip"+i].contenedor.loadMovie(imagenes[i]);
   _root.createEmptyMovieClip("contenedor1", 1);
   this["clip"+i].swf = this["popup"+i].swf;
   trace ( this["popup"+i].swf);
   this["clip"+i].onPress = function() {
      _root.contenedor1.loadMovie(this.swf);
      _root.contenedor1._x = 50;
      _root.contenedor1._y = 100;
      _root.contenedor1.swapDepths(_root.getNextHighestDepth());
   };
}


El trace me devuelva undefined y teniedo:

Código :

for (var i:Number = 0; i<imagenes.length; i++) {
   this.createEmptyMovieClip("clip"+i, this.getNextHighestDepth());
   this["clip"+i]._x = posicionesX[i];
   this["clip"+i]._y = posicionesY[i];
   this["clip"+i].createEmptyMovieClip("contenedor", 6);
   this["clip"+i].contenedor.loadMovie(imagenes[i]);
   _root.createEmptyMovieClip("contenedor1", 1);
   this["clip"+i].swf = "popup.swf"+i;
   trace("popup.swf"+i);
   this["clip"+i].onPress = function() {
      _root.contenedor1.loadMovie(this.swf);
      _root.contenedor1._x = 50;
      _root.contenedor1._y = 100;
      _root.contenedor1.swapDepths(_root.getNextHighestDepth());
   };
}


El trace me devuelve popup.swf1,popup.swf2..... lo q intento hacer es q me devulva popup1.swf,popup2.swf!!!!
me voy a volver loco!!!!

Por carter15

73 de clabLevel



 

firefox
Citar            
MensajeEscrito el 14 Dic 2006 03:28 pm
es lo que le mandas:
this["clip"+i].swf = "popup.swf"+i;

saldrá el trace si pones:
this["clip"+i].swf = "popup"+i+".swf";

Y en el primer código:
this["popup"+i].swf no es nada, no está definido.(por lo menos en ese trozo de código)

Por Teseo

SWAT Team

1780 de clabLevel

14 tutoriales

Genero:Masculino   SWAT

msie
Citar            
MensajeEscrito el 14 Dic 2006 03:55 pm
Gracias por responder!! bueno si q quiere decir algo pero como bien dices fuera del codigo q pegue! pero llevas razon con lo de:

this["clip"+i].swf = "popup"+i+".swf";


yo lo intente con :

Código :

this["clip"+i].swf = "popup"+i ".swf";


me faltaba un + para terminar la concatenacion.

Por carter15

73 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.