Frame 1
function createMosquitos(count) {
var i;
i = 1;
while (count >= i) {
_root.attachMovie("mosquito", "mosquito" + i, i);
i++;
}
}
function changeCursor(movieclip) {
Mouse.hide();
_root.attachMovie(movieclip, "customCursor", 9999);
_root.customCursor.startDrag(true);
}
function calculateRandom(min, max) {
return(Math.floor(Math.random() * ((max + 1) - min)) + min);
}
function playSound(max, x, soundID) {
var soundobject;
soundobject = new Sound();
soundobject.attachSound(soundID);
if (x < 0) {
x = 0;
} else if (max < x) {
x = max;
}
soundobject.setPan(((x - (max / 2)) * 100) / (max / 2));
soundobject.start();
}
fscommand ("fullscreen", true);
fscommand ("allowscale", true);
fscommand ("showmenu", false);
level = 0;
hit = 0;
score = 0;
changeCursor("swatter");
Frame 3
if (hit == level) {
if (level < 8) {
level++;
}
hit = 0;
createMosquitos(level);
}
prevFrame();
play();
Symbol 11 MovieClip Frame 6
stop();
Symbol 13 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 2
stop();
Instance of Symbol 13 MovieClip "arm" in Symbol 14 MovieClip [swatter] Frame 1
onClipEvent (mouseDown) {
_root.playSound(640, _parent._x, "zish");
gotoAndPlay (2);
}
onClipEvent (mouseUp) {
gotoAndPlay (3);
}
onClipEvent (mouseMove) {
updateAfterEvent();
}
Symbol 23 MovieClip [mosquito] Frame 1
stop();
Instance of Symbol 20 MovieClip "mosquito" in Symbol 23 MovieClip [mosquito] Frame 1
onClipEvent (load) {
varName = 5;
}
onClipEvent (mouseDown) {
if (this.hitTest(_root.customCursor.hitarea)) {
soundobject.stop();
_root.playSound(640, _parent._x, "splatter");
_root.score++;
_parent.gotoAndPlay("hit");
}
}
onClipEvent (load) {
_parent._x = _root.calculateRandom(-1500, -50);
_parent._y = _root.calculateRandom(80, 200);
scale = 10;
_parent._xscale = scale;
_parent._yscale = scale;
xStep = 12;
yStep = 8;
soundobject = new Sound(this);
soundobject.attachSound("buzz");
soundobject.setPan(-100);
soundobject.start(0, 999);
}
onClipEvent (enterFrame) {
_parent._x = _parent._x + xstep;
_parent._y = _parent._y + (Math.sin(_parent._x / 100) * ystep);
if ((_parent._x < -30) and (xstep < 0)) {
xstep = -(xstep - (xstep / 16));
ystep = -(ystep - (ystep / 16));
scale = _parent._yscale + 4;
_parent._xscale = scale;
_parent._yscale = scale;
} else if ((670 < _parent._x) and (0 < xstep)) {
xstep = -(xstep - (xstep / 16));
ystep = -(ystep - (ystep / 16));
scale = _parent._yscale + 4;
_parent._xscale = -scale;
_parent._yscale = scale;
}
if (_parent._x < 0) {
x = 0;
} else if (640 < _parent._x) {
x = 640;
} else {
x = _parent._x;
}
soundobject.setPan(((x - 320) * 100) / 320);
}
Symbol 23 MovieClip [mosquito] Frame 16
removeMovieClip("");
_root.hit++;