Burbujas.

  • MichalMystic
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Sep 09, 2004
  • Mensajes: 14
  • Status: Offline

Nota Septiembre 13th, 2004, 1:25 pm

Hey todos Im pregunto si alguien conoce una buena manera de hacer burbujas en flash para que éstas se ven como flotando hasta allí y son al azar en un espacio certian flash de mi proyecto.
En realidad no tienen que ser al azar, como acaba de ver allí flotando. Im Asegúrese de que existe una manera de hacer esto con guión de acción, así que no tiene que animar cada burbuja.

Cualquier ayuda sería genial!

Thx a todos!
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Septiembre 13th, 2004, 1:25 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Septiembre 13th, 2004, 2:33 pm

Gustar esto
Hice una burbuja de 10X10 píxeles attachMovied 10 de ellos y les animaba con esto,
Código: [ Select ]
MovieClip.prototype.air = function(){
  this.onEnterFrame = function(){
   this._y> -10 ? this._y-=4 : (this._y=85,this._x=random(300));
   if(this.L>0){
     this._x++;this.C++;this._xscale+=10;this._yscale-=10;
     if(this.C>3){
      this.L=0;this.C=0;
     }
   }else{
     this._x--;this.C++;this._xscale-=10;this._yscale+=10;
     if(this.C>3){
      this.L=1;this.C=0;
     }
   }
  }
}

/*------initialize bubbles---------*/

for(i=0;++i<11;){
   _root["bb"+i].C = 0;
   _root["bb"+i].L = Math.round(Math.random());
   _root["bb"+i].air();
  }
  1. MovieClip.prototype.air = function(){
  2.   this.onEnterFrame = function(){
  3.    this._y> -10 ? this._y-=4 : (this._y=85,this._x=random(300));
  4.    if(this.L>0){
  5.      this._x++;this.C++;this._xscale+=10;this._yscale-=10;
  6.      if(this.C>3){
  7.       this.L=0;this.C=0;
  8.      }
  9.    }else{
  10.      this._x--;this.C++;this._xscale-=10;this._yscale+=10;
  11.      if(this.C>3){
  12.       this.L=1;this.C=0;
  13.      }
  14.    }
  15.   }
  16. }
  17. /*------initialize bubbles---------*/
  18. for(i=0;++i<11;){
  19.    _root["bb"+i].C = 0;
  20.    _root["bb"+i].L = Math.round(Math.random());
  21.    _root["bb"+i].air();
  22.   }

Usted tendría que modificas los números, pero la fórmula básica está ahí.
Strong with this one, the sudo is.

Publicar Información

  • Total de mensajes en este tema: 2 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 34 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC