Section 1
//A_46 (ambientParade_fla.A_46)
package ambientParade_fla {
import flash.display.*;
public dynamic class A_46 extends MovieClip {
public function A_46(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ambientParade_fla
Section 2
//A_48 (ambientParade_fla.A_48)
package ambientParade_fla {
import flash.display.*;
public dynamic class A_48 extends MovieClip {
public function A_48(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ambientParade_fla
Section 3
//B_50 (ambientParade_fla.B_50)
package ambientParade_fla {
import flash.display.*;
public dynamic class B_50 extends MovieClip {
public function B_50(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ambientParade_fla
Section 4
//blackfade_15 (ambientParade_fla.blackfade_15)
package ambientParade_fla {
import flash.display.*;
public dynamic class blackfade_15 extends MovieClip {
public function blackfade_15(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 5
//blackfade23_17 (ambientParade_fla.blackfade23_17)
package ambientParade_fla {
import flash.display.*;
public dynamic class blackfade23_17 extends MovieClip {
public function blackfade23_17(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package ambientParade_fla
Section 6
//C_52 (ambientParade_fla.C_52)
package ambientParade_fla {
import flash.display.*;
public dynamic class C_52 extends MovieClip {
public function C_52(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ambientParade_fla
Section 7
//clearlist_30 (ambientParade_fla.clearlist_30)
package ambientParade_fla {
import flash.display.*;
public dynamic class clearlist_30 extends MovieClip {
public function clearlist_30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 8
//combo_102 (ambientParade_fla.combo_102)
package ambientParade_fla {
import flash.display.*;
public dynamic class combo_102 extends MovieClip {
public var mc:MovieClip;
public function combo_102(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 9
//comboadd_105 (ambientParade_fla.comboadd_105)
package ambientParade_fla {
import flash.display.*;
public dynamic class comboadd_105 extends MovieClip {
public var mc:MovieClip;
public function comboadd_105(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 10
//combomc_103 (ambientParade_fla.combomc_103)
package ambientParade_fla {
import flash.display.*;
import flash.text.*;
public dynamic class combomc_103 extends MovieClip {
public var combotxt:TextField;
}
}//package ambientParade_fla
Section 11
//combomc2_106 (ambientParade_fla.combomc2_106)
package ambientParade_fla {
import flash.display.*;
import flash.text.*;
public dynamic class combomc2_106 extends MovieClip {
public var txt:TextField;
}
}//package ambientParade_fla
Section 12
//controltxt_63 (ambientParade_fla.controltxt_63)
package ambientParade_fla {
import flash.display.*;
public dynamic class controltxt_63 extends MovieClip {
public var mc:MovieClip;
public function controltxt_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 13
//D_54 (ambientParade_fla.D_54)
package ambientParade_fla {
import flash.display.*;
public dynamic class D_54 extends MovieClip {
public function D_54(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ambientParade_fla
Section 14
//gameovermenu_27 (ambientParade_fla.gameovermenu_27)
package ambientParade_fla {
import flash.display.*;
public dynamic class gameovermenu_27 extends MovieClip {
public function gameovermenu_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 15
//grade_45 (ambientParade_fla.grade_45)
package ambientParade_fla {
import flash.display.*;
public dynamic class grade_45 extends MovieClip {
public function grade_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 16
//high_60 (ambientParade_fla.high_60)
package ambientParade_fla {
import flash.display.*;
public dynamic class high_60 extends MovieClip {
public function high_60(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package ambientParade_fla
Section 17
//intro1_8 (ambientParade_fla.intro1_8)
package ambientParade_fla {
import flash.display.*;
public dynamic class intro1_8 extends MovieClip {
public function intro1_8(){
addFrameScript(72, frame73);
}
function frame73(){
stop();
}
}
}//package ambientParade_fla
Section 18
//mainmenu_86 (ambientParade_fla.mainmenu_86)
package ambientParade_fla {
import flash.display.*;
public dynamic class mainmenu_86 extends MovieClip {
public function mainmenu_86(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 19
//MainTimeline (ambientParade_fla.MainTimeline)
package ambientParade_fla {
import flash.display.*;
import flash.events.*;
import mochi.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var simpleScore:int;
public var txts:Array;
public var bar:MovieClip;
public var zdown:Boolean;
public var opts:options;
public var lvl:levelclear;
public var soundRing1:Sprite;
public var rings:Array;
public var glow1:GlowFilter;
public var track0:track0music;
public var track1:track1music;
public var speed:int;
public var track3:track3music;
public var track4:track4music;
public var glow7:GlowFilter;
public var glow3:GlowFilter;
public var glow6:GlowFilter;
public var glow5:GlowFilter;
public var track2:track2music;
public var scoreupSound:scoreup;
public var tutScreen:tutwindow;
public var glow4:GlowFilter;
public var p:playermc;
public var tutNum:int;
public var menuchangeSound:menuchange;
public var lastH:int;
public var down:Boolean;
public var gameMode;
public var vol:Number;
public var creds:credits;
public var blurs:Array;
public var lifes:Array;
public var textsmc:Sprite;
public var startSpeed:int;
public var lives:int;
public var targets:Array;
public var stageH:int;
public var comboCol:int;
public var fademe:MovieClip;
public var xdown:Boolean;
public var stageW:int;
public var level0:String;
public var level1:String;
public var level2:String;
public var level3:String;
public var level4:String;
public var level5:String;
public var level6:String;
public var level7:String;
public var level8:String;
public var myTarg:targeting;
public var hitSound:hit;
public var map:Array;
public var boosting:int;
public var goto:String;
public var lo:MovieClip;
public var timer5:int;
public var chain2:Array;
public var chain3:Array;
public var timer1:int;
public var blocks:Array;
public var chain1:Array;
public var timer2:int;
public var mySpectrum:ByteArray;
public var diamonds:Array;
public var lazers:Array;
public var comboScore:int;
public var glow:GlowFilter;
public var holder:Sprite;
public var key1:int;
public var key2:int;
public var key3:int;
public var key4:int;
public var key5:int;
public var key6:int;
public var respawning:int;
public var keyselectSound:keyselect;
public var downKeys:Object;
public var chains:int;
public var tutText:tuttxt;
public var targeted;
public var showTarg;
public var switchSound:lazerswitch;
public var startTime;
public var titletxts:Array;
public var ti:titleScreen;
public var fade:fademc;
public var hscores:highscores;
public var score:int;
public var missed:int;
public var musicon:Boolean;
public var gotoTime:int;
public var parts:Array;
public var player:Object;
public var lightnings:Array;
public var deathSound:deaths;
public var blinkCount:int;
public var scrollH:int;
public var selectoptionSound:selectoption;
public var rails:tester;
public var tbar:topbar;
public var boostSound:boost;
public var soundon:Boolean;
public var cons:controls;
public var comboNum:int;
public var total:int;
public var timer:int;
public var gameComplete:completescreen;
public var targs:Sprite;
public var level;
public var tutTime:int;
public var gameState;
public var gamePaused:Boolean;
public var soundRing:Sprite;
public var logo1:MovieClip;
public var logo2:MovieClip;
public var logo3:SimpleButton;
public var gameOver:gameover;
public var game:Sprite;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
public function newLifeTxt():void{
var _local1:dyntxt;
if (gameState == "game"){
_local1 = new dyntxt();
_local1.x = (stageW / 2);
_local1.y = ((stageH / 2) - 20);
if (lives != 1){
_local1.txt.text = (("" + String(lives)) + " lives left");
} else {
_local1.txt.text = (("" + String(lives)) + " life left");
};
targs.addChild(_local1);
txts.push(_local1);
};
}
public function updateLevel():void{
var _local1:int;
var _local2:int;
_local1 = (Math.floor((scrollH / 40)) - 1);
if (_local1 == 1){
speed = 0;
trans("levelClear");
};
if (lastH != _local1){
lastH = _local1;
_local2 = 0;
while (_local2 < 5) {
if (map[_local1][_local2] != 0){
if (map[_local1][_local2] < 4){
newTarget((_local2 + 1), map[_local1][_local2]);
} else {
if (map[_local1][_local2] == 4){
newCrossBeam();
} else {
if (map[_local1][_local2] == 5){
newSwitchBeam(_local2);
} else {
if (map[_local1][_local2] == 6){
newLightning((_local2 * 40));
} else {
if (map[_local1][_local2] == 7){
newBlock(_local2);
} else {
if (map[_local1][_local2] == 9){
newSpinBeam();
};
};
};
};
};
};
};
_local2++;
};
};
}
public function changeScreen():void{
if (goto == "game"){
ti.x = 800;
startGame();
} else {
if (goto == "controls"){
ti.x = 800;
cons.x = 0;
gameState = "controls";
} else {
if (goto == "menu"){
game.x = 0;
holder.x = 0;
ti.x = 0;
cons.x = 800;
opts.x = 800;
creds.x = 800;
hscores.x = 800;
gameOver.x = 800;
gameComplete.x = 800;
gameState = "title";
} else {
if (goto == "options"){
opts.x = 0;
ti.x = 800;
gameState = "options";
} else {
if (goto == "credits"){
creds.x = 0;
ti.x = 800;
gameState = "credits";
} else {
if (goto == "levelClear"){
game.x = 800;
lvl.x = 0;
gameState = "levelClear";
holder.x = -800;
lvl.refreshStats();
SoundMixer.stopAll();
} else {
if (goto == "nextLevel"){
nextLevel();
lvl.x = 800;
game.x = 0;
gameState = "game";
holder.x = 0;
} else {
if (goto == "gameover"){
gameOver.x = 0;
game.x = 800;
gameState = "gameover";
holder.x = -800;
SoundMixer.stopAll();
if (musicon){
vol = 0;
track0.play(0, 999);
};
} else {
if (goto == "gamecomplete"){
gameComplete.x = 0;
game.x = 800;
gameState = "gamecomplete";
holder.x = -800;
SoundMixer.stopAll();
if (musicon){
vol = 0;
track0.play(0, 999);
};
} else {
if (goto == "hscores"){
hscores.x = 0;
ti.x = 800;
gameState = "hscores";
hscores.getScores();
} else {
if (goto == "savescore"){
hscores.x = 0;
gameOver.x = 800;
gameComplete.x = 800;
gameState = "hscores";
hscores.saveScore(total);
};
};
};
};
};
};
};
};
};
};
};
}
public function nextLevel():void{
var _local1:int;
var _local2:int;
score = 0;
simpleScore = 0;
comboScore = 0;
tbar.lightup.mc.txt.text = "0000000";
level++;
if (level == 9){
if (comboNum > 1){
comboScore = (comboScore + (comboNum * 750));
comboNum = 1;
comboCol = 0;
tbar.combo1.gotoAndStop(1);
tbar.combo.mc.combotxt.text = "";
};
trans("gamecomplete");
lives = 3;
level = 0;
nextLevel();
endGame();
} else {
game.removeChild(targs);
targs = new Sprite();
game.addChild(targs);
targets = new Array();
lazers = new Array();
parts = new Array();
lightnings = new Array();
rings = new Array();
txts = new Array();
blocks = new Array();
lifes = new Array();
blurs = new Array();
_local1 = 0;
while (_local1 < diamonds.length) {
holder.removeChild(diamonds[_local1]);
_local1++;
};
diamonds = new Array();
chain1 = new Array();
chain2 = new Array();
chain3 = new Array();
game.removeChild(p);
game.addChild(p);
chain1 = initChain(50);
chain2 = initChain(220);
chain3 = initChain(480);
startTime = 30;
loadLevel(level);
speed = startSpeed;
player = {x:320, y:400, dir:"none"};
vol = 0;
scrollH = ((level1.length / 5) * 40);
if (musicon){
_local2 = level;
if (level > 4){
_local2 = (_local2 - 4);
};
this[("track" + _local2)].play(0, 999);
};
};
}
function frame2(){
SoundMixer.stopAll();
}
function frame4(){
stop();
timer2 = 0;
fademe.buttonMode = true;
logo2.buttonMode = true;
this.addEventListener(Event.ENTER_FRAME, updatelogo2);
fademe.addEventListener(MouseEvent.CLICK, getLink2);
stage.showDefaultContextMenu = false;
}
function frame5(){
stop();
timer1 = 0;
fademe.buttonMode = true;
this.addEventListener(Event.ENTER_FRAME, updatelogo1);
fademe.addEventListener(MouseEvent.CLICK, getLink1);
stage.showDefaultContextMenu = false;
}
function frame1(){
level0 = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000007770700000770770000070777000000000000000000000000000000000000000000000000000000000000000000000000000000000002000020000200000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
level1 = "000000000000000000000000000000000000000040000000000000000000000001727117271000000000000000000000000000077110770007700000770007701177000000000000000000000000000020202202020000000000001000131000100000000000000300000004000000300400000030040000000000030000000000001121100000221220000000000000000000000000000207772000000020000277700000000000000000000001000171000700007000070000000000000000040000001000100010000030000030000030000020002000200000000000000000000001000103030033300000000000400004000000000000000222000000400000000001110012100111000000000000000000000000003000030777007770000040000770007702077020000004000000777007770077700000000000020002120400000010040000011100000000000703070000037073020200070070207000000707000000000000000000000022200020000200000000000077377773774000077377773770000000000000000000010101000000000040000003000010000300000004000000000003000000000000000770007070170701777000077700007200072077700000000000000000003000333000300000000000040000000000010001110001000000077772777720000000000277772777700000000000000077377773770000000000033300000007770077700000000200000002000200000100010000070007700077000770007700077000700000000000000000000003000303000000000000000002020000000020000000000000101000000001000000000000";
level2 = "000000000000770000700007000077000000000007700070000700077000000000090000900000000030003330033300393000300000000000000000000000000042220000000000000000000000000000000400000000007270007000000000000000000000033333000000000000000000004000000300400000000000000000003000303030001000010000100001000000000000000000000000000000002000220002000000000000200020200000040000000000101000100000000000077770000710007100071000710007177770000000013000000077773700037000370003700037000077770000000000000000000000000002000000040200000004020000000002000000000000000000777007070077700000000000000000000001110100001000010000011100000300003000030333030000300000000000000000000000040000022204000000200400000000000000000000020002120000000000002120002000000000000000000000017270172701777040000177701707017070000000000000000002003010303230001000020000000000000000000000400003000230702077700070000000400000000000000000000020000100021200000000000000000000040000000001000211322000000000000000007000777000700700077000700000100011171100000000000000040000002000222000200400000000000000000003303330003003000000000000000007777000070777707000072222000013311130000300000000000000000000000040000000000000000000303030303000000000000000040000000000222000000110110000020002";
level3 = "000000000000000009000090000900009000090000000070770700707707007070070707707070220707707170071700717077177000000000000000400000010040000021204000000100400000000000000313233132300000000000000000000001000121001210001000000000000000000000070207072707020700000007000707000700000000000000000010201070201020000000000000000400000090040000000000000000000022200202002000022200001000010010100111000000000000000000000033300303003330000000000040000400000000000000000000090000900009000090000900009000000000100010101010100100001000000000000000000000000900009000090000000000000000000200010000100000200000100001000200000000000000000400000000000000400007070700000070700000070707000000000001000001000001000100030000030000030003000300000000000000000000000000000222020002200022000200000000000000000000400000000001010010100101000000000007707700000011100777000000000000000000900020200090000000000004000022222400000000000000000000000000070073700737007377770000000000072170721707007077770000000000000400000000000000030300030003030000000000000000000000010003230001000000040000700074000000700400007000740000000000000033033003003303300000000000090000900009000000000200022200000040000000000020000000400004000000000000001313131313000000000000000000000000000000";
level4 = "000000000000000400000000000000000004000000000000000000000000002000020000000000007727700200707070000000000009000090000900000000000040000000000030040000030300000000000000001010100000000000000000000000000000077757007070070700717077070700707077071700707077077000000000000900009004000000900009000000000000000000777000720007200000000000700037000370003000000000000000000000000050000000000000000000003300033003300033000000000000000004000040000400000000000000000000000027700000070702000000700700000002700000070700000000007207000000000000030003000030200030200002000200010001000010000010000000900009000090000900000000000040000003000303040000000000000000000000000202000200000000202000000000000000000000000000000000500000000000000300030300303000300000004000000900000000000040000000004000000000003000000040000400000000000000000000090000900022200090000000000000312002310012300312000000000000000000000777077000070000707737007300077770770007733077070777707700000000000030000000300030000000200020200020000000000000000040000020200000040000400000020000200400000090000900000000000000300300033000300000000000000000000400004000000000002000222000000400000000000000770770000000000000004000000000000000020000000010200102000000001000000000000000000000000000";
level5 = "000000000000000007077770700000000000090000900009000090000000000000010002220001000000000000000000000030003030300030003030300030000000000000000000000500400000000070007770777000700000000000070007770007000777030703300030303000000000000000001110021200020000000000004000000000000000000000000000000000005000000000000500000000000000072770727707077070770707707077270772000000000040000400004000000000000000000000000001000010600100000000000000000000000000000000005000000000000000006020000200002000000000000000000000000900009000313003130009000090000000000030003000300030003000040000000010001000100010001000040000000020002000200020002000000000077770777700000077770777757777077774000007777077770777707777000000000003330033300000000900000000090000900033300090000000000007727777277772770000030000300000300003000403000030000030000300000100001400100001000100001000100001000001000010040020000200020000200020000200000200002000000000000400007077703000770770030077707000307707700300770774000000000000000000000000000000005000000000000090000300009000030000900000000000000000011100000007170071700777000700007003373300000000000030000000000002000202020002000000000100000000010000000010100010000000000000000000000000000000000050000004000000000000000000000000";
level6 = "000000090000900009000000000000000000000000050000000000000000000000050000000400000000040000000000000000000033300000000000000000000000200003000232002020000004000040000000000010001010001000000000000000000000000000000000050000000000000000000700070700070002220702070707007070700070000000000000000000003000003000003060306030000002000200020000020000020010000010000010001000100000000000000000041020410200000000000000000000000000009000090000900009000000000000000000000000000030300000030003000000060000000000000000000000000000000001010000000010011111000000000000000400000000000500000002202220002220220000000000000000000003330030300000003030033300000000000000000000000000000000005005000000000000000000000000000007070400007070700000033300000077077070700030007070770770000040000001004000040000001004000000000000000000003330000006030600300000000000000000000000020002020000000000000000000000000000000000000000027717271172711777007000004000000000000000000000050000004000000001000010000100000000000000030000300003000000060000000000000000000000620000200002000000000000000003333330003000000020002020002000090000900009000000000000400004000000000222220000000000000000101000100000000010001010000000000077077770777757777077770777707777077770777707700000";
level7 = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011100100001100010000111000000000000090000900009000090000900009000000000000070708707007070770770000000000302030020000000660660020000200000004000000000000004000000000000004000000500000000000030103301033010300000000000000000000000000020001110022200000000000770777020770207707077070700700007000000000000009000333000900033300090000000000006000600000000000000001320023100132000000000000000000000000000500005000000000000000000000000006622022000000000000000000000111000000400004000040000002000212000200009000090000900009000000000000037770370003700037000370003777000000000077730007300073000730007307773000000000000606000000000000000000000100020500000000003000000000050000001000200000050000000000000000001777117071170710707007070077700000000000002004000000200400000020040000002000000010301033301030100000000000000000000000000005000000000000222000000022200000002220000006000000000000000000000100000000000000300030300000000000100011000100000000000000000900022200090000000000000030003030000000000000100013100010000000000004000000000000000000002320023200000000000001000000000100000000010000000000000000000000";
level8 = "000000000000000000000000000900009000090000900009000000000000030303303300000000000000000000000000000000000006000000000000000000000000300003000000000000660660000000000000000000002020002000000000000000000010001210005000000000000000000000000000030300030001310013100030003030000000000000000400000000000500000000050000000000000000077177071700717077177000000000001110077700707007770000000000000000000000666000000000000000000000000000333003030033304000001110010100111040000022200202002220000000000000000600000001040000006000200040000000200100640000000000020040000000000000000000000000000006060000000000000000020200202000000000000020000200000000000060606000000000000000000000090000900009003030300900009000090000000000000727000200072700727000700007000000000900009000090000000000004000000000000000000005000000500000040000000007707717071000000707077077000000000000900011100090001110009000000000000000660000000000000000000000000000003331111333000004000000000000000000022522020200000000000000000222007770027200070000000006000000000000110110101000000000004000040000002000222000200009000090000900009000090000000006000000000000400004000040000000000002000300020000030000020003000100000300000100030001000000000000000000000000050005000005000000000000";
stage.showDefaultContextMenu = false;
MochiBot.track(this, "63671d77");
MochiServices.connect("19b3c19a6f19313b", this);
stop();
stage.showDefaultContextMenu = false;
timer5 = 0;
fademe.buttonMode = true;
fademe.addEventListener(MouseEvent.CLICK, getLink3);
this.addEventListener(Event.ENTER_FRAME, loadGame);
}
public function updateTxts():void{
var _local1:int;
_local1 = 0;
while (_local1 < txts.length) {
txts[_local1].x = (((stageW / 2) + 4) - (Math.random() * 8));
txts[_local1].y = (((stageW / 2) - 16) - (Math.random() * 8));
if (txts.alpha == 1){
txts.alpha = 0.6;
} else {
txts[_local1].alpha = (txts[_local1].alpha - 0.2);
};
if (txts[_local1].alpha <= 0){
targs.removeChild(txts[_local1]);
txts.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
function frame3(){
}
public function drawLighting(_arg1:Array):int{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5 = _arg1;
var _local6 = 1;
var _local7 = (_local5[_local6] - 1);
_local5[_local6] = _local7;
if (_arg1[1] <= 0){
return (1);
};
if (_arg1[1] <= 60){
if (((_arg1[0].x + 20) / 40) == (p.x / 40)){
if (respawning == 0){
death();
};
};
_arg1[0].graphics.clear();
_arg1[0].graphics.lineStyle(1, 0xFFCC00, 1);
_local3 = (30 - (Math.random() * 20));
_local4 = 0;
_arg1[0].graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 17) {
_arg1[0].graphics.lineTo(_local3, _local4);
_local3 = (30 - (Math.random() * 20));
_local4 = ((_local2 * 34) - (Math.random() * 17));
_local2++;
};
_arg1[0].graphics.lineStyle(1, 0xFFFF00, 1);
_local3 = (30 - (Math.random() * 20));
_local4 = 0;
_arg1[0].graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 17) {
_arg1[0].graphics.lineTo(_local3, _local4);
_local3 = (30 - (Math.random() * 20));
_local4 = ((_local2 * 34) - (Math.random() * 17));
_local2++;
};
_arg1[0].graphics.lineStyle(1, 16774033, 1);
_local3 = (30 - (Math.random() * 20));
_local4 = 0;
_arg1[0].graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 17) {
_arg1[0].graphics.lineTo(_local3, _local4);
_local3 = (30 - (Math.random() * 20));
_local4 = ((_local2 * 34) - (Math.random() * 17));
_local2++;
};
} else {
if (_arg1[1] == 61){
targs.removeChild(_arg1[2]);
};
};
return (0);
}
function frame6(){
stageW = 640;
stageH = 480;
speed = 2;
startSpeed = 2;
respawning = 0;
boosting = 0;
blinkCount = 0;
gameState = "title";
vol = 0;
gamePaused = false;
gotoTime = 0;
startTime = 30;
key1 = 38;
key2 = 40;
key3 = 39;
key4 = 37;
key5 = 90;
key6 = 88;
tutTime = 340;
tutNum = 1;
musicon = true;
soundon = true;
down = false;
zdown = false;
xdown = false;
scoreupSound = new scoreup();
selectoptionSound = new selectoption();
menuchangeSound = new menuchange();
hitSound = new hit();
keyselectSound = new keyselect();
deathSound = new deaths();
boostSound = new boost();
switchSound = new lazerswitch();
track0 = new track0music();
track1 = new track1music();
track2 = new track2music();
track3 = new track3music();
track4 = new track4music();
glow = new GlowFilter(13382553, 1, 13, 13, 3.7);
glow1 = new GlowFilter(0xFF0000, 1, 13, 13, 3.7);
glow3 = new GlowFilter(0xFFCC00, 1, 13, 13, 3.7);
glow4 = new GlowFilter(26367, 1, 13, 13, 3.7);
glow5 = new GlowFilter(0xCC00, 1, 13, 13, 3.7);
glow6 = new GlowFilter(0xFFFFFF, 1, 13, 13, 3.7);
glow7 = new GlowFilter(0xFF6600, 1, 13, 13, 3.7);
score = 0;
simpleScore = 0;
comboScore = 0;
missed = 0;
total = 0;
level = 0;
lives = 3;
gameMode = "level";
scrollH = ((level1.length / 5) * 40);
lastH = 0;
mySpectrum = new ByteArray();
soundRing = new Sprite();
soundRing1 = new Sprite();
comboNum = 1;
comboCol = 0;
player = {x:320, y:400, dir:"none"};
rails = new tester();
targs = new Sprite();
p = new playermc();
tbar = new topbar();
myTarg = new targeting();
showTarg = false;
downKeys = new Object();
targets = new Array();
lazers = new Array();
parts = new Array();
lightnings = new Array();
rings = new Array();
txts = new Array();
blocks = new Array();
lifes = new Array();
blurs = new Array();
diamonds = new Array();
chain1 = new Array();
chain2 = new Array();
chain3 = new Array();
titletxts = new Array();
chains = 3;
holder = new Sprite();
timer = 20;
addEventListener(Event.ENTER_FRAME, update);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keysDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keysUp);
game = new Sprite();
addChild(game);
game.addChild(holder);
chain1 = initChain(50);
chain2 = initChain(220);
chain3 = initChain(480);
ti = new titleScreen();
ti.st = this;
addChild(ti);
cons = new controls();
cons.st = this;
addChild(cons);
cons.x = 800;
opts = new options();
opts.st = this;
addChild(opts);
opts.x = 800;
creds = new credits();
creds.st = this;
addChild(creds);
creds.x = 800;
lvl = new levelclear();
lvl.st = this;
addChild(lvl);
lvl.x = 800;
gameOver = new gameover();
gameOver.st = this;
addChild(gameOver);
gameOver.x = 800;
gameComplete = new completescreen();
gameComplete.st = this;
addChild(gameComplete);
gameComplete.x = 800;
hscores = new highscores();
hscores.st = this;
addChild(hscores);
hscores.x = 800;
tutScreen = new tutwindow();
tutScreen.st = this;
addChild(tutScreen);
tutScreen.x = 800;
tutScreen.y = 130;
tutText = new tuttxt();
addChild(tutText);
tutText.x = 800;
tutText.y = 83;
tutText.st = this;
textsmc = new Sprite();
addChild(textsmc);
fade = new fademc();
addChild(fade);
SoundMixer.stopAll();
track0.play(0, 999);
stop();
}
public function checkTutorial():void{
var _local1:int;
var _local2:*;
if ((((((tutNum == 2)) || ((tutNum == 3)))) || ((tutNum == 4)))){
if ((((((targets.length <= 0)) && ((tutTime > 60)))) && ((tutTime < 300)))){
_local2 = (tutTime - 60);
scrollH = (scrollH - (_local2 * 2));
tutTime = 60;
};
};
}
public function newLife(_arg1:int):void{
var _local2:life;
_local2 = new life();
_local2.x = (240 + (_arg1 * 40));
_local2.y = -20;
lifes.push(_local2);
targs.addChild(_local2);
}
public function updatelogo1(_arg1:Event):void{
timer1++;
if (timer1 >= 100){
fademe.play();
};
if (timer1 > 120){
this.removeEventListener(Event.ENTER_FRAME, updatelogo1);
fademe.removeEventListener(MouseEvent.CLICK, getLink1);
nextFrame();
};
}
public function updatelogo2(_arg1:Event):void{
timer2++;
if (timer2 >= 100){
fademe.play();
};
if (timer2 > 120){
this.removeEventListener(Event.ENTER_FRAME, updatelogo2);
fademe.removeEventListener(MouseEvent.CLICK, getLink2);
nextFrame();
};
}
public function update(_arg1:Event):void{
var _local2:int;
if (vol < 1){
vol = (vol + 0.02);
SoundMixer.soundTransform = new SoundTransform(vol, 0);
};
if (fade.currentFrame == 40){
fade.x = 800;
};
if (gotoTime > 0){
gotoTime--;
if (gotoTime == 0){
changeScreen();
};
};
updateTitleTxts();
if (gamePaused){
if ((((gameState == "tutorial")) && ((tutText.pe.currentFrame == 1)))){
newTitleText("Paused", 200);
} else {
if (gameState == "game"){
newTitleText("Paused", 200);
};
};
};
if (gameState == "title"){
newTitleText("Ambient Parade");
} else {
if (gameState == "controls"){
newTitleText("Controls");
} else {
if (gameState == "options"){
newTitleText("Options");
} else {
if (gameState == "credits"){
newTitleText("Credits");
} else {
if (gameState == "gameover"){
newTitleText("Game Over !");
} else {
if (gameState == "gamecomplete"){
newTitleText("Game Complete !");
} else {
if (gameState == "levelClear"){
newTitleText("Level Clear !");
};
};
};
};
};
};
};
if (!gamePaused){
updateDiamonds();
if (gameState == "chooseTut"){
showWave();
};
if (gameState == "tutorial"){
checkTutorial();
if (respawning <= 60){
tutTime--;
if (tutTime <= 0){
tutTime = 380;
gamePaused = true;
updateTutorial();
tutText.pe.gotoAndPlay(2);
};
};
};
if ((((gameState == "game")) || ((gameState == "tutorial")))){
if (startTime > 0){
startTime--;
newLevelTxt();
};
showWave();
p.rotation = (p.rotation + 2);
if (respawning > 0){
if (p.currentFrame <= 12){
blinkCount++;
if (blinkCount == 5){
blinkCount = 0;
p.alpha = Math.abs((1 - p.alpha));
};
};
respawning--;
if (respawning > 60){
newLifeTxt();
} else {
speed = startSpeed;
};
} else {
p.alpha = 1;
};
updateLevel();
scrollH = (scrollH - speed);
_local2 = 0;
while (_local2 < targets.length) {
targets[_local2].y = (targets[_local2].y + speed);
if (targets[_local2].y > 500){
targs.removeChild(targets[_local2]);
targets.splice(_local2, 1);
_local2--;
missed++;
} else {
if (targets[_local2].dead){
targs.removeChild(targets[_local2]);
targets.splice(_local2, 1);
_local2--;
};
};
_local2++;
};
_local2 = 0;
while (_local2 < lazers.length) {
if (updateLazer(lazers[_local2]) == false){
lazers.splice(_local2, 1);
_local2--;
};
_local2++;
};
_local2 = 0;
while (_local2 < lightnings.length) {
if (drawLighting(lightnings[_local2]) == 1){
targs.removeChild(lightnings[_local2][0]);
lightnings.splice(_local2, 1);
_local2--;
};
_local2++;
};
_local2 = 0;
while (_local2 < rings.length) {
if (drawRing(rings[_local2]) == 1){
targs.removeChild(rings[_local2][0]);
rings.splice(_local2, 1);
_local2--;
};
_local2++;
};
_local2 = 0;
while (_local2 < blurs.length) {
blurs[_local2].alpha = (blurs[_local2].alpha - 0.1);
if (blurs[_local2].alpha <= 0){
targs.removeChild(blurs[_local2]);
blurs.splice(_local2, 1);
_local2--;
};
_local2++;
};
if (respawning <= 60){
movePlayer();
};
updateParticles();
updateBlocks();
updateLifes();
updateTxts();
if (showTarg == true){
myTarg.y = targeted.y;
myTarg.x = targeted.x;
myTarg.txt.text = ((("Target locked x:" + myTarg.x) + ", y:") + myTarg.y);
} else {
myTarg.y = -500;
};
p.x = player.x;
p.y = player.y;
};
};
}
public function keysDown(_arg1:KeyboardEvent):void{
if ((((gameState == "tutorial")) && ((_arg1.keyCode == 13)))){
if (gamePaused == true){
if (tutScreen.x > 700){
gamePaused = false;
tutText.pe.gotoAndStop(1);
};
};
};
downKeys[("key" + _arg1.keyCode)] = true;
}
public function newSpinBeam():void{
var _local1:spinner;
_local1 = new spinner();
_local1.x = 320;
_local1.y = -20;
_local1.lines = new Sprite();
_local1.addChild(_local1.lines);
_local1.num = 3;
_local1.m = 1;
_local1.lines.filters = [glow7];
lazers.push(_local1);
targs.addChild(_local1);
}
public function explode(_arg1:int, _arg2:int, _arg3:int){
var _local4:int;
if (_arg3 == comboCol){
comboNum++;
tbar.combo1.gotoAndStop(2);
newcombotxt(comboNum, _arg1, _arg2);
} else {
if (comboNum > 1){
_local4 = ((comboNum * 750) - 750);
score = (score + _local4);
comboScore = (comboScore + _local4);
updateScore();
addCombo(_local4);
};
comboCol = _arg3;
comboNum = 1;
tbar.combo.mc.combotxt.text = "";
tbar.combo1.gotoAndStop(1);
};
if (_arg3 == 1){
newRing(_arg1, _arg2, 0xFF0000, 1);
} else {
if (_arg3 == 2){
newRing(_arg1, _arg2, 26367, 4);
} else {
if (_arg3 == 3){
newRing(_arg1, _arg2, 0xCC00, 5);
};
};
};
}
public function newLightning(_arg1:int):void{
var _local2:Sprite;
var _local3:bolt;
_local2 = new Sprite();
targs.addChild(_local2);
_local2.x = (220 + _arg1);
_local2.filters = [glow3];
_local3 = new bolt();
targs.addChild(_local3);
_local3.x = (220 + _arg1);
_local3.y = 0;
lightnings.push([_local2, 90, _local3]);
}
public function drawSwitchbeam(_arg1:Sprite):void{
var _local2:int;
var _local3:int;
var _local4:int;
_arg1.graphics.clear();
_arg1.graphics.lineStyle(1, 0xFF0000, 1);
_local3 = 0;
_local4 = 0;
_arg1.graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 7) {
_arg1.graphics.lineTo(_local3, _local4);
_local3 = ((_local2 * 34) - (Math.random() * 17));
_local4 = (10 - (Math.random() * 20));
_local2++;
};
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.lineTo(180, _local4);
_arg1.graphics.lineStyle(1, 10486017, 1);
_local3 = 0;
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 7) {
_arg1.graphics.lineTo(_local3, _local4);
_local3 = ((_local2 * 34) - (Math.random() * 17));
_local4 = (10 - (Math.random() * 20));
_local2++;
};
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.lineTo(180, _local4);
_arg1.graphics.lineStyle(1, 16679297, 1);
_local3 = 0;
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 7) {
_arg1.graphics.lineTo(_local3, _local4);
_local3 = ((_local2 * 34) - (Math.random() * 17));
_local4 = (10 - (Math.random() * 20));
_local2++;
};
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.lineTo(180, _local4);
if (Math.abs((_arg1.parent.y - p.y)) < 20){
if (respawning == 0){
death();
};
};
}
public function checkHit():void{
var _local1:int;
var _local2:int;
var _local3:int;
if (showTarg == true){
if (soundon){
hitSound.play();
};
explode(targeted.x, targeted.y, targeted.fr.currentFrame);
targeted.dead = true;
score = (score + 250);
simpleScore = (simpleScore + 250);
updateScore();
};
_local1 = 0;
while (_local1 < lazers.length) {
if (lazers[_local1].num == 2){
_local2 = (Math.abs((lazers[_local1].x - p.x)) - 10);
_local3 = Math.abs((lazers[_local1].y - p.y));
if ((((((_local3 <= 140)) && ((_local3 > 100)))) && ((_local2 == lazers[_local1].xd)))){
if (soundon){
switchSound.play();
};
lazers[_local1].btn.play();
};
};
_local1++;
};
}
public function addCombo(_arg1:int):void{
var _local2:String;
_local2 = ("+" + String(_arg1));
tbar.comboadd.mc.txt.text = _local2;
tbar.comboadd.play();
}
public function activateTutorial():void{
gameState = "tutorial";
tutText.x = 12;
tutText.gotoAndStop(2);
tutText.pe.gotoAndPlay(2);
gamePaused = true;
loadLevel(0);
scrollH = ((level1.length / 5) * 40);
tutTime = 340;
tutScreen.playme.gotoAndStop(1);
level = 0;
}
public function updateDiamonds():void{
var _local1:int;
var _local2:int;
var _local3:*;
_local1 = 0;
while (_local1 < diamonds.length) {
diamonds[_local1].y = (diamonds[_local1].y + 2);
if (diamonds[_local1].y > 600){
holder.removeChild(diamonds[_local1]);
diamonds.splice(_local1, 1);
_local1--;
};
_local1++;
};
_local2 = 1;
while (_local2 <= chains) {
_local3 = this[("chain" + _local2)];
_local3[1] = (_local3[1] + 2);
if (_local3[1] > -10){
newDiamond(_local3);
};
_local2++;
};
}
public function drawRing(_arg1:Array):int{
var _local2:int;
var _local3:*;
var _local4:Number;
var _local5:int;
var _local6:int;
_arg1[1] = (_arg1[1] + 3);
_arg1[0].y = (_arg1[0].y + speed);
if (_arg1[1] >= 80){
return (1);
};
_arg1[0].graphics.clear();
_arg1[0].graphics.lineStyle(1, _arg1[2], 1);
_local2 = ((_arg1[1] / 10) - (Math.random() * (_arg1[1] / 5)));
_arg1[0].graphics.moveTo((_arg1[1] + _local2), 0);
_local3 = (_arg1[1] + _local2);
_local4 = 0;
_local5 = 0;
while (_local5 < 19) {
_local4 = (_local4 + (Math.PI / 10));
_local6 = ((_arg1[1] / 10) - (Math.random() * (_arg1[1] / 5)));
_arg1[0].graphics.lineTo((Math.cos(_local4) * (_arg1[1] + _local6)), (Math.sin(_local4) * (_arg1[1] + _local6)));
_local5++;
};
_arg1[0].graphics.lineTo(_local3, 0);
return (0);
}
public function updateLifes():void{
var _local1:int;
_local1 = 0;
while (_local1 < lifes.length) {
lifes[_local1].y = (lifes[_local1].y + speed);
if (lifes[_local1].y > (stageH + 20)){
targs.removeChild(lifes[_local1]);
lifes.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function getLink1(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.alillm.com");
navigateToURL(_local2, "_blank");
}
public function getLink2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.dabontv.com");
navigateToURL(_local2, "_blank");
}
public function getLink3(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.dabontv.com");
navigateToURL(_local2, "_blank");
}
public function updateLazer(_arg1):Boolean{
var _local2:*;
var _local3:*;
if (_arg1.num == 1){
_arg1.t--;
if (_arg1.t < -30){
_arg1.t = 40;
};
if (_arg1.t > 0){
drawCrossbeam(_arg1.lines);
} else {
if (_arg1.t == 0){
_arg1.lines.graphics.clear();
};
};
_arg1.y = (_arg1.y + speed);
if (_arg1.y > 500){
targs.removeChild(_arg1);
return (false);
};
} else {
if (_arg1.num == 2){
if (_arg1.btn.currentFrame == 1){
drawSwitchbeam(_arg1.lines);
} else {
_arg1.lines.graphics.clear();
};
_arg1.y = (_arg1.y + speed);
if (_arg1.y > 500){
targs.removeChild(_arg1);
return (false);
};
} else {
if (_arg1.m == 1){
_arg1.ob1.x = (_arg1.ob1.x + 2);
_arg1.ob2.x = (_arg1.ob2.x - 2);
if (_arg1.ob1.x > 0){
_arg1.m = 2;
};
} else {
_arg1.ob1.x = (_arg1.ob1.x - 2);
_arg1.ob2.x = (_arg1.ob2.x + 2);
if (_arg1.ob1.x < -80){
_arg1.m = 1;
};
};
_arg1.beam1.width = (80 + _arg1.ob1.x);
_arg1.beam2.width = (80 + _arg1.ob1.x);
_arg1.y = (_arg1.y + speed);
_local2 = Math.abs((_arg1.y - p.y));
_local3 = Math.abs((_arg1.x - p.x));
if ((((_local2 < 30)) && ((_local3 > _arg1.ob2.x)))){
if (respawning == 0){
death();
};
};
if (_arg1.y > 500){
targs.removeChild(_arg1);
return (false);
};
};
};
return (true);
}
public function newTitleText(_arg1:String, _arg2:int=0):void{
var _local3:dyntxt;
_local3 = new dyntxt();
_local3.x = (stageW / 2);
_local3.y = (130 + _arg2);
_local3.offsets = _arg2;
_local3.txt.text = _arg1;
textsmc.addChild(_local3);
titletxts.push(_local3);
}
public function loadGame(_arg1:Event):void{
var _local2:*;
var _local3:*;
lo.rotation = (lo.rotation + 2);
_local2 = stage.loaderInfo.bytesLoaded;
_local3 = stage.loaderInfo.bytesTotal;
if (_local2 >= _local3){
fademe.gotoAndStop((timer5 + 20));
timer5++;
if (timer5 == 20){
this.removeEventListener(Event.ENTER_FRAME, loadGame);
fademe.removeEventListener(MouseEvent.CLICK, getLink3);
gotoAndPlay(2);
};
} else {
bar.width = ((_local2 / _local3) * 250);
};
}
public function newLevelTxt():void{
var _local1:dyntxt;
_local1 = new dyntxt();
_local1.x = (stageW / 2);
_local1.y = ((stageH / 2) - 20);
if (level > 0){
_local1.txt.text = ("Level " + String(level));
};
targs.addChild(_local1);
txts.push(_local1);
}
public function movePlayer():void{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:playermc;
var _local5:*;
var _local6:*;
var _local7:int;
var _local8:*;
if (boosting == 0){
if (downKeys[("key" + key4)] == true){
if ((player.x % 40) == 0){
if (player.x > 240){
player.dir = "left";
} else {
player.dir = "none";
};
};
} else {
if (downKeys[("key" + key3)] == true){
if ((player.x % 40) == 0){
if (player.x < 400){
player.dir = "right";
} else {
player.dir = "none";
};
};
} else {
if ((player.x % 40) == 0){
player.dir = "none";
};
down = false;
};
};
};
if (downKeys[("key" + key5)] == true){
if (zdown == false){
zdown = true;
p.gotoAndPlay("zap");
checkHit();
};
} else {
zdown = false;
};
if (downKeys[("key" + key6)] == true){
if (xdown == false){
if ((player.x % 40) == 0){
xdown = true;
boosting = 8;
if (soundon){
boostSound.play();
};
};
};
} else {
xdown = false;
};
if (boosting == 0){
if (downKeys[("key" + key1)] == true){
if (player.y > 20){
player.y = (player.y - 5);
};
} else {
if (downKeys[("key" + key2)] == true){
if (player.y < (stageH - 20)){
player.y = (player.y + 5);
};
};
};
};
if (player.dir == "left"){
player.x = (player.x - 5);
} else {
if (player.dir == "right"){
player.x = (player.x + 5);
};
};
if (boosting > 0){
boosting--;
_local4 = new playermc();
targs.addChild(_local4);
_local4.x = player.x;
_local4.y = player.y;
_local4.rotation = p.rotation;
blurs.push(_local4);
if (player.y > 20){
player.y = (player.y - 15);
};
};
showTarg = false;
_local1 = new Array();
_local2 = 0;
while (_local2 < targets.length) {
_local5 = (targets[_local2].x - p.x);
_local6 = Math.abs((targets[_local2].y - p.y));
if ((((_local5 == 0)) && ((_local6 < 35)))){
if (boosting == 0){
_local1.push(targets[_local2]);
showTarg = true;
} else {
if (soundon){
hitSound.play();
};
targets[_local2].dead = true;
explode(targets[_local2].x, targets[_local2].y, targets[_local2].fr.currentFrame);
score = (score + 250);
simpleScore = (simpleScore + 250);
updateScore();
};
};
_local2++;
};
_local3 = 9999;
if (showTarg == true){
_local7 = 0;
while (_local7 < _local1.length) {
_local8 = Math.abs((_local1[_local7].y - p.y));
if (_local8 < _local3){
_local3 = _local8;
targeted = _local1[_local7];
};
_local7++;
};
};
}
public function loadLevel(_arg1:int):void{
var _local2:int;
var _local3:String;
var _local4:int;
var _local5:*;
var _local6:int;
var _local7:int;
map = new Array();
_local2 = 0;
while (_local2 < 246) {
map[_local2] = new Array();
_local2++;
};
_local3 = this[("level" + _arg1)];
_local4 = 0;
_local5 = (_local3.length / 5);
_local6 = 0;
while (_local6 < _local5) {
_local7 = 0;
while (_local7 < 5) {
map[_local6][_local7] = Number(_local3.charAt(_local4));
_local4++;
_local7++;
};
_local6++;
};
}
public function newCrossBeam():void{
var _local1:crosslazer;
_local1 = new crosslazer();
_local1.x = 230;
_local1.y = -20;
_local1.t = 40;
_local1.lines = new Sprite();
_local1.addChild(_local1.lines);
_local1.num = 1;
_local1.lines.filters = [glow];
lazers.push(_local1);
targs.addChild(_local1);
}
public function death():void{
if (soundon){
deathSound.play();
};
if (gameState == "game"){
lives--;
};
newRing(p.x, p.y, 0xFFFFFF, 6);
speed = 0;
if (lives >= 0){
respawning = 150;
p.gotoAndPlay("respawn");
} else {
if (comboNum > 1){
comboScore = (comboScore + (comboNum * 750));
comboNum = 1;
comboCol = 0;
tbar.combo1.gotoAndStop(1);
tbar.combo.mc.combotxt.text = "";
};
trans("gameover");
lives = 3;
level = 0;
nextLevel();
endGame();
};
}
public function trans(_arg1:String):void{
fade.x = 0;
if (_arg1 == "game"){
gameState = "trans";
goto = "game";
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "controls"){
gameState = "trans";
goto = "controls";
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "menu"){
gameState = "trans";
goto = "menu";
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "options"){
gameState = "trans";
goto = "options";
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "credits"){
gameState = "trans";
goto = "credits";
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "levelClear"){
if (comboNum > 1){
comboScore = (comboScore + (comboNum * 750));
comboNum = 1;
comboCol = 0;
tbar.combo1.gotoAndStop(1);
tbar.combo.mc.combotxt.text = "";
};
gameState = "trans";
goto = "levelClear";
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "nextLevel"){
gameState = "trans";
goto = "nextLevel";
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "gameover"){
gameState = "trans";
goto = "gameover";
gameOver.refreshStats();
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "gamecomplete"){
gameState = "trans";
goto = "gamecomplete";
gameComplete.refreshStats();
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "hscores"){
gameState = "trans";
goto = "hscores";
gotoTime = 20;
fade.play();
} else {
if (_arg1 == "savescore"){
gameState = "trans";
goto = "savescore";
gotoTime = 20;
fade.play();
};
};
};
};
};
};
};
};
};
};
};
}
public function newSwitchBeam(_arg1:int):void{
var _local2:switchlazer;
_local2 = new switchlazer();
_local2.x = 230;
_local2.y = -150;
_local2.t = 60;
_local2.num = 2;
_local2.lines = new Sprite();
_local2.addChild(_local2.lines);
_local2.lines.filters = [glow1];
lazers.push(_local2);
targs.addChild(_local2);
_local2.btn.x = ((_arg1 * 40) + 10);
_local2.btn.y = 120;
_local2.xd = (_arg1 * 40);
}
public function newBlock(_arg1:int):void{
var _local2:block;
_local2 = new block();
_local2.x = (240 + (_arg1 * 40));
_local2.y = -20;
blocks.push(_local2);
targs.addChild(_local2);
}
public function drawCrossbeam(_arg1:Sprite):void{
var _local2:int;
var _local3:int;
var _local4:int;
_arg1.graphics.clear();
_arg1.graphics.lineStyle(1, 13382553, 1);
_local3 = 0;
_local4 = 0;
_arg1.graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 7) {
_arg1.graphics.lineTo(_local3, _local4);
_local3 = ((_local2 * 34) - (Math.random() * 17));
_local4 = (10 - (Math.random() * 20));
_local2++;
};
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.lineTo(180, _local4);
_arg1.graphics.lineStyle(1, 14714310, 1);
_local3 = 0;
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 7) {
_arg1.graphics.lineTo(_local3, _local4);
_local3 = ((_local2 * 34) - (Math.random() * 17));
_local4 = (10 - (Math.random() * 20));
_local2++;
};
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.lineTo(180, _local4);
_arg1.graphics.lineStyle(1, 11152260, 1);
_local3 = 0;
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.moveTo(_local3, _local4);
_local2 = 1;
while (_local2 < 7) {
_arg1.graphics.lineTo(_local3, _local4);
_local3 = ((_local2 * 34) - (Math.random() * 17));
_local4 = (10 - (Math.random() * 20));
_local2++;
};
_local4 = (10 - (Math.random() * 20));
_arg1.graphics.lineTo(180, _local4);
if (Math.abs((_arg1.parent.y - p.y)) < 20){
if (respawning == 0){
death();
};
};
}
public function updateTutorial():void{
tutNum++;
tutText.gotoAndStop((tutNum + 1));
if (tutNum == 7){
gameState = "chooseTut";
tutScreen.x = 165;
tutScreen.playme.gotoAndStop(2);
tutScreen.pointers.gotoAndStop(2);
tutScreen.select = 2;
tutText.x = 800;
tutText.gotoAndStop(1);
tutNum = 1;
tutTime = 340;
player = {x:320, y:400, dir:"none"};
score = 0;
simpleScore = 0;
comboScore = 0;
tbar.lightup.mc.txt.text = "0000000";
tbar.combo1.gotoAndStop(1);
comboNum = 1;
tbar.combo.mc.combotxt.text = "";
};
}
public function updateScore():void{
var _local1:String;
var _local2:int;
var _local3:int;
var _local4:int;
_local1 = String(score);
_local2 = _local1.length;
_local3 = (7 - _local2);
tbar.lightup.mc.txt.text = "";
_local4 = 0;
while (_local4 < _local3) {
tbar.lightup.mc.txt.appendText("0");
_local4++;
};
tbar.lightup.mc.txt.appendText(_local1);
tbar.lightup.play();
}
public function newTarget(_arg1:int, _arg2:int=9999, _arg3:int=0):void{
var _local4:target;
_local4 = new target();
_local4.x = (200 + (_arg1 * 40));
_local4.y = (-20 + _arg3);
_local4.targeted = false;
_local4.fill.gotoAndStop(_arg2);
_local4.fr.gotoAndStop(_arg2);
targets.push(_local4);
targs.addChild(_local4);
}
public function endGame():void{
game.removeChild(rails);
game.removeChild(soundRing);
game.removeChild(soundRing1);
game.removeChild(targs);
game.removeChild(p);
game.removeChild(tbar);
scrollH = ((level1.length / 5) * 40);
player = {x:320, y:400, dir:"none"};
SoundMixer.stopAll();
level = 0;
}
public function startGame():void{
rails.x = (stageW / 2);
rails.y = 250;
game.addChild(soundRing);
game.addChild(soundRing1);
game.addChild(rails);
game.addChild(targs);
game.addChild(p);
p.x = player.x;
p.y = player.y;
game.addChild(tbar);
game.addChild(myTarg);
myTarg.y = -50;
gameState = "chooseTut";
tutScreen.x = 165;
}
public function initChain(_arg1:int):Array{
var _local2:int;
var _local3:int;
var _local4:diamond;
var _local5:int;
var _local6:Number;
_local2 = stageH;
_local3 = 0;
while (_local3 < 8) {
_local4 = new diamond();
holder.addChild(_local4);
_local4.x = _arg1;
_local4.y = _local2;
_local4.gotoAndStop(level);
_local5 = (45 - (Math.random() * 90));
_local4.rotation = _local5;
_local6 = (_local4.rotation * (Math.PI / 180));
_arg1 = (_arg1 + (Math.sin(_local6) * 100));
_local2 = (_local2 - (Math.cos(_local6) * 100));
diamonds.push(_local4);
_local3++;
};
return ([_arg1, _local2]);
}
public function activateGame():void{
gameState = "game";
scrollH = ((level1.length / 5) * 40);
tutTime = 340;
gamePaused = false;
tutScreen.playme.gotoAndStop(1);
SoundMixer.stopAll();
level = 0;
total = 0;
nextLevel();
}
public function newDiamond(_arg1:Array):void{
var _local2:diamond;
var _local3:int;
var _local4:Number;
_local2 = new diamond();
holder.addChild(_local2);
_local2.x = _arg1[0];
_local2.y = _arg1[1];
_local2.gotoAndStop(level);
if (_arg1[0] <= 0){
_local3 = (Math.random() * 45);
} else {
if (_arg1[0] >= stageW){
_local3 = (-(Math.random()) * 45);
} else {
_local3 = (45 - (Math.random() * 90));
};
};
_local2.rotation = _local3;
_local4 = (_local2.rotation * (Math.PI / 180));
_arg1[0] = (_arg1[0] + (Math.sin(_local4) * 100));
_arg1[1] = (_arg1[1] - (Math.cos(_local4) * 100));
diamonds.push(_local2);
}
public function showWave():void{
var _local1:int;
var _local2:*;
SoundMixer.computeSpectrum(mySpectrum, true);
soundRing.graphics.clear();
soundRing.graphics.lineStyle(0.25, 39423, 1);
soundRing.graphics.moveTo((stageW / 2), 0);
soundRing1.graphics.clear();
soundRing1.graphics.lineStyle(0.25, 0xFFFFFF, 1);
soundRing1.graphics.moveTo((stageW - 100), 0);
_local1 = 0;
while (_local1 < 510) {
_local2 = mySpectrum.readFloat();
soundRing.graphics.drawRect((((stageW / 2) - (_local2 * 100)) - 108), _local1, 3, 10);
soundRing.graphics.drawRect(((((stageW / 2) - (_local2 * 100)) + 6) - 108), _local1, (_local2 * 100), 10);
soundRing.graphics.drawRect((((stageW / 2) + (_local2 * 100)) + 105), _local1, 3, 10);
soundRing.graphics.drawRect((((stageW / 2) - 3) + 105), _local1, (_local2 * 100), 10);
_local1 = (_local1 + 20);
};
}
public function updateBlocks():void{
var _local1:int;
var _local2:*;
var _local3:int;
_local1 = 0;
while (_local1 < blocks.length) {
blocks[_local1].y = (blocks[_local1].y + speed);
blocks[_local1].rotation = (blocks[_local1].rotation + 3);
_local2 = (blocks[_local1].x - p.x);
_local3 = Math.abs((blocks[_local1].y - p.y));
if (blocks[_local1].y > (stageH + 20)){
targs.removeChild(blocks[_local1]);
blocks.splice(_local1, 1);
_local1--;
};
if ((((_local2 == 0)) && ((_local3 < 35)))){
if (respawning == 0){
death();
};
};
_local1++;
};
}
public function updateTitleTxts():void{
var _local1:int;
_local1 = 0;
while (_local1 < titletxts.length) {
titletxts[_local1].x = (((stageW / 2) + 4) - (Math.random() * 8));
titletxts[_local1].y = ((134 - (Math.random() * 8)) + titletxts[_local1].offsets);
if (titletxts.alpha == 1){
titletxts.alpha = 0.6;
} else {
titletxts[_local1].alpha = (titletxts[_local1].alpha - 0.2);
};
if (titletxts[_local1].alpha <= 0){
textsmc.removeChild(titletxts[_local1]);
titletxts.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function keysUp(_arg1:KeyboardEvent):void{
if ((((gameState == "tutorial")) && ((_arg1.keyCode == 27)))){
gameState = "chooseTut";
tutScreen.x = 165;
tutScreen.pointers.gotoAndStop(2);
tutScreen.select = 2;
tutText.x = 800;
tutText.gotoAndStop(1);
tutNum = 1;
tutTime = 340;
player = {x:320, y:400, dir:"none"};
p.x = player.x;
p.y = player.y;
score = 0;
simpleScore = 0;
comboScore = 0;
tbar.lightup.mc.txt.text = "0000000";
tbar.combo1.gotoAndStop(1);
comboNum = 1;
tbar.combo.mc.combotxt.text = "";
};
if ((((((gameState == "game")) || ((gameState == "tutorial")))) && ((_arg1.keyCode == 80)))){
if ((((gameState == "tutorial")) && ((tutText.pe.currentFrame == 1)))){
gamePaused = !(gamePaused);
} else {
if (gameState == "game"){
gamePaused = !(gamePaused);
};
};
};
downKeys[("key" + _arg1.keyCode)] = false;
}
public function newcombotxt(_arg1:int, _arg2:int, _arg3:int):void{
tbar.combo.mc.combotxt.text = ("x" + String(_arg1));
tbar.combo.play();
}
public function updateParticles():void{
var _local1:int;
_local1 = 0;
while (_local1 < parts.length) {
parts[_local1].x = (parts[_local1].x + parts[_local1].xv);
parts[_local1].y = (parts[_local1].y + parts[_local1].yv);
parts[_local1].life--;
if (parts[_local1].life <= 0){
targs.removeChild(parts[_local1]);
parts.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function newRing(_arg1:int, _arg2:int, _arg3, _arg4):void{
var _local5:Sprite;
_local5 = new Sprite();
targs.addChild(_local5);
_local5.x = _arg1;
_local5.y = _arg2;
_local5.filters = [this[("glow" + _arg4)]];
rings.push([_local5, 10, _arg3]);
}
}
}//package ambientParade_fla
Section 20
//mmmc_64 (ambientParade_fla.mmmc_64)
package ambientParade_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mmmc_64 extends MovieClip {
public var txt:TextField;
}
}//package ambientParade_fla
Section 21
//mmmc2_65 (ambientParade_fla.mmmc2_65)
package ambientParade_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mmmc2_65 extends MovieClip {
public var txt:TextField;
}
}//package ambientParade_fla
Section 22
//msgbox_67 (ambientParade_fla.msgbox_67)
package ambientParade_fla {
import flash.display.*;
public dynamic class msgbox_67 extends MovieClip {
public function msgbox_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 23
//on_59 (ambientParade_fla.on_59)
package ambientParade_fla {
import flash.display.*;
public dynamic class on_59 extends MovieClip {
public function on_59(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package ambientParade_fla
Section 24
//optionsmenu_61 (ambientParade_fla.optionsmenu_61)
package ambientParade_fla {
import flash.display.*;
public dynamic class optionsmenu_61 extends MovieClip {
public function optionsmenu_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 25
//playtut_25 (ambientParade_fla.playtut_25)
package ambientParade_fla {
import flash.display.*;
public dynamic class playtut_25 extends MovieClip {
public function playtut_25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 26
//pressenter_21 (ambientParade_fla.pressenter_21)
package ambientParade_fla {
import flash.display.*;
public dynamic class pressenter_21 extends MovieClip {
public function pressenter_21(){
addFrameScript(0, frame1, 27, frame28);
}
function frame1(){
stop();
}
function frame28(){
gotoAndPlay(2);
}
}
}//package ambientParade_fla
Section 27
//selectors_66 (ambientParade_fla.selectors_66)
package ambientParade_fla {
import flash.display.*;
public dynamic class selectors_66 extends MovieClip {
public function selectors_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 28
//soundsholder_7 (ambientParade_fla.soundsholder_7)
package ambientParade_fla {
import flash.display.*;
import flash.media.*;
public dynamic class soundsholder_7 extends MovieClip {
public function soundsholder_7(){
addFrameScript(0, frame1);
}
function frame1(){
SoundMixer.stopAll();
SoundMixer.stopAll();
SoundMixer.stopAll();
SoundMixer.stopAll();
SoundMixer.stopAll();
SoundMixer.stopAll();
SoundMixer.stopAll();
SoundMixer.stopAll();
}
}
}//package ambientParade_fla
Section 29
//switch_116 (ambientParade_fla.switch_116)
package ambientParade_fla {
import flash.display.*;
public dynamic class switch_116 extends MovieClip {
public var mid:MovieClip;
public function switch_116(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 30
//tutmenu_23 (ambientParade_fla.tutmenu_23)
package ambientParade_fla {
import flash.display.*;
public dynamic class tutmenu_23 extends MovieClip {
public function tutmenu_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 31
//upscore_107 (ambientParade_fla.upscore_107)
package ambientParade_fla {
import flash.display.*;
public dynamic class upscore_107 extends MovieClip {
public var mc:MovieClip;
public function upscore_107(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 32
//upscoremc_108 (ambientParade_fla.upscoremc_108)
package ambientParade_fla {
import flash.display.*;
import flash.text.*;
public dynamic class upscoremc_108 extends MovieClip {
public var txt:TextField;
}
}//package ambientParade_fla
Section 33
//whitefade_5 (ambientParade_fla.whitefade_5)
package ambientParade_fla {
import flash.display.*;
public dynamic class whitefade_5 extends MovieClip {
public function whitefade_5(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package ambientParade_fla
Section 34
//x1_104 (ambientParade_fla.x1_104)
package ambientParade_fla {
import flash.display.*;
public dynamic class x1_104 extends MovieClip {
public function x1_104(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 35
//ztocontin_56 (ambientParade_fla.ztocontin_56)
package ambientParade_fla {
import flash.display.*;
public dynamic class ztocontin_56 extends MovieClip {
public function ztocontin_56(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ambientParade_fla
Section 36
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.trans("menu");
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 37
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _sendChannel:LocalConnection;
private static var _rcvChannelName:String;
private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__mochiservices";
private static var _rcvChannel:LocalConnection;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function get id():String{
return (_id);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function getVersion():String{
return ("1.31");
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
_rcvChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
return (_local2);
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion()});
_rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
_rcvChannelName = _arg1;
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var clipname:String;
var f:Function;
var req:URLRequest;
var id = _arg1;
var clip = _arg2;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
MochiServices.allowDomains(_gatewayURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
f = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
req = new URLRequest(_gatewayURL);
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain("*", "localhost");
_rcvChannel.allowInsecureDomain("*", "localhost");
_rcvChannel.client = _clip;
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 38
//block (block)
package {
import flash.display.*;
public dynamic class block extends MovieClip {
}
}//package
Section 39
//bolt (bolt)
package {
import flash.display.*;
public dynamic class bolt extends MovieClip {
}
}//package
Section 40
//boost (boost)
package {
import flash.media.*;
public dynamic class boost extends Sound {
}
}//package
Section 41
//combotxt (combotxt)
package {
import flash.display.*;
import flash.text.*;
public dynamic class combotxt extends MovieClip {
public var txt:TextField;
}
}//package
Section 42
//completescreen (completescreen)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class completescreen extends MovieClip {
public var finalscore:TextField;
public var select:int;
public var stageH:int;
public var stageW:int;
public var st;
public var maxItems:int;
public var pointers:MovieClip;
public function completescreen(){
addFrameScript(0, frame1);
}
public function menuSelect():void{
if (st.soundon){
st.selectoptionSound.play();
};
if (select == 1){
st.trans("savescore");
};
}
function frame1(){
select = 1;
maxItems = 1;
stageW = 640;
stageH = 480;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
}
public function refreshStats():void{
var _local1:String;
var _local2:int;
var _local3:int;
st.total = (st.total + (st.simpleScore + st.comboScore));
_local1 = String(st.total);
_local2 = (7 - _local1.length);
finalscore.text = "";
_local3 = 0;
while (_local3 < _local2) {
finalscore.appendText("0");
_local3++;
};
finalscore.appendText(st.total);
}
public function keydown(_arg1:KeyboardEvent):void{
if (st.gameState == "gamecomplete"){
if ((((_arg1.keyCode == 90)) || ((_arg1.keyCode == 13)))){
menuSelect();
};
};
}
}
}//package
Section 43
//controls (controls)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class controls extends MovieClip {
public var select:int;
public var stageH:int;
public var stageW:int;
public var selecting:Boolean;
public var st;
public var keyList:Array;
public var msgbox:MovieClip;
public var txt1:MovieClip;
public var txt2:MovieClip;
public var txt3:MovieClip;
public var txt5:MovieClip;
public var txt6:MovieClip;
public var msging:Boolean;
public var txt4:MovieClip;
public var maxItems:int;
public var pointers:MovieClip;
public function controls(){
addFrameScript(0, frame1);
}
public function checkKeys():Boolean{
var _local1:int;
var _local2:int;
_local1 = 1;
while (_local1 <= 6) {
if (st[("key" + _local1)] == 80){
msging = true;
msgbox.gotoAndStop(2);
msgbox.x = 120;
return (false);
};
_local2 = 1;
while (_local2 < 6) {
if ((((st[("key" + _local1)] == st[("key" + _local2)])) && (!((_local1 == _local2))))){
msging = true;
msgbox.gotoAndStop(1);
msgbox.x = 120;
return (false);
};
_local2++;
};
_local1++;
};
return (true);
}
public function menuSelect():void{
if (st.soundon){
st.selectoptionSound.play();
};
if (select < 7){
selecting = true;
this[("txt" + select)].gotoAndStop(2);
} else {
if (select == 7){
if (checkKeys() == true){
st.trans("menu");
};
};
};
}
function frame1(){
select = 1;
selecting = false;
maxItems = 7;
msging = false;
stageW = 640;
stageH = 480;
keyList = [0, 1, 2, 3, 4, 5, 6, 7, "backspace", "tab", 10, 11, 12, "enter", 14, 15, "shift", "control", 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, "space", 33, 34, 35, 36, "left", "up", "right", "down", 41, 42, 43, 44, 45, 46, 47, "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", 58, 59, 60, 61, 62, 63, 64, "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, "num +", 108, "num -", 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, ";", "=", ",", "-", ".", "/", "'", 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, "[", " ", "]", "#", "`", 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 0xFF, 0x0100, 0x0101, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299];
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
stage.addEventListener(Event.ENTER_FRAME, update);
}
public function keydown(_arg1:KeyboardEvent):void{
var _local2:String;
if (st.gameState == "controls"){
if (msging){
msgbox.x = 800;
msging = false;
} else {
if (selecting == false){
if (_arg1.keyCode == 38){
if (st.soundon){
st.menuchangeSound.play();
};
select--;
if (select == 0){
select = maxItems;
pointers.gotoAndStop(maxItems);
} else {
pointers.prevFrame();
};
} else {
if (_arg1.keyCode == 40){
if (st.soundon){
st.menuchangeSound.play();
};
select++;
if (select > maxItems){
select = 1;
pointers.gotoAndStop(1);
} else {
pointers.nextFrame();
};
};
};
if ((((_arg1.keyCode == 90)) || ((_arg1.keyCode == 13)))){
menuSelect();
};
} else {
if (_arg1.keyCode > keyList.length){
_local2 = "???";
};
if ((keyList[_arg1.keyCode] is String)){
_local2 = keyList[_arg1.keyCode];
} else {
_local2 = "???";
};
st.keyselectSound.play();
st[("key" + select)] = _arg1.keyCode;
this[("txt" + select)].gotoAndStop(1);
selecting = false;
};
};
};
}
public function update(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:String;
_local2 = 1;
while (_local2 <= 6) {
if (this[("txt" + _local2)].mc != null){
if (this[("txt" + _local2)].mc.txt != null){
_local3 = st[("key" + _local2)];
if (_local3 >= keyList.length){
_local4 = "???";
} else {
if ((keyList[_local3] is String)){
_local4 = keyList[_local3];
} else {
_local4 = "???";
};
};
this[("txt" + _local2)].mc.txt.text = _local4;
};
};
_local2++;
};
}
}
}//package
Section 44
//credits (credits)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class credits extends MovieClip {
public var st;
public function credits(){
addFrameScript(0, frame1);
}
function frame1(){
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
}
public function keydown(_arg1:KeyboardEvent):void{
if (st.gameState == "credits"){
if ((((_arg1.keyCode == 90)) || ((_arg1.keyCode == 13)))){
if (st.soundon){
st.selectoptionSound.play();
};
st.trans("menu");
};
};
}
}
}//package
Section 45
//crosslazer (crosslazer)
package {
import flash.display.*;
public dynamic class crosslazer extends MovieClip {
}
}//package
Section 46
//deaths (deaths)
package {
import flash.media.*;
public dynamic class deaths extends Sound {
}
}//package
Section 47
//diamond (diamond)
package {
import flash.display.*;
public dynamic class diamond extends MovieClip {
public function diamond(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 48
//dyntxt (dyntxt)
package {
import flash.display.*;
import flash.text.*;
public dynamic class dyntxt extends MovieClip {
public var txt:TextField;
}
}//package
Section 49
//fademc (fademc)
package {
import flash.display.*;
public dynamic class fademc extends MovieClip {
public function fademc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 50
//gameover (gameover)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class gameover extends MovieClip {
public var finalscore:TextField;
public var select:int;
public var stageH:int;
public var stageW:int;
public var st;
public var maxItems:int;
public var pointers:MovieClip;
public function gameover(){
addFrameScript(0, frame1);
}
public function menuSelect():void{
if (st.soundon){
st.selectoptionSound.play();
};
if (select == 1){
st.trans("savescore");
};
}
function frame1(){
select = 1;
maxItems = 1;
stageW = 640;
stageH = 480;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
}
public function refreshStats():void{
var _local1:String;
var _local2:int;
var _local3:int;
st.total = (st.total + (st.simpleScore + st.comboScore));
_local1 = String(st.total);
_local2 = (7 - _local1.length);
finalscore.text = "";
_local3 = 0;
while (_local3 < _local2) {
finalscore.appendText("0");
_local3++;
};
finalscore.appendText(st.total);
}
public function keydown(_arg1:KeyboardEvent):void{
if (st.gameState == "gameover"){
if ((((_arg1.keyCode == 90)) || ((_arg1.keyCode == 13)))){
menuSelect();
};
};
}
}
}//package
Section 51
//highscores (highscores)
package {
import flash.display.*;
import mochi.*;
public dynamic class highscores extends MovieClip {
public function highscores(){
addFrameScript(0, frame1);
}
public function getScores():void{
MochiScores.showLeaderboard({boardID:"bbcac8eb46f65eb9"});
}
public function saveScore(_arg1:int):void{
MochiScores.showLeaderboard({boardID:"bbcac8eb46f65eb9", score:_arg1});
}
function frame1(){
stop();
}
}
}//package
Section 52
//hit (hit)
package {
import flash.media.*;
public dynamic class hit extends Sound {
}
}//package
Section 53
//keyselect (keyselect)
package {
import flash.media.*;
public dynamic class keyselect extends Sound {
}
}//package
Section 54
//lazerswitch (lazerswitch)
package {
import flash.media.*;
public dynamic class lazerswitch extends Sound {
}
}//package
Section 55
//levelclear (levelclear)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class levelclear extends MovieClip {
public var negs:int;
public var select:int;
public var st;
public var pressz:MovieClip;
public var currentScore:int;
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public var txt5:TextField;
public var txt4:TextField;
public var pointers:MovieClip;
public var grade:MovieClip;
public function levelclear(){
addFrameScript(0, frame1);
}
public function skipCurrent():void{
if (st.soundon){
st.selectoptionSound.play();
};
if (select == 1){
select++;
currentScore = 0;
renderScore(1, st.simpleScore);
st.total = (st.total + st.simpleScore);
pointers.nextFrame();
} else {
if (select == 2){
select++;
currentScore = 0;
renderScore(2, st.comboScore);
st.total = (st.total + st.comboScore);
pointers.nextFrame();
} else {
if (select == 3){
select++;
currentScore = 0;
renderScore(3, (st.lives * 1000));
st.total = (st.total + (st.lives * 1000));
pointers.nextFrame();
} else {
if (select == 4){
select++;
currentScore = 0;
renderScore(4, (negs * 250));
st.total = (st.total + (negs * 250));
pointers.nextFrame();
} else {
if (select == 5){
select++;
currentScore = 0;
renderScore(5, st.total);
pointers.nextFrame();
} else {
if (grade.currentFrame == 1){
grade.gotoAndStop(2);
pressz.gotoAndStop(2);
};
};
};
};
};
};
}
function frame1(){
select = 1;
currentScore = 0;
stage.addEventListener(Event.ENTER_FRAME, update);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
}
public function keydown(_arg1:KeyboardEvent):void{
if (st.gameState == "levelClear"){
if ((((_arg1.keyCode == 90)) || ((_arg1.keyCode == 13)))){
if (select < 7){
skipCurrent();
} else {
if (st.soundon){
st.selectoptionSound.play();
};
st.trans("nextLevel");
};
};
};
}
public function refreshStats():void{
currentScore = 0;
select = 1;
pointers.gotoAndStop(1);
grade.gotoAndStop(1);
pressz.gotoAndStop(1);
st.lives++;
negs = st.missed;
st.missed = 0;
}
public function renderScore(_arg1:int, _arg2:int):void{
var _local3:String;
var _local4:int;
var _local5:int;
var _local6:int;
_local3 = String(_arg2);
_local4 = _local3.length;
_local5 = (7 - _local4);
this[("txt" + _arg1)].text = "";
_local6 = 0;
while (_local6 < _local5) {
this[("txt" + _arg1)].appendText("0");
_local6++;
};
this[("txt" + _arg1)].appendText(_local3);
}
public function update(_arg1:Event):void{
if (st.gameState == "levelClear"){
if (select == 1){
renderScore(1, currentScore);
if (currentScore < (st.simpleScore - (st.simpleScore / 100))){
currentScore = (currentScore + (st.simpleScore / 100));
if (st.soundon){
st.scoreupSound.play();
};
} else {
if (st.soundon){
st.selectoptionSound.play();
};
currentScore = st.simpleScore;
select++;
currentScore = 0;
renderScore(1, st.simpleScore);
st.total = (st.total + st.simpleScore);
pointers.nextFrame();
};
} else {
if (select == 2){
renderScore(2, currentScore);
if (currentScore < (st.comboScore - (st.comboScore / 100))){
currentScore = (currentScore + (st.comboScore / 100));
if (st.soundon){
st.scoreupSound.play();
};
} else {
if (st.soundon){
st.selectoptionSound.play();
};
currentScore = st.comboScore;
select++;
currentScore = 0;
renderScore(2, st.comboScore);
st.total = (st.total + st.comboScore);
pointers.nextFrame();
};
} else {
if (select == 3){
renderScore(3, currentScore);
if (currentScore < ((st.lives * 1000) - 77)){
currentScore = (currentScore + 77);
if (st.soundon){
st.scoreupSound.play();
};
} else {
if (st.soundon){
st.selectoptionSound.play();
};
currentScore = (st.lives * 1000);
select++;
currentScore = 0;
renderScore(3, (st.lives * 1000));
st.total = (st.total + (st.lives * 1000));
pointers.nextFrame();
};
} else {
if (select == 4){
renderScore(4, currentScore);
if (currentScore < ((negs * 250) - ((negs * 250) / 100))){
currentScore = (currentScore + ((negs * 250) / 100));
if (st.soundon){
st.scoreupSound.play();
};
} else {
if (st.soundon){
st.selectoptionSound.play();
};
currentScore = (negs * 250);
select++;
currentScore = 0;
renderScore(4, (negs * 250));
st.total = (st.total - (negs * 250));
if (st.total < 0){
st.total = 0;
};
pointers.nextFrame();
};
} else {
if (select == 5){
renderScore(5, currentScore);
if (currentScore < (st.total - (st.total / 100))){
currentScore = (currentScore + (st.total / 100));
if (st.soundon){
st.scoreupSound.play();
};
} else {
if (st.soundon){
st.selectoptionSound.play();
};
currentScore = st.total;
select++;
currentScore = 0;
renderScore(5, st.total);
pointers.nextFrame();
};
} else {
if (select == 6){
if (negs == 0){
grade.gotoAndStop(2);
} else {
if (negs <= 2){
grade.gotoAndStop(3);
} else {
if (negs <= 5){
grade.gotoAndStop(4);
} else {
if (negs <= 10){
grade.gotoAndStop(5);
} else {
grade.gotoAndStop(6);
};
};
};
};
select++;
pressz.gotoAndStop(2);
};
};
};
};
};
};
};
}
}
}//package
Section 56
//life (life)
package {
import flash.display.*;
public dynamic class life extends MovieClip {
}
}//package
Section 57
//menuchange (menuchange)
package {
import flash.media.*;
public dynamic class menuchange extends Sound {
}
}//package
Section 58
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 59
//options (options)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class options extends MovieClip {
public var select:int;
public var stageH:int;
public var stageW:int;
public var st;
public var switch3:MovieClip;
public var switch1:MovieClip;
public var switch2:MovieClip;
public var maxItems:int;
public var pointers:MovieClip;
public function options(){
addFrameScript(0, frame1);
}
public function menuSelect():void{
if (st.soundon){
st.selectoptionSound.play();
};
if (select == 1){
if (switch1.currentFrame == 1){
switch1.gotoAndStop(2);
st.musicon = false;
SoundMixer.stopAll();
} else {
switch1.gotoAndStop(1);
st.musicon = true;
st.track0.play(0, 999);
};
} else {
if (select == 2){
if (switch2.currentFrame == 1){
switch2.gotoAndStop(2);
st.soundon = false;
} else {
switch2.gotoAndStop(1);
st.soundon = true;
};
} else {
if (select == 3){
if (switch3.currentFrame == 1){
switch3.gotoAndStop(2);
stage.quality = StageQuality.MEDIUM;
} else {
if (switch3.currentFrame == 2){
switch3.gotoAndStop(3);
stage.quality = StageQuality.LOW;
} else {
switch3.gotoAndStop(1);
stage.quality = StageQuality.BEST;
};
};
} else {
if (select == 4){
st.trans("menu");
};
};
};
};
}
function frame1(){
select = 1;
maxItems = 4;
stageW = 640;
stageH = 480;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
stage.addEventListener(Event.ENTER_FRAME, update);
}
public function keydown(_arg1:KeyboardEvent):void{
if (st.gameState == "options"){
if (_arg1.keyCode == 38){
if (st.soundon){
st.menuchangeSound.play();
};
select--;
if (select == 0){
select = maxItems;
pointers.gotoAndStop(maxItems);
} else {
pointers.prevFrame();
};
} else {
if (_arg1.keyCode == 40){
if (st.soundon){
st.menuchangeSound.play();
};
select++;
if (select > maxItems){
select = 1;
pointers.gotoAndStop(1);
} else {
pointers.nextFrame();
};
};
};
if ((((_arg1.keyCode == 90)) || ((_arg1.keyCode == 13)))){
menuSelect();
};
};
}
public function update(_arg1:Event):void{
}
}
}//package
Section 60
//particle (particle)
package {
import flash.display.*;
public dynamic class particle extends MovieClip {
}
}//package
Section 61
//playermc (playermc)
package {
import flash.display.*;
public dynamic class playermc extends MovieClip {
public function playermc(){
addFrameScript(0, frame1, 11, frame12, 89, frame90);
}
function frame90(){
gotoAndStop(1);
}
function frame12(){
gotoAndStop(1);
}
function frame1(){
stop();
}
}
}//package
Section 62
//reddiamond (reddiamond)
package {
import flash.display.*;
public dynamic class reddiamond extends MovieClip {
}
}//package
Section 63
//scoreup (scoreup)
package {
import flash.media.*;
public dynamic class scoreup extends Sound {
}
}//package
Section 64
//selectoption (selectoption)
package {
import flash.media.*;
public dynamic class selectoption extends Sound {
}
}//package
Section 65
//spinner (spinner)
package {
import flash.display.*;
public dynamic class spinner extends MovieClip {
public var beam2:MovieClip;
public var beam1:MovieClip;
public var ob1:MovieClip;
public var ob2:MovieClip;
}
}//package
Section 66
//switchlazer (switchlazer)
package {
import flash.display.*;
public dynamic class switchlazer extends MovieClip {
public var btn:MovieClip;
}
}//package
Section 67
//target (target)
package {
import flash.display.*;
public dynamic class target extends MovieClip {
public var fill:MovieClip;
public var fr:MovieClip;
}
}//package
Section 68
//targeting (targeting)
package {
import flash.display.*;
import flash.text.*;
public dynamic class targeting extends MovieClip {
public var txt:TextField;
}
}//package
Section 69
//tester (tester)
package {
import flash.display.*;
public dynamic class tester extends MovieClip {
}
}//package
Section 70
//titleScreen (titleScreen)
package {
import flash.display.*;
import flash.events.*;
import mochi.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class titleScreen extends MovieClip {
public var select:int;
public var stageH:int;
public var stageW:int;
public var menu:MovieClip;
public var st;
public var maxItems:int;
public function titleScreen(){
addFrameScript(0, frame1);
}
public function menuSelect():void{
if (st.soundon){
st.selectoptionSound.play();
};
if (select == 1){
st.trans("game");
} else {
if (select == 2){
st.trans("controls");
} else {
if (select == 3){
st.trans("options");
} else {
if (select == 4){
st.trans("credits");
} else {
if (select == 5){
st.trans("hscores");
} else {
if (select == 6){
gotoLink();
};
};
};
};
};
};
}
function frame1(){
select = 1;
maxItems = 6;
stageW = 640;
stageH = 480;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
stage.addEventListener(Event.ENTER_FRAME, update);
}
public function keydown(_arg1:KeyboardEvent):void{
if (st.gameState == "title"){
if (_arg1.keyCode == 38){
if (st.soundon){
st.menuchangeSound.play();
};
select--;
if (select == 0){
select = maxItems;
menu.gotoAndStop(maxItems);
} else {
menu.prevFrame();
};
} else {
if (_arg1.keyCode == 40){
if (st.soundon){
st.menuchangeSound.play();
};
select++;
if (select > maxItems){
select = 1;
menu.gotoAndStop(1);
} else {
menu.nextFrame();
};
};
};
if ((((_arg1.keyCode == 90)) || ((_arg1.keyCode == 13)))){
menuSelect();
};
};
}
public function update(_arg1:Event):void{
}
public function gotoLink():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://www.dabontv.com");
navigateToURL(_local1, "_blank");
}
}
}//package
Section 71
//topbar (topbar)
package {
import flash.display.*;
public dynamic class topbar extends MovieClip {
public var lightup:MovieClip;
public var combo1:MovieClip;
public var comboadd:MovieClip;
public var combo:MovieClip;
}
}//package
Section 72
//track0music (track0music)
package {
import flash.media.*;
public dynamic class track0music extends Sound {
}
}//package
Section 73
//track1music (track1music)
package {
import flash.media.*;
public dynamic class track1music extends Sound {
}
}//package
Section 74
//track2music (track2music)
package {
import flash.media.*;
public dynamic class track2music extends Sound {
}
}//package
Section 75
//track3music (track3music)
package {
import flash.media.*;
public dynamic class track3music extends Sound {
}
}//package
Section 76
//track4music (track4music)
package {
import flash.media.*;
public dynamic class track4music extends Sound {
}
}//package
Section 77
//tuttxt (tuttxt)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class tuttxt extends MovieClip {
public var pe:MovieClip;
public var str3:String;
public var str4:String;
public var str2:String;
public var str1:String;
public var txt:TextField;
public var st;
public var keyList:Array;
public function tuttxt(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame3(){
if ((keyList[st.key5] is String)){
str1 = keyList[st.key5];
} else {
str1 = "z (default)";
};
txt.text = (("Move over the red target to lock on to it. \n \n Press the " + str1) + " key to destroy the target. \n \n You get 250 points for every target you destroy. \n \n You lose 250 points for every target you miss.");
}
function frame6(){
if ((keyList[st.key6] is String)){
str1 = keyList[st.key6];
} else {
str1 = "x (default)";
};
txt.text = "These rotating walls will destroy you if you touch them. \n \n Try to get past them without hitting them.";
}
function frame7(){
if ((keyList[st.key5] is String)){
str1 = keyList[st.key5];
} else {
str1 = "z (default)";
};
txt.text = (("This switch lazer will destroy you if you touch it while it is on. \n \n Press " + str1) + " when over the switch to turn off the lazer. \n \n Move past the lazer before it comes back on!");
}
function frame1(){
keyList = [0, 1, 2, 3, 4, 5, 6, 7, "backspace", "tab", 10, 11, 12, "enter", 14, 15, "shift", "control", 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, "space", 33, 34, 35, 36, "left", "up", "right", "down", 41, 42, 43, 44, 45, 46, 47, "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", 58, 59, 60, 61, 62, 63, 64, "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, "num +", 108, "num -", 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, ";", "=", ",", "-", ".", "/", "'", 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, "[", " ", "]", "#", "`", 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 0xFF, 0x0100, 0x0101, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299];
stop();
}
function frame4(){
if ((keyList[st.key5] is String)){
str1 = keyList[st.key5];
} else {
str1 = "z (default)";
};
txt.text = "Here are another 2 red targets. Destroy them. \n \n Notice that the combo counter above your score increases when you destroy multiple targets of the same colour.";
}
function frame5(){
if ((keyList[st.key6] is String)){
str1 = keyList[st.key6];
} else {
str1 = "x (default)";
};
txt.text = (("Move under the line of blue targets. \n \n Press the " + str1) + " key to perform a boost. While boosting, any targtes you hit will be destroyed. \n \n Boosting can also be used to avoid hazzards.");
}
function frame2(){
stop();
if ((keyList[st.key3] is String)){
str1 = keyList[st.key3];
} else {
str1 = "left (default)";
};
if ((keyList[st.key4] is String)){
str2 = keyList[st.key4];
} else {
str2 = "right (default)";
};
if ((keyList[st.key1] is String)){
str3 = keyList[st.key1];
} else {
str3 = "up (default)";
};
if ((keyList[st.key2] is String)){
str4 = keyList[st.key2];
} else {
str4 = "down (default)";
};
txt.text = (((((((("use the " + str1) + " and ") + str2) + " keys to move between lanes.\n \n Use the ") + str3) + " and ") + str4) + " keys to move up and down your current lane. \n \n Press P at any time to pause the game.");
}
}
}//package
Section 78
//tutwindow (tutwindow)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.filters.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class tutwindow extends MovieClip {
public var select:int;
public var stageH:int;
public var stageW:int;
public var st;
public var maxItems:int;
public var playme:MovieClip;
public var pointers:MovieClip;
public function tutwindow(){
addFrameScript(0, frame1);
}
public function menuSelect():void{
if (st.soundon){
st.selectoptionSound.play();
};
if (select == 1){
this.x = 800;
st.activateTutorial();
} else {
if (select == 2){
this.x = 800;
st.activateGame();
};
};
}
function frame1(){
select = 1;
maxItems = 2;
stageW = 640;
stageH = 480;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
stage.addEventListener(Event.ENTER_FRAME, update);
}
public function keydown(_arg1:KeyboardEvent):void{
if (st.gameState == "chooseTut"){
if (_arg1.keyCode == 38){
if (st.soundon){
st.menuchangeSound.play();
};
select--;
if (select == 0){
select = maxItems;
pointers.gotoAndStop(maxItems);
} else {
pointers.prevFrame();
};
} else {
if (_arg1.keyCode == 40){
if (st.soundon){
st.menuchangeSound.play();
};
select++;
if (select > maxItems){
select = 1;
pointers.gotoAndStop(1);
} else {
pointers.nextFrame();
};
};
};
if ((((_arg1.keyCode == 90)) || ((_arg1.keyCode == 13)))){
menuSelect();
};
};
}
public function update(_arg1:Event):void{
}
}
}//package