Comunidad de diseño web y desarrollo en internet online

gotas cayendo en diferentes tiempos

Citar            
MensajeEscrito el 09 Sep 2009 02:41 am
tengo un menu donde tengo 9 botones en forma de gota, cada gota es un mc que al final es boton, pero quiero que inicien los mcs en diferentes tiempos o sea en forma random perono se como hacerlo. este es el codigo:

this.attachMovie("LAGRIMA1","LAGRIMA1",this.getNextHighestDepth());
LAGRIMA1._x=60;
LAGRIMA1._y=240;
this.attachMovie("LAGRIMA2","LAGRIMA2",this.getNextHighestDepth());
LAGRIMA2._x=157.5;
LAGRIMA2._y=190;
this.attachMovie("LAGRIMA3","LAGRIMA3",this.getNextHighestDepth());
LAGRIMA3._x=255;
LAGRIMA3._y=240;
this.attachMovie("LAGRIMA4","LAGRIMA4",this.getNextHighestDepth());
LAGRIMA4._x=352.5;
LAGRIMA4._y=190;
this.attachMovie("LAGRIMA5","LAGRIMA5",this.getNextHighestDepth());
LAGRIMA5._x=450;
LAGRIMA5._y=240;
this.attachMovie("LAGRIMA6","LAGRIMA6",this.getNextHighestDepth());
LAGRIMA6._x=547.5;
LAGRIMA6._y=190;
this.attachMovie("LAGRIMA7","LAGRIMA7",this.getNextHighestDepth());
LAGRIMA7._x=645;
LAGRIMA7._y=240;
this.attachMovie("LAGRIMA8","LAGRIMA8",this.getNextHighestDepth());
LAGRIMA8._x=742.5;
LAGRIMA8._y=190;
this.attachMovie("LAGRIMA9","LAGRIMA9",this.getNextHighestDepth());
LAGRIMA9._x=840;
LAGRIMA9._y=240;

Por JIMMYTHECLOWN

25 de clabLevel



 

MÉXICO

msie8
Citar            
MensajeEscrito el 09 Sep 2009 07:44 pm
Yo lo haría así:

Código ActionScript :

var interval:Number=0;
var mostrar:Boolean=true;

_root.onEnterFrame = function(){
   if (_root.mostrar){
      interval++;
      trace(interval);
      switch (interval) { 
       case 10 : 
         this.attachMovie("LAGRIMA1","LAGRIMA1",this.getNextHighestDepth());
         LAGRIMA1._x=60;
         LAGRIMA1._y=240;
       break; 
       case 20 : 
          this.attachMovie("LAGRIMA2","LAGRIMA2",this.getNextHighestDepth());
         LAGRIMA2._x=157.5;
         LAGRIMA2._y=190;
      break;
      case 30 : 
          this.attachMovie("LAGRIMA3","LAGRIMA3",this.getNextHighestDepth());
         LAGRIMA3._x=255;
         LAGRIMA3._y=240;
      break;
      case 200 : 
          mostrar=false;
      break;
       default : 
       trace(interval); 
       } 
   }
}


Las herramientas están ahi solo hay que saber utilizarlas ^^

Por CODE_DCD

6 de clabLevel



 

msie

 

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