Combined Code
movieClip 2 {
}
movieClip 3 {
frame 1 {
depth = 10000;
bulgepower = 3;
particleWidth = 2;
this.dot._width = 2;
particleHeight = 2;
this.dot._height = 2;
movieWidth = Stage.width;
movieHeight = Stage.height;
width = 100;
height = 100;
xoff = (movieWidth - particleWidth * width) / 2;
yoff = (movieHeight - particleHeight * height) / 2;
j = 0;
while (j < height) {
i = 0;
while (i < width) {
duplicateMovieClip(this.dot, 'dot' + depth, depth);
d = eval('dot' + depth);
d.bx = xoff + this.dot._width * i;
d.by = yoff + this.dot._height * j;
d._x = d.bx;
d._y = d.by;
d.sensitive = true;
++depth;
++i;
}
++j;
}
}
instance dot of movieClip 2 {
onClipEvent (load) {
D = 125;
}
onClipEvent (enterFrame) {
if (sensitive == true) {
xd = _parent._xmouse - bx;
yd = _parent._ymouse - by;
d = Math.sqrt(xd * xd + yd * yd);
if (d < D) {
xp = (-xd / d) * Math.sqrt(D - d) * _parent.bulgepower;
yp = (-yd / d) * Math.sqrt(D - d) * _parent.bulgepower;
} else {
yp = 0;
xp = 0;
}
xt = bx + xp;
yt = by + yp;
_x = _x + (xt - _x) / 3;
_y = _y + (yt - _y) / 3;
}
}
}
}