Frame 1
_global.upKey = 38;
_global.leftKey = 37;
_global.downKey = 40;
_global.rightKey = 39;
_global.muzic = true;
Frame 2
stop();
Frame 4
K = new Array();
K[9] = "TAB";
K[13] = "ENTER";
K[16] = "SHIFT";
K[17] = "CTRL";
K[20] = "Caps Lock";
K[32] = "SPACE";
K[33] = "Page Up";
K[34] = "Page Down";
K[35] = "END";
K[36] = "HOME";
K[37] = "LEFT";
K[38] = "UP";
K[39] = "RIGHT";
K[40] = "DOWN";
K[44] = ",";
K[45] = "INSERT";
K[46] = "DELETE";
K[47] = "/";
K[48] = "0";
K[49] = "1";
K[50] = "2";
K[51] = "3";
K[52] = "4";
K[53] = "5";
K[54] = "6";
K[55] = "7";
K[56] = "8";
K[57] = "9";
K[65] = "A";
K[66] = "B";
K[67] = "C";
K[68] = "D";
K[69] = "E";
K[70] = "F";
K[71] = "G";
K[72] = "H";
K[73] = "I";
K[74] = "J";
K[75] = "K";
K[76] = "L";
K[77] = "M";
K[78] = "N";
K[79] = "O";
K[80] = "P";
K[81] = "Q";
K[82] = "R";
K[83] = "S";
K[84] = "T";
K[85] = "U";
K[86] = "V";
K[87] = "W";
K[88] = "X";
K[89] = "Y";
K[90] = "Z";
K[96] = "0";
K[97] = "1";
K[98] = "2";
K[99] = "3";
K[100] = "4";
K[101] = "5";
K[102] = "6";
K[103] = "7";
K[104] = "8";
K[105] = "9";
K[186] = ";";
K[219] = "[";
K[222] = "'";
setLeft = false;
setUp = false;
setRight = false;
setDown = false;
keySet = new Object();
Key.addListener(keySet);
onEnterFrame = function () {
keySet.onKeyDown = function () {
if (setUp) {
setUp = false;
_root.instructions.text = "Up key now set to " + K[int(Key.getCode())];
_global.upKey = Key.getCode();
_root.up.text = K[int(Key.getCode())];
}
if (setLeft) {
setLeft = false;
_root.instructions.text = "Left key now set to " + K[int(Key.getCode())];
_global.leftKey = Key.getCode();
_root.left.text = K[int(Key.getCode())];
}
if (setDown) {
setDown = false;
_root.instructions.text = "Down key now set to " + K[int(Key.getCode())];
_global.downKey = Key.getCode();
_root.down.text = K[int(Key.getCode())];
}
if (setRight) {
setRight = false;
_root.instructions.text = "Right key now set to " + K[int(Key.getCode())];
_global.rightKey = Key.getCode();
_root.right.text = K[int(Key.getCode())];
}
};
};
muzac.stop();
i = 200;
while (i <= 500) {
_root["ufo" + i].removeMovieClip();
i++;
}
i = 500;
while (i <= 1000) {
_root["cow" + i].removeMovieClip();
i++;
}
_root.nextLevel.removeMovieClip();
Frame 5
function makeCow() {
cowNumber = 500;
i = 500;
while (i <= 1000) {
if (!_root["cow" + i]) {
cowNumber = i;
_root.attachMovie("cow", "cow" + cowNumber, cowNumber);
break;
}
i++;
}
_root["cow" + cowNumber].action = "walking";
_root["cow" + cowNumber]._y = 300;
if (random(2) == 0) {
_root["cow" + cowNumber]._x = -100;
} else {
_root["cow" + cowNumber]._x = 525;
}
_root["cow" + cowNumber].vSpeed = 0;
_root["cow" + cowNumber].action = "walking";
_root["cow" + cowNumber].direction = "left";
if (cowNumber >= cowCounter) {
cowCounter++;
}
}
function makeUFO() {
_root.attachMovie("ufo", "ufo" + ufoCounter, ufoCounter);
_root["ufo" + ufoCounter].action = "searching";
_root["ufo" + ufoCounter].cowSearch = int(random(cowCounter) + 1);
_root["ufo" + ufoCounter].vSpeed = 0;
_root["ufo" + ufoCounter].health = 100;
if (random(2) == 0) {
_root["ufo" + ufoCounter]._x = -100;
} else {
_root["ufo" + ufoCounter]._x = 525;
}
_root["ufo" + ufoCounter]._y = random(75) + 50;
ufoCounter++;
}
function makeBullet() {
_root.attachMovie("bullet", "bullet" + bulletCounter, bulletCounter);
_root["bullet" + bulletCounter]._x = _root.player._x;
_root["bullet" + bulletCounter]._y = _root.player._y - 20;
_root["bullet" + bulletCounter].x = _root["bullet" + bulletCounter]._xmouse;
_root["bullet" + bulletCounter].y = _root["bullet" + bulletCounter]._ymouse;
_root["bullet" + bulletCounter].angle = Math.atan(_root["bullet" + bulletCounter].y / _root["bullet" + bulletCounter].x) / (Math.PI/180);
if (_root["bullet" + bulletCounter].x < 0) {
_root["bullet" + bulletCounter].angle = _root["bullet" + bulletCounter].angle + 180;
}
if ((_root["bullet" + bulletCounter].x >= 0) && (_root["bullet" + bulletCounter].y < 0)) {
_root["bullet" + bulletCounter].angle = _root["bullet" + bulletCounter].angle + 360;
}
_root["bullet" + bulletCounter].speed = 10;
_root["bullet" + bulletCounter].angle = _root["bullet" + bulletCounter].angle + (88 + random(10));
_root["bullet" + bulletCounter]._rotation = _root["bullet" + bulletCounter].angle;
_root["bullet" + bulletCounter].lastX = 0;
_root["bullet" + bulletCounter].lastY = 0;
bulletCounter++;
if (bulletCounter > 150) {
bulletCounter = 100;
}
}
function levelUp() {
_root.attachMovie("nextLevel", "nextLevel", 967);
_root.nextLevel._x = 0;
_root.nextLevel._y = 0;
if (level == 1) {
_root.makeCow();
}
_root.ufoCounter = 200;
}
function clearAll() {
muzac.stop();
i = 200;
while (i <= 500) {
_root["ufo" + i].removeMovieClip();
i++;
}
i = 500;
while (i <= 1000) {
_root["cow" + i].removeMovieClip();
i++;
}
_root.nextLevel.removeMovieClip();
}
_root.level = 0;
_root.lives = 5;
_root.gunshot = new Sound();
_root.gunshot.attachSound("shotgun");
_root.reloadTimer = 0;
_root.fire = 3;
_root.cowCounter = 500;
_root.ufoCounter = 200;
_root.bulletCounter = 100;
_root.missileCounter = 151;
_root.score = 0;
_root.attachMovie("crosshair", "crosshair", 997);
onMouseDown = function () {
if (_root.player.action == "aiming") {
if (reloadTimer == 0) {
_root.player.arms.arms.fire.gotoAndPlay(2);
reloadTimer = 25;
gunshot.start();
i = 1;
while (i <= fire) {
makeBullet();
i++;
}
} else {
reloadTimer = reloadTimer + 2;
}
} else if ((_root.player.action == "walking") || (_root.player.action == "standing")) {
_root.player.action = "aiming";
}
};
onEnterFrame = function () {
if (reloadTimer > 0) {
reloadTimer--;
}
if (!_root.nextLevel) {
nextLVL = true;
i = 200;
while (i <= ufoCounter) {
if (_root["ufo" + i]) {
nextLVL = false;
}
i++;
}
if (nextLVL) {
ufoCounter = 200;
level++;
makeCow();
levelUp();
}
}
cows = 0;
i = 500;
while (i <= cowCounter) {
if (_root["cow" + i]) {
cows++;
}
i++;
}
if ((_root.lives == 0) || (cows == 0)) {
clearAll();
gotoAndStop (6);
}
};
stop();
_root.muzac = new Sound();
_root.muzac.attachSound("music");
if (_global.muzic) {
muzac.start(0, 9999);
}
Instance of Symbol 236 MovieClip in Frame 5
onClipEvent (enterFrame) {
this.gotoAndStop(_root.lives);
}
Instance of Symbol 294 MovieClip "player" in Frame 5
onClipEvent (load) {
action = "standing";
direction = "Left";
maxSpeed = 5;
vSpeed = 0;
hSpeed = 0;
floor = this._y;
jump = 10;
keyListener = new Object();
fireListener = new Object();
Key.addListener(keyListener);
Key.addListener(fireListener);
}
onClipEvent (enterFrame) {
if (Key.isDown(_global.leftKey)) {
if ((action != "aiming") && (action != "dead")) {
hSpeed = hSpeed - 0.5;
direction = "left";
}
}
if (Key.isDown(_global.rightKey)) {
if ((action != "aiming") && (action != "dead")) {
hSpeed = hSpeed + 0.5;
direction = "right";
}
}
if (Key.isDown(_global.upKey)) {
if ((action != "aiming") && (action != "dead")) {
if (_y == floor) {
vSpeed = -jump;
}
}
}
keyListener.onKeyDown = function () {
if ((action == "aiming") && (Key.isDown(_global.upKey))) {
action = "standing";
} else if (Key.isDown(_global.downKey)) {
if ((action == "standing") || (action == "walking")) {
action = "aiming";
hSpeed = 0;
} else if (action == "aiming") {
action = "standing";
}
}
};
if ((action != "aiming") && (action != "dead")) {
if ((!Key.isDown(_global.leftKey)) && (hSpeed < 0)) {
hSpeed = hSpeed + 0.5;
}
if ((!Key.isDown(_global.rightKey)) && (hSpeed > 0)) {
hSpeed = hSpeed - 0.5;
}
if (hSpeed > maxSpeed) {
hSpeed = maxSpeed;
} else if (hSpeed < (-maxSpeed)) {
hSpeed = -maxSpeed;
}
if ((_y < floor) && (Key.isDown(_global.upKey))) {
vSpeed = vSpeed - (jump * 0.05);
}
if (_y < floor) {
vSpeed++;
} else if ((_y + vSpeed) > floor) {
vSpeed = 0;
_y = floor;
}
_x = (_x + hSpeed);
_y = (_y + vSpeed);
if (_x < 0) {
_x = 0;
}
if (_x > 425) {
_x = 425;
}
if (hSpeed != 0) {
action = "walking";
} else {
action = "standing";
}
if (_y != floor) {
action = "up";
}
if (vSpeed > 0) {
action = "down";
}
if (hSpeed < 0) {
direction = "left";
}
if (hSpeed > 0) {
direction = "right";
}
} else if (action == "aiming") {
if (this._xmouse > 0) {
if (direction == "left") {
direction = "right";
} else {
direction = "left";
}
}
}
if (direction == "left") {
_xscale = 100;
} else if (direction == "right") {
_xscale = -100;
}
if (action == "standing") {
this.gotoAndStop(1);
}
if (action == "walking") {
this.gotoAndStop(2);
}
if (action == "up") {
this.gotoAndStop(3);
}
if (action == "down") {
this.gotoAndStop(4);
}
if (action == "aiming") {
this.gotoAndStop(5);
}
if (action == "dead") {
this.gotoAndStop(6);
}
}
Frame 6
onEnterFrame = function () {
};
stop();
muzac.stop();
i = 200;
while (i <= 500) {
_root["ufo" + i].removeMovieClip();
i++;
}
i = 500;
while (i <= 1000) {
_root["cow" + i].removeMovieClip();
i++;
}
_root.nextLevel.removeMovieClip();
Instance of Symbol 305 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (this._currentframe == 156) {
_root.gotoAndStop(2);
}
}
Frame 7
play();
Frame 50
gotoAndStop (2);
Symbol 8 MovieClip [FLabelSymbol] Frame 1
#initclip 2
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 17 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 23 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 29 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame4, "shadow");
component.registerSkinElement(frame2, "darkshadow");
component.registerSkinElement(frame3, "highlight");
component.registerSkinElement(frame1, "highlight3D");
Symbol 35 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 36 MovieClip [fpb_states] Frame 1
stop();
Symbol 36 MovieClip [fpb_states] Frame 2
stop();
Symbol 36 MovieClip [fpb_states] Frame 3
stop();
Symbol 36 MovieClip [fpb_states] Frame 4
stop();
Symbol 37 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var funct in this.methodTable) {
this[funct]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, inner);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!global)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var myColor = new Color(skinMCRef);
myColor.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 43 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 43 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 44 MovieClip [FPushButtonSymbol] Frame 1
#initclip 3
function FPushButtonClass() {
this.init();
}
FPushButtonClass.prototype = new FUIComponentClass();
Object.registerClass("FPushButtonSymbol", FPushButtonClass);
FPushButtonClass.prototype.init = function () {
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.attachMovie("fpb_states", "fpbState_mc", 1);
this.attachMovie("FLabelSymbol", "fLabel_mc", 2);
this.attachMovie("fpb_hitArea", "fpb_hitArea_mc", 3);
super.init();
this.btnState = false;
this.setClickHandler(this.clickHandler);
this._xscale = 100;
this._yscale = 100;
this.setSize(this.width, this.height);
if (this.label != undefined) {
this.setLabel(this.label);
}
this.ROLE_SYSTEM_PUSHBUTTON = 43;
this.STATE_SYSTEM_PRESSED = 8;
this.EVENT_OBJECT_STATECHANGE = 32778;
this.EVENT_OBJECT_NAMECHANGE = 32780;
this._accImpl.master = this;
this._accImpl.stub = false;
this._accImpl.get_accRole = this.get_accRole;
this._accImpl.get_accName = this.get_accName;
this._accImpl.get_accState = this.get_accState;
this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
};
FPushButtonClass.prototype.setHitArea = function (w, h) {
var hit = this.fpb_hitArea_mc;
this.hitArea = hit;
hit._visible = false;
hit._width = w;
hit._height = ((arguments.length > 1) ? (h) : (hit._height));
};
FPushButtonClass.prototype.setSize = function (w, h) {
w = ((w < 6) ? 6 : (w));
if (arguments.length > 1) {
if (h < 6) {
h = 6;
}
}
super.setSize(w, h);
this.setLabel(this.getLabel());
this.arrangeLabel();
this.setHitArea(w, h);
this.boundingBox_mc._width = w;
this.boundingBox_mc._height = h;
this.drawFrame();
if (this.focused) {
super.myOnSetFocus();
}
this.initContentPos("fLabel_mc");
};
FPushButtonClass.prototype.arrangeLabel = function () {
var label = this.fLabel_mc;
var h = this.height;
var w = (this.width - 2);
var b = 1;
this.fLabel_mc.setSize(w - (b * 4));
label._x = b * 3;
label._y = (h / 2) - (label._height / 2);
};
FPushButtonClass.prototype.getLabel = function () {
return(this.fLabel_mc.labelField.text);
};
FPushButtonClass.prototype.setLabel = function (label) {
this.fLabel_mc.setLabel(label);
this.txtFormat();
this.arrangeLabel();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_NAMECHANGE);
}
};
FPushButtonClass.prototype.getEnabled = function () {
return(this.enabled);
};
FPushButtonClass.prototype.setEnabled = function (enable) {
if (enable || (enable == undefined)) {
this.gotoFrame(1);
this.drawFrame();
this.flabel_mc.setEnabled(true);
this.enabled = true;
super.setEnabled(true);
} else {
this.gotoFrame(4);
this.drawFrame();
this.flabel_mc.setEnabled(false);
this.enabled = false;
super.setEnabled(false);
}
};
FPushButtonClass.prototype.txtFormat = function () {
var txtS = this.textStyle;
var sTbl = this.styleTable;
txtS.align = ((sTbl.textAlign.value == undefined) ? ((txtS.align = "center")) : undefined);
txtS.leftMargin = ((sTbl.textLeftMargin.value == undefined) ? ((txtS.leftMargin = 1)) : undefined);
txtS.rightMargin = ((sTbl.textRightMargin.value == undefined) ? ((txtS.rightMargin = 1)) : undefined);
if (this.fLabel_mc._height > this.height) {
super.setSize(this.width, this.fLabel_mc._height);
} else {
super.setSize(this.width, this.height);
}
this.fLabel_mc.labelField.setTextFormat(this.textStyle);
this.setEnabled(this.enable);
};
FPushButtonClass.prototype.drawFrame = function () {
var b = 1;
var x1 = 0;
var y1 = 0;
var x2 = this.width;
var y2 = this.height;
var mc_array = ["up_mc", "over_mc", "down_mc", "disabled_mc"];
var frame = mc_array[this.fpbState_mc._currentframe - 1];
var mc = "frame";
var i = 0;
while (i < 6) {
x1 = x1 + ((i % 2) * b);
y1 = y1 + ((i % 2) * b);
x2 = x2 - (((i + 1) % 2) * b);
y2 = y2 - (((i + 1) % 2) * b);
var w = (Math.abs(x1 - x2) + (2 * b));
var h = (Math.abs(y1 - y2) + (2 * b));
this.fpbState_mc[frame][mc + i]._width = w;
this.fpbState_mc[frame][mc + i]._height = h;
this.fpbState_mc[frame][mc + i]._x = x1 - b;
this.fpbState_mc[frame][mc + i]._y = y1 - b;
i++;
}
};
FPushButtonClass.prototype.setClickHandler = function (chng, obj) {
this.handlerObj = ((arguments.length < 2) ? (this._parent) : (obj));
this.clickHandler = chng;
};
FPushButtonClass.prototype.executeCallBack = function () {
this.handlerObj[this.clickHandler](this);
};
FPushButtonClass.prototype.initContentPos = function (mc) {
this.incrVal = 1;
this.initx = this[mc]._x - (this.getBtnState() * this.incrVal);
this.inity = this[mc]._y - (this.getBtnState() * this.incrVal);
this.togx = this.initx + this.incrVal;
this.togy = this.inity + this.incrVal;
};
FPushButtonClass.prototype.setBtnState = function (state) {
this.btnState = state;
if (state) {
this.fLabel_mc._x = this.togx;
this.fLabel_mc._y = this.togy;
} else {
this.fLabel_mc._x = this.initx;
this.fLabel_mc._y = this.inity;
}
};
FPushButtonClass.prototype.getBtnState = function () {
return(this.btnState);
};
FPushButtonClass.prototype.myOnSetFocus = function () {
this.focused = true;
super.myOnSetFocus();
};
FPushButtonClass.prototype.onPress = function () {
this.pressFocus();
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
this.setBtnState(true);
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FPushButtonClass.prototype.onRelease = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
this.executeCallBack();
this.setBtnState(false);
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FPushButtonClass.prototype.onRollOver = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
};
FPushButtonClass.prototype.onRollOut = function () {
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onReleaseOutside = function () {
this.setBtnState(false);
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onDragOut = function () {
this.setBtnState(false);
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onDragOver = function () {
this.setBtnState(true);
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
};
FPushButtonClass.prototype.myOnKeyDown = function () {
if ((Key.getCode() == 32) && (this.pressOnce == undefined)) {
this.onPress();
this.pressOnce = 1;
}
};
FPushButtonClass.prototype.myOnKeyUp = function () {
if (Key.getCode() == 32) {
this.onRelease();
this.pressOnce = undefined;
}
};
FPushButtonClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_PUSHBUTTON);
};
FPushButtonClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FPushButtonClass.prototype.get_accState = function (childId) {
if (this.pressOnce) {
return(this.master.STATE_SYSTEM_PRESSED);
}
return(this.master.STATE_SYSTEM_DEFAULT);
};
FPushButtonClass.prototype.get_accDefaultAction = function (childId) {
return("Press");
};
FPushButtonClass.prototype.accDoDefaultAction = function (childId) {
this.master.onPress();
this.master.onRelease();
};
#endinitclip
boundingBox_mc._visible = false;
deadPreview._visible = false;
Symbol 49 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 12
_parent.makeMissile();
Symbol 67 MovieClip Frame 32
_parent.action = "searching";
Symbol 73 MovieClip Frame 8
gotoAndPlay (5);
Symbol 80 MovieClip Frame 1
_parent._root["cow" + _parent.cowSearch].action = "down";
Symbol 80 MovieClip Frame 11
_parent.vSpeed = random(20) - 10;
_parent.cowSearch = int(random(_root.cowCounter) + 1);
_parent.action = "searching";
Symbol 96 MovieClip Frame 1
_parent._root["cow" + _parent.cowSearch].action = "down";
_parent._root.score = _parent._root.score + 500;
Symbol 96 MovieClip Frame 26
_parent.removeMovieClip();
Symbol 97 MovieClip [UFO] Frame 1
function makeMissile() {
_root.attachMovie("missile", "missile" + _root.missileCounter, _root.missileCounter);
_root["missile" + _root.missileCounter]._x = _x - 10;
_root["missile" + _root.missileCounter]._y = _y + 30;
_root.missileCounter++;
if (_root.missileCounter > 199) {
_root.missileCounter = 151;
}
}
onEnterFrame = function () {
if (action == "damage") {
vSpeed = 0;
}
if (health <= 0) {
action = "death";
}
if (action == "searching") {
if (_root["cow" + cowSearch]) {
if ((_root["cow" + cowSearch]._x < _x) && (vSpeed > -5)) {
vSpeed = vSpeed - 0.5;
}
if ((_root["cow" + cowSearch]._x > _x) && (vSpeed < 5)) {
vSpeed = vSpeed + 0.5;
}
if (((_root["cow" + cowSearch]._x + 10) > _x) && ((_root["cow" + cowSearch]._x - 10) < _x)) {
vSpeed = vSpeed * 0.9;
if (vSpeed < 1) {
vSpeed = 0;
action = "TractorBeam";
}
}
}
if (random(200) == 0) {
action = "missile";
}
}
if (action == "TractorBeam") {
if (_root["cow" + cowSearch]) {
_root["cow" + cowSearch].action = "up";
if (_root["cow" + cowSearch]._y < this._y) {
health = health + 10;
_root["cow" + cowSearch].removeMovieClip();
action = "searching";
}
} else {
action = "searching";
}
}
if (action == "missile") {
vSpeed = (_root.player._x - _x) * 0.03;
if (vSpeed > 8) {
vSpeed = 8;
}
if (vSpeed < -8) {
vSpeed = -8;
}
}
_x = (_x + vSpeed);
if (!_root["cow" + cowSearch]) {
cowSearch = int(random(_root.cowCounter - 500) + 500);
}
if (action == "damage") {
this.gotoAndStop(4);
}
if (action == "TractorBeam") {
this.gotoAndStop(3);
}
if (action == "searching") {
this.gotoAndStop(1);
}
if (action == "death") {
this.gotoAndStop(5);
}
if (action == "missile") {
this.gotoAndStop(2);
}
};
stop();
Instance of Symbol 49 MovieClip in Symbol 97 MovieClip [UFO] Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.health);
}
Instance of Symbol 51 MovieClip "hitArea" in Symbol 97 MovieClip [UFO] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 140 MovieClip Frame 12
gotoAndPlay (10);
Symbol 141 MovieClip [cow] Frame 1
onEnterFrame = function () {
if ((_root.level > 1) && (_root.nextLevel)) {
_root.score = _root.score + 2;
}
if (action == "walking") {
if (direction == "left") {
_x = (_x-1);
}
if (direction == "right") {
_x = (_x+1);
}
if (int(random(40)) == 0) {
action = "standing";
}
}
if (action == "standing") {
if (int(random(75)) == 0) {
if (direction == "left") {
direction = "right";
} else if (direction == "right") {
direction = "left";
}
}
if (int(random(75)) == 0) {
action = "walking";
}
}
if (action == "up") {
_y = (_y-1);
}
if (action == "down") {
vSpeed = vSpeed + 1;
_y = (_y + vSpeed);
if (_y > 300) {
_y = 300;
vSpeed = 0;
action = "walking";
}
}
if (_x > 425) {
_x = 425;
action = "walking";
direction = "left";
}
if (_x < 0) {
action = "walking";
direction = "right";
_x = 0;
}
if (direction == "left") {
_xscale = 100;
} else if (direction == "right") {
_xscale = -100;
}
if (action == "standing") {
gotoAndStop (2);
}
if (action == "walking") {
gotoAndStop (1);
}
if (action == "up") {
gotoAndStop (3);
}
};
Symbol 143 MovieClip [bullet] Frame 1
onEnterFrame = function () {
_x = (_x + ((Math.sin(angle * (Math.PI/180)) * speed) * 2));
_y = (_y - ((Math.cos(angle * (Math.PI/180)) * speed) * 2));
if ((lastX == _x) && (lastY == _y)) {
this.removeMovieClip();
}
lastX = _x;
lastY = _y;
if ((((_x < -20) || (_x > 445)) || (_y < -20)) || (_y > _root.player.floor)) {
this.removeMovieClip();
}
i = 200;
while (i <= _parent.ufoCounter) {
if (_root["ufo" + i]) {
if (_root["ufo" + i].hitarea.hitTest(_x, _y, false)) {
_root.score = _root.score + 5;
_root["ufo" + i].action = "damage";
_root["ufo" + i].anim.gotoAndPlay(1);
_root["ufo" + i].health = _root["ufo" + i].health - 4;
this.removeMovieClip();
}
}
i++;
}
i = 151;
while (i <= 199) {
if (_root["missile" + i] && (_root["missile" + i].action != "explode")) {
if (_root["missile" + i].hitTest(_x, _y, false)) {
_root.score = _root.score + 5;
_root["missile" + i].action = "explode";
this.removeMovieClip();
}
}
i++;
}
};
Symbol 145 MovieClip [crosshair] Frame 1
this.startDrag(true);
Mouse.hide();
Symbol 151 MovieClip [nextLevel] Frame 95
i = 1;
while (i <= _root.level) {
_root.makeUFO();
i++;
}
i = 1;
while (i <= (_root.level * 0.5)) {
_root.makecow();
i++;
}
if ((_root.level % 5) == 0) {
_root.fire++;
}
this.removeMovieClip();
Symbol 166 MovieClip Frame 15
_parent.removeMovieClip();
Symbol 167 MovieClip [missile] Frame 1
action = "none";
ySpeed = 0;
onEnterFrame = function () {
if ((_x > 425) || (_x < 0)) {
this.removeMovieClip();
}
if (_currentframe == 1) {
if ((_y + ySpeed) > (_root.player.floor + 10)) {
_y = _root.player.floor;
ySpeed = 0;
this.gotoAndPlay(2);
} else {
ySpeed++;
}
_y = (_y + ySpeed);
}
if (action == "explode") {
i = 200;
while (i <= _parent.ufoCounter) {
if (_root["ufo" + i]) {
if (_root["ufo" + i].hitarea.hitTest(this)) {
_root.score = _root.score + 5;
_root["ufo" + i].action = "damage";
_root["ufo" + i].anim.gotoAndPlay(1);
_root["ufo" + i].health--;
}
}
i++;
}
}
if (action == "explode") {
gotoAndStop (15);
}
if (frame < 15) {
if (hitTest(_root.player._x, _root.player._y, false)) {
action = "explode";
}
}
if ((_currentframe == 15) && (hitArea.hitTest(_root.player._x, _root.player._y, false))) {
_root.player.action = "dead";
}
};
stop();
Symbol 167 MovieClip [missile] Frame 14
stop();
Instance of Symbol 51 MovieClip "hitArea" in Symbol 167 MovieClip [missile] Frame 15
onClipEvent (enterFrame) {
_visible = false;
}
Symbol 170 MovieClip Frame 1
_root.stop();
Symbol 170 MovieClip Frame 14
_stop();
onEnterFrame = function () {
if (_framesloaded == _totalframes) {
play();
}
};
Symbol 170 MovieClip Frame 33
stop();
_root.play();
Symbol 178 Button
on (release) {
_root.gotoAndStop(3);
}
Symbol 183 Button
on (release) {
_root.gotoAndStop(5);
}
Symbol 188 Button
on (release) {
_global.muzic = false;
}
Symbol 191 Button
on (release) {
_global.muzic = true;
}
Symbol 194 Button
on (release) {
_quality = "High";
}
Symbol 197 Button
on (release) {
_quality = "Medium";
}
Symbol 200 Button
on (release) {
_quality = "Low";
}
Symbol 203 Button
on (release) {
_root.gotoAndStop(4);
}
Symbol 208 Button
on (release) {
_root.gotoAndStop(2);
}
Symbol 211 Button
on (release) {
_root.gotoAndStop(3);
}
Symbol 221 Button
on (press) {
setLeft = false;
setUp = false;
setRight = true;
setDown = false;
_root.instructions.text = "Press key for RIGHT";
}
Symbol 225 Button
on (press) {
setLeft = true;
setUp = false;
setRight = false;
setDown = false;
_root.instructions.text = "Press key for LEFT";
}
Symbol 229 Button
on (press) {
setLeft = false;
setUp = false;
setRight = false;
setDown = true;
_root.instructions.text = "Press key for DOWN";
}
Symbol 233 Button
on (press) {
setLeft = false;
setUp = true;
setRight = false;
setDown = false;
_root.instructions.text = "Press key for UP";
}
Symbol 236 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 11
gotoAndPlay (2);
Symbol 271 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 1
stop();
Instance of Symbol 273 MovieClip "arms" in Symbol 294 MovieClip Frame 5
onClipEvent (enterFrame) {
x = this._xmouse;
y = this._ymouse;
angle = Math.atan(y / x) / (Math.PI/180);
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
gotoAndStop(int(angle));
}
Instance of Symbol 293 MovieClip in Symbol 294 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_currentframe == 45) {
i = 151;
while (i <= 199) {
if (_root["missile" + i]) {
_root["missile" + i].action = "explode";
}
i++;
}
}
if (_currentframe == 56) {
_root.player._x = random(425);
_root.player._y = -20;
_root.player.action = "down";
_root.lives--;
}
}
Symbol 304 MovieClip Frame 27
stop();
Symbol 305 MovieClip Frame 156
_root._parent.gotoAndStop(2);