Frame 1
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
_root._highquality = 1;
_root.objectBase = 1;
_root.objectMax = 100;
_root.collisionVis = 1;
_root.movieWidth = 600;
_root.movieHeight = 600;
function makenode() {
newnode = "node" + String(depth++);
this.attachMovie("node", newnode, depth);
this[newnode]._rotation = random(360);
slevel = random(0) + 40;
this[newnode]._xscale = slevel;
this[newnode]._yscale = slevel;
side = random(4);
if (side == 0) {
this[newnode]._x = random(_root.movieWidth) + 5;
this[newnode]._y = 0;
} else if (side == 1) {
this[newnode]._x = 0;
this[newnode]._y = random(_root.movieHeight) + 5;
} else if (side == 2) {
this[newnode]._x = random(_root.movieWidth) + 5;
this[newnode]._y = _root.movieHeight;
} else {
this[newnode]._x = _root.movieWidth;
this[newnode]._y = random(_root.movieHeight) + 5;
}
}
depth = 2;
slevel = 100;
Frame 10
makenode();
Frame 20
gotoAndPlay (10);
Symbol 2 MovieClip [decoy] Frame 1
stop();
Symbol 4 MovieClip [node] Frame 1
this._visible = _root.collisionVis;
var maxv = 5;
vx = (300 - this._x) / 20;
vy = (175 - this._y) / 15;
Symbol 4 MovieClip [node] Frame 2
vx = vx + ((random(7) - 3) / 5);
if (vx < (-maxv)) {
vx = -maxv;
} else if (maxv < vx) {
vx = maxv;
}
vy = vy + ((random(7) - 3) / 5);
if (vy < (-maxv)) {
vy = -maxv;
} else if (maxv < vy) {
vy = maxv;
}
this._x = this._x + vx;
this._y = this._y + vy;
this._rotation = this._rotation + 1;
if ((((this._x < -10) || ((_root.movieWidth + 10) < this._x)) || (this._y < -10)) || ((_root.movieHeight + 10) < this._y)) {
_parent.makenode();
this.gotoAndPlay(100);
}
stick1 = _parent.magnet1.checkme(this._x, this._y, this._rotation, this._xscale);
stick2 = _parent.magnet2.checkme(this._x, this._y, this._rotation, this._xscale);
if (stick1 or stick2) {
this.gotoAndPlay(4);
}
Symbol 4 MovieClip [node] Frame 3
gotoAndPlay (2);
Symbol 4 MovieClip [node] Frame 79
stop();
Symbol 4 MovieClip [node] Frame 111
this.removeMovieClip();
Symbol 6 MovieClip Frame 1
function checkme(x, y, r, s) {
rx = 15 * Math.cos((Math.PI/180) * r);
ry = 15 * Math.sin((Math.PI/180) * r);
if (((hitTest(x - rx, y - ry, true) || (hitTest(x + rx, y - ry, true))) || (hitTest(x - rx, y + ry, true))) || (hitTest(x + rx, y + ry, true))) {
if (_root.objectMax >= _root.objectBase) {
newgrowth = "grow" + String(gd--);
this.attachMovie("decoy", newgrowth, gd);
this[newgrowth]._x = x - this._x;
this[newgrowth]._y = y - this._y;
this[newgrowth]._rotation = r;
this[newgrowth]._xscale = s;
this[newgrowth]._yscale = s;
_root.objectBase++;
} else {
_root.collisionVis = 0;
}
return(1);
}
return(0);
}
var gd = 5000;
Symbol 6 MovieClip Frame 2
stop();