Hey dudes i wanna make this particle effect in a movie clip and the movement, distance size of particcles and everything is generated by a random function, how exactly can i change this to make the particles move in a certain area of hte movie clip stage not all over.Here’s the code
xMin = 0;
xMax = 550;
yMin = 0;
yMax = 400;
minSize = 10;
maxSize = 50;
easeFactor = 10;
randomX = Math.random () * ( xMax - xMin ) + xMin;
randomY = Math.random () * ( yMax - yMin ) + yMin;
distance = Math.sqrt(Math.pow(this._x-randomX, 2)+Math.pow(this._y-randomY, 2));
if (distance>1) {
this._x += (randomX-this._x)/easeFactor;
this._y += (randomY-this._y)/easeFactor;
gotoAndPlay(2);
} else {
gotoAndPlay(1);
}
10x in advance:flower: