Frame 1
function btnRelease() {
sound.PlaySound("btnRelease_wav", VOLUME);
_root.btnRollOut();
}
function btnRollOver() {
sound.PlaySound("btnRollOver_wav", VOLUME);
sound.LoopSound("btnRollOverStar_wav", VOLUME + 100);
}
function btnRollOut() {
sound.StopSound("btnRollOverStar_wav");
}
function UIupdate() {
sound.PlaySound("UIupdate_wav", VOLUME);
}
function backgroundMusic1() {
_root.music1IsPlaying = true;
sound.StartMusic("mainscreen_mp3", VOLUME_BG);
}
function easyMusic() {
_root.music1IsPlaying = false;
sound.StartMusic("easy_music_mp3", VOLUME_BG);
}
function normalMusic() {
_root.music1IsPlaying = false;
sound.StartMusic("normal_music_mp3", VOLUME_BG);
}
function hardMusic() {
_root.music1IsPlaying = false;
sound.StartMusic("hard_music_mp3", VOLUME_BG);
}
function gameOverMusic() {
sound.PlaySound("game_over_mp3", VOLUME_BG);
}
function stopGameOverMusic() {
sound.StopSound("game_over_mp3");
}
function stopBGMusic() {
_root.sound.StopSound("easy_music_mp3");
_root.sound.StopSound("normal_music_mp3");
_root.sound.StopSound("hard_music_mp3");
_root.sound.StopSound("mainscreen_mp3");
_root.sound.StopSound("supertime_wav");
}
var localization_moregames;
var localization_freegames;
var localization_language_nr;
var localization_branding_nr;
_root.localization_url1 = "http://www.gamesgames.com/moregames/?utm_source=brandedgames&utm_medium=rainbow_spider";
_root.localization_url2 = "http://www.gamesgames.com/freegames/?utm_source=brandedgames&utm_medium=rainbow_spider";
_root.localization_language_nr = 1;
_root.localization_branding_nr = 1;
var enterName;
var player;
var cpu;
var day;
var levelUp;
var normal;
var hard;
var unlockEasy;
var unlockHard;
var unlockVeryHard;
switch (_root.localization_language_nr) {
case 1 :
enterName = "ENTER NAME";
player = "Player";
cpu = "CPU";
day = "Day";
levelUp = "Level-up!";
normal = "NORMAL";
hard = "HARD";
unlockEasy = "SURVIVE 30 KM TO UNLOCK NORMAL MODE";
unlockHard = "SURVIVE 30 KM TO UNLOCK HARD MODE";
unlockVeryHard = "HOW LONG CAN YOU SURVIVE?";
break;
case 2 :
enterName = "VUL JE NAAM IN";
player = "Speler";
cpu = "CPU";
day = "Dag";
levelUp = "Level omhoog!";
normal = "NORMAAL";
hard = "MOEILIJK";
unlockEasy = "OVERLEEF 30 KM OM DE NORMALE MODUS VRIJ TE SPELEN";
unlockHard = "OVERLEEF 30 KM OM DE MOEILIJKE MODUS VRIJ TE SPELEN";
unlockVeryHard = "HOE LANG KAN JE OVERLEVEN?";
break;
case 3 :
enterName = "";
player = "Joueur";
cpu = "PC";
day = "Jour";
levelUp = "Niveau termin\u00E9!";
normal = "NORMAL";
hard = "DIFFICILE";
unlockEasy = "SURVIS SUR 30 KM POUR D\u00C9BLOQUER LE MODE \u201CNORMAL\u201D";
unlockHard = "SURVIS SUR 30 KM POUR D\u00C9BLOQUER LE MODE \u201CDIFFICILE\u201D";
unlockVeryHard = "MODE \u201CDIFFICILE\u201D";
break;
case 4 :
enterName = "";
player = "Spieler";
cpu = "CPU";
day = "Tag";
levelUp = "Level-up!";
normal = "NORMAL";
hard = "SCHWER";
unlockEasy = "\u00DCBERLEBE 30 KM, UM DEN NORMALEN MODUS FREIZUSCHALTEN";
unlockHard = "\u00DCBERLEBE 30 KM, UM DEN SCHWEREN MODUS FREIZUSCHALTEN";
unlockVeryHard = "SCHWEREN MODUS";
break;
case 5 :
enterName = "WPISZ IMI\u0118";
player = "Gracz";
cpu = "KOMPUTER";
day = "Dzie\u0144";
levelUp = "Poziom w g\u00F3r\u0119!";
normal = "NORMALNY";
hard = "TRUDNY";
unlockEasy = "POKONAJ 30 KM, ABY ODBLOKOWA\u0106 TRYB NORMALNY";
unlockHard = "POKONAJ 30 KM, ABY ODBLOKOWA\u0106 TRYB TRUDNY";
unlockVeryHard = "TRYB TRUDNY";
break;
case 6 :
enterName = "ANGE NAMN";
player = "Spelare";
cpu = "DAT";
day = "Dag ";
levelUp = "Niv\u00E5 klarad!";
normal = "NORMAL";
hard = "SV\u00C5RT";
unlockEasy = "\u00D6VERLEV 30 KM F\u00D6R ATT L\u00C5SA UPP NORMALT L\u00C4GE";
unlockHard = "\u00D6VERLEV 30 KM F\u00D6R ATT L\u00C5SA UPP SV\u00C5RT L\u00C4GE";
unlockVeryHard = "SV\u00C5RT L\u00C4GE";
break;
case 7 :
enterName = "DIGITA NOME";
player = "Giocatore";
cpu = "PC";
day = "Giorno";
levelUp = "Nuovo livello!";
normal = "NORMALE";
hard = "DIFFICILE";
unlockEasy = "PERCORRI 30 KM E SBLOCCHI LA MODALIT\u00C0 NORMALE";
unlockHard = "PERCORRI 30 KM E SBLOCCHI LA MODALIT\u00C0 DIFFICILE";
unlockVeryHard = "MODALIT\u00C0 DIFFICILE";
break;
case 8 :
enterName = "";
player = "Jugador";
cpu = "CPU";
day = "D\u00EDa";
levelUp = "\u00A1Subes de nivel!";
normal = "NORMAL";
hard = "DIF\u00CDCIL";
unlockEasy = "SOBREVIVE 30KM PARA DESBLOQUEAR EL MODO NORMAL";
unlockHard = "SOBREVIVE 30KM PARA DESBLOQUEAR EL MODO DIF\u00CDCIL";
unlockVeryHard = "MODO DIF\u00CDCIL";
break;
case 9 :
enterName = "";
player = "Jogador";
cpu = "CPU";
day = "Dia";
levelUp = "Novo N\u00EDvel!";
normal = "NORMAL";
hard = "DIF\u00CDCIL";
unlockEasy = "SOBREVIVA 30 KM PARA LIBERAR MODO NORMAL";
unlockHard = "SOBREVIVA 30 KM PARA LIBERAR MODO DIF\u00CDCIL";
unlockVeryHard = "MODO DIF\u00CDCIL";
break;
case 10 :
enterName = "INSERIR NOME";
player = "Jogador";
cpu = "CPU";
day = "Dia";
levelUp = "N\u00EDvel acima!";
normal = "NORMAL";
hard = "DIF\u00CDCIL";
unlockEasy = "SOBREVIVA 30 KM PARA DESBLOQUEAR O MODO NORMAL";
unlockHard = "SOBREVIVA 30 KM PARA DESBLOQUEAR O MODO DIF\u00CDCIL";
unlockVeryHard = "MODO DIF\u00CDCIL";
break;
case 11 :
enterName = "\u0412\u041F\u0418\u0428\u0418\u0422\u0415 \u0418\u041C\u042F";
player = "\u0418\u0433\u0440\u043E\u043A";
cpu = "\u041A\u041E\u041C\u041F\u042C\u042E\u0422\u0415\u0420";
day = "\u0414\u0435\u043D\u044C";
levelUp = "\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0432\u0432\u0435\u0440\u0445!";
normal = "\u041D\u041E\u0420\u041C\u0410\u041B\u042C\u041D\u042B\u0419";
hard = "\u0422\u0420\u0423\u0414\u041D\u042B\u0419";
unlockEasy = "\u041F\u0420\u0415\u041E\u0414\u041E\u041B\u0415\u0419\u0422\u0415 30 \u041A\u041C, \u0427\u0422\u041E\u0411\u042B \u041E\u0422\u0411\u041B\u041E\u041A\u0418\u0420\u041E\u0412\u0410\u0422\u042C \u041D\u041E\u0420\u041C\u0410\u041B\u042C\u041D\u042B\u0419 \u0420\u0415\u0416\u0418\u041C";
unlockHard = "\u041F\u0420\u0415\u041E\u0414\u041E\u041B\u0415\u0419\u0422\u0415 30 \u041A\u041C, \u0427\u0422\u041E\u0411\u042B \u041E\u0422\u0411\u041B\u041E\u041A\u0418\u0420\u041E\u0412\u0410\u0422\u042C \u0422\u0420\u0423\u0414\u041D\u042B\u0419 \u0420\u0415\u0416\u0418\u041C";
unlockVeryHard = "\u0422\u0420\u0423\u0414\u041D\u042B\u0419 \u0420\u0415\u0416\u0418\u041C";
break;
case 12 :
enterName = "";
player = "Pemain";
cpu = "KOMPUTER";
day = "Hari";
levelUp = "Level-naik!";
normal = "SUKAR";
hard = "SKOR";
unlockEasy = "BERTAHAN SELAMA 30 KM UNTUK MEMBUKA MODE NORMAL";
unlockHard = "BERTAHAN SELAMA 30 KM UNTUK MEMBUKA MODE SUKAR";
unlockVeryHard = "MODE SUKAR";
break;
case 13 :
enterName = "\u8F93\u5165\u59D3\u540D";
player = "Player";
cpu = "CPU";
day = "Day";
levelUp = "\u5347\u7EA7";
normal = "\u4E00\u822C";
hard = "\u56F0\u96BE";
unlockEasy = "\u98DE\u884C 30KM \u89E3\u9501\u201C\u4E00\u822C\u201C\u5173\u5361";
unlockHard = "\u98DE\u884C 30KM \u89E3\u9501\u201C\u56F0\u96BE\u201C\u5173\u5361";
unlockVeryHard = "\u4F60\u80FD\u98DE\u591A\u8FDC\uFF1F";
}
stop();
fscommand ("allowscale", false);
fscommand ("showmenu", false);
var currentScore;
var level;
var qualityNum;
var soundNum;
var callBack = this;
var VOLUME = 100;
var VOLUME_BG = 50;
var music1IsPlaying = false;
var da = SharedObject.getLocal("shareObject20");
if (da.getSize() == 0) {
var initScoreArr = [{name:cpu, score:150000}, {name:cpu, score:120000}, {name:cpu, score:100000}, {name:cpu, score:70000}, {name:cpu, score:50000}, {name:cpu, score:20000}, {name:cpu, score:10000}, {name:cpu, score:6000}, {name:cpu, score:4000}, {name:cpu, score:2000}];
da.data.arr = new Array();
var temp = new Array();
da.data.arr = initScoreArr.concat(temp);
da.data.personal = 0;
da.data.level = 1;
da.data.lastName = "";
}
percent = 0;
totalBytes = _root.getBytesTotal();
this.onEnterFrame = function () {
if (percent < 100) {
percent = Math.round((_root.getBytesLoaded() / totalBytes) * 100);
loading_mc.loadingBar_mc.cover_mc._x = (percent / 100) * loading_mc.loadingBar_mc.cover_mc._width;
} else {
delete this.onEnterFrame;
gotoAndStop (3);
}
};
this.loading_mc.moreGames_btn.onRelease = function () {
getURL (_root.localization_url1, "_blank");
_root.btnRelease();
};
this.loading_mc.logo_mc.onRelease = function () {
getURL (_root.localization_url1, "_blank");
};
Frame 3
stop();
if (!firstrun) {
_quality = "MEDIUM";
_root.qualityNum = 2;
this.mainmenu_mc.qualityBtn_mc.gotoAndStop(2);
firstrun = 1;
}
if (!sound) {
var sound = (new as.Sounds(_root));
}
if (!music1IsPlaying) {
backgroundMusic1();
}
this.mainmenu_mc.soundBtn_mc.gotoAndStop(_root.soundNum);
this.mainmenu_mc.qualityBtn_mc.gotoAndStop(_root.qualityNum);
this.mainmenu_mc.soundBtn_mc.onRelease = function () {
if (this._currentframe == 1) {
_root.soundNum = 2;
_root.sound.soundEnabled = false;
_root.sound.FadeMusic();
this.gotoAndStop(2);
} else if (this._currentframe == 2) {
_root.soundNum = 1;
_root.sound.soundEnabled = true;
_root.backgroundMusic1();
_root.music1IsPlaying = true;
this.gotoAndStop(1);
}
};
this.mainmenu_mc.qualityBtn_mc.onRelease = function () {
if (this._currentframe == 1) {
_quality = "MEDIUM";
_root.qualityNum = 2;
this.gotoAndStop(2);
} else if (this._currentframe == 2) {
_quality = "LOW";
_root.qualityNum = 3;
this.gotoAndStop(3);
} else if (this._currentframe == 3) {
_quality = "HIGH";
_root.qualityNum = 1;
this.gotoAndStop(1);
}
};
this.mainmenu_mc.logo_mc.onRelease = function () {
getURL (_root.localization_url1, "_blank");
};
Frame 4
stop();
this.gameOver_mc.yourScore_txt.text = _root.currentScore;
if (da.data.lastName == "") {
this.gameOver_mc.yourName_txt.text = enterName;
} else {
this.gameOver_mc.yourName_txt.text = da.data.lastName;
}
this.gameOver_mc.yourName_txt.onSetFocus = function () {
if (this.text == enterName) {
this.text = "";
}
};
this.gameOver_mc.yourName_txt.onKillFocus = function () {
if (this.text == "") {
this.text = enterName;
}
};
this.gameOver_mc.submitScore_btn.onRelease = function () {
if ((_root.gameOver_mc.yourName_txt.text != enterName) && (_root.gameOver_mc.yourName_txt.text != "")) {
_root.da.data.lastName = _root.gameOver_mc.yourName_txt.text;
}
var _local2 = new Object();
if ((_root.gameOver_mc.yourName_txt.text == "") || (_root.gameOver_mc.yourName_txt.text == enterName)) {
_local2.name = player;
} else {
_local2.name = _root.gameOver_mc.yourName_txt.text;
}
_local2.score = Number(_root.gameOver_mc.yourScore_txt.text);
_root.da.data.arr.push(_local2);
if (_local2.score > _root.da.data.personal) {
_root.da.data.personal = _local2.score;
}
_root.btnRelease();
_root.stopGameOverMusic();
_root.backgroundMusic1();
_root.gotoAndStop("highScore");
};
this.gameOver_mc.moreGames_btn.onRelease = function () {
getURL (_root.localization_url1, "_blank");
_root.btnRelease();
};
this.gameOver_mc.logo_mc.onRelease = function () {
getURL (_root.localization_url1, "_blank");
};
Frame 5
stop();
var temp_mc = this.submitScore_mc.paiMing_mc.txt_mc;
var temp_arr = da.data.arr;
temp_arr.sortOn("score", Array.DESCENDING | Array.NUMERIC);
var j = 0;
while (j < 10) {
temp_mc["name_" + (j + 1)].text = temp_arr[j].name;
temp_mc["score_" + (j + 1)].text = temp_arr[j].score;
if (temp_mc["score_" + (j + 1)].text == _root.currentScore) {
temp_mc["new_" + (j + 1)]._alpha = 100;
} else {
temp_mc["new_" + (j + 1)]._alpha = 0;
}
j++;
}
this.submitScore_mc.back_btn.onRelease = function () {
_root.btnRelease();
_root.gotoAndPlay("mainmenu");
};
this.submitScore_mc.back_btn.onRollOver = function () {
_root.btnRollOver();
};
Frame 6
stop();
Frame 7
stop();
currentScore = 0;
da.data.arr.sortOn("score", Array.DESCENDING | Array.NUMERIC);
this.scoreBar_mc.record_txt.text = _root.da.data.personal;
as.Game.main(this.game_mc);
if (_root.level == 1) {
stopBGMusic();
easyMusic();
} else if (_root.level == 2) {
stopBGMusic();
normalMusic();
} else if (_root.level == 3) {
stopBGMusic();
hardMusic();
}
ground_top_2_mc._x = ground_top_2_mc._width;
ground_top_2_mc._y = 0;
Symbol 27 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 65 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 76 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 88 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 102 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 120 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 154 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 167 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 210 MovieClip Frame 1
gotoAndStop(_root.localization_branding_nr);
Instance of Symbol 171 MovieClip in Symbol 210 MovieClip Frame 1
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 174 MovieClip in Symbol 210 MovieClip Frame 2
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 177 MovieClip in Symbol 210 MovieClip Frame 3
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 180 MovieClip in Symbol 210 MovieClip Frame 4
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 183 MovieClip in Symbol 210 MovieClip Frame 5
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 186 MovieClip in Symbol 210 MovieClip Frame 6
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 189 MovieClip in Symbol 210 MovieClip Frame 7
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 192 MovieClip in Symbol 210 MovieClip Frame 8
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 195 MovieClip in Symbol 210 MovieClip Frame 9
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 198 MovieClip in Symbol 210 MovieClip Frame 10
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 201 MovieClip in Symbol 210 MovieClip Frame 11
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 204 MovieClip in Symbol 210 MovieClip Frame 12
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 207 MovieClip in Symbol 210 MovieClip Frame 15
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 209 MovieClip in Symbol 210 MovieClip Frame 16
on (release) {
getURL (_root.localization_url1, "_blank");
}
Symbol 1271 MovieClip [__Packages.as.Sounds] Frame 0
class as.Sounds
{
var dmc, sounds, soundsmc, currentMusicName;
function Sounds (mc) {
dmc = mc.createEmptyMovieClip("sounds", mc.getNextHighestDepth());
Init();
}
function CreateSound(soundName) {
var _local2 = dmc.createEmptyMovieClip(soundName, dmc.getNextHighestDepth());
_local2.isPlaying = false;
var _local3 = new Sound(_local2);
_local3.attachSound(soundName);
sounds[soundName] = _local3;
soundsmc[soundName] = _local2;
}
function Init() {
sounds = new Array();
soundsmc = new Array();
CreateSound("btnRelease_wav");
CreateSound("btnRollOver_wav");
CreateSound("UIupdate_wav");
CreateSound("btnRollOverStar_wav");
CreateSound("mainscreen_mp3");
CreateSound("easy_music_mp3");
CreateSound("normal_music_mp3");
CreateSound("hard_music_mp3");
CreateSound("eat_wav");
CreateSound("eatPower_wav");
CreateSound("catchUp_wav");
CreateSound("catchUpPower_wav");
CreateSound("putInArm_wav");
CreateSound("putOutArm_wav");
CreateSound("displayPelsEffect_wav");
CreateSound("updataDayNight_wav");
CreateSound("supertime_wav");
CreateSound("game_over_mp3");
}
function PlaySound(soundName, Volume) {
if (Volume == null) {
Volume = 100;
}
if (soundEnabled) {
var mc = soundsmc[soundName];
mc.onEnterFrame = null;
var _local2 = sounds[soundName];
_local2.stop();
_local2.setVolume(Volume);
_local2.start(0, 1);
mc.isPlaying = true;
_local2.onSoundComplete = function () {
mc.isPlaying = false;
};
}
}
function StopSound(soundName) {
var _local3 = sounds[soundName];
var _local2 = soundsmc[soundName];
_local3.stop();
_local2.isPlaying = false;
}
function LoopSound(soundName, Volume) {
if (Volume == null) {
Volume = 100;
}
if (soundEnabled) {
var _local3 = sounds[soundName];
var _local2 = soundsmc[soundName];
if (!_local2.isPlaying) {
_local2.isPlaying = true;
_local3.start(0, 1);
_local3.onSoundComplete = function () {
this.start(0, 1);
};
} else {
FadeVolume(soundName, true, false, 3, Volume);
}
}
}
function playSpeedUp() {
var _local3 = sounds.speedUp;
var _local2 = soundsmc.speedUp;
if (!_local2.isPlaying) {
_local2.isPlaying = true;
_local3.start();
var owner = this;
_local3.onSoundComplete = function () {
owner.LoopKeepUp();
};
}
}
function LoopKeepUp() {
var _local3 = sounds.keepUp;
var _local2 = soundsmc.keepUp;
if (!_local2.isPlaying) {
_local2.isPlaying = true;
_local3.start(0, 1);
_local3.onSoundComplete = function () {
this.start(0, 1);
};
}
}
function playSpeedDown() {
var _local5 = sounds.speedUp;
var _local2 = soundsmc.speedUp;
var _local7 = sounds.keepUp;
var _local3 = soundsmc.keepUp;
if (_local2.isPlaying) {
_local5.stop();
_local2.isPlaying = false;
}
if (_local3.isPlaying) {
_local7.stop();
_local3.isPlaying = false;
var _local4 = sounds.speedDown;
var _local6 = soundsmc.speedDown;
_local4.start(0, 1);
_local6.isPlaying = true;
var owner = this;
_local4.onSoundComplete = function () {
owner.soundsmc.speedUp.isPlaying = false;
};
}
}
function StartMusic(musicName, Volume) {
if (Volume == null) {
Volume = 40;
}
if (soundEnabled) {
var _local3 = soundsmc[musicName];
_local3.onEnterFrame = null;
var _local2 = sounds[musicName];
_local2.stop();
_local2.setVolume(Volume);
_local2.start(0, 999);
}
currentMusicName = musicName;
}
function FadeMusic() {
if (currentMusicName != null) {
FadeVolume(currentMusicName, false, false, 1);
currentMusicName = null;
}
}
function ToggleSound(mc) {
soundEnabled = !soundEnabled;
if (soundEnabled) {
mc.gotoAndStop("on");
if (currentMusicName != null) {
StartMusic(currentMusicName);
}
} else {
mc.gotoAndStop("off");
for (var _local2 in sounds) {
FadeVolume(_local2, false, false, null);
}
}
}
function FadeVolume(soundName, louder, fromStart, speed, Volume) {
if (speed == null) {
speed = 3;
}
if (Volume == null) {
Volume = 100;
}
var snd = sounds[soundName];
var _local2 = soundsmc[soundName];
if (fromStart) {
if (louder) {
snd.setVolume(1);
snd.start(0, 1);
_local2.isPlaying = true;
} else {
snd.setVolume(Volume - 1);
}
}
if (louder) {
_local2.onEnterFrame = function () {
snd.setVolume(snd.getVolume() + speed);
if (snd.getVolume() >= (Volume - 1)) {
snd.setVolume(Volume);
delete this.onEnterFrame;
}
};
} else {
_local2.onEnterFrame = function () {
snd.setVolume(snd.getVolume() - speed);
if (snd.getVolume() <= 0) {
snd.stop();
snd.setVolume(Volume);
this.isPlaying = false;
delete this.onEnterFrame;
}
};
}
}
var soundEnabled = true;
}
Symbol 1272 MovieClip [__Packages.as.Game] Frame 0
class as.Game
{
var rootMc, basicSpeed, initSpeed, coinNum, powerNum, powerFull, days, pels, upWallNum, powerFullTimes, displayPelsTimes, speedUpTimes, topWallArr, middleWallArr, bottomWallArr, rainbowArr, coinArr, engine, ui, spider, updataDayInterval, mouseDownVector, dynamicSpeed, startLevel, level, speedupNum, speedupBiggest, probability_Upright_top, probabliity_Level_top, probability_Upright_middle, probabliity_Level_middle, probability_Upright_bottom, probabliity_Level_bottom, sphere_top, sphere_middle, sphere_bottom, speedupPels, react_middle, upWallNum_max;
function Game (mc) {
setLevel();
rootMc = mc;
basicSpeed = initSpeed;
coinNum = 0;
powerNum = 0;
powerFull = false;
days = 0;
pels = 0;
upWallNum = 0;
powerFullTimes = 0;
displayPelsTimes = 0;
speedUpTimes = 0;
topWallArr = new Array();
middleWallArr = new Array();
bottomWallArr = new Array();
rainbowArr = new Array();
coinArr = new Array();
engine = new org.cove.flade.DynamicsEngine();
engine.setDamping(0.95);
engine.setGravity(0, 0.2);
engine.setSurfaceBounce(0.05);
engine.setSurfaceFriction(0.1);
ui = new as.UI(this);
spider = new as.actor.Spider(this);
new as.prop.BottomWall(this, 100, 385, 7);
new as.prop.BottomWall(this, 270, 385, 7);
new as.prop.BottomWall(this, 440, 385, 7);
new as.prop.BottomWall(this);
new as.prop.TopWall(this, 100, 50);
new as.prop.TopWall(this, 400, 80);
new as.prop.TopWall(this);
new as.prop.MiddleWall(this);
new as.prop.Coin(this, 350, null, true);
new as.prop.Rainbow(this, 500, null, true);
updataDayInterval = setInterval(this, "updataDay", 30000);
}
function run() {
as.tools.Timer.run();
updataGravity();
updataDynamicSpeed();
reducePower();
checkVanish();
checkCreate();
var _local6 = 0;
while (_local6 < middleWallArr.length) {
middleWallArr[_local6].run();
_local6++;
}
var _local5 = 0;
while (_local5 < topWallArr.length) {
topWallArr[_local5].run();
_local5++;
}
var _local4 = 0;
while (_local4 < bottomWallArr.length) {
bottomWallArr[_local4].run();
_local4++;
}
var _local3 = 0;
while (_local3 < rainbowArr.length) {
rainbowArr[_local3].run();
_local3++;
}
var _local2 = 0;
while (_local2 < coinArr.length) {
coinArr[_local2].run();
_local2++;
}
spider.run();
engine.timeStep();
updataPels();
updataLevel();
displayPels();
speedUp();
checkGameOver();
ui.run();
}
function onMouseDown() {
mouseDownVector = new org.cove.flade.util.Vector(rootMc._xmouse, rootMc._ymouse);
spider.onMouseDown();
}
static function main(mc) {
var c = (new as.Game(mc));
Mouse.addListener(c);
mc.onEnterFrame = function () {
c.run();
};
}
function updataGravity() {
if (spider.body.curr.y <= (spider.body.prev.y - 1)) {
engine.setGravity(0, -0.025);
} else {
engine.setGravity(0, 0.4);
}
}
function updataDynamicSpeed() {
if (spider.body.curr.x > SPEEDUPBOUNDARY) {
dynamicSpeed = basicSpeed + (((spider.body.curr.x - SPEEDUPBOUNDARY) / 100) * ACCELERATION);
} else {
dynamicSpeed = basicSpeed;
}
}
function updataDay() {
days = days + 0.5;
ui.updataBottomGround();
if ((days % 1) == 0) {
ui.addDaysEffect();
}
}
function updataPels() {
pels = pels + dynamicSpeed;
}
function updataLevel() {
if ((pels > (riseLevelPels * ((level - startLevel) + 1))) && (level < 3)) {
level++;
if (level == 2) {
if (_root.da.data.level < 2) {
_root.da.data.level = 2;
}
if (_root.sound.currentMusicName != "supertime_wav") {
_root.sound.FadeMusic();
as.tools.Timer.AddTimer(_root, "normalMusic", 1000);
}
} else if (level == 3) {
if (_root.da.data.level < 3) {
_root.da.data.level = 3;
}
if (_root.sound.currentMusicName != "supertime_wav") {
_root.sound.FadeMusic();
as.tools.Timer.AddTimer(_root, "hardMusic", 1000);
}
}
ui.addLevelEffect();
ui.addMupaiEffect();
}
if (_root.level == 1) {
speedupNum = speedupNum + (((end_speedupNum - easy_speedupNum) / riseLevelPels_easy) * dynamicSpeed);
speedupBiggest = speedupBiggest + (((end_speedupBiggest - easy_speedupBiggest) / riseLevelPels_easy) * dynamicSpeed);
probability_Upright_top = probability_Upright_top + (((end_probability_Upright_top - easy_probability_Upright_top) / riseLevelPels_easy) * dynamicSpeed);
probabliity_Level_top = probabliity_Level_top + (((end_probabliity_Level_top - easy_probabliity_Level_top) / riseLevelPels_easy) * dynamicSpeed);
probability_Upright_middle = probability_Upright_middle + (((end_probability_Upright_middle - easy_probability_Upright_middle) / riseLevelPels_easy) * dynamicSpeed);
probabliity_Level_middle = probabliity_Level_middle + (((end_probabliity_Level_middle - easy_probabliity_Level_middle) / riseLevelPels_easy) * dynamicSpeed);
probability_Upright_bottom = probability_Upright_bottom + (((end_probability_Upright_bottom - easy_probability_Upright_bottom) / riseLevelPels_easy) * dynamicSpeed);
probabliity_Level_bottom = probabliity_Level_bottom + (((end_probabliity_Level_bottom - easy_probabliity_Level_bottom) / riseLevelPels_easy) * dynamicSpeed);
sphere_top.maxX = sphere_top.maxX + (((end_sphere_top_max_x - easy_sphere_top_max_x) / riseLevelPels_easy) * dynamicSpeed);
sphere_top.minX = sphere_top.minX + (((end_sphere_top_min_x - easy_sphere_top_min_x) / riseLevelPels_easy) * dynamicSpeed);
sphere_middle.maxX = sphere_middle.maxX + (((end_sphere_middle_max_x - easy_sphere_middle_max_x) / riseLevelPels_easy) * dynamicSpeed);
sphere_middle.minX = sphere_middle.minX + (((end_sphere_middle_min_x - easy_sphere_middle_min_x) / riseLevelPels_easy) * dynamicSpeed);
sphere_bottom.maxX = sphere_bottom.maxX + (((end_sphere_bottom_max_x - easy_sphere_bottom_max_x) / riseLevelPels_easy) * dynamicSpeed);
sphere_bottom.minX = sphere_bottom.minX + (((end_sphere_bottom_min_x - easy_sphere_bottom_min_x) / riseLevelPels_easy) * dynamicSpeed);
} else if (_root.level == 2) {
speedupNum = speedupNum + (((end_speedupNum - normal_speedupNum) / riseLevelPels_normal) * dynamicSpeed);
speedupBiggest = speedupBiggest + (((end_speedupBiggest - normal_speedupBiggest) / riseLevelPels_normal) * dynamicSpeed);
probability_Upright_top = probability_Upright_top + (((end_probability_Upright_top - normal_probability_Upright_top) / riseLevelPels_normal) * dynamicSpeed);
probabliity_Level_top = probabliity_Level_top + (((end_probabliity_Level_top - normal_probabliity_Level_top) / riseLevelPels_normal) * dynamicSpeed);
probability_Upright_middle = probability_Upright_middle + (((end_probability_Upright_middle - normal_probability_Upright_middle) / riseLevelPels_normal) * dynamicSpeed);
probabliity_Level_middle = probabliity_Level_middle + (((end_probabliity_Level_middle - normal_probabliity_Level_middle) / riseLevelPels_normal) * dynamicSpeed);
probability_Upright_bottom = probability_Upright_bottom + (((end_probability_Upright_bottom - normal_probability_Upright_bottom) / riseLevelPels_normal) * dynamicSpeed);
probabliity_Level_bottom = probabliity_Level_bottom + (((end_probabliity_Level_bottom - normal_probabliity_Level_bottom) / riseLevelPels_normal) * dynamicSpeed);
sphere_top.maxX = sphere_top.maxX + (((end_sphere_top_max_x - normal_sphere_top_max_x) / riseLevelPels_normal) * dynamicSpeed);
sphere_top.minX = sphere_top.minX + (((end_sphere_top_min_x - normal_sphere_top_min_x) / riseLevelPels_normal) * dynamicSpeed);
sphere_middle.maxX = sphere_middle.maxX + (((end_sphere_middle_max_x - normal_sphere_middle_max_x) / riseLevelPels_normal) * dynamicSpeed);
sphere_middle.minX = sphere_middle.minX + (((end_sphere_middle_min_x - normal_sphere_middle_min_x) / riseLevelPels_normal) * dynamicSpeed);
sphere_bottom.maxX = sphere_bottom.maxX + (((end_sphere_bottom_max_x - normal_sphere_bottom_max_x) / riseLevelPels_normal) * dynamicSpeed);
sphere_bottom.minX = sphere_bottom.minX + (((end_sphere_bottom_min_x - normal_sphere_bottom_min_x) / riseLevelPels_normal) * dynamicSpeed);
} else if (_root.level == 3) {
speedupNum = speedupNum + (((end_speedupNum - hard_speedupNum) / riseLevelPels_hard) * dynamicSpeed);
speedupBiggest = speedupBiggest + (((end_speedupBiggest - hard_speedupBiggest) / riseLevelPels_hard) * dynamicSpeed);
probability_Upright_top = probability_Upright_top + (((end_probability_Upright_top - hard_probability_Upright_top) / riseLevelPels_hard) * dynamicSpeed);
probabliity_Level_top = probabliity_Level_top + (((end_probabliity_Level_top - hard_probabliity_Level_top) / riseLevelPels_hard) * dynamicSpeed);
probability_Upright_middle = probability_Upright_middle + (((end_probability_Upright_middle - hard_probability_Upright_middle) / riseLevelPels_hard) * dynamicSpeed);
probabliity_Level_middle = probabliity_Level_middle + (((end_probabliity_Level_middle - hard_probabliity_Level_middle) / riseLevelPels_hard) * dynamicSpeed);
probability_Upright_bottom = probability_Upright_bottom + (((end_probability_Upright_bottom - hard_probability_Upright_bottom) / riseLevelPels_hard) * dynamicSpeed);
probabliity_Level_bottom = probabliity_Level_bottom + (((end_probabliity_Level_bottom - hard_probabliity_Level_bottom) / riseLevelPels_hard) * dynamicSpeed);
sphere_top.maxX = sphere_top.maxX + (((end_sphere_top_max_x - hard_sphere_top_max_x) / riseLevelPels_hard) * dynamicSpeed);
sphere_top.minX = sphere_top.minX + (((end_sphere_top_min_x - hard_sphere_top_min_x) / riseLevelPels_hard) * dynamicSpeed);
sphere_middle.maxX = sphere_middle.maxX + (((end_sphere_middle_max_x - hard_sphere_middle_max_x) / riseLevelPels_hard) * dynamicSpeed);
sphere_middle.minX = sphere_middle.minX + (((end_sphere_middle_min_x - hard_sphere_middle_min_x) / riseLevelPels_hard) * dynamicSpeed);
sphere_bottom.maxX = sphere_bottom.maxX + (((end_sphere_bottom_max_x - hard_sphere_bottom_max_x) / riseLevelPels_hard) * dynamicSpeed);
sphere_bottom.minX = sphere_bottom.minX + (((end_sphere_bottom_min_x - hard_sphere_bottom_min_x) / riseLevelPels_hard) * dynamicSpeed);
}
}
function addPowerNum() {
powerNum++;
ui.updataPowerNum();
if (powerNum == POWERFULL_NUM) {
powerFullTimes++;
powerFull = true;
var _local3 = rainbowArr.length;
var _local2 = 0;
while (_local2 < _local3) {
rainbowArr[0].del();
_local2++;
}
as.tools.Timer.AddCycleTimer(this, "throwInCoin", 600, 20);
ui.stopBGMusic();
ui.supertime();
}
}
function reducePower() {
if (_root.powerBar_mc._currentframe == 50) {
if (_root.powerBar_mc.mask_mc._x > -224.7) {
ui.reducePower();
} else {
_root.powerBar_mc.mask_mc._x = 0;
powerFull = false;
new as.prop.Rainbow(this);
if (level == 1) {
ui.stopBGMusic();
_root.easyMusic();
} else if (level == 2) {
ui.stopBGMusic();
_root.normalMusic();
} else if (level == 3) {
ui.stopBGMusic();
_root.hardMusic();
}
powerNum = 0;
ui.updataPowerNum();
}
}
}
function checkVanish() {
var _local6 = 0;
while (_local6 <= topWallArr.length) {
if (topWallArr[_local6].x < VANISHBOUNDARY) {
topWallArr[_local6].vanish();
}
_local6++;
}
var _local5 = 0;
while (_local5 <= middleWallArr.length) {
if (middleWallArr[_local5].x < VANISHBOUNDARY) {
middleWallArr[_local5].vanish();
}
_local5++;
}
var _local4 = 0;
while (_local4 <= bottomWallArr.length) {
if (bottomWallArr[_local4].x < VANISHBOUNDARY) {
bottomWallArr[_local4].vanish();
}
_local4++;
}
var _local3 = 0;
while (_local3 <= coinArr.length) {
if (coinArr[_local3].x < VANISHBOUNDARY) {
coinArr[_local3].vanish();
}
_local3++;
}
var _local2 = 0;
while (_local2 <= rainbowArr.length) {
if (rainbowArr[_local2].x < VANISHBOUNDARY) {
rainbowArr[_local2].vanish();
}
_local2++;
}
}
function checkCreate() {
var _local6 = 0;
while (_local6 <= topWallArr.length) {
if (topWallArr[_local6].allowCreateNext) {
if ((topWallArr[_local6].x + (topWallArr[_local6].width / 2)) < CREATEBOUNDARY_WALL) {
new as.prop.TopWall(this);
topWallArr[_local6].allowCreateNext = false;
}
}
_local6++;
}
var _local5 = 0;
while (_local5 <= middleWallArr.length) {
if (middleWallArr[_local5].allowCreateNext) {
if ((middleWallArr[_local5].x + (middleWallArr[_local5].width / 2)) < CREATEBOUNDARY_WALL) {
new as.prop.MiddleWall(this);
middleWallArr[_local5].allowCreateNext = false;
}
}
_local5++;
}
var _local4 = 0;
while (_local4 <= bottomWallArr.length) {
if (bottomWallArr[_local4].allowCreateNext) {
if ((bottomWallArr[_local4].x + (bottomWallArr[_local4].width / 2)) < CREATEBOUNDARY_WALL) {
new as.prop.BottomWall(this);
bottomWallArr[_local4].allowCreateNext = false;
}
}
_local4++;
}
var _local3 = 0;
while (_local3 <= coinArr.length) {
if (((coinArr[_local3].x + (coinArr[_local3].WIDTH / 2)) < CREATEBOUNDARY_PROP) && (coinArr[_local3].allowCreateNext)) {
new as.prop.Coin(this);
coinArr[_local3].allowCreateNext = false;
}
_local3++;
}
var _local2 = 0;
while (_local2 <= rainbowArr.length) {
if (((rainbowArr[_local2].x + (rainbowArr[_local2].WIDTH / 2)) < CREATEBOUNDARY_PROP) && (rainbowArr[_local2].allowCreateNext)) {
new as.prop.Rainbow(this);
rainbowArr[_local2].allowCreateNext = false;
}
_local2++;
}
}
function speedUp() {
if (basicSpeed < speedupBiggest) {
if ((pels - (speedUpTimes * speedupPels)) > speedupPels) {
speedUpTimes++;
basicSpeed = basicSpeed + speedupNum;
}
}
}
function displayPels() {
if ((pels - (displayPelsTimes * DISPLAYPELSES)) > DISPLAYPELSES) {
displayPelsTimes++;
ui.addPelsEffect();
}
}
function checkGameOver() {
if ((spider.body.curr.x < LFETOVERBOUNDARY) || (spider.body.curr.y > BOTTOMOVERBOUNDARY)) {
gameOver();
}
}
function throwInCoin() {
new as.prop.Coin(this, 600, null, false);
}
function gameOver() {
var _local6 = 0;
while (_local6 < topWallArr.length) {
topWallArr[_local6].del();
delete topWallArr[_local6];
_local6++;
}
var _local5 = 0;
while (_local5 < middleWallArr.length) {
middleWallArr[_local5].del();
delete middleWallArr[_local5];
_local5++;
}
var _local4 = 0;
while (_local4 < bottomWallArr.length) {
bottomWallArr[_local4].del();
delete bottomWallArr[_local4];
_local4++;
}
var _local3 = 0;
while (_local3 < coinArr.length) {
coinArr[_local3].del();
delete coinArr[_local3];
_local3++;
}
var _local2 = 0;
while (_local2 < rainbowArr.length) {
rainbowArr[_local2].del();
delete rainbowArr[_local2];
_local2++;
}
spider.del();
clearInterval(updataDayInterval);
engine.del();
delete engine;
delete eval (onMouseDown());
delete eval (rootMc.onEnterFrame());
rootMc.removeMovieClip();
ui.gameOver();
}
function setLevel() {
switch (_root.level) {
case 1 :
level = 1;
startLevel = 1;
initSpeed = easy_initSpeed;
speedupPels = easy_speedupPels;
speedupNum = easy_speedupNum;
speedupBiggest = easy_speedupBiggest;
probability_Upright_top = easy_probability_Upright_top;
probabliity_Level_top = easy_probabliity_Level_top;
probability_Upright_middle = easy_probability_Upright_middle;
probabliity_Level_middle = easy_probabliity_Level_middle;
probability_Upright_bottom = easy_probability_Upright_bottom;
probabliity_Level_bottom = easy_probabliity_Level_bottom;
sphere_top = new as.tools.Sphere(easy_sphere_middle_min_x, easy_sphere_top_max_x, easy_sphere_top_min_y, easy_sphere_top_max_y);
sphere_middle = new as.tools.Sphere(easy_sphere_middle_min_x, easy_sphere_middle_max_x, easy_sphere_middle_min_y, easy_sphere_middle_max_y);
sphere_bottom = new as.tools.Sphere(easy_sphere_bottom_min_x, easy_sphere_bottom_max_x, easy_sphere_bottom_min_y, easy_sphere_bottom_max_y);
react_middle = easy_react_middle;
upWallNum_max = easy_upWallNum_max;
break;
case 2 :
level = 2;
startLevel = 2;
initSpeed = normal_initSpeed;
speedupPels = normal_speedupPels;
speedupNum = normal_speedupNum;
speedupBiggest = normal_speedupBiggest;
probability_Upright_top = normal_probability_Upright_top;
probabliity_Level_top = normal_probabliity_Level_top;
probability_Upright_middle = normal_probability_Upright_middle;
probabliity_Level_middle = normal_probabliity_Level_middle;
probability_Upright_bottom = normal_probability_Upright_bottom;
probabliity_Level_bottom = normal_probabliity_Level_bottom;
sphere_top = new as.tools.Sphere(normal_sphere_middle_min_x, normal_sphere_top_max_x, normal_sphere_top_min_y, normal_sphere_top_max_y);
sphere_middle = new as.tools.Sphere(normal_sphere_middle_min_x, normal_sphere_middle_max_x, normal_sphere_middle_min_y, normal_sphere_middle_max_y);
sphere_bottom = new as.tools.Sphere(normal_sphere_bottom_min_x, normal_sphere_bottom_max_x, normal_sphere_bottom_min_y, normal_sphere_bottom_max_y);
react_middle = normal_react_middle;
upWallNum_max = normal_upWallNum_max;
break;
case 3 :
level = 3;
startLevel = 3;
initSpeed = hard_initSpeed;
speedupPels = hard_speedupPels;
speedupNum = hard_speedupNum;
speedupBiggest = hard_speedupBiggest;
probability_Upright_top = hard_probability_Upright_top;
probabliity_Level_top = hard_probabliity_Level_top;
probability_Upright_middle = hard_probability_Upright_middle;
probabliity_Level_middle = hard_probabliity_Level_middle;
probability_Upright_bottom = hard_probability_Upright_bottom;
probabliity_Level_bottom = hard_probabliity_Level_bottom;
sphere_top = new as.tools.Sphere(hard_sphere_middle_min_x, hard_sphere_top_max_x, hard_sphere_top_min_y, hard_sphere_top_max_y);
sphere_middle = new as.tools.Sphere(hard_sphere_middle_min_x, hard_sphere_middle_max_x, hard_sphere_middle_min_y, hard_sphere_middle_max_y);
sphere_bottom = new as.tools.Sphere(hard_sphere_bottom_min_x, hard_sphere_bottom_max_x, hard_sphere_bottom_min_y, hard_sphere_bottom_max_y);
react_middle = hard_react_middle;
upWallNum_max = hard_upWallNum_max;
}
}
var easy_initSpeed = 0.5;
var easy_speedupPels = 5000;
var easy_speedupNum = 0.35;
var easy_speedupBiggest = 5;
var easy_probability_Upright_top = 0;
var easy_probabliity_Level_top = 0.8;
var easy_probability_Upright_middle = 0;
var easy_probabliity_Level_middle = 0;
var easy_probability_Upright_bottom = 0;
var easy_probabliity_Level_bottom = 0.95;
var easy_sphere_top_max_x = 580;
var easy_sphere_top_min_x = 550;
var easy_sphere_top_max_y = 100;
var easy_sphere_top_min_y = 20;
var easy_sphere_middle_max_x = 2000;
var easy_sphere_middle_min_x = 600;
var easy_sphere_middle_max_y = 250;
var easy_sphere_middle_min_y = 150;
var easy_sphere_bottom_max_x = 600;
var easy_sphere_bottom_min_x = 550;
var easy_sphere_bottom_max_y = 400;
var easy_sphere_bottom_min_y = 320;
var easy_react_middle = true;
var easy_upWallNum_max = 1;
var normal_initSpeed = 1;
var normal_speedupPels = 5000;
var normal_speedupNum = 0.45;
var normal_speedupBiggest = 6;
var normal_probability_Upright_top = 0.05;
var normal_probabliity_Level_top = 0.4;
var normal_probability_Upright_middle = 0;
var normal_probabliity_Level_middle = 0;
var normal_probability_Upright_bottom = 0.05;
var normal_probabliity_Level_bottom = 0.45;
var normal_sphere_top_max_x = 850;
var normal_sphere_top_min_x = 550;
var normal_sphere_top_max_y = 100;
var normal_sphere_top_min_y = 20;
var normal_sphere_middle_max_x = 1200;
var normal_sphere_middle_min_x = 600;
var normal_sphere_middle_max_y = 250;
var normal_sphere_middle_min_y = 170;
var normal_sphere_bottom_max_x = 800;
var normal_sphere_bottom_min_x = 600;
var normal_sphere_bottom_max_y = 400;
var normal_sphere_bottom_min_y = 320;
var normal_react_middle = true;
var normal_upWallNum_max = 1;
var hard_initSpeed = 1;
var hard_speedupPels = 5000;
var hard_speedupNum = 1;
var hard_speedupBiggest = 6;
var hard_probability_Upright_top = 0.4;
var hard_probabliity_Level_top = 0.2;
var hard_probability_Upright_middle = 0;
var hard_probabliity_Level_middle = 0;
var hard_probability_Upright_bottom = 0.45;
var hard_probabliity_Level_bottom = 0.2;
var hard_sphere_top_max_x = 660;
var hard_sphere_top_min_x = 650;
var hard_sphere_top_max_y = 100;
var hard_sphere_top_min_y = 20;
var hard_sphere_middle_max_x = 900;
var hard_sphere_middle_min_x = 600;
var hard_sphere_middle_max_y = 230;
var hard_sphere_middle_min_y = 180;
var hard_sphere_bottom_max_x = 860;
var hard_sphere_bottom_min_x = 800;
var hard_sphere_bottom_max_y = 400;
var hard_sphere_bottom_min_y = 320;
var hard_react_middle = true;
var hard_upWallNum_max = 1;
var end_initSpeed = 1;
var end_speedupPels = 5000;
var end_speedupNum = 1;
var end_speedupBiggest = 10;
var end_probability_Upright_top = 0.4;
var end_probabliity_Level_top = 0.2;
var end_probability_Upright_middle = 0;
var end_probabliity_Level_middle = 0;
var end_probability_Upright_bottom = 0.45;
var end_probabliity_Level_bottom = 0.2;
var end_sphere_top_max_x = 660;
var end_sphere_top_min_x = 650;
var end_sphere_top_max_y = 100;
var end_sphere_top_min_y = 20;
var end_sphere_middle_max_x = 660;
var end_sphere_middle_min_x = 550;
var end_sphere_middle_max_y = 230;
var end_sphere_middle_min_y = 180;
var end_sphere_bottom_max_x = 860;
var end_sphere_bottom_min_x = 800;
var end_sphere_bottom_max_y = 400;
var end_sphere_bottom_min_y = 320;
var end_react_middle = true;
var end_upWallNum_max = 1;
var riseLevelPels_easy = 90000;
var riseLevelPels_normal = 60000;
var riseLevelPels_hard = 30000;
var riseLevelPels = 30000;
var POWERFULL_NUM = 7;
var POWERFULL_TIME = 15;
var SPEEDUPBOUNDARY = 250;
var ACCELERATION = 15;
var VANISHBOUNDARY = -200;
var CREATEBOUNDARY_WALL = 500;
var CREATEBOUNDARY_PROP = 550;
var LFETOVERBOUNDARY = -180;
var BOTTOMOVERBOUNDARY = 900;
var DISPLAYPELSES = 5000;
var ADDPOWER = 25;
}
Symbol 1273 MovieClip [__Packages.as.tools.Sphere] Frame 0
class as.tools.Sphere
{
var minY, maxY, minX, maxX;
function Sphere (minx, maxx, miny, maxy) {
minY = miny;
maxY = maxy;
minX = minx;
maxX = maxx;
}
function copy(a) {
maxX = a.maxX;
minX = a.minX;
maxY = a.maxY;
minY = a.minY;
}
}
Symbol 1274 MovieClip [__Packages.org.cove.flade.DynamicsEngine] Frame 0
class org.cove.flade.DynamicsEngine
{
var primitives, PrimitivecheckCollisions, surfaces, constraints, gravity, coeffRest, coeffFric, coeffDamp;
function DynamicsEngine () {
primitives = new Array();
PrimitivecheckCollisions = new Array();
surfaces = new Array();
constraints = new Array();
gravity = new org.cove.flade.util.Vector(0, 1);
coeffRest = 1.5;
coeffFric = 0.01;
coeffDamp = 0.99;
}
function addPrimitive(p) {
primitives.push(p);
}
function addPrimitivecheckCollisions(p) {
PrimitivecheckCollisions.push(p);
}
function addSurface(s) {
surfaces.push(s);
}
function addConstraint(c) {
constraints.push(c);
}
function paintSurfaces() {
var _local2 = 0;
while (_local2 < surfaces.length) {
surfaces[_local2].paint();
_local2++;
}
}
function paintPrimitives() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].paint();
_local2++;
}
}
function paintConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].paint();
_local2++;
}
}
function timeStep() {
verlet();
satisfyConstraints();
satisfyConstraints();
checkCollisions();
}
function setSurfaceBounce(kfr) {
coeffRest = 1 + kfr;
}
function setSurfaceFriction(f) {
coeffFric = f;
}
function setDamping(d) {
coeffDamp = d;
}
function setGravity(gx, gy) {
gravity.x = gx;
gravity.y = gy;
}
function verlet() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].verlet(this);
_local2++;
}
}
function satisfyConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].resolve();
_local2++;
}
}
function checkCollisions() {
var _local4 = 0;
while (_local4 < surfaces.length) {
var _local3 = surfaces[_local4];
if (_local3.getActiveState()) {
var _local2 = 0;
while (_local2 < PrimitivecheckCollisions.length) {
PrimitivecheckCollisions[_local2].checkCollision(_local3, this);
_local2++;
}
}
_local4++;
}
}
function del() {
var _local4 = 0;
while (_local4 < surfaces.length) {
surfaces[_local4].del();
_local4++;
}
var _local3 = 0;
while (_local3 < primitives.length) {
primitives[_local3].del();
_local3++;
}
var _local2 = 0;
while (_local2 < constraints.length) {
surfaces[_local2].del();
_local2++;
}
}
}
Symbol 1275 MovieClip [__Packages.org.cove.flade.util.Vector] Frame 0
class org.cove.flade.util.Vector
{
var x, y;
function Vector (px, py) {
x = px;
y = py;
}
function setTo(px, py) {
x = px;
y = py;
}
function copy(v) {
x = v.x;
y = v.y;
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function cross(v) {
return((x * v.y) - (y * v.x));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
return(this);
}
function plusNew(v) {
return(new org.cove.flade.util.Vector(x + v.x, y + v.y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
return(this);
}
function minusNew(v) {
return(new org.cove.flade.util.Vector(x - v.x, y - v.y));
}
function mult(s) {
x = x * s;
y = y * s;
return(this);
}
function multNew(s) {
return(new org.cove.flade.util.Vector(x * s, y * s));
}
function distance(v) {
var _local3 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function normalize() {
var _local2 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
return(this);
}
function magnitude() {
return(Math.sqrt((x * x) + (y * y)));
}
function project(b) {
var _local5 = dot(b);
var _local4 = (b.x * b.x) + (b.y * b.y);
var _local3 = new org.cove.flade.util.Vector(0, 0);
_local3.x = (_local5 / _local4) * b.x;
_local3.y = (_local5 / _local4) * b.y;
return(_local3);
}
}
Symbol 1276 MovieClip [__Packages.org.cove.flade.primitives.Particle] Frame 0
class org.cove.flade.primitives.Particle
{
var init, curr, prev, temp, extents, bmin, bmax, mtd, isVisible, dmc;
function Particle (posX, posY) {
init = new org.cove.flade.util.Vector(posX, posY);
curr = new org.cove.flade.util.Vector(posX, posY);
prev = new org.cove.flade.util.Vector(posX, posY);
temp = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(0, 0);
bmin = 0;
bmax = 0;
mtd = new org.cove.flade.util.Vector(0, 0);
isVisible = true;
}
function initializeContainer() {
var _local2 = _root.getNextHighestDepth();
var _local3 = "_" + _local2;
}
function setVisible(v) {
isVisible = v;
}
function verlet(sysObj) {
temp.x = curr.x;
temp.y = curr.y;
curr.x = curr.x + ((sysObj.coeffDamp * (curr.x - prev.x)) + sysObj.gravity.x);
curr.y = curr.y + ((sysObj.coeffDamp * (curr.y - prev.y)) + sysObj.gravity.y);
prev.x = temp.x;
prev.y = temp.y;
}
function pin() {
curr.x = init.x;
curr.y = init.y;
prev.x = init.x;
prev.y = init.y;
}
function setPos(px, py) {
curr.x = px;
curr.y = py;
prev.x = px;
prev.y = py;
}
function getCardXProjection() {
bmin = curr.x - extents.x;
bmax = curr.x + extents.x;
}
function getCardYProjection() {
bmin = curr.y - extents.y;
bmax = curr.y + extents.y;
}
function getAxisProjection(axis) {
var _local5 = new org.cove.flade.util.Vector(Math.abs(axis.x), Math.abs(axis.y));
var _local2 = curr.dot(axis);
var _local3 = extents.dot(_local5);
bmin = _local2 - _local3;
bmax = _local2 + _local3;
}
function setMTD(depthX, depthY, depthN, surfNormal) {
var _local4 = Math.abs(depthX);
var _local3 = Math.abs(depthY);
var _local2 = Math.abs(depthN);
if ((_local4 < _local3) && (_local4 < _local2)) {
mtd.setTo(depthX, 0);
} else if ((_local3 < _local4) && (_local3 < _local2)) {
mtd.setTo(0, depthY);
} else if ((_local2 < _local4) && (_local2 < _local3)) {
mtd = surfNormal.multNew(depthN);
}
}
function setXYMTD(depthX, depthY) {
var _local3 = Math.abs(depthX);
var _local2 = Math.abs(depthY);
if (_local3 < _local2) {
mtd.setTo(depthX, 0);
} else {
mtd.setTo(0, depthY);
}
}
function resolveCollision(normal, sysObj) {
var _local2 = curr.minusNew(prev);
var _local3 = normal.dot(_local2);
var _local8 = _local2.minusNew(normal.multNew(_local3));
var _local4 = _local8.multNew(sysObj.coeffFric);
var _local5 = normal.multNew(_local3 * sysObj.coeffRest);
var _local6 = _local5.plusNew(_local4);
var _local7 = _local2.minusNew(_local6);
curr.plus(mtd);
prev = curr.minusNew(_local7);
}
function paint() {
}
function checkCollision(surface, sysObj) {
}
function del() {
dmc.removeMovieClip();
}
}
Symbol 1277 MovieClip [__Packages.org.cove.flade.surfaces.Surface] Frame 0
interface org.cove.flade.surfaces.Surface
{
}
Symbol 1278 MovieClip [__Packages.org.cove.flade.primitives.CircleParticle] Frame 0
class org.cove.flade.primitives.CircleParticle extends org.cove.flade.primitives.Particle
{
var radius, contactRadius, extents, closestPoint, dmc, curr;
function CircleParticle (px, py, r) {
super(px, py);
radius = r;
contactRadius = r;
extents = new org.cove.flade.util.Vector(r, r);
closestPoint = new org.cove.flade.util.Vector(0, 0);
}
function paint() {
dmc.clear();
dmc.lineStyle(0, 6710886, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, curr.x, curr.y, radius);
}
function checkCollision(surface, sysObj) {
surface.resolveCircleCollision(this, sysObj);
}
}
Symbol 1279 MovieClip [__Packages.org.cove.flade.graphics.Graphics] Frame 0
class org.cove.flade.graphics.Graphics
{
function Graphics () {
}
static function paintLine(dmc, x0, y0, x1, y1) {
dmc.moveTo(x0, y0);
dmc.lineTo(x1, y1);
}
static function paintCircle(dmc, x, y, r) {
var mtp8r = (0.414213562373095 * r);
var msp4r = (0.707106781186547 * r);
with (dmc) {
moveTo(x + r, y);
curveTo(r + x, mtp8r + y, msp4r + x, msp4r + y);
curveTo(mtp8r + x, r + y, x, r + y);
curveTo((-mtp8r) + x, r + y, (-msp4r) + x, msp4r + y);
curveTo((-r) + x, mtp8r + y, (-r) + x, y);
curveTo((-r) + x, (-mtp8r) + y, (-msp4r) + x, (-msp4r) + y);
curveTo((-mtp8r) + x, (-r) + y, x, (-r) + y);
curveTo(mtp8r + x, (-r) + y, msp4r + x, (-msp4r) + y);
curveTo(r + x, (-mtp8r) + y, r + x, y);
}
}
static function paintRectangle(dmc, x, y, w, h) {
var w2 = (w / 2);
var h2 = (h / 2);
with (dmc) {
moveTo(x - w2, y - h2);
lineTo(x + w2, y - h2);
lineTo(x + w2, y + h2);
lineTo(x - w2, y + h2);
lineTo(x - w2, y - h2);
}
}
}
Symbol 1280 MovieClip [__Packages.org.cove.flade.primitives.RectangleParticle] Frame 0
class org.cove.flade.primitives.RectangleParticle extends org.cove.flade.primitives.Particle
{
var width, height, vertex, extents, isVisible, dmc, curr;
function RectangleParticle (px, py, w, h) {
super(px, py);
width = w;
height = h;
vertex = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(w / 2, h / 2);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 6710886, 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, curr.x, curr.y, width, height);
}
}
function checkCollision(surface, sysObj) {
surface.resolveRectangleCollision(this, sysObj);
}
}
Symbol 1281 MovieClip [__Packages.org.cove.flade.constraints.Constraint] Frame 0
interface org.cove.flade.constraints.Constraint
{
}
Symbol 1282 MovieClip [__Packages.as.actor.Spider] Frame 0
class as.actor.Spider
{
var game, mc, bodyVector, armVector, lengthBS, arm1, arm2, body, controlArm, intervalID;
function Spider (g) {
game = g;
mc = game.rootMc.attachMovie("spider", "spider_mc", game.rootMc.getNextHighestDepth(), {_x:MCINITPOS_X, _y:MCINITPOS_Y});
bodyVector = getGlobalXY(mc.bodyVector_mc);
armVector = getGlobalXY(mc.armVector_mc);
lengthBS = new org.cove.flade.util.Vector(mc._x - bodyVector.x, mc._y - bodyVector.y);
arm1 = new as.actor.Arm(mc.arm1_mc, this);
arm2 = new as.actor.Arm(mc.arm2_mc, this);
body = new as.actor.Body(this);
controlArm = 0;
}
function run() {
mc._x = body.curr.x + lengthBS.x;
mc._y = body.curr.y + lengthBS.y;
if (mc._currentframe == 16) {
armVector = getGlobalXY(mc.spider_cartoon_mc.armVector_mc);
} else {
armVector = getGlobalXY(mc.armVector_mc);
}
arm1.run();
arm2.run();
}
function onMouseDown() {
if ((controlArm % 2) != 0) {
arm1.mouseDown();
} else {
arm2.mouseDown();
}
controlArm++;
}
function getGlobalXY(m) {
var _local2 = {x:m._x, y:m._y};
mc.localToGlobal(_local2);
var _local3 = new org.cove.flade.util.Vector(_local2.x, _local2.y);
return(_local3);
}
function rise(v) {
var _local3 = Math.atan2(v.y - body.curr.y, v.x - body.curr.x);
_local3 = (-_local3) * RT;
var _local2 = Math.ceil(_local3 / 3);
_local2 = Math.floor(_local2 / 3) + 1;
if (_local2 > 15) {
_local2 = 15;
}
mc.gotoAndStop(_local2);
}
function fall() {
intervalID = setInterval(this, "fallFunction", FALLSPEED);
}
function fallFunction() {
if (((arm1.isTouch || (arm2.isTouch)) || (mc._currentframe == 1)) || (mc._currentframe == 16)) {
clearInterval(intervalID);
} else if ((!arm1.isTouch) && (!arm2.isTouch)) {
mc.prevFrame();
}
}
function del() {
mc.removeMovieClip();
clearInterval(intervalID);
arm1.del();
delete arm1;
arm2.del();
delete arm2;
body.del();
delete body;
}
var RT = 57.2957795130823;
var MCINITPOS_X = 100;
var MCINITPOS_Y = 100;
var FALLSPEED = 20;
}
Symbol 1283 MovieClip [__Packages.as.actor.Body] Frame 0
class as.actor.Body extends org.cove.flade.primitives.RectangleParticle
{
var spider, curr, prev;
function Body (sp) {
super(sp.bodyVector.x, sp.bodyVector.y, WIDTH, HEIGHT);
spider = sp;
spider.game.engine.addPrimitive(this);
spider.game.engine.addPrimitivecheckCollisions(this);
}
function rise(v) {
curr.x = curr.x + ((v.x - curr.x) * RISESPEED);
curr.y = curr.y + ((v.y - curr.y) * RISESPEED);
}
function move() {
curr.x = curr.x - (spider.game.dynamicSpeed - MOVESPEED);
prev.x = prev.x - (spider.game.dynamicSpeed - MOVESPEED);
}
function del() {
}
var RISESPEED = 0.005;
var WIDTH = 50;
var HEIGHT = 50;
var MOVESPEED = 1.5;
}
Symbol 1284 MovieClip [__Packages.as.actor.Arm] Frame 0
class as.actor.Arm
{
var spider, game, mc, pan, panLeftLine, panRightLine, caudaVector, shooted, isTouch, allowShoot, armPrimitives, head, cauda, length, webCauda, webHead, star_mc, touchVector, shootAngle, leftVector, rightVector, caudaShootAngle, TimerID;
function Arm (m, s) {
spider = s;
game = spider.game;
mc = m;
pan = game.rootMc.createEmptyMovieClip("paintArm" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
panLeftLine = game.rootMc.createEmptyMovieClip("paintLeftLine" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
panRightLine = game.rootMc.createEmptyMovieClip("paintRightLine" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
caudaVector = new org.cove.flade.util.Vector();
caudaVector.copy(getGlobalXY(mc.caudaVector_mc));
shooted = false;
isTouch = false;
allowShoot = true;
armPrimitives = new Array();
head = new org.cove.flade.primitives.RectangleParticle(spider.armVector.x, spider.armVector.y, 1, 1);
game.engine.addPrimitive(head);
cauda = new org.cove.flade.primitives.RectangleParticle(caudaVector.x, caudaVector.y, 1, 1);
game.engine.addPrimitive(cauda);
length = head.curr.distance(cauda.curr);
webCauda = new org.cove.flade.primitives.RectangleParticle(cauda.curr.x, cauda.curr.y, 1, 1);
armPrimitives.push(webCauda);
game.engine.addPrimitive(webCauda);
var _local3 = 0;
while (_local3 < (PRIMITIVENUM - 2)) {
var _local4 = new org.cove.flade.primitives.RectangleParticle((caudaVector.x + (PRIMITIVEDISTANCE * (_local3 + 1))) + 10, caudaVector.y, 1, 1);
armPrimitives.push(_local4);
game.engine.addPrimitive(_local4);
_local3++;
}
webHead = new org.cove.flade.primitives.RectangleParticle((caudaVector.x + (PRIMITIVEDISTANCE * (_local3 + 1))) + 10, caudaVector.y, 1, 1);
armPrimitives.push(webHead);
game.engine.addPrimitive(webHead);
game.engine.addPrimitivecheckCollisions(webHead);
var _local7 = new org.cove.flade.constraints.SpringConstraint(head, cauda);
_local7.setRestLength(length);
game.engine.addConstraint(_local7);
var _local2 = 0;
while (_local2 < (armPrimitives.length - 1)) {
var _local6 = armPrimitives[_local2];
var _local5 = armPrimitives[_local2 + 1];
game.engine.addConstraint(new org.cove.flade.constraints.SpringConstraint(_local6, _local5));
_local2++;
}
var _local8 = game.rootMc.getNextHighestDepth();
star_mc = game.rootMc.attachMovie("star", "star" + _local8, _local8, {_x:touchVector.x, _y:touchVector.y});
star_mc._alpha = 0;
}
function run() {
if ((game.powerFull && (touchVector != null)) && (!isTouch)) {
if (webHead.curr.distance(touchVector) <= 50) {
addTouch();
}
}
if (shootAngle != null) {
webHead.curr.x = webHead.curr.x + (WEBHEADRISESPEED * Math.cos(shootAngle));
webHead.curr.y = webHead.curr.y + (WEBHEADRISESPEED * Math.sin(shootAngle));
if (webHead.curr.distance(head.curr) >= BIGGESTLENGTH) {
game.ui.putInArm();
shootAngle = null;
if (game.powerFull) {
addTouch();
}
}
}
if (isTouch) {
webHead.curr = touchVector.multNew(1);
webHead.prev = touchVector.multNew(1);
touchVector.x = touchVector.x - game.dynamicSpeed;
if (leftVector != null) {
leftVector.x = leftVector.x - game.dynamicSpeed;
}
if (rightVector != null) {
rightVector.x = rightVector.x - game.dynamicSpeed;
}
spider.rise(touchVector);
spider.body.rise(touchVector);
}
if ((shootAngle != null) || (isTouch)) {
caudaShootAngle = Math.atan2(game.mouseDownVector.y - cauda.curr.y, game.mouseDownVector.x - cauda.curr.x);
if (((game.mouseDownVector.y - head.curr.y) * (cauda.curr.y - head.curr.y)) > 0) {
cauda.curr.x = cauda.curr.x + (CAUDARISESPEED * Math.cos(caudaShootAngle));
cauda.curr.y = cauda.curr.y + (CAUDARISESPEED * Math.sin(caudaShootAngle));
} else {
cauda.curr.x = cauda.curr.x + (CAUDARISESPEED * 1);
}
}
if (cauda.curr.x < head.curr.x) {
cauda.curr.x = cauda.curr.x + (Math.abs(cauda.curr.x - head.curr.x) * 0.5);
}
cauda.curr.x = cauda.curr.x + 0.4;
adjustMc();
head.curr.copy(spider.armVector);
head.prev.copy(spider.armVector);
webCauda.curr.copy(cauda.curr);
webCauda.prev.copy(cauda.curr);
pan.clear();
panLeftLine.clear();
panRightLine.clear();
paint();
paintHangingLine();
star_mc._x = webHead.curr.x;
star_mc._y = webHead.curr.y;
if (game.powerFull && (isTouch)) {
star_mc._alpha = 100;
} else {
star_mc._alpha = 0;
}
}
function mouseDown() {
if (allowShoot) {
game.ui.putOutArm();
shooted = true;
shootAngle = Math.atan2(game.mouseDownVector.y - webHead.curr.y, game.mouseDownVector.x - webHead.curr.x);
if (game.powerFull) {
touchVector = new org.cove.flade.util.Vector(game.rootMc._xmouse, game.rootMc._ymouse);
as.tools.Timer.DelTimer(TimerID);
TimerID = as.tools.Timer.AddTimer(this, "removeTouch", (TOUCHTIME * 1000) + 200);
}
var _local2 = 0;
while (_local2 < armPrimitives.length) {
armPrimitives[_local2].prev.x = armPrimitives[_local2].curr.x;
armPrimitives[_local2].prev.y = armPrimitives[_local2].curr.y;
_local2++;
}
allowShoot = false;
as.tools.Timer.AddTimer(this, "setAllowShoot", SHOOTINTERVAL * 1000);
}
}
function onContact(p, t) {
var _local3 = ((game.mouseDownVector.y - game.spider.body.curr.y) * (webHead.curr.y - game.spider.body.curr.y)) > 0;
if ((((p == webHead) && (shooted)) && (!isTouch)) && (_local3)) {
addTouch();
leftVector = new org.cove.flade.util.Vector(touchVector.x - 6, touchVector.y + 6);
rightVector = new org.cove.flade.util.Vector(touchVector.x + 6, touchVector.y + 6);
if ((((leftVector.x > t.maxX) || (leftVector.x < t.minX)) || (leftVector.y < t.minY)) || (leftVector.y > t.maxY)) {
leftVector = null;
}
if ((((rightVector.x > t.maxX) || (rightVector.x < t.minX)) || (rightVector.y < t.minY)) || (rightVector.y > t.maxY)) {
rightVector = null;
}
as.tools.Timer.DelTimer(TimerID);
TimerID = as.tools.Timer.AddTimer(this, "removeTouch", TOUCHTIME * 1000);
}
}
function setAllowShoot() {
allowShoot = true;
}
function removeTouch() {
isTouch = false;
touchVector = null;
leftVector = null;
rightVector = null;
spider.fall();
}
function addTouch() {
if (game.powerFull) {
game.ui.catchUpPower();
} else {
game.ui.catchUp();
}
as.tools.Timer.AddTimer(game.ui, "putInArm", 70);
touchVector = webHead.curr.multNew(1);
isTouch = true;
shootAngle = null;
shooted = false;
}
function adjustMc() {
var _local2 = Math.atan2(head.curr.y - cauda.curr.y, head.curr.x - cauda.curr.x);
mc._rotation = ((_local2 * RT) + 155) - spider.mc._rotation;
mc._x = spider.mc.armVector_mc._x;
mc._y = spider.mc.armVector_mc._y;
}
function getGlobalXY(m) {
var _local2 = {x:m._x, y:m._y};
mc.localToGlobal(_local2);
var _local3 = new org.cove.flade.util.Vector(_local2.x, _local2.y);
return(_local3);
}
function paint() {
pan.moveTo(armPrimitives[0].curr.x, armPrimitives[0].curr.y);
if (game.powerFull) {
pan.lineStyle(2, 15601424, 100);
pan.lineTo(armPrimitives[2].curr.x, armPrimitives[2].curr.y);
pan.lineStyle(2, 16741140, 100);
pan.lineTo(armPrimitives[4].curr.x, armPrimitives[4].curr.y);
pan.lineStyle(2, 16776707, 100);
pan.lineTo(armPrimitives[6].curr.x, armPrimitives[6].curr.y);
pan.lineStyle(2, 52737, 100);
pan.lineTo(armPrimitives[8].curr.x, armPrimitives[8].curr.y);
pan.lineStyle(2, 486399, 100);
pan.lineTo(armPrimitives[10].curr.x, armPrimitives[10].curr.y);
pan.lineStyle(2, 67535, 100);
pan.lineTo(armPrimitives[12].curr.x, armPrimitives[12].curr.y);
pan.lineStyle(2, 7079326, 100);
pan.lineTo(armPrimitives[14].curr.x, armPrimitives[14].curr.y);
} else {
pan.lineStyle(2, 16777215, 100);
var _local2 = 0;
while (_local2 < armPrimitives.length) {
pan.lineTo(armPrimitives[_local2].curr.x, armPrimitives[_local2].curr.y);
_local2++;
}
}
}
function paintHangingLine() {
if (isTouch && (!game.powerFull)) {
if (leftVector != null) {
panLeftLine.moveTo(leftVector.x, leftVector.y);
panLeftLine.lineStyle(2, 16777215, 100);
panLeftLine.lineTo(armPrimitives[10].curr.x, armPrimitives[10].curr.y);
}
if (rightVector != null) {
panRightLine.moveTo(rightVector.x, rightVector.y);
panRightLine.lineStyle(2, 16777215, 100);
panRightLine.lineTo(armPrimitives[10].curr.x, armPrimitives[10].curr.y);
}
}
}
function del() {
pan.removeMovieClip();
panLeftLine.removeMovieClip();
panRightLine.removeMovieClip();
star_mc.removeMovieClip();
mc.removeMovieClip();
as.tools.Timer.DelTimer(TimerID);
var _local2 = 0;
while (_local2 < armPrimitives.length) {
armPrimitives[_local2].del();
delete armPrimitives[_local2];
_local2++;
}
}
var RT = 57.2957795130823;
var PRIMITIVEDISTANCE = 1.5;
var PRIMITIVENUM = 15;
var BIGGESTLENGTH = 300;
var WEBHEADRISESPEED = 50;
var CAUDARISESPEED = 5;
var TOUCHTIME = 1;
var SHOOTINTERVAL = 1.2;
}
Symbol 1285 MovieClip [__Packages.org.cove.flade.constraints.SpringConstraint] Frame 0
class org.cove.flade.constraints.SpringConstraint implements org.cove.flade.constraints.Constraint
{
var p1, p2, p1s, p2s, restLength, stiffness, color, isVisible, dmc;
function SpringConstraint (p1, p2, p1s, p2s) {
this.p1 = p1;
this.p2 = p2;
if (p1s == undefined) {
p1s = 0;
}
if (p2s == undefined) {
p2s = 0;
}
this.p1s = p1s;
this.p2s = p2s;
restLength = p1.curr.distance(p2.curr);
stiffness = 0.4;
color = 10053171 /* 0x996633 */;
isVisible = true;
}
function initializeContainer() {
var _local2 = _root.getNextHighestDepth();
var _local3 = "_" + _local2;
}
function resolve() {
var _local5 = p1.curr.minusNew(p2.curr);
var _local3 = p1.curr.distance(p2.curr);
var _local4 = (_local3 - restLength) / _local3;
var _local2 = _local5.mult(_local4 * stiffness);
p1.curr.minus(_local2.multNew(1 + p1s));
p2.curr.plus(_local2.multNew(1 + p2s));
}
function setRestLength(r) {
restLength = r;
}
function setStiffness(s) {
stiffness = s;
}
function setVisible(v) {
isVisible = v;
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, color, 100);
org.cove.flade.graphics.Graphics.paintLine(dmc, p1.curr.x, p1.curr.y, p2.curr.x, p2.curr.y);
}
}
function del() {
dmc.removeMovieClip();
}
}
Symbol 1286 MovieClip [__Packages.as.tools.Timer] Frame 0
class as.tools.Timer
{
var CycleNum, Id, ob, Millisecond, functionname, StartTime, parameters, broadcastMessageObject;
function Timer (ob, functionname, Millisecond, CycleNum) {
this.CycleNum = CycleNum;
if ((CycleNum == undefined) || (CycleNum == null)) {
this.CycleNum = 0;
}
Id = ++TimerId;
this.ob = ob;
this.Millisecond = Millisecond;
this.functionname = functionname;
var _local3 = new Date();
StartTime = _local3.getTime();
parameters = new Array();
broadcastMessageObject = new AsBroadcaster();
AsBroadcaster.initialize(broadcastMessageObject);
broadcastMessageObject.addListener(ob);
}
function AddParameters() {
parameters.push(arguments[0]);
}
function CheckTime() {
var _local3 = new Date();
var _local2 = _local3.getTime();
if ((_local2 - StartTime) > Millisecond) {
broadcastMessageObject.broadcastMessage(functionname, parameters);
StartTime = _local2;
if (CycleNum > 0) {
CycleNum--;
}
if (CycleNum == 0) {
return(Id);
}
}
return(null);
}
function dele() {
broadcastMessageObject.removeListener(ob);
}
static function run() {
var _local1 = 0;
while (_local1 < TimerArr.length) {
DelTimer(TimerArr[_local1].CheckTime());
_local1++;
}
}
static function AddTimer(ob, functionname, Millisecond) {
var _local3 = new as.tools.Timer(ob, functionname, Millisecond);
TimerArr.push(_local3);
var _local2 = 3;
while (_local2 < arguments.length) {
_local3.AddParameters(arguments[_local2]);
_local2++;
}
return(TimerId);
}
static function AddCycleTimer(ob, functionname, Millisecond, CycleNum) {
if ((CycleNum == undefined) || (CycleNum == null)) {
CycleNum = -1;
}
var _local3 = new as.tools.Timer(ob, functionname, Millisecond, CycleNum);
TimerArr.push(_local3);
var _local2 = 4;
while (_local2 < arguments.length) {
_local3.AddParameters(arguments[_local2]);
_local2++;
}
return(TimerId);
}
static function DelTimer(TimerId) {
var _local1 = 0;
while (_local1 < TimerArr.length) {
if (TimerArr[_local1].Id == TimerId) {
TimerArr[_local1].dele();
delete TimerArr[_local1];
TimerArr.splice(_local1, 1);
_local1--;
}
_local1++;
}
}
static function del() {
var _local1 = 0;
while (_local1 < TimerArr.length) {
TimerArr[_local1].dele();
delete TimerArr[_local1];
_local1++;
}
}
static var TimerArr = new Array();
static var TimerId = 0;
}
Symbol 1287 MovieClip [__Packages.org.cove.flade.surfaces.AbstractTile] Frame 0
class org.cove.flade.surfaces.AbstractTile
{
var center, verts, normal, isVisible, isActivated, minX, maxX, minY, maxY;
function AbstractTile (cx, cy) {
center = new org.cove.flade.util.Vector(cx, cy);
verts = new Array();
normal = new org.cove.flade.util.Vector(0, 0);
isVisible = true;
isActivated = true;
}
function initializeContainer() {
var _local2 = _root.getNextHighestDepth();
var _local3 = "_" + _local2;
}
function setVisible(v) {
isVisible = v;
}
function setActiveState(a) {
isActivated = a;
}
function getActiveState() {
return(isActivated);
}
function createBoundingRect(rw, rh) {
var _local2 = center.y - (rh / 2);
var _local3 = center.y + (rh / 2);
var _local5 = center.x - (rw / 2);
var _local4 = center.x + (rw / 2);
verts.push(new org.cove.flade.util.Vector(_local4, _local3));
verts.push(new org.cove.flade.util.Vector(_local4, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local3));
setCardProjections();
}
function testIntervals(boxMin, boxMax, tileMin, tileMax) {
if (boxMax < tileMin) {
return(0);
}
if (tileMax < boxMin) {
return(0);
}
var _local2 = tileMax - boxMin;
var _local1 = tileMin - boxMax;
if (Math.abs(_local2) < Math.abs(_local1)) {
return(_local2);
}
return(_local1);
}
function setCardProjections() {
getCardXProjection();
getCardYProjection();
}
function getCardXProjection() {
minX = verts[0].x;
var _local3 = 1;
while (_local3 < verts.length) {
if (verts[_local3].x < minX) {
minX = verts[_local3].x;
}
_local3++;
}
maxX = verts[0].x;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x > maxX) {
maxX = verts[_local2].x;
}
_local2++;
}
}
function getCardYProjection() {
minY = verts[0].y;
var _local3 = 1;
while (_local3 < verts.length) {
if (verts[_local3].y < minY) {
minY = verts[_local3].y;
}
_local3++;
}
maxY = verts[0].y;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y > maxY) {
maxY = verts[_local2].y;
}
_local2++;
}
}
function onContact() {
}
}
Symbol 1288 MovieClip [__Packages.as.UI] Frame 0
class as.UI
{
var game, mc;
function UI (g) {
game = g;
mc = game.rootMc;
addMupaiEffect();
}
function run() {
updataMiddleGround();
updataTopGround();
updataScores();
updataSuperscript();
}
function updataBottomGround() {
updataDayNight();
_root.ground_bottom_mc.gotoAndPlay(_root.ground_bottom_mc._currentframe + 1);
}
function updataMiddleGround() {
if (_root.ground_middle_1_mc._x <= (-_root.ground_middle_1_mc._width)) {
_root.ground_middle_1_mc._x = _root.ground_middle_1_mc._width;
} else if (_root.ground_middle_2_mc._x <= (-_root.ground_middle_1_mc._width)) {
_root.ground_middle_2_mc._x = _root.ground_middle_1_mc._width;
}
_root.ground_middle_1_mc._x = _root.ground_middle_1_mc._x - Math.round(game.dynamicSpeed / 8);
_root.ground_middle_2_mc._x = _root.ground_middle_2_mc._x - Math.round(game.dynamicSpeed / 8);
}
function updataTopGround() {
if (_root.ground_top_1_mc._x <= (-_root.ground_top_1_mc._width)) {
_root.ground_top_1_mc._x = _root.ground_top_1_mc._width;
} else if (_root.ground_top_2_mc._x <= (-_root.ground_top_2_mc._width)) {
_root.ground_top_2_mc._x = _root.ground_top_2_mc._width;
}
_root.ground_top_1_mc._x = _root.ground_top_1_mc._x - Math.round(game.dynamicSpeed / 2);
_root.ground_top_2_mc._x = _root.ground_top_2_mc._x - Math.round(game.dynamicSpeed / 2);
}
function updataScores() {
_root.scoreBar_mc.score_txt.text = ((game.coinNum * COINSCORE) + (int(game.pels) * PELSSCORE)) + (game.powerFullTimes * POWERFULLSCORE);
}
function updataSuperscript() {
if (game.spider.body.curr.y <= -20) {
_root.superscript_mc._alpha = 100;
_root.superscript_mc.pos_txt.text = String(-Math.round(game.spider.body.curr.y + 20)) + "m";
} else {
_root.superscript_mc._alpha = 0;
_root.superscript_mc.pos_txt.text = "";
}
_root.superscript_mc._x = game.spider.body.curr.x;
}
function gameOver() {
_root.currentScore = Number(_root.scoreBar_mc.score_txt.text);
stopBGMusic();
_root.gameOverMusic();
_root.gotoAndPlay("gameOver");
}
function updataPowerNum() {
_root.powerBar_mc.gotoAndPlay("frame_" + String(game.powerNum));
}
function addPower() {
_root.powerBar_mc.mask_mc._x = _root.powerBar_mc.mask_mc._x + game.ADDPOWER;
}
function reducePower() {
_root.powerBar_mc.mask_mc._x = _root.powerBar_mc.mask_mc._x - 0.5;
}
function addRainbowEffect(obj) {
mc.attachMovie("rainbowEffect", "rainbowEffect", mc.getNextHighestDepth(), obj);
}
function addCoinEffect(obj) {
mc.attachMovie("scoreEffect", "scoreEffect", mc.getNextHighestDepth(), obj);
}
function addPelsEffect() {
displayPelsEffect();
mc.attachMovie("displayPelsEffect", "displayPelsEffect", mc.getNextHighestDepth(), {_x:275, _y:200});
var callBack = this;
mc.displayPelsEffect.onEnterFrame = function () {
this.pos_txt.text = (Math.round(callBack.game.pels) / 1000) + " KM";
};
}
function addDaysEffect() {
var _local9 = _root.day.length;
var _local6 = Stage.width;
var _local5 = Stage.height / 2;
var _local7 = 25;
var _local8 = 0;
var _local4 = 250;
var _local3 = 0;
while (_local3 < _local9) {
as.tools.Timer.AddTimer(this, "attachDay", _local4 * _local3, mc, (_local7 * _local3) + _local6, (_local8 * _local3) + _local5, _root.day.substr(_local3, 1));
_local3++;
}
as.tools.Timer.AddTimer(this, "attachDay", _local4 * _local3, mc, (_local7 * _local3) + _local6, (_local8 * _local3) + _local5, String(game.days));
}
function addLevelEffect() {
mc.attachMovie("displayLevelEffect", "displayLevelEffect", mc.getNextHighestDepth(), {_x:275, _y:200});
var callBack = this;
mc.displayLevelEffect.onEnterFrame = function () {
var _local3;
if (callBack.game.level == 2) {
_local3 = _root.normal;
} else if (callBack.game.level == 3) {
_local3 = _root.hard;
}
this.level_txt.pos_txt.text = _local3;
this.levelUp_1.levelUp_txt.pos_txt.text = _root.levelUp;
this.levelUp_2.levelUp_txt.pos_txt.text = _root.levelUp;
};
}
function addMupaiEffect() {
var callBack = this;
_root.mupai_mc._x = 550;
_root.mupai_mc._y = 0;
if ((_root.da.data.level == 1) && (game.level == 1)) {
_root.mupai_mc.mupai_txt.text = _root.unlockEasy;
_root.mupai_mc.onEnterFrame = function () {
if ((this._x + this._width) > 0) {
this._x = this._x - Math.round(callBack.game.dynamicSpeed / 2);
}
};
} else if ((_root.da.data.level == 2) && (game.level == 2)) {
_root.mupai_mc.mupai_txt.text = _root.unlockHard;
_root.mupai_mc.onEnterFrame = function () {
if ((this._x + this._width) > 0) {
this._x = this._x - Math.round(callBack.game.dynamicSpeed / 2);
}
};
} else if ((_root.da.data.level == 3) && (game.level == 3)) {
_root.mupai_mc.mupai_txt.text = _root.unlockVeryHard;
_root.mupai_mc.onEnterFrame = function () {
if ((this._x + this._width) > 0) {
this._x = this._x - Math.round(callBack.game.dynamicSpeed / 2);
}
};
}
}
function attachRainbow() {
var _local2 = mc.attachMovie("prop_rainbow", "prop_rainbow" + mc.getNextHighestDepth(), mc.getNextHighestDepth());
return(_local2);
}
function attachCoin() {
var _local2 = mc.attachMovie("prop_coin", "prop_coin" + mc.getNextHighestDepth(), mc.getNextHighestDepth());
return(_local2);
}
function eat() {
_root.sound.PlaySound("eat_wav", _root.VOLUME);
}
function eatPower() {
_root.sound.PlaySound("eatPower_wav", _root.VOLUME);
}
function catchUp() {
_root.sound.PlaySound("catchUp_wav", _root.VOLUME);
}
function catchUpPower() {
_root.sound.PlaySound("catchUpPower_wav", _root.VOLUME);
}
function putOutArm() {
_root.sound.PlaySound("putOutArm_wav", _root.VOLUME);
}
function putInArm() {
_root.sound.PlaySound("putInArm_wav", _root.VOLUME);
}
function displayPelsEffect() {
_root.sound.PlaySound("displayPelsEffect_wav", _root.VOLUME);
}
function updataDayNight() {
_root.sound.PlaySound("updataDayNight_wav", _root.VOLUME);
}
function supertime() {
_root.sound.StartMusic("supertime_wav", _root.VOLUME_BG);
}
function stopBGMusic() {
_root.stopBGMusic();
}
function attachDay(arr) {
var temp = arr[0].attachMovie("day", "day" + arr[0].getNextHighestDepth(), arr[0].getNextHighestDepth(), {_x:arr[1], _y:arr[2]});
temp.onEnterFrame = function () {
temp.txt.text = arr[3];
};
}
var COINSCORE = 1000;
var PELSSCORE = 1;
var POWERFULLSCORE = 1000;
}
Symbol 1289 MovieClip [__Packages.as.prop.BottomWall] Frame 0
class as.prop.BottomWall
{
var game, surfaceArr, typeId, x, width, y, allowCreateNext, mc, height;
function BottomWall (ga, cx, cy, ty) {
game = ga;
game.bottomWallArr.push(this);
surfaceArr = new Array();
if (ty != null) {
typeId = ty;
} else {
rundomID();
}
size();
if ((cx == undefined) && (cy == undefined)) {
x = ((Math.random() * (game.sphere_bottom.maxX - game.sphere_bottom.minX)) + game.sphere_bottom.minX) + (width / 2);
y = (Math.random() * (game.sphere_bottom.maxY - game.sphere_bottom.minY)) + game.sphere_bottom.minY;
allowCreateNext = true;
} else {
x = cx;
y = cy;
allowCreateNext = false;
}
newType();
mc._x = x;
mc._y = y;
}
function run() {
if ((x > 550) && (x <= (550 + width))) {
checkOverLap();
}
x = x - game.dynamicSpeed;
var _local2 = 0;
while (_local2 < surfaceArr.length) {
surfaceArr[_local2].center.x = surfaceArr[_local2].center.x - game.dynamicSpeed;
surfaceArr[_local2].maxX = surfaceArr[_local2].maxX - game.dynamicSpeed;
surfaceArr[_local2].minX = surfaceArr[_local2].minX - game.dynamicSpeed;
_local2++;
}
mc._x = x;
mc._y = y;
}
function checkOverLap() {
var _local2 = 0;
while (_local2 < game.middleWallArr.length) {
if (game.middleWallArr[_local2].mc.hitTest(mc)) {
vanish();
new as.prop.BottomWall(game);
break;
}
_local2++;
}
}
function rundomID() {
var _local3 = Math.random();
if (_local3 <= game.probability_Upright_bottom) {
typeId = 8;
} else {
var _local2 = Math.random();
if (_local2 <= game.probabliity_Level_bottom) {
typeId = 7;
} else {
typeId = random(7);
}
}
}
function size() {
switch (typeId) {
case 0 :
width = 50;
height = 51.5;
break;
case 1 :
width = 60;
height = 56.5;
break;
case 2 :
width = 60;
height = 57.3;
break;
case 3 :
width = 60;
height = 61.5;
break;
case 4 :
width = 50;
height = 59.8;
break;
case 5 :
width = 50;
height = 41.3;
break;
case 6 :
width = 40;
height = 45.5;
break;
case 7 :
width = 160;
height = 40;
break;
case 8 :
width = 40;
height = 160;
}
}
function newType() {
switch (typeId) {
case 0 :
var _local10 = new as.prop.CircleWall(x, y, 24, game);
surfaceArr.push(_local10);
game.engine.addSurface(_local10);
var _local17 = random(4);
mc = game.rootMc.attachMovie("wall_0_" + _local17, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 1 :
var _local9 = new as.prop.CircleWall(x, y, 20.8, game);
surfaceArr.push(_local9);
game.engine.addSurface(_local9);
var _local18 = random(4);
mc = game.rootMc.attachMovie("wall_1_" + _local18, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 2 :
var _local8 = new as.prop.CircleWall(x, y, 18.5, game);
surfaceArr.push(_local8);
game.engine.addSurface(_local8);
var _local19 = random(4);
mc = game.rootMc.attachMovie("wall_2_" + _local19, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 3 :
var _local7 = new as.prop.CircleWall(x, y, 25, game);
surfaceArr.push(_local7);
game.engine.addSurface(_local7);
var _local11 = random(4);
mc = game.rootMc.attachMovie("wall_3_" + _local11, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 4 :
var _local6 = new as.prop.CircleWall(x, y, 24.5, game);
surfaceArr.push(_local6);
game.engine.addSurface(_local6);
var _local12 = random(4);
mc = game.rootMc.attachMovie("wall_4_" + _local12, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 5 :
var _local5 = new as.prop.CircleWall(x, y, 19, game);
surfaceArr.push(_local5);
game.engine.addSurface(_local5);
var _local13 = random(4);
mc = game.rootMc.attachMovie("wall_5_" + _local13, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 6 :
var _local4 = new as.prop.CircleWall(x, y, 24.3, game);
surfaceArr.push(_local4);
game.engine.addSurface(_local4);
var _local14 = random(4);
mc = game.rootMc.attachMovie("wall_6_" + _local14, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 7 :
var _local3 = new as.prop.RectangleWall(x, y, 156, 39, game);
surfaceArr.push(_local3);
game.engine.addSurface(_local3);
var _local15 = random(4);
mc = game.rootMc.attachMovie("wall_7_" + _local15, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 8 :
if (game.upWallNum < game.upWallNum_max) {
game.upWallNum = game.upWallNum + 1;
var _local2 = new as.prop.RectangleWall(x, y, 39, 156, game);
surfaceArr.push(_local2);
game.engine.addSurface(_local2);
var _local16 = random(4);
mc = game.rootMc.attachMovie("wall_8_" + _local16, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
} else {
rundomID();
size();
x = ((Math.random() * (game.sphere_bottom.maxX - game.sphere_bottom.minX)) + game.sphere_bottom.minX) + (width / 2);
y = (Math.random() * (game.sphere_bottom.maxY - game.sphere_bottom.minY)) + game.sphere_bottom.minY;
newType();
}
}
}
function vanish() {
if (typeId == 8) {
game.upWallNum = game.upWallNum - 1;
}
mc.removeMovieClip();
var _local4 = 0;
while (_local4 <= game.bottomWallArr.length) {
if (game.bottomWallArr[_local4] == this) {
game.bottomWallArr.splice(_local4, 1);
}
_local4++;
}
var _local3 = 0;
while (_local3 < surfaceArr.length) {
var _local2 = 0;
while (_local2 < game.engine.surfaces.length) {
if (game.engine.surfaces[_local2] == surfaceArr[_local3]) {
surfaceArr[_local3].dmc.removeMovieClip();
game.engine.surfaces.splice(_local2, 1);
}
_local2++;
}
_local3++;
}
}
function del() {
mc.removeMovieClip();
}
}
Symbol 1290 MovieClip [__Packages.org.cove.flade.surfaces.CircleTile] Frame 0
class org.cove.flade.surfaces.CircleTile extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var createBoundingRect, radius, isVisible, dmc, center, onContact, normal, testIntervals, minX, maxX, minY, maxY;
function CircleTile (cx, cy, r) {
super(cx, cy);
createBoundingRect(r * 2, r * 2);
radius = r;
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, center.x, center.y, radius);
}
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact(p);
p.resolveCollision(normal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact(p);
p.resolveCollision(normal, sysObj);
}
}
function isCircleColliding(p) {
p.getCardXProjection();
var _local8 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local8 == 0) {
return(false);
}
p.getCardYProjection();
var _local7 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local7 == 0) {
return(false);
}
var _local4 = center.x - p.curr.x;
var _local3 = center.y - p.curr.y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6 = (p.radius + radius) - _local5;
if (_local6 > 0) {
_local4 = _local4 / _local5;
_local3 = _local3 / _local5;
p.mtd.setTo((-_local4) * _local6, (-_local3) * _local6);
normal.setTo(-_local4, -_local3);
return(true);
}
return(false);
}
function isRectangleColliding(p) {
p.getCardXProjection();
var _local6 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local6 == 0) {
return(false);
}
p.getCardYProjection();
var _local5 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local5 == 0) {
return(false);
}
var _local11 = Math.abs(_local6) < radius;
var _local12 = Math.abs(_local5) < radius;
if (_local11 && (_local12)) {
var _local10 = p.curr.x + (sign(center.x - p.curr.x) * (p.width / 2));
var _local9 = p.curr.y + (sign(center.y - p.curr.y) * (p.height / 2));
p.vertex.setTo(_local10, _local9);
var _local4 = p.vertex.x - center.x;
var _local3 = p.vertex.y - center.y;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = radius - _local8;
if (_local7 > 0) {
_local4 = _local4 / _local8;
_local3 = _local3 / _local8;
p.mtd.setTo(_local4 * _local7, _local3 * _local7);
normal.setTo(_local4, _local3);
return(true);
}
return(false);
}
p.setXYMTD(_local6, _local5);
normal.setTo(p.mtd.x / Math.abs(_local6), p.mtd.y / Math.abs(_local5));
return(true);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
}
function del() {
dmc.removeMovieClip();
}
}
Symbol 1291 MovieClip [__Packages.as.prop.CircleWall] Frame 0
class as.prop.CircleWall extends org.cove.flade.surfaces.CircleTile
{
var game, isCircleColliding, normal, isRectangleColliding, minY, timeID;
function CircleWall (cx, cy, r, ga) {
super(cx, cy, r);
game = ga;
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact(p);
if ((!game.spider.arm1.isTouch) && (!game.spider.arm2.isTouch)) {
p.resolveCollision(normal, sysObj);
} else if (((p == game.spider.body) || (p == game.spider.arm1.webHead)) || (p == game.spider.arm2.webHead)) {
p.resolveCollision(normal, sysObj);
}
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact(p);
if ((!game.spider.arm1.isTouch) && (!game.spider.arm2.isTouch)) {
p.resolveCollision(normal, sysObj);
} else if (((p == game.spider.body) || (p == game.spider.arm1.webHead)) || (p == game.spider.arm2.webHead)) {
p.resolveCollision(normal, sysObj);
}
}
}
function onContact(p) {
game.spider.arm1.onContact(p, this);
game.spider.arm2.onContact(p, this);
if ((p == game.spider.body) && (p.curr.y < minY)) {
game.spider.mc.gotoAndStop(16);
game.spider.body.move();
as.tools.Timer.DelTimer(timeID);
timeID = as.tools.Timer.AddTimer(this, "removeContact", 500);
}
}
function removeContact() {
game.spider.mc.gotoAndStop(1);
}
}
Symbol 1292 MovieClip [__Packages.org.cove.flade.surfaces.RectangleTile] Frame 0
class org.cove.flade.surfaces.RectangleTile extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var rectWidth, rectHeight, createBoundingRect, isVisible, dmc, center, onContact, normal, testIntervals, minX, maxX, minY, maxY;
function RectangleTile (cx, cy, rw, rh) {
super(cx, cy);
rectWidth = rw;
rectHeight = rh;
createBoundingRect(rw, rh);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, center.x, center.y, rectWidth, rectHeight);
}
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact(p);
p.resolveCollision(normal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact(p);
p.resolveCollision(normal, sysObj);
}
}
function isCircleColliding(p) {
p.getCardXProjection();
var _local6 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local6 == 0) {
return(false);
}
p.getCardYProjection();
var _local5 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local5 == 0) {
return(false);
}
var _local11 = Math.abs(_local6) < p.radius;
var _local12 = Math.abs(_local5) < p.radius;
if (_local11 && (_local12)) {
var _local10 = center.x + (sign(p.curr.x - center.x) * (rectWidth / 2));
var _local9 = center.y + (sign(p.curr.y - center.y) * (rectHeight / 2));
var _local4 = p.curr.x - _local10;
var _local3 = p.curr.y - _local9;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = p.radius - _local8;
if (_local7 > 0) {
_local4 = _local4 / _local8;
_local3 = _local3 / _local8;
p.mtd.setTo(_local4 * _local7, _local3 * _local7);
normal.setTo(_local4, _local3);
return(true);
}
return(false);
}
p.setXYMTD(_local6, _local5);
normal.setTo(p.mtd.x / Math.abs(_local6), p.mtd.y / Math.abs(_local5));
return(true);
}
function isRectangleColliding(p) {
p.getCardXProjection();
var _local4 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local4 == 0) {
return(false);
}
p.getCardYProjection();
var _local3 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local3 == 0) {
return(false);
}
p.setXYMTD(_local4, _local3);
normal.setTo(p.mtd.x / Math.abs(_local4), p.mtd.y / Math.abs(_local3));
return(true);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
}
function del() {
dmc.removeMovieClip();
}
}
Symbol 1293 MovieClip [__Packages.as.prop.RectangleWall] Frame 0
class as.prop.RectangleWall extends org.cove.flade.surfaces.RectangleTile
{
var game, isCircleColliding, normal, isRectangleColliding, minY, timeID;
function RectangleWall (cx, cy, rw, rh, ga) {
super(cx, cy, rw, rh);
game = ga;
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact(p);
if ((!game.spider.arm1.isTouch) && (!game.spider.arm2.isTouch)) {
p.resolveCollision(normal, sysObj);
} else if (((p == game.spider.body) || (p == game.spider.arm1.webHead)) || (p == game.spider.arm2.webHead)) {
p.resolveCollision(normal, sysObj);
}
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact(p);
if ((!game.spider.arm1.isTouch) && (!game.spider.arm2.isTouch)) {
p.resolveCollision(normal, sysObj);
} else if (((p == game.spider.body) || (p == game.spider.arm1.webHead)) || (p == game.spider.arm2.webHead)) {
p.resolveCollision(normal, sysObj);
}
}
}
function onContact(p) {
game.spider.arm1.onContact(p, this);
game.spider.arm2.onContact(p, this);
if ((p == game.spider.body) && (p.curr.y < minY)) {
game.spider.mc.gotoAndStop(16);
game.spider.body.move();
as.tools.Timer.DelTimer(timeID);
timeID = as.tools.Timer.AddTimer(this, "removeContact", 100);
}
}
function removeContact() {
game.spider.mc.gotoAndStop(1);
}
}
Symbol 1294 MovieClip [__Packages.as.prop.TopWall] Frame 0
class as.prop.TopWall
{
var game, surfaceArr, x, width, typeId, y, height, allowCreateNext, mc;
function TopWall (ga, cx, cy) {
game = ga;
game.topWallArr.push(this);
surfaceArr = new Array();
rundomID();
size();
if ((cx == undefined) && (cy == undefined)) {
x = ((Math.random() * (game.sphere_top.maxX - game.sphere_top.minX)) + game.sphere_top.minX) + (width / 2);
if (typeId == 8) {
y = (Math.random() * ((game.sphere_top.maxY - game.sphere_top.minY) - (height / 2))) + game.sphere_top.minY;
} else {
y = ((Math.random() * ((game.sphere_top.maxY - game.sphere_top.minY) - height)) + game.sphere_top.minY) + (height / 2);
}
allowCreateNext = true;
} else {
x = cx;
y = cy;
allowCreateNext = false;
}
newType();
mc._x = x;
mc._y = y;
}
function run() {
if ((x > 550) && (x <= (550 + width))) {
checkOverLap();
}
x = x - game.dynamicSpeed;
var _local2 = 0;
while (_local2 < surfaceArr.length) {
surfaceArr[_local2].center.x = surfaceArr[_local2].center.x - game.dynamicSpeed;
surfaceArr[_local2].maxX = surfaceArr[_local2].maxX - game.dynamicSpeed;
surfaceArr[_local2].minX = surfaceArr[_local2].minX - game.dynamicSpeed;
_local2++;
}
mc._x = x;
mc._y = y;
}
function checkOverLap() {
var _local2 = 0;
while (_local2 < game.middleWallArr.length) {
if (game.middleWallArr[_local2].mc.hitTest(mc)) {
vanish();
new as.prop.TopWall(game);
break;
}
_local2++;
}
}
function rundomID() {
var _local3 = Math.random();
if (_local3 <= game.probability_Upright_top) {
typeId = 8;
} else {
var _local2 = Math.random();
if (_local2 <= game.probabliity_Level_top) {
typeId = 7;
} else {
typeId = random(7);
}
}
}
function size() {
switch (typeId) {
case 0 :
width = 50;
height = 51.5;
break;
case 1 :
width = 60;
height = 56.5;
break;
case 2 :
width = 60;
height = 57.3;
break;
case 3 :
width = 60;
height = 61.5;
break;
case 4 :
width = 50;
height = 59.8;
break;
case 5 :
width = 50;
height = 41.3;
break;
case 6 :
width = 40;
height = 45.5;
break;
case 7 :
width = 160;
height = 40;
break;
case 8 :
width = 40;
height = 160;
}
}
function newType() {
switch (typeId) {
case 0 :
var _local10 = new as.prop.CircleWall(x, y, 24, game);
surfaceArr.push(_local10);
game.engine.addSurface(_local10);
var _local17 = random(4);
mc = game.rootMc.attachMovie("wall_0_" + _local17, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 1 :
var _local9 = new as.prop.CircleWall(x, y, 20.8, game);
surfaceArr.push(_local9);
game.engine.addSurface(_local9);
var _local18 = random(4);
mc = game.rootMc.attachMovie("wall_1_" + _local18, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 2 :
var _local8 = new as.prop.CircleWall(x, y, 18.5, game);
surfaceArr.push(_local8);
game.engine.addSurface(_local8);
var _local19 = random(4);
mc = game.rootMc.attachMovie("wall_2_" + _local19, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 3 :
var _local7 = new as.prop.CircleWall(x, y, 25, game);
surfaceArr.push(_local7);
game.engine.addSurface(_local7);
var _local11 = random(4);
mc = game.rootMc.attachMovie("wall_3_" + _local11, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 4 :
var _local6 = new as.prop.CircleWall(x, y, 24.5, game);
surfaceArr.push(_local6);
game.engine.addSurface(_local6);
var _local12 = random(4);
mc = game.rootMc.attachMovie("wall_4_" + _local12, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 5 :
var _local5 = new as.prop.CircleWall(x, y, 19, game);
surfaceArr.push(_local5);
game.engine.addSurface(_local5);
var _local13 = random(4);
mc = game.rootMc.attachMovie("wall_5_" + _local13, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 6 :
var _local4 = new as.prop.CircleWall(x, y, 24.3, game);
surfaceArr.push(_local4);
game.engine.addSurface(_local4);
var _local14 = random(4);
mc = game.rootMc.attachMovie("wall_6_" + _local14, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 7 :
var _local3 = new as.prop.RectangleWall(x, y, 156, 39, game);
surfaceArr.push(_local3);
game.engine.addSurface(_local3);
var _local15 = random(4);
mc = game.rootMc.attachMovie("wall_7_" + _local15, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 8 :
if (game.upWallNum < game.upWallNum_max) {
game.upWallNum = game.upWallNum + 1;
var _local2 = new as.prop.RectangleWall(x, y, 39, 156, game);
surfaceArr.push(_local2);
game.engine.addSurface(_local2);
var _local16 = random(4);
mc = game.rootMc.attachMovie("wall_8_" + _local16, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
} else {
rundomID();
size();
x = ((Math.random() * (game.sphere_top.maxX - game.sphere_top.minX)) + game.sphere_top.minX) + (width / 2);
if (typeId == 8) {
y = (Math.random() * ((game.sphere_top.maxY - game.sphere_top.minY) - (height / 2))) + game.sphere_top.minY;
} else {
y = ((Math.random() * ((game.sphere_top.maxY - game.sphere_top.minY) - height)) + game.sphere_top.minY) + (height / 2);
}
newType();
}
}
}
function vanish() {
if (typeId == 8) {
game.upWallNum = game.upWallNum - 1;
}
mc.removeMovieClip();
var _local4 = 0;
while (_local4 <= game.topWallArr.length) {
if (game.topWallArr[_local4] == this) {
game.topWallArr.splice(_local4, 1);
}
_local4++;
}
var _local3 = 0;
while (_local3 < surfaceArr.length) {
var _local2 = 0;
while (_local2 < game.engine.surfaces.length) {
if (game.engine.surfaces[_local2] == surfaceArr[_local3]) {
surfaceArr[_local3].dmc.removeMovieClip();
game.engine.surfaces.splice(_local2, 1);
}
_local2++;
}
_local3++;
}
}
function del() {
mc.removeMovieClip();
}
}
Symbol 1295 MovieClip [__Packages.as.prop.MiddleWall] Frame 0
class as.prop.MiddleWall
{
var game, surfaceArr, x, width, y, allowCreateNext, mc, typeId, height;
function MiddleWall (ga, cx, cy) {
if (ga.react_middle) {
game = ga;
game.middleWallArr.push(this);
surfaceArr = new Array();
rundomID();
size();
if ((cx == undefined) && (cy == undefined)) {
x = ((Math.random() * (game.sphere_middle.maxX - game.sphere_middle.minX)) + game.sphere_middle.minX) + (width / 2);
y = (Math.random() * (game.sphere_middle.maxY - game.sphere_middle.minY)) + game.sphere_middle.minY;
allowCreateNext = true;
} else {
x = cx;
y = cy;
allowCreateNext = false;
}
newType();
mc._x = x;
mc._y = y;
}
}
function run() {
if ((x > 550) && (x <= 550)) {
checkOverLap();
}
x = x - game.dynamicSpeed;
var _local2 = 0;
while (_local2 < surfaceArr.length) {
surfaceArr[_local2].center.x = surfaceArr[_local2].center.x - game.dynamicSpeed;
surfaceArr[_local2].maxX = surfaceArr[_local2].maxX - game.dynamicSpeed;
surfaceArr[_local2].minX = surfaceArr[_local2].minX - game.dynamicSpeed;
_local2++;
}
mc._x = x;
mc._y = y;
}
function checkOverLap() {
var _local3 = 0;
while (_local3 < game.topWallArr.length) {
if (game.topWallArr[_local3].mc.hitTest(mc)) {
vanish();
new as.prop.MiddleWall(game);
break;
}
_local3++;
}
var _local2 = 0;
while (_local2 < game.bottomWallArr.length) {
if (game.bottomWallArr[_local2].mc.hitTest(mc)) {
vanish();
new as.prop.MiddleWall(game);
break;
}
_local2++;
}
}
function rundomID() {
var _local3 = Math.random();
if (_local3 <= game.probability_Upright_middle) {
typeId = 8;
} else {
var _local2 = Math.random();
if (_local2 <= game.probabliity_Level_middle) {
typeId = 7;
} else {
typeId = random(7);
}
}
}
function size() {
switch (typeId) {
case 0 :
width = 50;
height = 51.5;
break;
case 1 :
width = 60;
height = 56.5;
break;
case 2 :
width = 60;
height = 57.3;
break;
case 3 :
width = 60;
height = 61.5;
break;
case 4 :
width = 50;
height = 59.8;
break;
case 5 :
width = 50;
height = 41.3;
break;
case 6 :
width = 40;
height = 45.5;
break;
case 7 :
width = 160;
height = 40;
break;
case 8 :
width = 40;
height = 160;
}
}
function newType() {
switch (typeId) {
case 0 :
var _local10 = new as.prop.CircleWall(x, y, 24, game);
surfaceArr.push(_local10);
game.engine.addSurface(_local10);
var _local17 = random(4);
mc = game.rootMc.attachMovie("wall_0_" + _local17, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 1 :
var _local9 = new as.prop.CircleWall(x, y, 20.8, game);
surfaceArr.push(_local9);
game.engine.addSurface(_local9);
var _local18 = random(4);
mc = game.rootMc.attachMovie("wall_1_" + _local18, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 2 :
var _local8 = new as.prop.CircleWall(x, y, 18.5, game);
surfaceArr.push(_local8);
game.engine.addSurface(_local8);
var _local19 = random(4);
mc = game.rootMc.attachMovie("wall_2_" + _local19, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 3 :
var _local7 = new as.prop.CircleWall(x, y, 25, game);
surfaceArr.push(_local7);
game.engine.addSurface(_local7);
var _local11 = random(4);
mc = game.rootMc.attachMovie("wall_3_" + _local11, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 4 :
var _local6 = new as.prop.CircleWall(x, y, 24.5, game);
surfaceArr.push(_local6);
game.engine.addSurface(_local6);
var _local12 = random(4);
mc = game.rootMc.attachMovie("wall_4_" + _local12, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 5 :
var _local5 = new as.prop.CircleWall(x, y, 19, game);
surfaceArr.push(_local5);
game.engine.addSurface(_local5);
var _local13 = random(4);
mc = game.rootMc.attachMovie("wall_5_" + _local13, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 6 :
var _local4 = new as.prop.CircleWall(x, y, 24.3, game);
surfaceArr.push(_local4);
game.engine.addSurface(_local4);
var _local14 = random(4);
mc = game.rootMc.attachMovie("wall_6_" + _local14, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 7 :
var _local3 = new as.prop.RectangleWall(x, y, 156, 39, game);
surfaceArr.push(_local3);
game.engine.addSurface(_local3);
var _local15 = random(4);
mc = game.rootMc.attachMovie("wall_7_" + _local15, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
break;
case 8 :
if (game.upWallNum < game.upWallNum_max) {
game.upWallNum = game.upWallNum + 1;
var _local2 = new as.prop.RectangleWall(x, y, 39, 156, game);
surfaceArr.push(_local2);
game.engine.addSurface(_local2);
var _local16 = random(4);
mc = game.rootMc.attachMovie("wall_8_" + _local16, "wall" + game.rootMc.getNextHighestDepth(), game.rootMc.getNextHighestDepth());
} else {
rundomID();
size();
x = ((Math.random() * (game.sphere_middle.maxX - game.sphere_middle.minX)) + game.sphere_middle.minX) + (width / 2);
y = (Math.random() * (game.sphere_middle.maxY - game.sphere_middle.minY)) + game.sphere_middle.minY;
newType();
}
}
}
function vanish() {
if (typeId == 8) {
game.upWallNum = game.upWallNum - 1;
}
mc.removeMovieClip();
var _local3 = 0;
while (_local3 <= game.middleWallArr.length) {
if (game.middleWallArr[_local3] == this) {
game.middleWallArr.splice(_local3, 1);
}
_local3++;
}
var _local4 = 0;
while (_local4 < surfaceArr.length) {
var _local2 = 0;
while (_local2 < game.engine.surfaces.length) {
if (game.engine.surfaces[_local2] == surfaceArr[_local4]) {
surfaceArr[_local3].dmc.removeMovieClip();
game.engine.surfaces.splice(_local2, 1);
}
_local2++;
}
_local4++;
}
}
function del() {
mc.removeMovieClip();
}
}
Symbol 1296 MovieClip [__Packages.as.prop.Coin] Frame 0
class as.prop.Coin
{
var sphere, x, y, allowCreateNext, game, rectangleCoin, mc;
function Coin (ga, cx, cy, al) {
sphere = new as.tools.Sphere(600, 1800, 100, 350);
if ((cx == undefined) || (cx == null)) {
x = (Math.random() * (sphere.maxX - sphere.minX)) + sphere.minX;
} else {
x = cx;
}
if ((cy == undefined) || (cy == null)) {
y = (Math.random() * (sphere.maxY - sphere.minY)) + sphere.minY;
} else {
y = cy;
}
if ((al == undefined) || (al == null)) {
allowCreateNext = true;
} else {
allowCreateNext = al;
}
game = ga;
rectangleCoin = new as.prop.RectangleCoin(x, y, WIDTH, HEIGHT, this);
game.engine.addSurface(rectangleCoin);
game.coinArr.push(this);
mc = game.ui.attachCoin();
adjustPos();
mc._x = x;
mc._y = y;
}
function run() {
if ((x > 550) && (x <= (550 + WIDTH))) {
checkOverLap();
}
x = x - game.dynamicSpeed;
rectangleCoin.center.x = rectangleCoin.center.x - game.dynamicSpeed;
rectangleCoin.maxX = rectangleCoin.maxX - game.dynamicSpeed;
rectangleCoin.minX = rectangleCoin.minX - game.dynamicSpeed;
mc._x = x;
mc._y = y;
}
function checkOverLap() {
var _local4 = 0;
while (_local4 < game.middleWallArr.length) {
if (game.middleWallArr[_local4].mc.hitTest(mc)) {
vanish();
new as.prop.Coin(game, x + 50, null, allowCreateNext);
}
_local4++;
}
var _local3 = 0;
while (_local3 < game.topWallArr.length) {
if (game.topWallArr[_local3].mc.hitTest(mc)) {
vanish();
new as.prop.Coin(game, x + 50, null, allowCreateNext);
}
_local3++;
}
var _local2 = 0;
while (_local2 < game.bottomWallArr.length) {
if (game.bottomWallArr[_local2].mc.hitTest(mc)) {
vanish();
new as.prop.Coin(game, x + 50, null, allowCreateNext);
}
_local2++;
}
}
function adjustPos() {
if ((x > sphere.minX) && (x < sphere.maxX)) {
if ((x - (WIDTH / 2)) < sphere.minX) {
x = sphere.minX + (WIDTH / 2);
}
}
}
function vanish() {
mc.removeMovieClip();
var _local3 = 0;
while (_local3 <= game.coinArr.length) {
if (game.coinArr[_local3] == this) {
game.coinArr.splice(_local3, 1);
}
_local3++;
}
var _local2 = 0;
while (_local2 < game.engine.surfaces.length) {
if (game.engine.surfaces[_local2] == rectangleCoin) {
rectangleCoin.dmc.removeMovieClip();
game.engine.surfaces.splice(_local2, 1);
}
_local2++;
}
}
function del() {
mc.removeMovieClip();
rectangleCoin.del();
delete rectangleCoin;
}
var WIDTH = 24;
var HEIGHT = 28;
}
Symbol 1297 MovieClip [__Packages.as.prop.RectangleCoin] Frame 0
class as.prop.RectangleCoin extends org.cove.flade.surfaces.RectangleTile
{
var coin, isCircleColliding, isRectangleColliding, center;
function RectangleCoin (cx, cy, rw, rh, co) {
super(cx, cy, rw, rh);
coin = co;
}
function resolveCircleCollision(p) {
if (isCircleColliding(p)) {
onContact(p);
}
}
function resolveRectangleCollision(p) {
if (isRectangleColliding(p)) {
onContact(p);
}
}
function onContact(p) {
if ((p == coin.game.spider.body) && (center.x < coin.game.CREATEBOUNDARY_PROP)) {
coin.game.ui.eat();
coin.game.ui.addCoinEffect({_x:center.x, _y:center.y});
coin.game.coinNum++;
coin.vanish();
}
}
function del() {
}
}
Symbol 1298 MovieClip [__Packages.as.prop.Rainbow] Frame 0
class as.prop.Rainbow
{
var sphere, x, y, allowCreateNext, game, rectangleRainbow, mc;
function Rainbow (ga, cx, cy, al) {
sphere = new as.tools.Sphere(600, 1800, 100, 350);
if ((cx == undefined) || (cx == null)) {
x = (Math.random() * (sphere.maxX - sphere.minX)) + sphere.minX;
} else {
x = cx;
}
if ((cy == undefined) || (cy == null)) {
y = (Math.random() * (sphere.maxY - sphere.minY)) + sphere.minY;
} else {
y = cy;
}
if ((al == undefined) || (al == null)) {
allowCreateNext = true;
} else {
allowCreateNext = al;
}
game = ga;
rectangleRainbow = new as.prop.RectangleRainbow(x, y, WIDTH, HEIGHT, this);
game.engine.addSurface(rectangleRainbow);
game.rainbowArr.push(this);
if (!game.powerFull) {
mc = game.ui.attachRainbow();
} else {
mc = game.ui.attachCoin();
}
adjustPos();
mc._x = x;
mc._y = y;
}
function run() {
if ((x > 550) && (x <= (550 + WIDTH))) {
checkOverLap();
}
x = x - game.dynamicSpeed;
rectangleRainbow.center.x = rectangleRainbow.center.x - game.dynamicSpeed;
rectangleRainbow.maxX = rectangleRainbow.maxX - game.dynamicSpeed;
rectangleRainbow.minX = rectangleRainbow.minX - game.dynamicSpeed;
mc._x = x;
mc._y = y;
}
function checkOverLap() {
var _local4 = 0;
while (_local4 < game.middleWallArr.length) {
if (game.middleWallArr[_local4].mc.hitTest(mc)) {
vanish();
new as.prop.Rainbow(game, x + 50, null, allowCreateNext);
}
_local4++;
}
var _local3 = 0;
while (_local3 < game.topWallArr.length) {
if (game.topWallArr[_local3].mc.hitTest(mc)) {
vanish();
new as.prop.Rainbow(game, x + 50, null, allowCreateNext);
}
_local3++;
}
var _local2 = 0;
while (_local2 < game.bottomWallArr.length) {
if (game.bottomWallArr[_local2].mc.hitTest(mc)) {
vanish();
new as.prop.Rainbow(game, x + 50, null, allowCreateNext);
}
_local2++;
}
}
function adjustPos() {
if ((x > sphere.minX) && (x < sphere.maxX)) {
if ((x - (WIDTH / 2)) < sphere.minX) {
x = sphere.minX + (WIDTH / 2);
}
}
}
function vanish() {
mc.removeMovieClip();
var _local3 = 0;
while (_local3 <= game.rainbowArr.length) {
if (game.rainbowArr[_local3] == this) {
game.rainbowArr.splice(_local3, 1);
}
_local3++;
}
var _local2 = 0;
while (_local2 < game.engine.surfaces.length) {
if (game.engine.surfaces[_local2] == rectangleRainbow) {
rectangleRainbow.dmc.removeMovieClip();
game.engine.surfaces.splice(_local2, 1);
}
_local2++;
}
}
function del() {
var _local3 = 0;
while (_local3 <= game.rainbowArr.length) {
if (game.rainbowArr[_local3] == this) {
game.rainbowArr.splice(_local3, 1);
}
_local3++;
}
var _local2 = 0;
while (_local2 < game.engine.surfaces.length) {
if (game.engine.surfaces[_local2] == rectangleRainbow) {
rectangleRainbow.dmc.removeMovieClip();
game.engine.surfaces.splice(_local2, 1);
}
_local2++;
}
mc.removeMovieClip();
rectangleRainbow.del();
delete rectangleRainbow;
}
var WIDTH = 24;
var HEIGHT = 28;
}
Symbol 1299 MovieClip [__Packages.as.prop.RectangleRainbow] Frame 0
class as.prop.RectangleRainbow extends org.cove.flade.surfaces.RectangleTile
{
var rainbow, isCircleColliding, isRectangleColliding, center;
function RectangleRainbow (cx, cy, rw, rh, ra) {
super(cx, cy, rw, rh);
rainbow = ra;
}
function resolveCircleCollision(p) {
if (isCircleColliding(p)) {
onContact(p);
}
}
function resolveRectangleCollision(p) {
if (isRectangleColliding(p)) {
onContact(p);
}
}
function onContact(p) {
if ((p == rainbow.game.spider.body) && (center.x < rainbow.game.CREATEBOUNDARY_PROP)) {
rainbow.game.ui.eat();
rainbow.game.ui.eatPower();
rainbow.game.addPowerNum();
rainbow.game.ui.addRainbowEffect({_x:center.x, _y:center.y});
rainbow.vanish();
}
}
function del() {
}
}
Symbol 317 MovieClip [spider] Frame 1
stop();
Symbol 317 MovieClip [spider] Frame 2
stop();
Symbol 317 MovieClip [spider] Frame 3
stop();
Symbol 317 MovieClip [spider] Frame 4
stop();
Symbol 317 MovieClip [spider] Frame 5
stop();
Symbol 317 MovieClip [spider] Frame 6
stop();
Symbol 317 MovieClip [spider] Frame 7
stop();
Symbol 317 MovieClip [spider] Frame 8
stop();
Symbol 317 MovieClip [spider] Frame 9
stop();
Symbol 317 MovieClip [spider] Frame 10
stop();
Symbol 317 MovieClip [spider] Frame 11
stop();
Symbol 317 MovieClip [spider] Frame 12
stop();
Symbol 317 MovieClip [spider] Frame 13
stop();
Symbol 317 MovieClip [spider] Frame 14
stop();
Symbol 317 MovieClip [spider] Frame 15
stop();
Symbol 317 MovieClip [spider] Frame 16
stop();
Symbol 320 MovieClip Frame 11
stop();
Symbol 332 MovieClip [star] Frame 12
stop();
Symbol 363 MovieClip Frame 15
stop();
Symbol 367 MovieClip [scoreEffect] Frame 20
stop();
this.removeMovieClip();
Symbol 385 MovieClip [displayPelsEffect] Frame 56
stop();
delete this.onEnterFrame;
this.removeMovieClip();
Symbol 427 MovieClip [rainbowEffect] Frame 10
stop();
this.removeMovieClip();
Symbol 496 MovieClip [displayLevelEffect] Frame 154
stop();
delete this.onEnterFrame;
this.removeMovieClip();
Symbol 512 MovieClip [day] Frame 64
this.removeMovieClip();
Symbol 535 MovieClip [ground_bottom] Frame 1
stop();
Instance of Symbol 522 MovieClip "starT" in Symbol 535 MovieClip [ground_bottom] Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(this._totalframes));
star_speed = this._xscale / _root.star_speed;
}
onClipEvent (enterFrame) {
if (this._x > 0) {
this._x = this._x - star_speed;
} else {
this._x = _root.scene_width;
}
}
Instance of Symbol 522 MovieClip "starT" in Symbol 535 MovieClip [ground_bottom] Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(this._totalframes));
star_speed = this._xscale / _root.star_speed;
}
onClipEvent (enterFrame) {
if (this._x > 0) {
this._x = this._x - star_speed;
} else {
this._x = _root.scene_width;
}
}
Instance of Symbol 522 MovieClip "starT" in Symbol 535 MovieClip [ground_bottom] Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(this._totalframes));
star_speed = this._xscale / _root.star_speed;
}
onClipEvent (enterFrame) {
if (this._x > 0) {
this._x = this._x - star_speed;
} else {
this._x = _root.scene_width;
}
}
Instance of Symbol 522 MovieClip "starT" in Symbol 535 MovieClip [ground_bottom] Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(this._totalframes));
star_speed = this._xscale / _root.star_speed;
}
onClipEvent (enterFrame) {
if (this._x > 0) {
this._x = this._x - star_speed;
} else {
this._x = _root.scene_width;
}
}
Symbol 535 MovieClip [ground_bottom] Frame 49
stop();
Symbol 535 MovieClip [ground_bottom] Frame 100
gotoAndPlay (1);
Symbol 569 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 583 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 584 MovieClip Frame 1
stop();
Symbol 597 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 610 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 623 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 624 MovieClip Frame 1
stop();
Symbol 641 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 660 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 674 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 688 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 703 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 726 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 744 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 752 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 764 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 769 MovieClip Frame 1
stop();
delete this.onEnterFrame;
this.startGame_btn.onRelease = function () {
_root.btnRelease();
_root.btnRollOut();
_root.UIupdate();
_root.mainmenu_mc.gotoAndPlay(2);
};
this.howToPlay_btn.onRelease = function () {
_root.btnRelease();
_root.btnRollOut();
_root.gotoAndStop("help");
};
this.highScore_btn.onRelease = function () {
_root.btnRelease();
_root.btnRollOut();
_root.gotoAndStop("highScore");
};
this.moreGames_btn.onRelease = function () {
_root.btnRelease();
getURL (_root.localization_url1, "_blank");
};
this.freeGames_btn.onRelease = function () {
getURL (_root.localization_url2, "_blank");
_root.btnRelease();
};
this.startGame_btn.onRollOver = function () {
_root.btnRollOver();
};
this.howToPlay_btn.onRollOver = function () {
_root.btnRollOver();
};
this.highScore_btn.onRollOver = function () {
_root.btnRollOver();
};
this.moreGames_btn.onRollOver = function () {
_root.btnRollOver();
};
this.freeGames_btn.onRollOver = function () {
_root.btnRollOver();
};
this.startGame_btn.onRollOut = function () {
_root.btnRollOut();
};
this.howToPlay_btn.onRollOut = function () {
_root.btnRollOut();
};
this.highScore_btn.onRollOut = function () {
_root.btnRollOut();
};
this.moreGames_btn.onRollOut = function () {
_root.btnRollOut();
};
this.freeGames_btn.onRollOut = function () {
_root.btnRollOut();
};
Symbol 769 MovieClip Frame 19
stop();
if (_root.da.data.level == 1) {
lock1_mc._visible = true;
lock2_mc._visible = true;
} else if (_root.da.data.level == 2) {
lock1_mc._visible = false;
lock2_mc._visible = true;
} else if (_root.da.data.level == 3) {
lock1_mc._visible = false;
lock2_mc._visible = false;
}
this.easy_btn.onRelease = function () {
if (_root.da.data.level >= 1) {
_root.level = 1;
_root.btnRelease();
_root.btnRollOut();
_root.gotoAndPlay("startGame");
}
};
this.normal_btn.onRelease = function () {
if (_root.da.data.level >= 2) {
_root.level = 2;
_root.btnRelease();
_root.btnRollOut();
_root.gotoAndPlay("startGame");
}
};
this.hard_btn.onRelease = function () {
if (_root.da.data.level >= 3) {
_root.level = 3;
_root.btnRelease();
_root.btnRollOut();
_root.gotoAndPlay("startGame");
}
};
this.back_btn.onRelease = function () {
_root.btnRelease();
_root.btnRollOut();
_root.UIupdate();
_root.mainmenu_mc.onEnterFrame = function () {
prevFrame();
};
};
this.easy_btn.onRollOver = function () {
_root.btnRollOver();
};
this.normal_btn.onRollOver = function () {
_root.btnRollOver();
};
this.hard_btn.onRollOver = function () {
_root.btnRollOver();
};
this.back_btn.onRollOver = function () {
_root.btnRollOver();
};
this.easy_btn.onRollOut = function () {
_root.btnRollOut();
};
this.normal_btn.onRollOut = function () {
_root.btnRollOut();
};
this.hard_btn.onRollOut = function () {
_root.btnRollOut();
};
this.back_btn.onRollOut = function () {
_root.btnRollOut();
};
Symbol 791 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 807 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 821 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 835 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 851 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 888 MovieClip Frame 10
stop();
removeMovieClip(this._parent);
Symbol 890 MovieClip Frame 8
i = 0;
onEnterFrame = function () {
duplicateMovieClip (star, "star" + i, i);
a = 360 * Math.random();
b = random(95) + 5;
c = random(20);
this["star" + i]._xscale = (this["star" + i]._yscale = b);
this["star" + i]._y = this["star" + i]._y + c;
i++;
};
Symbol 890 MovieClip Frame 27
stop();
Symbol 896 MovieClip Frame 30
stop();
Symbol 901 MovieClip Frame 30
stop();
Symbol 906 MovieClip Frame 30
stop();
Symbol 911 MovieClip Frame 30
stop();
Symbol 916 MovieClip Frame 30
stop();
Symbol 921 MovieClip Frame 30
stop();
Symbol 926 MovieClip Frame 30
stop();
Symbol 931 MovieClip Frame 1
i = 0;
star._visible = 0;
onEnterFrame = function () {
if ((i % 4) == 0) {
aa = Math.pow(-1, random(2));
duplicateMovieClip (star, "star" + i, i);
a = 360 * Math.random();
b = random(35) + 5;
c = random(18);
this["star" + i]._xscale = b;
this["star" + i]._yscale = b * 1.2;
this["star" + i]._y = this["star" + i]._y + (aa * c);
}
i++;
};
Symbol 933 MovieClip Frame 1
stop();
Symbol 933 MovieClip Frame 2
this.mask_mc._x = -226.3;
Symbol 933 MovieClip Frame 8
stop();
this.mask_mc._x = -195.2;
Symbol 933 MovieClip Frame 9
this.mask_mc._x = -195.2;
Symbol 933 MovieClip Frame 15
stop();
this.mask_mc._x = -162.3;
Symbol 933 MovieClip Frame 16
this.mask_mc._x = -162.3;
Symbol 933 MovieClip Frame 22
stop();
this.mask_mc._x = -129.1;
Symbol 933 MovieClip Frame 23
this.mask_mc._x = -129.1;
Symbol 933 MovieClip Frame 29
stop();
this.mask_mc._x = -96.2;
Symbol 933 MovieClip Frame 30
this.mask_mc._x = -96.2;
Symbol 933 MovieClip Frame 36
stop();
this.mask_mc._x = -63.4;
Symbol 933 MovieClip Frame 37
this.mask_mc._x = -63.4;
Symbol 933 MovieClip Frame 43
stop();
this.mask_mc._x = -29.6;
Symbol 933 MovieClip Frame 44
this.mask_mc._x = -29.6;
Symbol 933 MovieClip Frame 50
stop();
Symbol 956 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 979 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 982 Button
on (release) {
_root.btnRelease();
_root.gotoAndPlay("mainmenu");
}
on (rollOver) {
_root.btnRollOver();
}
Symbol 1006 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1042 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1093 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1143 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1194 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1237 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1259 MovieClip Frame 1
function onEnterFrameFun() {
if ((_currentframe >= 112) && (_currentframe < 148)) {
coin = 1;
} else if (_currentframe >= 148) {
coin = 2;
}
this.scoreBar_mc.score_txt.text = ((-int(wall_mc._x)) * 2) + (coin * 1000);
if (time == 2) {
this.gotoAndStop(this._currentframe + 1);
time = 0;
} else {
time++;
}
}
this.scoreBar_mc.score_txt.text = 0;
var coin = 0;
var time = 0;
this.onEnterFrame = onEnterFrameFun;
Symbol 1259 MovieClip Frame 190
stop();
_parent.gotoAndPlay("mainmenu");