Frame 1
function createMosquitos(count) {
var _local2 = count;
var _local3 = _root;
var _local1;
_local1 = 1;
while (_local1 <= _local2) {
_local3.attachMovie("mosquito", "mosquito" + _local1, _local1);
_local1++;
}
}
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 _local2 = x;
var _local3 = max;
var _local1;
_local1 = new Sound();
_local1.attachSound(soundID);
if (_local2 < 0) {
_local2 = 0;
} else if (_local2 > _local3) {
_local2 = _local3;
}
_local1.setPan(((_local2 - (_local3 / 2)) * 100) / (_local3 / 2));
_local1.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 (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 ((_parent._x > 670) and (xstep > 0)) {
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 (_parent._x > 640) {
x = 640;
} else {
x = _parent._x;
}
soundobject.setPan(((x - 320) * 100) / 320);
}
Symbol 23 MovieClip [mosquito] Frame 16
removeMovieClip("");
_root.hit++;