A “L” Driver question…
followed the Tutorial on Particles but am unable to tame the particles
to move within a designated X & Y space…
here is script in frame 1&2
xMin = 10;
xMax = 450;
yMin = 10;
yMax = 300;
minSize = 5;
maxSize = 40;
easeFactor = 8;
randomX = Math.random () * ( xMax - xMin ) + xMin;
randomY = Math.random () * ( yMax - yMin ) + yMin;
randomSize = Math.random () * ( maxSize - minSize ) + minSize;
Frame 3 is as follows
distance = Math.sqrt(Math.pow(this._x-randomX, 2)+Math.pow(this._y-randomY, 2));
if (Math.abs(this._width-maxSize)>1) {
this._width += (randomSize-this._width)/2;
this._height += (randomSize-this._height)/2;
}
if (distance>1) {
this._x += (randomX-this._x)/easeFactor;
this._y += (randomY-this._y)/easeFactor;
gotoAndPlay(2);
} else {
gotoAndPlay(1);
}
Is there anyway to change the colors of the particles to random while its moving?
Would like to thank in advance the Flash Gurus for taking time to respond.
Thanxs…