Flash help please

Support, Discussion, Reviews
Post Reply
User avatar
Bubba Grizz
Super Poster!
Super Poster!
Posts: 6121
Joined: July 3, 2002, 12:52 pm
Gender: Male
Location: Green Bay, Wisconsin

Flash help please

Post 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; 
   } 
}
User avatar
Bubba Grizz
Super Poster!
Super Poster!
Posts: 6121
Joined: July 3, 2002, 12:52 pm
Gender: Male
Location: Green Bay, Wisconsin

Post 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; 
   } 
}
User avatar
Sargeras
Way too much time!
Way too much time!
Posts: 1604
Joined: July 3, 2002, 2:35 pm
Location: Mental Insanity of Life

Post by Sargeras »

God I haven't touched Actionscript in so long :(
Sargeras Gudluvin - R.I.P. old friend - January 9, 2005
Post Reply