Frame 1
scoreCount = 0;
attachMovie("container", "birds", 2);
_root.birds._x = 0;
_root.birds._y = 0;
stop();
Instance of Symbol 11 MovieClip "player1" in Frame 1
onClipEvent (load) {
cGravity = 2;
cMaxDrop = 50;
cTerminalVel = 10;
}
onClipEvent (enterFrame) {
squirrel = _root.squirrel1;
a1 = _root.anchor1;
a2 = _root.anchor2;
a3 = _root.anchor1b;
a4 = _root.anchor2b;
if (squirrel.velocityY < cTerminalVel) {
squirrel.velocityY = squirrel.velocityY + cGravity;
}
if ((squirrel._y + 17) >= a1._y) {
xDisplacement = 245 - Math.abs(squirrel._x - 245);
dropDistance = (xDisplacement / 245) * cMaxDrop;
k = 2 / dropDistance;
equiDisplace = (squirrel._y + 16) - a1._y;
resistAccel = k * equiDisplace;
squirrel.velocityY = squirrel.velocityY - resistAccel;
if ((equiDisplace > dropDistance) && (squirrel.launch == false)) {
squirrel.velocityY = dropDistance - equiDisplace;
}
hit = true;
a1.x = squirrel._x - 5;
a1.y = squirrel._y + 17;
a2.x = squirrel._x + 5;
a2.y = squirrel._y + 17;
} else {
if (squirrel.standstill == true) {
squirrel.standstill = false;
}
hit = false;
}
if ((((squirrel._y < (a3._y + 10)) && (squirrel._y > (a3._y - 10))) && (squirrel.grab == true)) || ((hit2 == true) && (squirrel.grab == true))) {
xDisplacement = 245 - Math.abs(squirrel._x - 245);
dropDistance = (xDisplacement / 245) * cMaxDrop;
k = 2 / dropDistance;
equiDisplace = (squirrel._y + 16) - a3._y;
resistAccel = k * equiDisplace;
squirrel.velocityY = squirrel.velocityY - resistAccel;
if ((equiDisplace > dropDistance) && (squirrel.launch == false)) {
squirrel.velocityY = dropDistance - equiDisplace;
}
hit2 = true;
a3.x = squirrel._x - 5;
a3.y = squirrel._y + 3;
a4.x = squirrel._x + 5;
a4.y = squirrel._y + 3;
} else {
hit2 = false;
}
_root.clear();
_root.lineStyle(2, 0, 100);
if (hit) {
_root.moveTo(a1._x, a1._y);
_root.lineTo(a1.x, a1.y);
_root.moveTo(a2._x, a2._y);
_root.lineTo(a2.x, a2.y);
_root.moveTo(a1.x, a1.y);
_root.lineTo(a2.x, a2.y);
} else {
_root.moveTo(a1._x, a1._y);
_root.lineTo(a2._x, a2._y);
}
if (hit2) {
_root.moveTo(a3._x, a3._y);
_root.lineTo(a3.x, a3.y);
_root.moveTo(a4._x, a4._y);
_root.lineTo(a4.x, a4.y);
_root.moveTo(a3.x, a3.y);
_root.lineTo(a4.x, a4.y);
} else {
_root.moveTo(a3._x, a3._y);
_root.lineTo(a4._x, a4._y);
}
}
Instance of Symbol 11 MovieClip "birdControl" in Frame 1
onClipEvent (load) {
cNumBirds = 50;
birdLevel = 1;
counter = 2;
}
onClipEvent (enterFrame) {
squirrel = _root.squirrel1;
a1 = _root.anchor1;
a2 = _root.anchor2;
a3 = _root.anchor1b;
a4 = _root.anchor2b;
if (counter == 20) {
birdPosX = random(34);
birdPosY = random(2) + 1;
_root.birds.attachMovie("bird", "bird" + birdLevel, birdLevel);
birdPosX = (birdPosX * 10) + 70;
eval ("_root.birds.bird" + birdLevel)._x = birdPosX;
if (birdPosY == 1) {
if (_root.player1.hit == false) {
eval ("_root.birds.bird" + birdLevel)._y = 197;
} else {
if (birdPosX > squirrel._x) {
m = (a2._y - a2.y) / (a2._x - a2.x);
b = a2.y - (m * a2.x);
bentY = ((m * birdPosX) + b) - 10;
} else {
m = (a1.y - a1._y) / (a1.x - a1._x);
b = a1.y - (m * a1.x);
bentY = ((m * birdPosX) + b) - 10;
}
eval ("_root.birds.bird" + birdLevel)._y = bentY;
}
eval ("_root.birds.bird" + birdLevel).wire = 2;
} else if (birdPosY == 2) {
if (_root.player1.hit2 == false) {
eval ("_root.birds.bird" + birdLevel)._y = 90;
} else {
if (birdPosX > squirrel._x) {
m = (a4._y - a4.y) / (a4._x - a4.x);
b = a4.y - (m * a4.x);
bentY = ((m * birdPosX) + b) - 3;
} else {
m = (a3.y - a3._y) / (a3.x - a3._x);
b = a3.y - (m * a3.x);
bentY = ((m * birdPosX) + b) - 3;
}
eval ("_root.birds.bird" + birdLevel)._y = bentY;
}
eval ("_root.birds.bird" + birdLevel).wire = 1;
}
birdLevel++;
counter = 2;
} else {
counter++;
}
}
Instance of Symbol 35 MovieClip "squirrel1" in Frame 1
onClipEvent (load) {
cMovementSpeed = 4;
launch = false;
standstill = false;
right = true;
}
onClipEvent (enterFrame) {
if (launch == true) {
if (launchCount < 6) {
velocityY = 3.5;
launchCount++;
} else {
launch = false;
launchCount = 0;
}
} else {
launch = false;
launchCount = 0;
}
this._y = this._y + velocityY;
if ((Key.isDown(37) && (this._x > 70)) && (standstill == false)) {
this._x = this._x - cMovementSpeed;
if (right == true) {
left = true;
right = false;
this._xscale = this._xscale * -1;
this._x = this._x - 5;
}
isRunning = true;
} else if ((Key.isDown(39) && (this._x < 440)) && (standstill == false)) {
this._x = this._x + cMovementSpeed;
if (left == true) {
right = true;
left = false;
this._xscale = this._xscale * -1;
this._x = this._x + 5;
}
isRunning = true;
}
if (Key.isDown(38)) {
if ((launchPressed == false) && (_root.player1.hit == true)) {
launchPressed = true;
launch = true;
standstill = true;
}
} else {
launchPressed = false;
}
if (Key.isDown(32) && (_root.player1.hit != true)) {
grab = true;
} else {
grab = false;
}
}
Instance of Symbol 54 MovieClip in Frame 1
onClipEvent (load) {
timer = 1;
}
onClipEvent (enterFrame) {
if (timer == 20) {
_root.countdown--;
if (_root.countdown == 0) {
_root.clear();
_root.gotoAndPlay("end");
}
timer = 1;
} else {
timer++;
}
}
Frame 2
again.onPress = function () {
countdown = 30;
scoreCount = 0;
gotoAndPlay (1);
};
dogfaced.onPress = function () {
getURL ("http://www.dogfaced.com", "_blank");
};
stop();
Symbol 5 MovieClip Frame 1
idleAnim = random(40);
if (idleAnim == 1) {
gotoAndPlay (3);
}
Symbol 5 MovieClip Frame 2
gotoAndPlay (1);
Symbol 9 MovieClip Frame 1
idleAnim = random(40);
if (idleAnim == 1) {
gotoAndPlay (3);
}
Symbol 9 MovieClip Frame 2
gotoAndPlay (1);
Symbol 13 MovieClip [bird] Frame 1
stop();
Instance of Symbol 11 MovieClip in Symbol 13 MovieClip [bird] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
squirrel = _root.squirrel1;
a1 = _root.anchor1;
a2 = _root.anchor2;
a3 = _root.anchor1b;
a4 = _root.anchor2b;
if (this.hitTest(_root.squirrel1.hitBox)) {
_root.scoreCount++;
_root.scoreCounter = _root.scoreCount;
_parent.gotoAndPlay("death");
}
if (_parent.wire == 2) {
if (_root.player1.hit == false) {
_parent._y = 197;
} else if (_parent._x > squirrel._x) {
m = (a2._y - a2.y) / (a2._x - a2.x);
b = a2.y - (m * a2.x);
_parent._y = ((m * _parent._x) + b) - 10;
} else {
m = (a1.y - a1._y) / (a1.x - a1._x);
b = a1.y - (m * a1.x);
_parent._y = ((m * _parent._x) + b) - 10;
}
} else if (_parent.wire == 1) {
if (_root.player1.hit2 == false) {
_parent._y = 90;
} else if (_parent._x > squirrel._x) {
m = (a4._y - a4.y) / (a4._x - a4.x);
b = a4.y - (m * a4.x);
_parent._y = ((m * _parent._x) + b) - 5;
} else {
m = (a3.y - a3._y) / (a3.x - a3._x);
b = a3.y - (m * a3.x);
_parent._y = ((m * _parent._x) + b) - 5;
}
}
}
Symbol 13 MovieClip [bird] Frame 60
this.removeMovieClip();
Symbol 35 MovieClip Frame 1
if (grab == true) {
gotoAndPlay (34);
}
if (isRunning == true) {
gotoAndPlay (13);
}
idleAnim = random(40);
if (idleAnim == 1) {
gotoAndPlay (3);
}
Instance of Symbol 11 MovieClip "hitBox" in Symbol 35 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 35 MovieClip Frame 2
gotoAndPlay (1);
Symbol 35 MovieClip Frame 12
gotoAndPlay (1);
Symbol 35 MovieClip Frame 33
isRunning = false;
gotoAndPlay (1);
Symbol 35 MovieClip Frame 35
if (((grab == true) && (isRunning == true)) && (_root.player1.hit2 == true)) {
gotoAndPlay (36);
} else if (grab == true) {
gotoAndPlay (34);
} else {
gotoAndPlay (1);
}
Symbol 35 MovieClip Frame 40
isRunning = false;
gotoAndPlay (34);