Page 1 of 1

Flash help please

Posted: September 7, 2006, 4:04 pm
by Bubba Grizz
I use this code to mimic snowflakes or falling ash. What I would like to do is reverse it so that I can make bubbles.

This is the part I have on the actions frame.

Code: Select all

no=15; 
for (i=1;i<no>480) { 
      this._y=0; 
   } 
   if (this._x>980) { 
      this._x=0; 
   } 
   if (this._x<0>480) { 
      this._y=0; 
   } 
   if (this._x>980) { 
      this._x=0; 
   } 
   if (this._x<0) { 
      this._x=980; 
   } 
}

Posted: September 7, 2006, 4:07 pm
by Bubba Grizz
This is the code I have on the movie clip instance named ember.
(for some reason this wouldn't all post in the same post)

Code: Select all

onClipEvent(load) { 
   this._alpha=random(70)+20; 
   this._width=this._height=random(4)+4; 
   this._y=random(980); 
   this._x=random(480); 
   fall_speed = 1+Math.random()*2; 
   k=-Math.PI+Math.random()*Math.PI; 
   rad=0; 
   centerX=490; 
   centerY=240; 
} 
onClipEvent(enterFrame) { 
   rad+=(k/180)*Math.PI; 
   this._x+=Math.cos(rad)+ms; 
   this._y+=fall_speed; 
   ms=(centerX-_root._xmouse)/100; 
   if (this._y>480) { 
      this._y=0; 
   } 
   if (this._x>980) { 
      this._x=0; 
   } 
   if (this._x<0) { 
      this._x=980; 
   } 
}

Posted: September 7, 2006, 4:36 pm
by Sargeras
God I haven't touched Actionscript in so long :(