Comunidad de diseño web y desarrollo en internet online

Controlar con un botón los mc creados con attachmovie.

Citar            
MensajeEscrito el 31 Jul 2009 04:39 pm
Hola a todos, he creado varios mc con el sig código:

Código ActionScript :

for (var i:Number = 0; i < 10; i++){
      mc = attachMovie("mclip", "mc"+i, i);
      mc._x = i*30;
      mc._y = i*30;
}


Ahora necesito mover todos los "mc" cuando presiono un botón, y no se cómo hacerlo.

Por CRD

80 de clabLevel



Genero:Masculino  

Diseño Filete Ilustración

msie7
Citar            
MensajeEscrito el 31 Jul 2009 05:17 pm
Para mejor explicación, en el siguiente código, al soltar los botones "sube" o "baja", se mueve solamente el último mc creado.

Código ActionScript :

for (var i:Number = 0; i < 10; i++){
      checkb = attachMovie("checkbt", "ch"+i, i);
      checkb._x = i*30;
      checkb._y = i*30;
      baja.onRelease = function(){
         checkb._x = checkb._x + 100;
      }
      sube.onRelease = function(){
         checkb._x = checkb._x - 100;
      }
}

Y yo necesito que se muevan todos. :(

Por CRD

80 de clabLevel



Genero:Masculino  

Diseño Filete Ilustración

msie7

 

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