Frame 1
clicked = false;
stage = 1;
points = 0;
stagePoints = 0;
stop();
Instance of Symbol 4 MovieClip in Frame 1
on (release) {
_root.gotoAndPlay("start");
}
Instance of Symbol 4 MovieClip in Frame 1
on (release) {
_root.gotoAndPlay("instructions");
}
Instance of Symbol 4 MovieClip in Frame 1
on (release) {
_root.gotoAndPlay("credits");
}
Instance of Symbol 4 MovieClip in Frame 1
on (release) {
getURL ("http://www.beammeupscotty.se/");
}
Frame 2
stop();
Instance of Symbol 4 MovieClip in Frame 2
on (release) {
_root.gotoAndPlay("menu");
}
Frame 3
stop();
Frame 4
stop();
got = 0;
totalExpanded = 0;
clicked = false;
if (stage == 1) {
total = 5;
goal = 2;
} else if (stage == 2) {
total = 10;
goal = 4;
} else if (stage == 3) {
total = 16;
goal = 9;
} else if (stage == 4) {
total = 20;
goal = 12;
} else if (stage == 5) {
total = 28;
goal = 19;
} else if (stage == 6) {
total = 35;
goal = 27;
} else if (stage == 7) {
total = 40;
goal = 34;
} else if (stage == 8) {
total = 45;
goal = 40;
} else if (stage == 9) {
total = 53;
goal = 47;
} else if (stage == 10) {
total = 60;
goal = 55;
}
i = 0;
while (i < total) {
duplicateMovieClip (_root.bullet, "bulletID_" + i, i);
setProperty("bulletID_" + i, _x , random(300));
setProperty("bulletID_" + i, _y , random(300));
i++;
}
Instance of Symbol 14 MovieClip in Frame 4
on (release) {
if (_root.clicked == false) {
duplicateMovieClip (_root.pointerSpawn, "pointer", 900);
_root.clicked = true;
_root.totalExpanded = _root.totalExpanded + 1;
}
}
Instance of Symbol 25 MovieClip "bullet" in Frame 4
onClipEvent (load) {
if (this._name == "bullet") {
this._alpha = 0;
xmov = 0;
ymov = 0;
} else {
this._alpha = (Math.random() * 50) + 50;
dir = Math.ceil(Math.random() * 2);
if (dir == 1) {
xmov = Math.random() * 2;
ymov = Math.random() * 2;
} else {
xmov = Math.random() * -2;
ymov = Math.random() * -2;
}
rotation = 10;
stagewidth = 400;
stageheight = 400;
expanded = false;
hitOther = false;
givePoints = true;
}
}
onClipEvent (enterFrame) {
if (expanded == false) {
this._x = this._x + xmov;
this._y = this._y + ymov;
this._rotation = this._rotation + rotation;
if (this._x < 12) {
this._x = 12;
xmov = xmov * -1;
} else if (this._x > stagewidth) {
this._x = stagewidth;
xmov = xmov * -1;
} else if (this._y < 12) {
this._y = 12;
ymov = ymov * -1;
} else if (this._y > stageheight) {
this._y = stageheight;
ymov = ymov * -1;
} else if ((this._y < 12) || (this._x > stagewidth)) {
ymov = ymov * -1;
xmov = xmov * -1;
} else if ((this._y > stageheight) || (this._x < 12)) {
ymov = ymov * -1;
xmov = xmov * -1;
}
if (this.hitTest(_root.pointer)) {
if (expanded == false) {
this.gotoAndPlay(2);
_root.got = _root.got + 1;
_root.stagePoints = _root.stagePoints + 1;
_root.totalExpanded = _root.totalExpanded + 1;
expanded = true;
movx = 0;
movy = 0;
}
}
if (hitOther == true) {
if (expanded == false) {
_root.stagePoints = _root.stagePoints + 1;
_root.got = _root.got + 1;
_root.totalExpanded = _root.totalExpanded + 1;
this.gotoAndPlay(2);
expanded = true;
movx = 0;
movy = 0;
}
}
}
if (expanded == true) {
i = 0;
while (i < _root.total) {
if (this.hitTest(_root["bulletID_" + i])) {
_root["bulletID_" + i].hitOther = true;
if (givePoints == true) {
givePoints = false;
}
}
i++;
}
}
}
Instance of Symbol 28 MovieClip "pointerSpawn" in Frame 4
onClipEvent (load) {
morph = true;
}
onClipEvent (enterFrame) {
if (morph == true) {
if (this._name == "pointer") {
this._x = _xmouse - 25;
this._y = _ymouse + 37;
this.gotoAndPlay(2);
morph = false;
}
}
}
Instance of Symbol 30 MovieClip in Frame 4
onClipEvent (load) {
_root.stagePoints = 0;
}
onClipEvent (enterFrame) {
_root.showPoints = _root.points + _root.stagePoints;
if ((_root.totalExpanded == 0) && (_root.clicked == true)) {
_root.confirmYes._visible = false;
_root.confirmNo._visible = false;
_root.confirmRestart._visible = false;
i = 0;
while (i < _root.total) {
removeMovieClip(_root["bulletID_" + i]);
i++;
}
if (_root.clicked == true) {
removeMovieClip(_root.pointer);
}
if (_root.got < _root.goal) {
_root.gotoAndPlay("gameOver");
} else if (_root.stage >= 10) {
_root.points = _root.points + _root.stagePoints;
_root.gotoAndPlay("winGame");
} else {
_root.points = _root.points + _root.stagePoints;
_root.gotoAndPlay("nextStage");
}
}
}
Instance of Symbol 4 MovieClip in Frame 4
on (release) {
_root.confirmYes._visible = true;
_root.confirmNo._visible = true;
_root.confirmRestart._visible = true;
}
Instance of Symbol 35 MovieClip "confirmRestart" in Frame 4
onClipEvent (load) {
this.swapDepths(1000);
this._visible = false;
}
Instance of Symbol 4 MovieClip "confirmYes" in Frame 4
onClipEvent (load) {
this.swapDepths(1001);
this._visible = false;
}
on (release) {
_root.confirmYes._visible = false;
_root.confirmNo._visible = false;
_root.confirmRestart._visible = false;
i = 0;
while (i < _root.total) {
removeMovieClip(_root["bulletID_" + i]);
i++;
}
if (_root.clicked == true) {
removeMovieClip(_root.pointer);
}
_root.gotoAndPlay("menu");
}
Instance of Symbol 4 MovieClip "confirmNo" in Frame 4
onClipEvent (load) {
this.swapDepths(1002);
this._visible = false;
}
on (release) {
_root.confirmYes._visible = false;
_root.confirmNo._visible = false;
_root.confirmRestart._visible = false;
}
Frame 5
stop();
Instance of Symbol 38 MovieClip in Frame 5
on (release) {
if (_root.clicked == false) {
duplicateMovieClip (_root.pointerSpawn, "pointer", 900);
_root.clicked = true;
_root.totalExpanded = _root.totalExpanded + 1;
}
}
Instance of Symbol 4 MovieClip in Frame 5
on (release) {
_root.gotoAndPlay("menu");
}
Frame 6
stop();
Instance of Symbol 14 MovieClip in Frame 6
on (release) {
if (_root.clicked == false) {
duplicateMovieClip (_root.pointerSpawn, "pointer", 900);
_root.clicked = true;
_root.totalExpanded = _root.totalExpanded + 1;
}
}
Instance of Symbol 4 MovieClip in Frame 6
on (release) {
_root.stage = _root.stage + 1;
_root.gotoAndPlay("start");
}
Frame 7
stop();
Instance of Symbol 4 MovieClip in Frame 7
on (release) {
_root.gotoAndPlay("start");
}
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 62
_root.totalExpanded = _root.totalExpanded - 1;
this.removeMovieClip();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 72
_root.totalExpanded = _root.totalExpanded - 1;
this.removeMovieClip();