Frame 1
fscommand ("allowscale", false);
mwidth = 1200;
mheight = 800;
hand = false;
x = 1;
while (50 >= x) {
duplicateMovieClip ("cursor", "c" + x, x);
x++;
}
startDrag ("cursor", true);
Instance of Symbol 4 MovieClip "cursor" in Frame 1
onClipEvent (load) {
Mouse.hide();
}
Symbol 3 MovieClip Frame 1
stop();
Symbol 3 MovieClip Frame 2
stop();
Symbol 4 MovieClip Frame 1
mw = _parent.mwidth;
mh = _parent.mheight;
sx = random(mw);
sy = random(mh);
ox = 0;
oy = 0;
directFollow = Math.round(Math.random());
switchXY = Math.round(Math.random());
switchX = Math.round(Math.random());
switchY = Math.round(Math.random());
_x = sx;
_y = sy;
if (directFollow) {
difX = sx - _parent._xmouse;
difY = sy - _parent._ymouse;
}
Symbol 4 MovieClip Frame 2
if (_name != "cursor") {
tx = _parent._xmouse;
ty = _parent._ymouse;
if (directFollow) {
if (switchX) {
mx = (mw - tx) - difX;
} else {
mx = tx + difX;
}
if (switchY) {
my = (mh - ty) - difY;
} else {
my = ty + difY;
}
} else {
if (sx >= tx) {
mx = (tx / sx) - 1;
} else {
mx = (tx - sx) / (mw - sx);
}
if (sy >= ty) {
my = (ty / sy) - 1;
} else {
my = (ty - sy) / (mh - sy);
}
if (switchXY) {
tmp = mx;
mx = my;
my = tmp;
}
if (switchX) {
mx = -1 * mx;
}
if (switchY) {
my = -1 * my;
}
if (0 >= mx) {
mx = sx + (mx * sx);
} else {
mx = sx + (mx * (mw - sx));
}
if (0 >= my) {
my = sy + (my * sy);
} else {
my = sy + (my * (mh - sy));
}
}
_x = mx;
_y = my;
}
if (_parent.hand) {
cursor.gotoAndStop(2);
} else {
cursor.gotoAndStop(1);
}
Symbol 4 MovieClip Frame 3
if (random(100) == 10) {
gotoAndPlay (1);
} else {
gotoAndPlay (2);
}
Symbol 6 Button
on (rollOver) {
hand = true;
}
on (rollOut, dragOut, releaseOutside) {
hand = false;
}
Symbol 7 Button
on (rollOver) {
hand = true;
}
on (rollOut, dragOut, releaseOutside) {
hand = false;
}
on (press) {
getURL ("../random.html", "_top");
}