Frame 1
if (_totalframes eq _framesloaded) {
gotoAndPlay (5);
}
size = getBytesTotal();
loaded = getBytesLoaded();
percent = int((loaded / size) * 100);
time = int(getTimer() / 1000);
Instance of Symbol 9 MovieClip in Frame 1
onClipEvent (enterFrame) {
this._x = 20 + (_root.percent * 4.5);
}
Frame 2
gotoAndPlay (1);
Frame 10
mst.filename = "catnmouse.sco";
mst.scoresize = 1;
mst.action = "VIEW";
mst.viewtype = "FLASH";
mst.winname = _root.Name;
mst.winscore = _root.Final.final;
mst.loadVariables("http://www.hairybullet.com/hosted/syndicatesdomain/Pages/Games/BatAndMouse/scores.php", "GET");
stop();
Frame 20
score = 0;
Final._visible = false;
stop();
Instance of Symbol 5 MovieClip "Ball" in Frame 20
onClipEvent (load) {
lose = false;
xmax = 520;
xmin = 30;
ymax = 370;
ymin = 30;
angle = 0;
xv = 0;
x = 0;
y = 0;
yv = 0;
xa = 0;
ya = 0;
v = 0;
visc = 0.02;
drag = 0;
}
onClipEvent (enterFrame) {
rtorque = 0.5 * AngVelocity;
AngAcceleration = torque - rtorque;
AngVelocity = AngVelocity + AngAcceleration;
angle = angle + AngVelocity;
if (angle < 0) {
angle = angle + 360;
}
if (angle > 360) {
angle = angle - 360;
}
v = Math.sqrt((xv * xv) + (yv * yv));
drag = visc * v;
if (Key.isDown(38) && (lose == false)) {
force = 1;
} else {
force = 0;
}
if (Key.isDown(39) && (lose == false)) {
torque = 5;
} else if (Key.isDown(37) && (lose == false)) {
torque = -5;
} else {
torque = 0;
}
xa = ((drag * xv) * -1) + (force * Math.sin((Math.PI/180) * angle));
ya = ((drag * yv) * -1) - (force * Math.cos((Math.PI/180) * angle));
xv = xv + xa;
yv = yv + ya;
if (_x <= xmin) {
_x = xmin;
}
if (_x >= xmax) {
_x = xmax;
}
if (_y <= ymin) {
_y = ymin;
}
if (_y >= ymax) {
_y = ymax;
}
_y = (_y + yv);
_x = (_x + xv);
_rotation = angle;
}
Instance of Symbol 9 MovieClip "Cat" in Frame 20
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
}
onClipEvent (enterFrame) {
if (this._x > _root.Ball._x) {
this._x = this._x - xspeed;
}
if (this._x < _root.Ball._x) {
this._x = this._x + xspeed;
}
if (this._y >= _root.Ball._y) {
this._y = this._y - yspeed;
}
if (this._y <= _root.Ball._y) {
this._y = this._y + yspeed;
}
if (_root.Ball.hitTest(_x, _y, true)) {
this.gotoAndStop("Hitting");
_root.Ball.gotoAndStop("Death");
_root.Timer.gotoAndStop(31);
_root.Timer._visible = false;
_root.Ball.lose = true;
_root.Ball.xv = 0;
_root.Ball.yv = 0;
xspeed = 0;
yspeed = 0;
_root.Final.final = _root.score * _root.Timer.timer;
_root.Final._visible = true;
_root.mst.filename = "catnmouse.sco";
_root.mst.scoresize = 100;
_root.mst.action = "INSERT";
_root.mst.viewtype = "FLASH";
_root.mst.winname = _root.Name;
_root.mst.winscore = _root.Final.final;
_root.mst.loadVariables("http://www.hairybullet.com/hosted/syndicatesdomain/Pages/Games/BatAndMouse/scores.php", "GET");
_root.gotoAndStop(21);
}
}
Instance of Symbol 35 MovieClip in Frame 20
onClipEvent (load) {
this._x = 30 + random(500);
this._y = 30 + random(350);
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.Ball)) {
_root.score = _root.score + 100;
this._y = 30 + random(350);
this._x = 40 + random(450);
}
}
Instance of Symbol 42 MovieClip "Timer" in Frame 20
onClipEvent (load) {
this.gotoAndPlay(2);
}
Symbol 5 MovieClip Frame 1
stop();
Symbol 9 MovieClip Frame 1
stop();
Symbol 23 Button
on (release) {
if (Name == "Enter Name") {
gotoAndStop (10);
} else if (Name != "Enter Name") {
gotoAndStop ("Game");
}
}
Symbol 27 Button
on (release) {
getURL ("http://www.hairybullet.com/hosted/syndicatesdomain/Pages/Games/BatAndMouse/BatNMouse.php", "_blank");
}
Symbol 31 Button
on (release) {
getURL ("http://www.hairybullet.com/hosted/syndicatesdomain/Pages/Games/BatAndMouse2/BatNMouse2.php", "_blank");
}
Symbol 42 MovieClip Frame 1
timer = 0;
Symbol 42 MovieClip Frame 2
_root.Cat.yspeed = _root.Cat.yspeed + 0.1;
_root.Cat.xspeed = _root.Cat.xspeed + 0.1;
Symbol 42 MovieClip Frame 30
timer = timer + 1;
gotoAndPlay (2);
Symbol 50 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("Intro");
}