Frame 1
stageWidth = 750;
stageHeight = 550;
startDrag ("mouse", true);
stop();
Symbol 2 MovieClip Frame 1
stop();
Symbol 3 MovieClip Frame 1
xMargin = 40;
yMargin = 40;
rows = 8;
columns = 12;
xSpacing = (_root.stageWidth - (2 * xMargin)) / (columns - 1);
ySpacing = (_root.stageHeight - (2 * yMargin)) / (rows - 1);
var i = 1;
while (rows >= i) {
var j = 1;
while (columns >= j) {
newClip = ("arrow" + j) + i;
duplicateMovieClip ("arrow_template", newClip, (columns * (i - 1)) + j);
setProperty(newClip, _x , xMargin + ((j - 1) * xSpacing));
setProperty(newClip, _y , yMargin + ((i - 1) * ySpacing));
j++;
}
i++;
}
Instance of Symbol 2 MovieClip "arrow_template" in Symbol 3 MovieClip Frame 1
onClipEvent (enterFrame) {
function radToDeg(angle) {
return((angle / Math.PI) * 180);
}
x = _root.mouse._x - this._x;
y = _root.mouse._y - this._y;
if (y == 0) {
y = 1E-5;
}
r = Math.sqrt((x * x) + (y * y));
theta = radToDeg(Math.acos(x / r)) * (y / Math.abs(y));
scaleVar = 3000 / (r - 14);
if (60 < scaleVar) {
scaleVar = 60;
} else if (scaleVar < 0) {
scaleVar = 60;
}
this._rotation = 0;
this._xscale = 100 + scaleVar;
this._yscale = 100 + scaleVar;
this._rotation = theta + 90;
gotoAndStop(Math.ceil((scaleVar / 60) * 30));
}