Frame 1
var GAME_NAME = "plasticsaucer";
var DEVELOPER_NAME = "plasticmartians";
var THRESHOLD = 600;
var ROOT_URL = "http://www.playaholics.com/";
var HI_SCORE_SCRIPT = (ROOT_URL + "comp_entry.php?");
Instance of Symbol 75 MovieClip in Frame 1
onClipEvent (load) {
value = 0;
maxValue = 100;
valueStep = this._width / maxValue;
this._width = 0;
totalFileSize = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
bytesLoaded = _root.getBytesLoaded();
amountLoaded = bytesLoaded / totalFileSize;
percentLoaded = int(amountLoaded * 100);
this._width = valueStep * percentLoaded;
if (amountLoaded >= 1) {
_root.gotoAndPlay("Game", 1);
}
}
Frame 2
_global.LAND_GFX = 0;
_global.LAND_GFX_BOT = 1;
_global.LAND_POINTS = 2;
_global.LAND_BOT_POINTS = 3;
_global.SEED = 23423664623;
_global.GAME_ID = 116;
_global.rad = (Math.PI/180);
_global.ang2rad = rad;
_global.rad2ang = 57.2957795130823;
_global.NUM_STALAGS = 5;
_global.MAX_STALAGS = 25;
_global.MAX_BOULDERS = 30;
_global.COLLISION_CLIP_DEPTH = 10000;
_global.TOP_CAVE_DEPTH = 10020;
_global.BOT_CAVE_DEPTH = 10050;
_global.SHIP_DEPTH = 10090;
_global.PARALLAX1_DEPTH = 10100;
_global.PARALLAX2_DEPTH = 10400;
_global.PARALLAX3_DEPTH = 10700;
_global.PARALLAX4_DEPTH = 11000;
_global.STALAG_DEPTH = 20100;
_global.EXPLOSION_DEPTH = 30000;
_global.VERSION_TXT_DEPTH = 40000;
_global.HISCORE_DEPTH = 40002;
_global.BUT0_DEPTH = 40010;
_global.BUT1_DEPTH = 40011;
_global.BUT2_DEPTH = 40012;
_global.BUT3_DEPTH = 40013;
explodeSound = new Sound();
explodeSound.attachSound("explode");
_root.version.version = "(c) plastic martians 2003";
_root.hiScoresChanged = false;
function pseudoRandom(num) {
_root.pseudoRandom.seed = ((_root.pseudoRandom.seed * _root.pseudoRandom.a) + _root.pseudoRandom.c) % _root.pseudoRandom.m;
return((_root.pseudoRandom.seed / _root.pseudoRandom.m) * num);
}
_root.pseudoRandom.m = 714025 /* 0x0AE529 */;
_root.pseudoRandom.a = 4096;
_root.pseudoRandom.c = 150889 /* 0x024D69 */;
_root.gotGlobalHighScore = false;
beep_low = new Sound();
beep_low.attachSound("beep_low");
beep_high = new Sound();
beep_high.attachSound("beep_high");
stop();
_root.attachMovie("321_GO", "goclip", 10100101010);
_root.goclip._x = 275;
_root.goclip._y = 200;
_root.goclip._xscale = (_root.goclip._yscale = 200);
Instance of Symbol 80 MovieClip "scoreBoard" in Frame 2
onClipEvent (load) {
this.swapDepths(10202993103);
}
Instance of Symbol 82 MovieClip in Frame 2
onClipEvent (enterFrame) {
_root.checkCollision();
_root.scrollLandscape();
_root.scrollBoulders();
_root.scrollStalags();
if (_root.saucer) {
_root.doScores();
}
_root.alterDifficulty();
}
Instance of Symbol 96 MovieClip "version" in Frame 2
onClipEvent (load) {
this.swapDepths(VERSION_TXT_DEPTH);
}
Frame 3
function alterDifficulty() {
if (_root.landScapeSection >= 4) {
_root.landScapeSection = 0;
_root.aRoughness++;
if (_root.aRoughness > 25) {
_root.aRoughness = 25;
}
_root.wallGap = _root.wallGap - 5;
if (_root.wallGap < 200) {
_root.wallGap = 200;
}
}
}
function doScores() {
if (_root.GO) {
_root.totalDistance = _root.totalDistance + _root.saucer.control.vx;
_root.additionalScore = _root.additionalScore + int((_root.saucer.control.vx - _root.saucer.control.MINSPEED) / 5);
_root.totalScore = int((_root.totalDistance / 10) + _root.additionalScore);
_root.scoreBoard.scoreTxt = _root.totalScore;
}
}
function createStalags(aArenaWidth, offset) {
var randomSpacing = (aArenaWidth / NUM_STALAGS);
var currentX = ((offset + randomSpacing) + 100);
var i = 0;
while (i < NUM_STALAGS) {
_root.currentStalag++;
if (_root.currentStalag > MAX_STALAGS) {
_root.currentStalag = 0;
}
var stalagToSpawn = int(_root.pseudoRandom(4));
var s = _root.collision.attachMovie("Stalag" + stalagToSpawn, "stalag" + _root.currentStalag, STALAG_DEPTH + _root.currentStalag);
s._x = currentX + int(_root.pseudoRandom(randomSpacing - 150));
if (stalagToSpawn < 2) {
s._y = -int(_root.pseudoRandom(30));
} else {
s._y = 200 + int(_root.pseudoRandom(30));
}
s._visible = false;
currentX = currentX + randomSpacing;
i++;
}
}
function checkCollision() {
if (_root.saucer._visible) {
var i = 0;
while (i < 5) {
var colPoint = _root.saucer["colPoint" + i];
tp = new Object();
tp.x = colPoint._x;
tp.y = colPoint._y;
_root.saucer.localToGlobal(tp);
if (_root.collision.hitTest(tp.x, tp.y, true)) {
var obj = _root.attachMovie("ExplodeAnimMulti", "Explosion", EXPLOSION_DEPTH);
obj._x = _root.saucer._x;
obj._y = _root.saucer._y;
_root.saucer.vx = 0;
_root.saucer.stopAllSounds();
_root.saucer.removeMovieClip();
_root.saucer._visible = false;
_root.explodeSound.start();
if (!_root.randomPlay) {
_root.gotoAndPlay("HiscoreSubmit");
} else {
_root.gotoAndPlay("showHiScores");
}
return;
}
i++;
}
}
}
function scrollLandscape() {
var landSection = 0;
while (landSection < _root.landscape.length) {
_root.landscape[landSection][LAND_GFX]._x = _root.landscape[landSection][LAND_GFX]._x - _root.saucer.control.vx;
_root.landscape[landSection][LAND_GFX_BOT]._x = _root.landscape[landSection][LAND_GFX_BOT]._x - _root.saucer.control.vx;
landSection++;
}
var landSection = 0;
while (landSection < _root.landscape.length) {
var thisLand = _root.landscape[landSection][LAND_GFX];
var thisLandBot = _root.landscape[landSection][LAND_GFX_BOT];
if ((thisLand._x < 560) && ((thisLand._x + thisLand._width) > -10)) {
if (!thisLand._visible) {
thisLand._visible = true;
thisLandBot._visible = true;
}
} else if ((thisLand._x + thisLand._width) < -10) {
_root.landScapeSection++;
land = _root.landscape;
land[landSection][LAND_GFX].removeMovieClip();
land[landSection][LAND_GFX_BOT].removeMovieClip();
land[landSection] = land[landSection + 1];
land[landSection + 1] = land[landSection + 2];
prevSection = landSection + 1;
land[landSection + 2] = _root.landscapeGen.createLandscapeSection(_root.aSectionWidthPixels, _root.pointWidth, _root.aNumPointsInSection, _root.section++, _root.aMaxDepth, _root.aMinDepth, _root.aRoughness, land[prevSection][LAND_POINTS][_root.aNumPointsInSection].y, land[prevSection][LAND_BOT_POINTS][_root.aNumPointsInSection].y, land[landSection + 2]);
land[landSection + 2][LAND_GFX]._x = land[prevSection][LAND_GFX]._x + land[prevSection][LAND_GFX]._width;
land[landSection + 2][LAND_GFX_BOT]._x = land[prevSection][LAND_GFX_BOT]._x + land[prevSection][LAND_GFX_BOT]._width;
createStalags(land[landSection + 2][LAND_GFX]._width, land[landSection + 2][LAND_GFX]._width * 2);
} else if (thisLand._visible) {
thisLand._visible = false;
thisLandBot._visible = false;
}
landSection++;
}
}
function scrollStalags() {
var i = 0;
while (i < MAX_STALAGS) {
var s = _root.collision["stalag" + i];
if (s) {
s._x = s._x - _root.saucer.control.vx;
if ((s._x + s._width) < 0) {
s.removeMovieClip();
s._visible = false;
} else if ((s._x < 550) && (!s._visible)) {
s._visible = true;
}
}
i++;
}
}
function scrollBoulders() {
var i = 0;
while (i < MAX_BOULDERS) {
var b = _root["boulder" + i];
b._x = b._x - (_root.saucer.control.vx * b.level);
if ((b._x + b._width) < 0) {
b._x = 550 + random(700);
b._visible = false;
}
if ((b._x < 550) && (!b._visible)) {
b._visible = true;
}
i++;
}
}
function createBoulders() {
var j = 0;
while (j < MAX_BOULDERS) {
var rnd = random(100);
if (rnd > 90) {
boulderToSpawn = random(2);
} else {
boulderToSpawn = random(3) + 2;
}
var b = _root.attachMovie("Boulder" + boulderToSpawn, "boulder" + j, (PARALLAX4_DEPTH + j) + (5 * boulderToSpawn));
b.level = ((boulderToSpawn < 2) ? 1.5 : 2);
b._x = random(1300);
b._y = 402 - b._height;
b._visible = true;
j++;
}
}
function createLandscape(aSectionWidthPixels, aNumSections, aNumPointsInSection, aMaxDepth, aMinDepth, aRoughness) {
var landscapeArray = [];
var pointWidth = (aSectionWidthPixels / aNumPointsInSection);
var i = 0;
while (i <= aNumSections) {
if (i == 0) {
landscapeArray[i] = createLandscapeSection(aSectionWidthPixels, pointWidth, aNumPointsInSection, i, aMaxDepth, aMinDepth, aRoughness, aMinDepth);
} else {
landscapeArray[i] = createLandscapeSection(aSectionWidthPixels, pointWidth, aNumPointsInSection, i, aMaxDepth, aMinDepth, aRoughness, landscapeArray[i - 1][LAND_POINTS][aNumPointsInSection].y);
}
i++;
}
return(landscapeArray);
}
_root.collision.removeMovieClip();
_root.mainPanel.removeMovieClip();
_root.playPanel.removeMovieClip();
_root.scoresPanel.removeMovieClip();
_root.GO = false;
_root.goclip.gotoAndPlay(2);
var i = 0;
while (i < MAX_BOULDERS) {
_root["boulder" + i].removeMovieClip();
i++;
}
_root.landScapeSection = 0;
_root.createEmptyMovieClip("collision", COLLISION_CLIP_DEPTH);
_root.attachMovie("Saucer", "saucer", SHIP_DEPTH);
_root.saucer._x = 100;
_root.saucer._y = 200;
numBoulders = 0;
var totalDistance = 0;
var additionalScore = 0;
var totalScore = 0;
_root.scoreBoard.scoreTxt = _root.totalScore;
var wallGap = 250;
var landscape = new Array();
var aSectionWidthPixels = 2000;
var aNumPointsInSection = 40;
var pointWidth = (aSectionWidthPixels / aNumPointsInSection);
var section = 0;
var aMaxDepth = 140;
var aMinDepth = 40;
var aRoughness = 15;
var currentStalag = 0;
var i = 0;
while (i < 3) {
_root.landscape[i] = new Array();
_root.landscape[i][LAND_POINTS] = new Array();
_root.landscape[i][LAND_BOT_POINTS] = new Array();
var k = 0;
while (k <= aNumPointsInSection) {
_root.landscape[i][LAND_POINTS][k] = new Object();
_root.landscape[i][LAND_POINTS][k].x = 0;
_root.landscape[i][LAND_POINTS][k].y = 0;
_root.landscape[i][LAND_BOT_POINTS][k] = new Object();
_root.landscape[i][LAND_BOT_POINTS][k].x = 0;
_root.landscape[i][LAND_BOT_POINTS][k].y = 0;
k++;
}
if (i == 0) {
_root.landscape[i] = _root.landscapeGen.createLandscapeSection(aSectionWidthPixels, pointWidth, aNumPointsInSection, i, aMaxDepth, aMinDepth, aRoughness, aMinDepth, aMinDepth + _root.wallGap, _root.landscape[i]);
} else {
createStalags(_root.landscape[0][LAND_GFX]._width, _root.landscape[0][LAND_GFX]._width * i);
_root.landscape[i] = _root.landscapeGen.createLandscapeSection(aSectionWidthPixels, pointWidth, aNumPointsInSection, i, aMaxDepth, aMinDepth, aRoughness, _root.landscape[i - 1][LAND_POINTS][aNumPointsInSection].y, _root.landscape[i - 1][LAND_BOT_POINTS][aNumPointsInSection].y, _root.landscape[i]);
}
i++;
}
var i = 0;
while (i < _root.landscape.length) {
_root.landscape[i][LAND_GFX]._x = _root.landscape[i - 1][LAND_GFX]._x + _root.landscape[i - 1][LAND_GFX]._width;
_root.landscape[i][LAND_GFX_BOT]._x = _root.landscape[i - 1][LAND_GFX_BOT]._x + _root.landscape[i - 1][LAND_GFX_BOT]._width;
i++;
}
createBoulders();
stop();
Frame 5
hiStatus = false;
gotHighScore = false;
gotGlobalHighScore = false;
Frame 30
Frame 31
stop();
Instance of Symbol 106 MovieClip "mainPanel" in Frame 31
onClipEvent (load) {
if (_root.totalScore > _root.THRESHOLD) {
this.attachMovie("HighScore", "scoreobj", 1010101);
} else {
this.attachMovie("LowScore", "scoreobj", 1010101);
}
this.scoreobj._x = this.scoreobj._x - 10;
this.scoreobj._y = this.scoreobj._y + 35;
this.swapDepths(HISCORE_DEPTH);
this.scores.totalTxt = _root.totalScore;
this.scores.otherTxt = (("Distance travelled: " + int(_root.totalDistance / 10)) + "\nSpeed bonus: ") + _root.additionalScore;
var strScore = ("" + (_root.hiScorePosition + 1));
var lastDigit = strScore.charAt(strScore.length());
var suffix = "";
if ((_root.hiScorePosition > 10) && (_root.hiScorePosition < 19)) {
suffix = "th";
} else if (strScore == "3") {
suffix = "rd";
} else if (strScore == "2") {
suffix = "nd";
} else if (strScore == "1") {
suffix = "st";
} else {
suffix = "th";
}
this.scores.positionTxt = (("You came: " + (_root.hiScorePosition + 1)) + "") + suffix;
if (!_root.gotGlobalHighScore) {
this.scores.rankingTxt = "local ranking";
} else {
this.scores.rankingTxt = "global ranking";
}
}
Frame 36
_root.scorePanel.gotoAndPlay(2);
Instance of Symbol 161 MovieClip "playPanel" in Frame 36
onClipEvent (load) {
this.swapDepths(HISCORE_DEPTH + 1);
}
Frame 37
stop();
Frame 41
_root.playPanel.gotoAndPlay(2);
Instance of Symbol 179 MovieClip "scorePanel" in Frame 41
onClipEvent (load) {
this.swapDepths(HISCORE_DEPTH);
i = 0;
while (i < 5) {
this["name" + i] = "";
i++;
}
_root.hiScoresChanged = true;
if (_root.hiScoresChanged) {
var i = 0;
while (i < _root.localHiScores.length) {
this["name" + i] = _root.localHiNames[i];
this["score" + i] = _root.localHiScores[i];
i++;
}
_root.hiScoresChanged = false;
}
}
Frame 42
stop();
Symbol 12 MovieClip [ScoresNotAvailable] Frame 1
stop();
Symbol 12 MovieClip [ScoresNotAvailable] Frame 81
this.removeMovieClip();
Instance of Symbol 14 MovieClip in Symbol 15 MovieClip [Star] Frame 1
onClipEvent (enterFrame) {
_parent._xscale = _parent._xscale - 4;
_parent._yscale = _parent._yscale - 4;
_parent._x = _parent._x - _root.saucer.control.vx;
if (_parent._xscale < 40) {
_parent.removeMovieClip();
}
}
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 1
function newExploder() {
this.attachMovie("ExplodeAnim", "ExplodeAnim" + explodeDepth, explodeDepth);
this["ExplodeAnim" + explodeDepth]._x = ((random(10) > 5) ? (random(40)) : (-random(40)));
this["ExplodeAnim" + explodeDepth]._y = ((random(10) > 5) ? (random(40)) : (-random(40)));
this["ExplodeAnim" + explodeDepth]._xscale = (this["ExplodeAnim" + explodeDepth]._yscale = random(60) + 60);
explodeDepth++;
}
explodeDepth = 700000 /* 0x0AAE60 */;
newExploder();
newExploder();
newExploder();
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 3
newExploder();
newExploder();
newExploder();
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 5
newExploder();
newExploder();
newExploder();
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 7
newExploder();
newExploder();
newExploder();
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 8
newExploder();
newExploder();
newExploder();
newExploder();
newExploder();
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 11
newExploder();
newExploder();
newExploder();
newExploder();
newExploder();
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 15
newExploder();
newExploder();
newExploder();
newExploder();
newExploder();
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 18
newExploder();
newExploder();
newExploder();
newExploder();
newExploder();
Symbol 16 MovieClip [ExplodeAnimMulti] Frame 177
this.removeMovieClip();
Symbol 19 MovieClip [ExplodeAnim] Frame 8
this.removeMovieClip();
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 15
stop();
Symbol 33 MovieClip Frame 1
this._visible = false;
Symbol 34 MovieClip [Saucer] Frame 1
function stopAllSounds() {
var u = 0;
while (u < 5) {
this.control.ufoSnd[u].stop();
u++;
}
}
function createParticle() {
i = 1000 + random(1919);
_root.attachMovie("Star", "Star" + i, i);
var thisStar = _root["Star" + i];
thisStar._rotation = sauce._rotation;
thisStar._xscale = 100;
thisStar._yscale = 100;
thisStar._alpha = random(50) + 50;
thisStar._x = _x;
thisStar._y = _y;
}
thisShadow = "saucerShadow";
Instance of Symbol 31 MovieClip "control" in Symbol 34 MovieClip [Saucer] Frame 1
onClipEvent (enterFrame) {
this.immune++;
if (Key.isDown(39) || (Key.isDown(32))) {
this.vx = this.vx + this.forwardforce;
} else if (Key.isDown(37)) {
this.vx = this.vx + (this.backwardforce * 2);
} else {
this.vx = this.vx + this.backwardforce;
}
if (this.vx < MINSPEED) {
this.vx = MINSPEED;
}
if (this.vx > MAXSPEED) {
this.vx = MAXSPEED;
}
if (_parent._x < 100) {
_parent._x = 100;
this.vx = 10;
}
if (random(100) > 40) {
_parent.createParticle();
}
if (_root.GO) {
if (Key.isDown(38) || (_root.mousedown)) {
this.vy = this.vy + this.upforce;
} else {
this.vy = this.vy + this.downforce;
}
_parent._rotation = this.vy * 3;
if (this.vy < -10) {
this.vy = -10;
}
if (this.vy > 10) {
this.vy = 10;
}
_parent._y = _parent._y + this.vy;
}
var sndToPlay = (this.numSounds - int((this.vx - MINSPEED) / this.range));
if (this.soundPlaying != sndToPlay) {
var u = 0;
while (u < 5) {
ufoSnd[u].stop();
u++;
}
ufoSnd[sndToPlay].start(0, 99999);
this.soundPlaying = sndToPlay;
}
}
onClipEvent (load) {
this.MAXSPEED = 28;
this.MINSPEED = 12;
this.vx = 10;
this.vy = 0;
this.upforce = -0.9;
this.downforce = 1.2;
this.forwardforce = 0.4;
this.backwardforce = -0.4;
ufoSnd = new Array();
var numSounds = 4;
var range = ((MAXSPEED - MINSPEED) / this.numSounds);
ufoSnd[0] = new Sound();
ufoSnd[0].attachSound("ufo-2");
ufoSnd[1] = new Sound();
ufoSnd[1].attachSound("ufo-1");
ufoSnd[2] = new Sound();
ufoSnd[2].attachSound("ufo");
ufoSnd[3] = new Sound();
ufoSnd[3].attachSound("ufo1");
ufoSnd[4] = new Sound();
ufoSnd[4].attachSound("ufo2");
this.soundPlaying = -1;
var i = 0;
while (i < 5) {
ufoSnd[i].setVolume(40);
i++;
}
this.immune = 0;
this.mousedown = false;
someListener = new Object();
someListener.onMouseDown = function () {
_root.mousedown = true;
};
Mouse.addListener(someListener);
someListener.onMouseUp = function () {
_root.mousedown = false;
};
Mouse.addListener(someListener);
}
Symbol 57 MovieClip [321_GO] Frame 1
this._visible = false;
stop();
Symbol 57 MovieClip [321_GO] Frame 2
this._visible = true;
Symbol 57 MovieClip [321_GO] Frame 8
_root.beep_low.start();
Symbol 57 MovieClip [321_GO] Frame 22
_root.beep_low.start();
Symbol 57 MovieClip [321_GO] Frame 36
_root.beep_low.start();
Symbol 57 MovieClip [321_GO] Frame 50
_root.beep_high.start();
Symbol 57 MovieClip [321_GO] Frame 70
_root.GO = true;
this._visible = false;
stop();
Symbol 63 Button
on (press) {
var url = ((((((_root.HI_SCORE_SCRIPT + "developer=") + _root.DEVELOPER_NAME) + "&game=") + _root.GAME_NAME) + "&score=") + _root.totalScore);
getURL (url, "_top");
}
Symbol 87 Button
on (press) {
_parent.removeMovieClip();
_root.gotoAndPlay("howToPlay");
}
Symbol 90 Button
on (press) {
_root.randomPlay = false;
_root.pseudoRandom.seed = SEED;
_root.gotoAndPlay("GAME");
_root.mainPanel.gotoAndPlay(2);
}
Symbol 93 Button
on (press) {
_root.randomPlay = true;
time = new Date().getTime();
_root.pseudoRandom.seed = time;
_root.gotoAndPlay("GAME");
_root.mainPanel.gotoAndPlay(2);
}
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 2
this.removeMovieClip();
Symbol 98 MovieClip Frame 1
this.createLandscapeSection = function (aSectionWidthPixels, aPointWidth, aNumPoints, aSectionNum, aMaxDepth, aMinDepth, aRoughness, aStartY, aStartBotY, landscapeSection) {
var pointArray = landscapeSection[LAND_POINTS];
var pointBotArray = landscapeSection[LAND_BOT_POINTS];
pointArray[0].x = 0;
pointArray[0].y = aStartY;
pointBotArray[0].x = 0;
if (aStartY == 0) {
pointBotArray[0].y = 400;
} else {
pointBotArray[0].y = aStartBotY;
}
var i = 1;
while (i <= aNumPoints) {
pointArray[i].x = i * aPointWidth;
pointArray[i].y = 0;
var rnd = 0;
if (pointArray[i - 1].y > aMaxDepth) {
rnd = -_root.pseudoRandom(aRoughness);
} else if (pointArray[i - 1].y < aMinDepth) {
rnd = _root.pseudoRandom(aRoughness);
} else {
rnd = ((_root.pseudoRandom(100) >= 50) ? (-_root.pseudoRandom(aRoughness)) : (_root.pseudoRandom(aRoughness)));
}
pointArray[i].y = pointArray[i - 1].y + rnd;
if (i == aNumPoints) {
pointBotArray[aNumPoints].y = pointArray[aNumPoints].y + _root.wallGap;
} else {
pointBotArray[i].y = (pointArray[i].y + _root.wallGap) + _root.pseudoRandom(aRoughness);
}
pointBotArray[i].x = pointArray[i].x;
i++;
}
var land = _root.collision.createEmptyMovieClip("landscapeSection" + aSectionNum, TOP_CAVE_DEPTH + aSectionNum);
var landBot = _root.collision.createEmptyMovieClip("landscapeBotSection" + aSectionNum, BOT_CAVE_DEPTH + aSectionNum);
colors = [15219714, 13107];
alphas = [100, 100];
ratios = [0, 255];
matrix = {matrixType:"box", x:0, y:0, w:aSectionWidthPixels, h:50, r:270 * rad};
matrix2 = {matrixType:"box", x:0, y:350, w:aSectionWidthPixels, h:50, r:90 * rad};
land.beginGradientFill("linear", colors, alphas, ratios, matrix);
land.lineStyle(0, 0, 0);
land.moveTo(0, 0);
land.lineTo(0, pointArray[0].y);
landBot.beginGradientFill("linear", colors, alphas, ratios, matrix2);
landBot.lineStyle(0, 0, 0);
landBot.moveTo(0, 400);
landBot.lineTo(0, pointBotArray[0].y);
land.lineStyle(0, 0, 100);
landBot.lineStyle(0, 0, 100);
var i = 0;
i = 1;
while (i <= aNumPoints) {
land.lineTo(pointArray[i].x, pointArray[i].y);
landBot.lineTo(pointBotArray[i].x, pointBotArray[i].y);
i++;
}
land.lineStyle(0, 0, 0);
land.lineTo(pointArray[aNumPoints].x, 0);
land.endFill();
landBot.lineStyle(0, 0, 0);
landBot.lineTo(pointBotArray[aNumPoints].x, 400);
landBot.endFill();
var section = new Array();
section[LAND_GFX] = land;
section[LAND_GFX_BOT] = landBot;
section[LAND_POINTS] = pointArray;
section[LAND_BOT_POINTS] = pointBotArray;
return(section);
};
Symbol 103 Button
on (press) {
_root.gotoAndStop("howToPlay");
_root.mainPanel.removeMovieClip();
}
Symbol 104 Button
on (press) {
_root.randomPlay = false;
_root.pseudoRandom.seed = SEED;
_root.gotoAndPlay("GAME");
_root.mainPanel.removeMovieClip();
}
Symbol 105 Button
on (press) {
_root.randomPlay = true;
time = new Date().getTime();
_root.pseudoRandom.seed = time;
_root.gotoAndPlay("GAME");
_root.mainPanel.removeMovieClip();
}
Symbol 109 Button
on (press) {
_root.randomPlay = false;
_root.pseudoRandom.seed = SEED;
_root.gotoAndPlay("GAME");
_root.playPanel.gotoAndPlay(2);
}
Symbol 110 Button
on (press) {
_root.randomPlay = true;
time = new Date().getTime();
_root.pseudoRandom.seed = time;
_root.gotoAndPlay("GAME");
_root.playPanel.gotoAndPlay(2);
}
Symbol 155 Button
on (press) {
_root.pseudoRandom.seed = SEED;
_root.gotoAndPlay(1);
_root.removeHiScoreGadgets();
}
Symbol 156 Button
on (press) {
time = new Date().getTime();
_root.pseudoRandom.seed = random(time);
_root.gotoAndPlay(1);
_root.removeHiScoreGadgets();
}
Symbol 159 Button
on (press) {
_parent.gotoAndPlay(2);
}
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 2
this.removeMovieClip();
Symbol 162 Button
on (press) {
_parent.gotoAndPlay("kill");
_root.gotoAndPlay("howToPlay");
}
Symbol 163 Button
on (press) {
_root.pseudoRandom.seed = SEED;
_root.randomPlay = false;
_root.gotoAndPlay("GAME");
_root.scorePanel.gotoAndPlay(2);
}
Symbol 164 Button
on (press) {
time = new Date().getTime();
_root.pseudoRandom.seed = time;
_root.randomPlay = true;
_root.gotoAndPlay("GAME");
_root.scorePanel.gotoAndPlay(2);
}
Symbol 179 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 2
this.removeMovieClip();