Frame 1
stop();
Instance of Symbol 237 MovieClip "loader" in Frame 1
onClipEvent (enterFrame) {
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._yscale = PercentLoaded * 10;
bar._xscale = PercentLoaded * 10;
} else {
_root.play();
}
}
Frame 3
function doSomething05() {
_root.gotoAndStop("menu");
}
function doSomething1() {
_root.gotoAndPlay("first");
}
function doSomething2() {
_root.gotoAndPlay("second");
}
function doSomething3() {
_root.gotoAndPlay("third");
}
function doSomething4() {
_root.gotoAndPlay("fourth");
}
function doSomething5() {
_root.gotoAndPlay("fifth");
}
function doSomething6() {
_root.gotoAndPlay("sixth");
}
function doSomething7() {
_root.gotoAndPlay("seven");
}
function doSomething8() {
_root.gotoAndPlay("eight");
}
function doSomething9() {
_root.gotoAndPlay("boss1");
}
function doSomething10() {
_root.gotoAndPlay("add");
}
stop();
_root.shooty = false;
_root.action = 0;
MENU.customItems.push(Functioned10);
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned05 = new ContextMenuItem("Menu", doSomething05);
Functioned1 = new ContextMenuItem("level 1", doSomething1);
Functioned2 = new ContextMenuItem("level 2", doSomething2);
Functioned3 = new ContextMenuItem("level 3", doSomething3);
Functioned4 = new ContextMenuItem("level 4", doSomething4);
Functioned5 = new ContextMenuItem("level 5", doSomething5);
Functioned6 = new ContextMenuItem("level 6", doSomething6);
Functioned7 = new ContextMenuItem("level 7", doSomething7);
Functioned8 = new ContextMenuItem("level 8", doSomething8);
Functioned9 = new ContextMenuItem("Boss 1", doSomething9);
Functioned10 = new ContextMenuItem("Help Support Me!", doSomething10);
MENU.customItems.push(Functioned05);
MENU.customItems.push(Functioned1);
MENU.customItems.push(Functioned2);
MENU.customItems.push(Functioned3);
MENU.customItems.push(Functioned4);
MENU.customItems.push(Functioned5);
MENU.customItems.push(Functioned6);
MENU.customItems.push(Functioned7);
MENU.customItems.push(Functioned8);
MENU.customItems.push(Functioned9);
MENU.customItems.push(Functioned10);
_root.menu = MENU;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 3
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 3
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Instance of Symbol 240 MovieClip in Frame 3
onClipEvent (mouseUp) {
_root.gotoAndPlay("first");
}
Frame 10
_root._x = 0;
_root._y = 0;
_root.lvlNum = 1;
_root.dead = false;
Frame 11
stop();
var Level = "yea";
_root.CurrentLevel = "first";
_root.NextLevel = "second";
_root.lvlNum = 1;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 11
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 11
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 12
_root._x = 0;
_root._y = 0;
_root.lvlNum = 2;
Frame 13
stop();
_root.CurrentLevel = "second";
_root.NextLevel = "third";
_root.lvlNum = 2;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 13
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 13
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 14
_root._x = 0;
_root._y = 0;
_root.lvlNum = 3;
Frame 15
stop();
_root.CurrentLevel = "third";
_root.NextLevel = "fourth";
_root.lvlNum = 3;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 15
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 15
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 16
_root._x = 0;
_root._y = 0;
_root.lvlNum = 4;
Frame 17
stop();
_root.CurrentLevel = "fourth";
_root.NextLevel = "fifth";
_root.lvlNum = 4;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 17
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 17
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 18
_root._x = 0;
_root._y = 0;
_root.lvlNum = 5;
Frame 19
stop();
var T = new torch(t1);
_root.CurrentLevel = "fifth";
_root.NextLevel = "sixth";
_root.lvlNum = 5;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 19
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 19
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 20
_root._x = 0;
_root._y = 0;
_root.lvlNum = 6;
Frame 21
stop();
_root.CurrentLevel = "sixth";
_root.NextLevel = "seven";
_root.lvlNum = 6;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 21
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 21
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 22
_root._x = 0;
_root._y = 0;
_root.lvlNum = 7;
Frame 23
stop();
_root.CurrentLevel = "seven";
_root.NextLevel = "eight";
_root.lvlNum = 7;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 23
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 23
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 24
_root._x = 0;
_root._y = 0;
_root.lvlNum = 8;
Frame 25
stop();
_root.CurrentLevel = "eight";
_root.NextLevel = "boss1";
_root.lvlNum = 8;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 25
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 25
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 26
_root._x = 0;
_root._y = 0;
_root.lvlNum = 9;
Frame 27
stop();
_root.CurrentLevel = "boss1";
_root.NextLevel = "credits";
_root.lvlNum = 9;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 27
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 27
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Frame 28
_root._x = 0;
_root._y = 0;
_root.lvlNum = 10;
Frame 29
stop();
_root.CurrentLevel = "credits";
_root.NextLevel = "add";
_root.lvlNum = 9;
Instance of Symbol 231 MovieClip [aim] "aim" in Frame 29
onClipEvent (load) {
this._x = 350;
this._y = 250;
left = 0;
right = 0;
up = 0;
down = 0;
speed = 2;
decay = 0.8;
maxSpeed = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
left = left + speed;
if (left > maxSpeed) {
left = maxSpeed;
}
}
if (Key.isDown(68)) {
right = right + speed;
if (right > maxSpeed) {
right = maxSpeed;
}
}
if (Key.isDown(87)) {
up = up + speed;
if (up > maxSpeed) {
up = maxSpeed;
}
}
if (Key.isDown(83)) {
down = down + speed;
if (down > maxSpeed) {
down = maxSpeed;
}
}
this._x = this._x + right;
this._x = this._x - left;
this._y = this._y + down;
this._y = this._y - up;
right = right * decay;
left = left * decay;
up = up * decay;
down = down * decay;
}
Instance of Symbol 228 MovieClip [ship] "ship" in Frame 29
onClipEvent (load) {
oldRot = this._rotation;
this._x = 350;
this._y = 250;
shooty = false;
}
onClipEvent (enterFrame) {
aim = _root.aim;
XMotion = (aim._x - this._x) / 15;
YMotion = (aim._y - this._y) / 10;
this._x = this._x + XMotion;
this._y = this._y + YMotion;
_root._x = _root._x - XMotion;
_root._y = _root._y - YMotion;
}
onClipEvent (keyDown) {
if (Key.getCode() == 17) {
_root.ship.gotoAndStop("dance");
}
if ((Key.getCode() == 16) && (_root.ship.action.action > 0)) {
_root.ship.gotoAndStop("shield");
}
if (Key.getCode() == 32) {
shooty = true;
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
shooty = false;
}
}
Instance of Symbol 300 MovieClip in Frame 29
onClipEvent (enterFrame) {
_y = (_y - 6);
}
Instance of Symbol 302 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (_y < 250) {
_y = (_y - 5);
}
}
onClipEvent (mouseDown) {
_root.gotoAndPlay("add");
}
Frame 30
_root._x = 0;
_root._y = 0;
_root.lvlNum = 10;
Frame 31
stop();
_root._x = 0;
_root._y = 0;
_root.lvlNum = 10;
_root.CurrentLevel = "add";
_root.NextLevel = "menu";
MochiAd.showInterLevelAd({id:"87e3efebfdcbab61", res:"700x500"});
Frame 32
stop();
MochiAd.showInterLevelAd({id:"87e3efebfdcbab61", res:"700x500"});
Symbol 5 MovieClip [waves] Frame 1
#initclip 38
Object.registerClass("waves", wavesClass);
#endinitclip
Symbol 10 MovieClip Frame 16
stop();
Symbol 11 MovieClip [goal] Frame 1
#initclip 16
Object.registerClass("goal", Goal);
#endinitclip
stop();
Symbol 11 MovieClip [goal] Frame 2
stop();
Symbol 13 MovieClip [shoot] Frame 1
#initclip 17
Object.registerClass("shoot", Shoot);
#endinitclip
Symbol 19 MovieClip [torch] Frame 1
#initclip 18
Object.registerClass("torch", torch);
#endinitclip
Instance of Symbol 55 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (load) {
startRot = _rotation;
timer = 0;
speed = 1;
}
onClipEvent (enterFrame) {
if (timer == 30) {
speed = speed * -1;
timer = -30;
}
_rotation = (_rotation + speed);
timer++;
}
Symbol 63 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 2
stop();
Symbol 68 MovieClip [minees] Frame 1
#initclip 19
Object.registerClass("minees", Mine);
#endinitclip
stop();
Instance of Symbol 66 MovieClip in Symbol 68 MovieClip [minees] Frame 1
onClipEvent (load) {
Xrand = 1 + (Math.random() * 5);
Yrand = 1 + (Math.random() * 5);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + Xrand;
this._yscale = this._yscale + Yrand;
if ((this._xscale + this._yscale) > 300) {
this._xscale = 0;
this._yscale = 0;
}
}
Instance of Symbol 66 MovieClip in Symbol 68 MovieClip [minees] Frame 1
onClipEvent (load) {
Xrand = 1 + (Math.random() * 5);
Yrand = 1 + (Math.random() * 5);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + Xrand;
this._yscale = this._yscale + Yrand;
if ((this._xscale + this._yscale) > 300) {
this._xscale = 0;
this._yscale = 0;
}
}
Instance of Symbol 66 MovieClip in Symbol 68 MovieClip [minees] Frame 1
onClipEvent (load) {
Xrand = 1 + (Math.random() * 5);
Yrand = 1 + (Math.random() * 5);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + Xrand;
this._yscale = this._yscale + Yrand;
if ((this._xscale + this._yscale) > 300) {
this._xscale = 0;
this._yscale = 0;
}
}
Instance of Symbol 66 MovieClip in Symbol 68 MovieClip [minees] Frame 1
onClipEvent (load) {
Xrand = 1 + (Math.random() * 5);
Yrand = 1 + (Math.random() * 5);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + Xrand;
this._yscale = this._yscale + Yrand;
if ((this._xscale + this._yscale) > 300) {
this._xscale = 0;
this._yscale = 0;
}
}
Instance of Symbol 66 MovieClip in Symbol 68 MovieClip [minees] Frame 1
onClipEvent (load) {
Xrand = 1 + (Math.random() * 5);
Yrand = 1 + (Math.random() * 5);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + Xrand;
this._yscale = this._yscale + Yrand;
if ((this._xscale + this._yscale) > 300) {
this._xscale = 0;
this._yscale = 0;
}
}
Instance of Symbol 66 MovieClip in Symbol 68 MovieClip [minees] Frame 1
onClipEvent (load) {
Xrand = 1 + (Math.random() * 5);
Yrand = 1 + (Math.random() * 5);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + Xrand;
this._yscale = this._yscale + Yrand;
if ((this._xscale + this._yscale) > 300) {
this._xscale = 0;
this._yscale = 0;
}
}
Symbol 82 MovieClip Frame 1
stop();
Instance of Symbol 84 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
speed = 5;
timer = 0;
}
onClipEvent (enterFrame) {
if (timmer == 5) {
speed = speed * -1;
timer = -5;
}
_alpha = (_alpha + speed);
timer++;
}
Symbol 95 MovieClip Frame 101
Symbol 95 MovieClip Frame 109
_root.boss1.chomp.play();
Symbol 96 MovieClip Frame 10
stop();
Instance of Symbol 100 MovieClip in Symbol 103 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 5);
}
Instance of Symbol 102 MovieClip in Symbol 103 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (_alpha - 0.5);
_rotation = (_rotation - 5);
}
Instance of Symbol 103 MovieClip in Symbol 104 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (_alpha - 3);
}
Symbol 107 MovieClip Frame 90
stop();
Instance of Symbol 56 MovieClip in Symbol 107 MovieClip Frame 90
/* no clip actions */
Symbol 139 MovieClip Frame 21
stop();
_root.boss1._alpha = 0;
_root.boss1.removeMovieClip();
Symbol 140 MovieClip [boss 1] Frame 1
#initclip 20
Object.registerClass("boss 1", Boss1);
#endinitclip
stop();
Instance of Symbol 23 MovieClip in Symbol 140 MovieClip [boss 1] Frame 1
onClipEvent (load) {
strtScale = _xscale;
}
onClipEvent (enterFrame) {
if (_xscale > 0) {
_xscale = ((_root.boss1.hp / 500) * strtScale);
} else {
_xscale = 0;
}
}
Symbol 140 MovieClip [boss 1] Frame 2
stop();
Symbol 140 MovieClip [boss 1] Frame 3
stop();
Symbol 140 MovieClip [boss 1] Frame 4
stop();
Symbol 140 MovieClip [boss 1] Frame 5
stop();
Instance of Symbol 143 MovieClip in Symbol 144 MovieClip Frame 1
onClipEvent (load) {
strtx = _x;
strty = _y;
_x = -29;
_y = -158;
}
onClipEvent (enterFrame) {
if (_root.ship._x > 1530.3) {
_x = (_x + ((strtx - _x) / 2));
_y = (_y + ((strty - _y) / 2));
}
}
Instance of Symbol 143 MovieClip in Symbol 145 MovieClip Frame 1
onClipEvent (load) {
strtx = _x;
strty = _y + 200;
}
onClipEvent (enterFrame) {
if (_root.boss1.dead) {
_y = (_y + ((strty - _y) / 2));
}
}
Symbol 146 MovieClip [bg boss] Frame 1
#initclip 21
Object.registerClass("bg boss", RedLines);
#endinitclip
Symbol 148 MovieClip [blaster] Frame 1
#initclip 22
Object.registerClass("blaster", Blast);
#endinitclip
Symbol 150 MovieClip [bg8] Frame 1
#initclip 23
Object.registerClass("bg8", RedLines);
#endinitclip
Symbol 152 MovieClip [BG 7] Frame 1
#initclip 24
Object.registerClass("BG 7", RedLines);
#endinitclip
Symbol 156 MovieClip [sonar 3 fill] Frame 1
#initclip 25
Object.registerClass("sonar 3 fill", Pellet2);
#endinitclip
Symbol 166 MovieClip [tropie mastermind] Frame 1
#initclip 26
Object.registerClass("tropie mastermind", Trophie3);
#endinitclip
stop();
Instance of Symbol 164 MovieClip in Symbol 166 MovieClip [tropie mastermind] Frame 2
onClipEvent (load) {
amount = 5;
decay = 1.02;
alphaAmount = 0.5;
}
onClipEvent (enterFrame) {
this._rotation = this._rotation + amount;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
_x = (_x + 10);
this._alpha = this._alpha - alphaAmount;
amount = amount * decay;
alphaAmount = alphaAmount * decay;
}
Symbol 166 MovieClip [tropie mastermind] Frame 20
_root.trophie3.removeMovieClip();
Symbol 166 MovieClip [tropie mastermind] Frame 21
stop();
Symbol 168 MovieClip [bg 6] Frame 1
#initclip 27
Object.registerClass("bg 6", RedLines);
#endinitclip
Symbol 170 MovieClip [Symbol 18] Frame 1
#initclip 28
Object.registerClass("Symbol 18", RedLines);
#endinitclip
Symbol 172 MovieClip [Symbol 14] Frame 1
#initclip 29
Object.registerClass("Symbol 14", RedLines);
#endinitclip
Symbol 176 MovieClip [SonarFill] Frame 1
#initclip 30
Object.registerClass("SonarFill", Pellet);
#endinitclip
Symbol 182 MovieClip [trophie2] Frame 1
#initclip 31
Object.registerClass("trophie2", Trophie2);
#endinitclip
stop();
Symbol 182 MovieClip [trophie2] Frame 20
_root.trophie2.removeMovieClip();
Symbol 182 MovieClip [trophie2] Frame 21
stop();
Symbol 188 MovieClip [trophie easy] Frame 1
#initclip 32
Object.registerClass("trophie easy", Trophie);
#endinitclip
stop();
Symbol 188 MovieClip [trophie easy] Frame 20
_root.trophie.removeMovieClip();
Symbol 188 MovieClip [trophie easy] Frame 21
stop();
Symbol 190 MovieClip [Symbol 12] Frame 1
#initclip 33
Object.registerClass("Symbol 12", RedLines);
#endinitclip
Symbol 192 MovieClip [BG2] Frame 1
#initclip 34
Object.registerClass("BG2", RedLines);
#endinitclip
Symbol 194 MovieClip [Symbol 3] Frame 1
#initclip 35
Object.registerClass("Symbol 3", RedLines);
#endinitclip
Symbol 197 MovieClip [sonar_noise] Frame 1
#initclip 36
Object.registerClass("sonar_noise", MenuSonar);
#endinitclip
Symbol 202 MovieClip [jet1] Frame 1
stop();
Symbol 221 MovieClip Frame 30
_root.ship.gotoAndPlay("nom");
Symbol 222 MovieClip Frame 33
_root.gotoAndPlay(_root.NextLevel);
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Instance of Symbol 224 MovieClip in Symbol 225 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 100;
this._xscale = 1;
this._yscale = 1;
this._x = Math.round((Math.random() * 120) - 60);
this._y = Math.round((Math.random() * 120) - 60);
num = Math.round((Math.random() * 2) + 1);
}
onClipEvent (enterFrame) {
this._xscale = this._xscale + (num * 10);
this._yscale = this._yscale + (num * 10);
this._alpha = this._alpha - num;
}
Symbol 225 MovieClip Frame 20
_root.gotoAndPlay(_root.CurrentLevel);
Symbol 227 MovieClip Frame 6
_root.ship.action.action = _root.ship.action.action - 5;
stop();
Instance of Symbol 226 MovieClip in Symbol 227 MovieClip Frame 6
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
_root.ship.action.action = _root.ship.action.action - 5;
}
Instance of Symbol 226 MovieClip in Symbol 227 MovieClip Frame 6
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
if (_root.ship.action.action == -1) {
_root.ship.shieldClip.play();
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 16) {
_root.ship.shieldClip.play();
}
}
Symbol 227 MovieClip Frame 11
_root.ship.gotoAndStop("nom");
Symbol 228 MovieClip [ship] Frame 1
#initclip 37
Object.registerClass("ship", wavesClass);
#endinitclip
stop();
Instance of Symbol 209 MovieClip "action" in Symbol 228 MovieClip [ship] Frame 1
onClipEvent (load) {
_root.action = 0;
startx = _x;
starty = _y;
action = _root.action;
reload = 0;
}
onClipEvent (enterFrame) {
if ((action < 140) && (action != -1)) {
action = action + 5;
_root.ship.action._x = (_root.ship.action._x - 254.9) / 2;
_root.ship.action._y = (_root.ship.action._y - -154) / 2;
_alpha = 100;
}
if (action >= 140) {
_root.ship.action._x = (_root.ship.action._x - 180) / 2;
_root.ship.action._y = (_root.ship.action._y - 12) / 2;
_alpha = ((_alpha - 0) / 2);
}
this._xscale = action;
_root.ship.action2._xscale = reload;
if (action <= 0) {
action = -1;
}
if (action == -1) {
reload = reload + 2;
}
if (reload == 100) {
reload = 0;
action = 100;
}
}
Symbol 228 MovieClip [ship] Frame 2
stop();
Symbol 228 MovieClip [ship] Frame 3
stop();
Symbol 228 MovieClip [ship] Frame 4
stop();
_root.dead = true;
Symbol 228 MovieClip [ship] Frame 5
stop();
Instance of Symbol 227 MovieClip "shieldClip" in Symbol 228 MovieClip [ship] Frame 5
onClipEvent (enterFrame) {
_root.ship.action.action = _root.ship.action.action - 5;
}
Instance of Symbol 230 MovieClip in Symbol 231 MovieClip [aim] Frame 1
onClipEvent (load) {
ship = _root.ship;
ship.oldx = ship._x;
ship.oldy = ship._y;
ship.currentx = ship._x;
ship.currenty = ship._y;
}
onClipEvent (enterFrame) {
_rotation = (_rotation+1);
ship.oldx = ship.currentx;
ship.oldy = ship.currenty;
ship.currentx = ship._x;
ship.currenty = ship._y;
}
Symbol 303 MovieClip [__Packages.Goal] Frame 0
class Goal extends MovieClip
{
static var size;
var c, distance, TempTimer, onEnterFrame, temp;
function Goal () {
super();
c = 0;
size = 6;
distance = 70;
TempTimer = -50;
onEnterFrame = function () {
this.MTemp = _root.ship;
this.shipX = this.MTemp._x;
this.shipY = this.MTemp._y;
this.HitDetect(this.dist(this.shipX, this.shipY, this._x, this._y));
};
}
function HitDetect(dist2) {
c++;
if (((dist2 < 30) && (c > 31)) && (_root.dead == false)) {
c = 0;
_root.ship.gotoAndPlay("hump");
}
}
function dist(a, b, c, d) {
temp = Math.sqrt(((a - c) * (a - c)) + ((b - d) * (b - d)));
return(temp);
}
}
Symbol 304 MovieClip [__Packages.Shoot] Frame 0
class Shoot extends MovieClip
{
var bound, enemy, ship, boost, c, _x, _y, speed, yspeed, xspeed, onEnterFrame;
function Shoot () {
super();
bound = _root.Bound;
enemy = _root.boss1;
ship = _root.ship;
boost = 3;
c = 0;
_x = ship._x;
_y = ship._y;
speed = 10;
yspeed = speed * Math.sin(_root.blast._rotation * (Math.PI/180));
xspeed = speed * Math.cos(_root.blast._rotation * (Math.PI/180));
onEnterFrame = function () {
this._x = this._x + (this.xspeed * this.boost);
this._y = this._y + (this.yspeed * this.boost);
this.boost = ((this.boost * 4) + 1) / 5;
this.c++;
if (this.c >= 45) {
this.removeMovieClip();
}
this.HitTester(this._x, this._y, this);
};
}
function HitTester(X, Y, MC) {
if (bound.hitTest(X, Y, true)) {
MC._alpha = 0;
MC.removeMovieClip();
}
if (enemy.hitTest(X, Y, true)) {
enemy.hp = enemy.hp - 1;
MC._alpha = 0;
MC.removeMovieClip();
}
}
}
Symbol 305 MovieClip [__Packages.torch] Frame 0
class torch extends MovieClip
{
var _mc, i, ship;
function torch (_MC) {
super();
_mc = _MC;
i = 1;
ship = _root.ship;
_mc.onEnterFrame = function () {
if (this.dist(this.ship._x, this.ship._y, this._x, this._y) < 30) {
_root.Container2.createEmptyMovieClip("emp", -1);
_root.Container2.emp.attachMovie("ball", "ball" + this.i, this.i);
this.tempmc = _root.Container2.emp["ball" + this.i];
this.tempmc._x = _root.ship._x;
this.tempmc._y = _root.ship._y;
this.tempmc._xscale = 3000;
this.tempmc._yscale = 3000;
this.tempmc.onEnterFrame = function () {
this._xscale = this._xscale - 10;
this._yscale = this._yscale - 10;
};
}
};
}
function dist(a, b, c, d) {
return(Math.sqrt(((a - c) * (a - c)) + ((b - d) * (b - d))));
}
}
Symbol 306 MovieClip [__Packages.Mine] Frame 0
class Mine extends MovieClip
{
var onEnterFrame;
function Mine () {
super();
onEnterFrame = function () {
this._rotation = this._rotation + 2;
};
}
}
Symbol 307 MovieClip [__Packages.Boss1] Frame 0
class Boss1 extends MovieClip
{
var tempMC, shipX, shipY, d, ON2, boss, timer, shoot, fire, temp;
function Boss1 () {
super();
tempMC = _root.ship;
shipX = tempMC._x;
shipY = tempMC._y;
d = 30;
ON2 = false;
boss = _root.boss1;
boss.hp = 500;
boss.dead = false;
timer = 0;
shoot = false;
fire = false;
boss.onLoad = function () {
this.hp = 500;
this.dead = false;
};
boss.onEnterFrame = function () {
this.shipX = this.tempMC._x;
this.shipY = this.tempMC._y;
if (this.dead == false) {
if (((((this.boss.hitTest(this.shipX, this.shipY, true) || (this.boss.hitTest(this.shipX - 17, this.shipY + 20, true))) || (this.boss.hitTest(this.shipX - 17, this.shipY - 20, true))) || (this.boss.hitTest(this.shipX + 37, this.shipY, true))) || (this.boss.hitTest(this.shipX - 30, this.shipY - 10, true))) || (this.boss.hitTest(this.shipX - 30, this.shipY + 7, true))) {
this.d++;
if (this.d > 30) {
this.tempMC.gotoAndStop("die");
this.d = 0;
}
}
}
if (!this.ON2) {
this.shipX = this.tempMC._x;
this.shipY = this.tempMC._y;
this.dist(this.shipX, this.shipY, this.boss._x, this.boss._y);
if (this.temp < 350) {
_root.boss1.warmup.gotoAndStop("go");
this.ON2 = true;
this.timer = 55;
}
}
if (this.ON2) {
if (this.timer == 0) {
this.c = Math.ceil(Math.random() * 4);
if (this.c == 1) {
this.boss.gotoAndStop("still");
this.c = 60;
}
if (this.c == 2) {
this.boss.gotoAndStop("chomp");
this.c = 131;
}
if ((this.c == 3) || (this.c == 4)) {
this.c = 95;
this.boss.gotoAndStop("fire");
}
this.timer = this.c;
}
this.timer--;
}
if (this.hp <= 0) {
this.gotoAndStop("dead");
this.dead = true;
}
};
}
function dist(a, b, c, d) {
temp = Math.sqrt(((a - c) * (a - c)) + ((b - d) * (b - d)));
return(temp);
}
}
Symbol 308 MovieClip [__Packages.RedLines] Frame 0
class RedLines extends MovieClip
{
var c, MTemp, shipX, shipY, bound, onEnterFrame;
function RedLines () {
super();
c = 30;
MTemp = _root.ship;
shipX = MTemp._x;
shipY = MTemp._y;
bound = _root.Bound;
onEnterFrame = function () {
this.shipX = this.MTemp._x;
this.shipY = this.MTemp._y;
if (((((this.bound.hitTest(this.shipX, this.shipY, true) || (this.bound.hitTest(this.shipX - 17, this.shipY + 20, true))) || (this.bound.hitTest(this.shipX - 17, this.shipY - 20, true))) || (this.bound.hitTest(this.shipX + 37, this.shipY, true))) || (this.bound.hitTest(this.shipX - 30, this.shipY - 10, true))) || (this.bound.hitTest(this.shipX - 30, this.shipY + 7, true))) {
this.c++;
if (this.c > 30) {
this.MTemp.gotoAndStop("die");
this.c = 0;
}
}
};
}
}
Symbol 309 MovieClip [__Packages.Blast] Frame 0
class Blast extends MovieClip
{
var s, ship, follow, blast, blast2;
function Blast () {
super();
s = 1;
ship = _root.ship;
follow = false;
blast = _root.blast;
blast2 = _root.blast2;
blast2.onEnterFrame = function () {
this.slope = (this.blast2._y - _root._ymouse) / (this.blast2._x - _root._xmouse);
this.blast2._x = this.ship._x + 1;
this.blast2._y = this.ship._y + this.slope;
};
blast.onEnterFrame = function () {
if (this.ship.hitTest(this.blast._x, this.blast._y) && (this.follow == false)) {
this.follow = true;
}
if (this.follow) {
this.blast._x = this.ship._x;
this.blast._y = this.ship._y;
this.hipot = Math.sqrt(((this.blast._y - _root._ymouse) * (this.blast._y - _root._ymouse)) + ((this.blast._x - _root._xmouse) * (this.blast._x - _root._xmouse)));
this.slope = (this.blast._y - _root._ymouse) / (this.blast._x - _root._xmouse);
if (_root._xmouse > this.ship._x) {
this.posneg = 0;
} else {
this.posneg = 180;
}
this.blast._rotation = this.posneg + (Math.atan(this.slope) * 57.2957795130823);
this.shootBall();
}
};
}
function shootBall() {
if (_root.ship.shooty) {
_root.attachMovie("shoot", "shoot" + s, _root.getNextHighestDepth());
s++;
}
}
}
Symbol 310 MovieClip [__Packages.Pellet2] Frame 0
class Pellet2 extends MovieClip
{
var t, temp;
function Pellet2 () {
super();
_root.pellet2.onEnterFrame = function () {
this.MTemp = _root.ship;
this.shipX = this.MTemp._x;
this.shipY = this.MTemp._y;
this.HitDetect(this.dist(this.shipX, this.shipY, this._x, this._y));
};
}
function HitDetect(dist2) {
if (dist2 < 300) {
}
if (dist2 < 30) {
if (_root.ship.S < 3) {
_root.ship.S = 3;
t = 1;
while (t <= 3) {
_root.ship["S" + t]._alpha = 100;
t++;
}
}
}
}
function dist(a, b, c, d) {
temp = Math.sqrt(((a - c) * (a - c)) + ((b - d) * (b - d)));
return(temp);
}
}
Symbol 311 MovieClip [__Packages.Trophie3] Frame 0
class Trophie3 extends MovieClip
{
var stopper, trophie, temp;
function Trophie3 () {
super();
stopper = true;
trophie = _root.trophie3;
trophie.onEnterFrame = function () {
this.MCTemp = _root.ship;
this.Sx = this.MCTemp._x;
this.Sy = this.MCTemp._y;
this.HitDetect(this.dist(this.Sx, this.Sy, this.trophie._x, this.trophie._y));
};
}
function HitDetect(dist2) {
if (((dist2 < 100) && (_root.dead == false)) && (stopper)) {
stopper = false;
trophie.gotoAndPlay("score");
_root.ship.gotoAndStop("dance");
}
}
function dist(a, b, c, d) {
temp = Math.sqrt(((a - c) * (a - c)) + ((b - d) * (b - d)));
return(temp);
}
}
Symbol 312 MovieClip [__Packages.Pellet] Frame 0
class Pellet extends MovieClip
{
var t, temp;
function Pellet () {
super();
_root.pellet.onEnterFrame = function () {
this.MTemp = _root.ship;
this.shipX = this.MTemp._x;
this.shipY = this.MTemp._y;
this.HitDetect(this.dist(this.shipX, this.shipY, this._x, this._y));
};
}
function HitDetect(dist2) {
if (dist2 < 30) {
_root.ship.S = 5;
t = 1;
while (t <= 5) {
_root.ship["S" + t]._alpha = 100;
t++;
}
}
}
function dist(a, b, c, d) {
temp = Math.sqrt(((a - c) * (a - c)) + ((b - d) * (b - d)));
return(temp);
}
}
Symbol 313 MovieClip [__Packages.Trophie2] Frame 0
class Trophie2 extends MovieClip
{
var stopper, trophie, temp;
function Trophie2 () {
super();
stopper = true;
trophie = _root.trophie2;
trophie.onEnterFrame = function () {
this.MCTemp = _root.ship;
this.Sx = this.MCTemp._x;
this.Sy = this.MCTemp._y;
this.HitDetect(this.dist(this.Sx, this.Sy, this.trophie._x, this.trophie._y));
};
}
function HitDetect(dist2) {
if (((dist2 < 100) && (_root.dead == false)) && (stopper)) {
stopper = false;
trophie.gotoAndPlay("score");
_root.ship.gotoAndStop("dance");
}
}
function dist(a, b, c, d) {
temp = Math.sqrt(((a - c) * (a - c)) + ((b - d) * (b - d)));
return(temp);
}
}
Symbol 314 MovieClip [__Packages.Trophie] Frame 0
class Trophie extends MovieClip
{
var stopper, trophie, temp;
function Trophie () {
super();
stopper = true;
trophie = _root.trophie;
trophie.onEnterFrame = function () {
this.MCTemp = _root.ship;
this.Sx = this.MCTemp._x;
this.Sy = this.MCTemp._y;
this.HitDetect(this.dist(this.Sx, this.Sy, this.trophie._x, this.trophie._y));
};
}
function HitDetect(dist2) {
if (((dist2 < 100) && (_root.dead == false)) && (stopper)) {
stopper = false;
trophie.gotoAndPlay("score");
_root.ship.gotoAndStop("dance");
}
}
function dist(a, b, c, d) {
temp = Math.sqrt(((a - c) * (a - c)) + ((b - d) * (b - d)));
return(temp);
}
}
Symbol 315 MovieClip [__Packages.MenuSonar] Frame 0
class MenuSonar extends MovieClip
{
function MenuSonar () {
super();
}
}
Symbol 316 MovieClip [__Packages.wavesClass] Frame 0
class wavesClass extends MovieClip
{
var oldx, oldy, oldshipx, oldshipy, shipx, shipy, i, h, S, end, fed, ship2, jet, head, bulb, bill;
function wavesClass () {
super();
_root.dead = false;
oldx = _root._xmouse;
oldy = _root._ymouse;
oldshipx = (oldshipy = (shipx = (shipy = 0)));
i = 1;
h = 1;
S = 5;
end = 0;
CreatGoal(_root.lvlNum);
CreatSonar();
CreatAfterImage();
}
function onMouseDown() {
if (S > 0) {
CreatSonar();
CreatAfterImage();
}
}
function onMouseMove() {
rotateJetAndHeadLight();
}
function CreatGoal(lvl) {
_root.ContainerGoal.createEmptyMovieClip("lame", lvl + 1);
_root.ContainerGoal.lame.attachMovie("goal", "goal" + lvl, lvl + 1);
fed = _root.ContainerGoal.lame["goal" + lvl];
if (lvl == 1) {
fed._x = 1150;
fed._y = 220;
}
if (lvl == 2) {
fed._x = 606;
fed._y = 248;
}
if (lvl == 3) {
fed._x = 1606;
fed._y = 300;
}
if (lvl == 4) {
fed._x = 4000;
fed._y = 500;
}
if (lvl == 5) {
fed._x = -1188;
fed._y = -1143;
}
if (lvl == 6) {
fed._x = 2000;
fed._y = 1000;
}
if (lvl == 7) {
fed._x = 20;
fed._y = 250;
}
if (lvl == 8) {
fed._x = 900;
fed._y = 100;
}
if (lvl == 9) {
fed._x = 3350;
fed._y = -14;
}
if (lvl == 10) {
fed._x = 3350;
fed._y = -14;
}
}
function rotateJetAndHeadLight() {
ship2 = _root.ship;
jet = _root.ship.jet;
head = _root.ship.head;
bulb = _root.ship.bubbles;
if (oldx < ship2._x) {
bulb._alpha = 100;
} else {
bulb._alpha = 0;
}
oldx = ship2._x;
jet._rotation = jet._rotation + 5;
head._rotation = head._rotation + 5;
}
function CreatAfterImage() {
_root.Container2.createEmptyMovieClip("PillA" + h, h);
_root.Container2["PillA" + h].attachMovie("Circle", "Circle" + h, h);
bill.removeMovieClip();
bill = _root.Container2["PillA" + h];
bill._x = _root.ship._x;
bill._y = _root.ship._y;
bill._xscale = 0;
bill._yscale = 0;
bill.h = h;
if (_root.afterImage._alpha < 5) {
_root.ship["S" + S]._alpha = 0;
S--;
_root.afterImage._alpha = 100;
}
bill.onEnterFrame = function () {
this._xscale = this._xscale + 27;
this._yscale = this._yscale + 27;
this._x = this._x + (_root.ship.currentx - _root.ship.oldx);
this._y = this._y + (_root.ship.currenty - _root.ship.oldy);
if (this._xscale > 1000) {
_root.afterImage._alpha--;
}
if (_root.afterImage._alpha < 5) {
_root.Container2["PillA" + this.h].removeMovieClip();
}
};
h++;
}
function CreatSonar() {
_root.Container.createEmptyMovieClip("pill" + i, i);
_root.Container["pill" + i].attachMovie("ring", "ring" + i, i);
bill = _root.Container["pill" + i];
bill._x = _root.ship._x;
bill._y = _root.ship._y;
bill._xscale = 0;
bill._yscale = 0;
bill.i = i;
bill.onEnterFrame = function () {
this._xscale = this._xscale + 35;
this._yscale = this._yscale + 35;
if (this._xscale > 12000) {
_root.Container["pill" + this.i].removeMovieClip();
}
};
i++;
}
}
Symbol 317 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.3");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}};
options = _parseOptions(options, _local27);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0) {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
}