Section 1
//Flash_185 (ghost_pikmin_as3_fla.Flash_185)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Flash_185 extends MovieClip {
public function Flash_185(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 2
//GameMusic1_77 (ghost_pikmin_as3_fla.GameMusic1_77)
package ghost_pikmin_as3_fla {
import flash.display.*;
import flash.media.*;
public dynamic class GameMusic1_77 extends MovieClip {
public function GameMusic1_77(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
SoundMixer.stopAll();
}
function frame2(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 3
//GameMusic2_118 (ghost_pikmin_as3_fla.GameMusic2_118)
package ghost_pikmin_as3_fla {
import flash.display.*;
import flash.media.*;
public dynamic class GameMusic2_118 extends MovieClip {
public function GameMusic2_118(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
SoundMixer.stopAll();
}
function frame2(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 4
//Highscores_171 (ghost_pikmin_as3_fla.Highscores_171)
package ghost_pikmin_as3_fla {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Highscores_171 extends MovieClip {
public var n2_txt:TextField;
public var n8_txt:TextField;
public var n10_txt:TextField;
public var n6_txt:TextField;
public var s2_txt:TextField;
public var s6_txt:TextField;
public var s8_txt:TextField;
public var i:Number;
public var s10_txt:TextField;
public var s4_txt:TextField;
public var n4_txt:TextField;
public var n7_txt:TextField;
public var n1_txt:TextField;
public var n3_txt:TextField;
public var n9_txt:TextField;
public var s1_txt:TextField;
public var n5_txt:TextField;
public var s3_txt:TextField;
public var s5_txt:TextField;
public var s7_txt:TextField;
public var s9_txt:TextField;
public function Highscores_171(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
i = 1;
while (i <= 10) {
this[(("n" + i) + "_txt")].text = this.data[("name" + i)];
this[(("s" + i) + "_txt")].text = this.data[("score" + i)];
i++;
};
}
}
}//package ghost_pikmin_as3_fla
Section 5
//hud_selection_66 (ghost_pikmin_as3_fla.hud_selection_66)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class hud_selection_66 extends MovieClip {
public function hud_selection_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 6
//hus_highlight_mc_75 (ghost_pikmin_as3_fla.hus_highlight_mc_75)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class hus_highlight_mc_75 extends MovieClip {
public var highlight_mc:MovieClip;
public function hus_highlight_mc_75(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 7
//IntroMusic_26 (ghost_pikmin_as3_fla.IntroMusic_26)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class IntroMusic_26 extends MovieClip {
public function IntroMusic_26(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 8
//MenuMusic_172 (ghost_pikmin_as3_fla.MenuMusic_172)
package ghost_pikmin_as3_fla {
import flash.display.*;
import flash.media.*;
public dynamic class MenuMusic_172 extends MovieClip {
public function MenuMusic_172(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
SoundMixer.stopAll();
}
function frame2(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 9
//MovingPlat2_124 (ghost_pikmin_as3_fla.MovingPlat2_124)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class MovingPlat2_124 extends MovieClip {
public var plat_mc:MovingPlatformRounded;
public function MovingPlat2_124(){
addFrameScript(0, frame1);
}
function frame1(){
this.plat_mc.range = 170;
}
}
}//package ghost_pikmin_as3_fla
Section 10
//MovingPlatform1_43 (ghost_pikmin_as3_fla.MovingPlatform1_43)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class MovingPlatform1_43 extends MovieClip {
public var plat_mc:MovingPlatformRounded;
public function MovingPlatform1_43(){
addFrameScript(1, frame2);
}
function frame2(){
this.plat_mc.range = 270;
}
}
}//package ghost_pikmin_as3_fla
Section 11
//Piano2_129 (ghost_pikmin_as3_fla.Piano2_129)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Piano2_129 extends MovieClip {
public var plat_mc:MovingPianoPlatform;
public function Piano2_129(){
addFrameScript(0, frame1);
}
function frame1(){
this.plat_mc.range = 150;
}
}
}//package ghost_pikmin_as3_fla
Section 12
//piano3_141 (ghost_pikmin_as3_fla.piano3_141)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class piano3_141 extends MovieClip {
public var plat_mc:MovingPianoPlatform;
public function piano3_141(){
addFrameScript(0, frame1);
}
function frame1(){
this.plat_mc.range = 160;
}
}
}//package ghost_pikmin_as3_fla
Section 13
//pianoplatform_90 (ghost_pikmin_as3_fla.pianoplatform_90)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class pianoplatform_90 extends MovieClip {
public var plat_mc:MovingPianoPlatform;
public function pianoplatform_90(){
addFrameScript(1, frame2);
}
function frame2(){
this.plat_mc.range = 120;
}
}
}//package ghost_pikmin_as3_fla
Section 14
//PianoplatformDown_106 (ghost_pikmin_as3_fla.PianoplatformDown_106)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class PianoplatformDown_106 extends MovieClip {
public var plat_mc:MovingPianoPlatform;
public function PianoplatformDown_106(){
addFrameScript(1, frame2);
}
function frame2(){
this.plat_mc.range = 120;
}
}
}//package ghost_pikmin_as3_fla
Section 15
//RATING_164 (ghost_pikmin_as3_fla.RATING_164)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class RATING_164 extends MovieClip {
public function RATING_164(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 16
//squareplatform_125 (ghost_pikmin_as3_fla.squareplatform_125)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class squareplatform_125 extends MovieClip {
public var plat_mc:SquarePlat;
public function squareplatform_125(){
addFrameScript(0, frame1);
}
function frame1(){
this.plat_mc.range = 210;
}
}
}//package ghost_pikmin_as3_fla
Section 17
//squareplatform2_139 (ghost_pikmin_as3_fla.squareplatform2_139)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class squareplatform2_139 extends MovieClip {
public var plat_mc:SquarePlat;
public function squareplatform2_139(){
addFrameScript(0, frame1);
}
function frame1(){
this.plat_mc.range = 90;
}
}
}//package ghost_pikmin_as3_fla
Section 18
//Symbol113_30 (ghost_pikmin_as3_fla.Symbol113_30)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Symbol113_30 extends MovieClip {
public function Symbol113_30(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 19
//Symbol136_133 (ghost_pikmin_as3_fla.Symbol136_133)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Symbol136_133 extends MovieClip {
public function Symbol136_133(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 20
//Symbol142_196 (ghost_pikmin_as3_fla.Symbol142_196)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Symbol142_196 extends MovieClip {
public function Symbol142_196(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 21
//Symbol14copy_198 (ghost_pikmin_as3_fla.Symbol14copy_198)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Symbol14copy_198 extends MovieClip {
public function Symbol14copy_198(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 22
//Symbol171_156 (ghost_pikmin_as3_fla.Symbol171_156)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Symbol171_156 extends MovieClip {
public function Symbol171_156(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 23
//Symbol172_155 (ghost_pikmin_as3_fla.Symbol172_155)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Symbol172_155 extends MovieClip {
public function Symbol172_155(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 24
//Symbol4_14 (ghost_pikmin_as3_fla.Symbol4_14)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Symbol4_14 extends MovieClip {
public function Symbol4_14(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 25
//Symbol7_16 (ghost_pikmin_as3_fla.Symbol7_16)
package ghost_pikmin_as3_fla {
import flash.display.*;
public dynamic class Symbol7_16 extends MovieClip {
public function Symbol7_16(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package ghost_pikmin_as3_fla
Section 26
//ab30 (ab30)
package {
import flash.utils.*;
public class ab30 {
public static function encodeNum(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local2 = getTimer();
_local3 = ["aZ", "Zy", "Zx"];
_local4 = ["zH", "jY", "uH"];
_local5 = ["Ah", "Xh", "hO"];
_local6 = ["Ub", "Bu", "Cb"];
_local7 = ["Qc", "Pc", "Pe"];
_local8 = ["Ei", "Ie", "Ef"];
_local9 = ["Fk", "kG", "Kg"];
_local10 = ["Jl", "Lm", "Mn"];
_local11 = ["No", "Np", "Qp"];
_local12 = ["Rs", "St", "Sw"];
_local13 = random(3);
_arg1 = String(_arg1);
_arg1 = fr(_arg1, "9", _local3[random(3)], 1);
_arg1 = fr(_arg1, "9", _local3[random(3)], 1);
_arg1 = fr(_arg1, "9", _local3[random(3)], 1);
_arg1 = fr(_arg1, "9", _local3[random(3)], 1);
_arg1 = fr(_arg1, "9", _local3[random(3)], 1);
_arg1 = fr(_arg1, "9", _local3[random(3)], 1);
_arg1 = fr(_arg1, "8", _local4[random(3)], 1);
_arg1 = fr(_arg1, "8", _local4[random(3)], 1);
_arg1 = fr(_arg1, "8", _local4[random(3)], 1);
_arg1 = fr(_arg1, "8", _local4[random(3)], 1);
_arg1 = fr(_arg1, "8", _local4[random(3)], 1);
_arg1 = fr(_arg1, "7", _local5[random(3)], 1);
_arg1 = fr(_arg1, "7", _local5[random(3)], 1);
_arg1 = fr(_arg1, "7", _local5[random(3)], 1);
_arg1 = fr(_arg1, "7", _local5[random(3)], 1);
_arg1 = fr(_arg1, "7", _local5[random(3)], 1);
_arg1 = fr(_arg1, "7", _local5[random(3)], 1);
_arg1 = fr(_arg1, "7", _local5[random(3)], 1);
_arg1 = fr(_arg1, "7", _local5[random(3)], 1);
_arg1 = fr(_arg1, "6", _local6[random(3)], 1);
_arg1 = fr(_arg1, "6", _local6[random(3)], 1);
_arg1 = fr(_arg1, "6", _local6[random(3)], 1);
_arg1 = fr(_arg1, "6", _local6[random(3)], 1);
_arg1 = fr(_arg1, "6", _local6[random(3)], 1);
_arg1 = fr(_arg1, "6", _local6[random(3)], 1);
if (_local13 == 1){
_arg1 = fr(_arg1, "5", _local7[0], undefined);
} else {
_arg1 = fr(_arg1, "5", _local7[random(3)], undefined);
};
_arg1 = fr(_arg1, "4", _local8[random(3)], undefined);
_arg1 = fr(_arg1, "3", _local9[random(3)], 1);
_arg1 = fr(_arg1, "3", _local9[random(3)], 1);
_arg1 = fr(_arg1, "3", _local9[random(3)], 1);
_arg1 = fr(_arg1, "3", _local9[random(3)], 1);
_arg1 = fr(_arg1, "3", _local9[random(3)], 1);
_arg1 = fr(_arg1, "3", _local9[random(3)], 1);
_arg1 = fr(_arg1, "3", _local9[random(3)], 1);
_arg1 = fr(_arg1, "3", _local9[random(3)], 1);
_arg1 = fr(_arg1, "2", _local10[random(3)], undefined);
_arg1 = fr(_arg1, "1", _local11[random(3)], undefined);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_arg1 = fr(_arg1, "0", _local12[random(3)], 1);
_local14 = (getTimer() - _local2);
_arg1 = ((_arg1 + "Dd") + _local14);
return (_arg1);
}
public static function random(_arg1:Number):Number{
return (Math.floor((Math.random() * _arg1)));
}
public static function decodeStr8bytes(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_arg1 = (("PIE" + _arg1) + "PIE");
_arg1 = fr(_arg1, "%", "D", undefined);
_arg1 = fr(_arg1, "$", "D", undefined);
_arg1 = fr(_arg1, "#", "D", undefined);
_arg1 = fr(_arg1, "@", "D", undefined);
_arg1 = fr(_arg1, "PIED", "", undefined);
_arg1 = fr(_arg1, "DPIE", "", undefined);
_local2 = _arg1.split("D");
_local3 = "";
_local4 = 0;
_local5 = _local2.length;
while (_local4 < _local5) {
_local3 = (_local3 + String(String.fromCharCode(_local2[_local4])));
_local4++;
};
return (_local3);
}
public static function decodeNum(_arg1){
var _local2:*;
var _local3:*;
_local2 = ["aZ", "Zy", "Zx", "zH", "jY", "uH", "Ah", "Xh", "hO", "Ub", "Bu", "Cb", "Qc", "Pc", "Pe", "Ei", "Ie", "Ef", "Fk", "kG", "Kg", "Jl", "Lm", "Mn", "No", "Np", "Qp", "Rs", "St", "Sw"];
_arg1 = String(_arg1);
_arg1 = _arg1.split("Dd");
_arg1 = _arg1[0];
_arg1 = fr(_arg1, _local2[0], "9", undefined);
_arg1 = fr(_arg1, _local2[1], "9", undefined);
_arg1 = fr(_arg1, _local2[2], "9", undefined);
_arg1 = fr(_arg1, _local2[3], "8", undefined);
_arg1 = fr(_arg1, _local2[4], "8", undefined);
_arg1 = fr(_arg1, _local2[5], "8", undefined);
_arg1 = fr(_arg1, _local2[6], "7", undefined);
_arg1 = fr(_arg1, _local2[7], "7", undefined);
_arg1 = fr(_arg1, _local2[8], "7", undefined);
_arg1 = fr(_arg1, _local2[9], "6", undefined);
_arg1 = fr(_arg1, _local2[10], "6", undefined);
_arg1 = fr(_arg1, _local2[11], "6", undefined);
_arg1 = fr(_arg1, _local2[12], "5", undefined);
_arg1 = fr(_arg1, _local2[13], "5", undefined);
_arg1 = fr(_arg1, _local2[14], "5", undefined);
_arg1 = fr(_arg1, _local2[15], "4", undefined);
_arg1 = fr(_arg1, _local2[16], "4", undefined);
_arg1 = fr(_arg1, _local2[17], "4", undefined);
_arg1 = fr(_arg1, _local2[18], "3", undefined);
_arg1 = fr(_arg1, _local2[19], "3", undefined);
_arg1 = fr(_arg1, _local2[20], "3", undefined);
_arg1 = fr(_arg1, _local2[21], "2", undefined);
_arg1 = fr(_arg1, _local2[22], "2", undefined);
_arg1 = fr(_arg1, _local2[23], "2", undefined);
_arg1 = fr(_arg1, _local2[24], "1", undefined);
_arg1 = fr(_arg1, _local2[25], "1", undefined);
_arg1 = fr(_arg1, _local2[26], "1", undefined);
_arg1 = fr(_arg1, _local2[27], "0", undefined);
_arg1 = fr(_arg1, _local2[28], "0", undefined);
_arg1 = fr(_arg1, _local2[29], "0", undefined);
_local3 = Number(_arg1);
return (_local3);
}
private static function fr(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
_local5 = _arg1;
if (typeof(_arg2) !== "string"){
if (_arg3 === undefined){
_arg3 = [""];
} else {
if (typeof(_arg3) === "string"){
_arg3 = [_arg3];
};
};
} else {
_arg2 = [_arg2];
_arg3 = [_arg3];
};
_local8 = _arg2.length;
_local9 = 0;
_local10 = 0;
while (_local9 < _local8) {
while ((_local7 = _local5.indexOf(_arg2[_local9])) !== -1) {
if (((!((_arg4 === undefined))) && ((_local10 >= _arg4)))){
break;
};
_local6 = new Array(_local5.substring(0, _local7), _local5.substr(_local7, _arg2[_local9].length), _local5.substr((_local7 + _arg2[_local9].length)));
_local6[1] = ((_arg3[_local9])===undefined) ? "" : _arg3[_local9];
_local5 = ((_local6[0] + _local6[1]) + _local6[2]);
_local10++;
};
_local9++;
_local10 = 0;
};
return (_local5);
}
public static function encodeStr8bytes(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = 0;
_local3 = _arg1.length;
_local4 = "%";
_local5 = ["%", "$", "#", "@"];
while (_local2 < _local3) {
_local4 = (_local4 + (_arg1.charCodeAt(_local2) + _local5[random(_local5.length)]));
_local2++;
};
return (_local4);
}
}
}//package
Section 27
//BlockBanister (BlockBanister)
package {
public dynamic class BlockBanister extends SquareBlock {
}
}//package
Section 28
//BlockBanisterEnd (BlockBanisterEnd)
package {
public dynamic class BlockBanisterEnd extends SquareBlock {
}
}//package
Section 29
//BlockBooksLeft (BlockBooksLeft)
package {
public dynamic class BlockBooksLeft extends SquareBlock {
}
}//package
Section 30
//BlockBooksRight (BlockBooksRight)
package {
public dynamic class BlockBooksRight extends SquareBlock {
}
}//package
Section 31
//BlockCandle (BlockCandle)
package {
public dynamic class BlockCandle extends CircleBlock {
}
}//package
Section 32
//BlockSword (BlockSword)
package {
public dynamic class BlockSword extends CircleBlock {
}
}//package
Section 33
//BroomClip (BroomClip)
package {
public dynamic class BroomClip extends DangerObject {
}
}//package
Section 34
//BroomMoveClip (BroomMoveClip)
package {
public dynamic class BroomMoveClip extends PausableClip {
}
}//package
Section 35
//ChandelierCircleDanger (ChandelierCircleDanger)
package {
public dynamic class ChandelierCircleDanger extends DangerObject {
}
}//package
Section 36
//CircleBlock (CircleBlock)
package {
import flash.geom.*;
import flash.display.*;
public class CircleBlock extends MovieClip {
private var blockRadius:Number;
private var location:Point;
public function CircleBlock(){
this.blockRadius = (5 + (this.width / 2));
this.location = new Point(((this.x * this.parent.scaleX) + this.parent.x), ((this.y * this.parent.scaleY) + this.parent.y));
}
public function blockTest(_arg1:Ghost):void{
var _local2:Point;
_local2 = _arg1.locationPoint.subtract(this.location);
if (_local2.length < this.blockRadius){
_local2.normalize(this.blockRadius);
_local2 = _local2.add(this.location);
_arg1.x = _local2.x;
_arg1.y = _local2.y;
};
}
}
}//package
Section 37
//DangerObject (DangerObject)
package {
import flash.events.*;
import flash.display.*;
public class DangerObject extends PausableClip {
public var hit_mc:MovieClip;
public function DangerObject(){
this.hit_mc.alpha = 0;
this.root.addEventListener("act", this.act);
}
private function act(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:Ghost;
_local2 = _arg1.target.ghosts.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = Ghost(_arg1.target.ghosts.getChildAt(_local3));
if (((_local4.active) && (this.hit_mc.hitTestPoint((_local4.x + _local4.parent.x), (_local4.y + _local4.parent.y), true)))){
_local4.die();
};
_local3++;
};
}
}
}//package
Section 38
//Font1 (Font1)
package {
import flash.text.*;
public dynamic class Font1 extends Font {
}
}//package
Section 39
//FormationRing (FormationRing)
package {
public dynamic class FormationRing extends FormSelector {
}
}//package
Section 40
//FormSelector (FormSelector)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
public class FormSelector extends MovieClip {
private var level:int;
public var label_mc:MovieClip;
public function mouseMove(_arg1:MouseEvent):void{
var _local2:Point;
var _local3:int;
var _local4:Number;
_local2 = new Point(this.mouseX, this.mouseY);
if (_local2.length > 40){
_local4 = Math.atan2(_local2.x, -(_local2.y));
_local4 = (_local4 + (Math.PI / 8));
if (_local4 < 0){
_local4 = (_local4 + (Math.PI * 2));
};
_local3 = Math.ceil((_local4 / (Math.PI / 4)));
} else {
_local3 = 0;
};
if (_local3 < this.level){
this.label_mc.gotoAndStop((1 + _local3));
} else {
this.label_mc.gotoAndStop(1);
};
}
public function setLevel(_arg1:int):void{
this.level = _arg1;
}
}
}//package
Section 41
//GameOver (GameOver)
package {
import flash.display.*;
public dynamic class GameOver extends MovieClip {
public var tryAgain_btn:SimpleButton;
}
}//package
Section 42
//Ghost (Ghost)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
public class Ghost extends MovieClip {
public var active:Boolean;
private var angleCount:int;
private var force:Point;
private var speed:Point;
public var head_mc:MovieClip;
private var formID_int:int;
private var actionTimer:Timer;
private var location:Point;
public var game;
private static var ghostCount:Number;
private static var twoRows:Array;
private static var blocks:MovieClip;
private static var ground:MovieClip;
private static var ghostList:Array;
private static var circle:Array;
private static var triangle:Array;
private static var diagonalLeft:Array;
private static var square:Array;
private static var horizontal:Array;
private static var diagonalRight:Array;
private static var vertical:Array;
public function Ghost(){
this.force = new Point(0, 0);
this.speed = new Point(0, 0);
this.active = true;
if (!ghostList){
ghostList = [];
};
ghostList.push(this);
ghostCount = ghostList.length;
this.angleCount = Math.floor((Math.random() * 3));
this.head_mc.gotoAndPlay(Math.ceil((Math.random() * 95)));
}
private function onFall(_arg1:TimerEvent):void{
this.scaleX = (this.scaleY = (this.scaleY * 0.8));
if (this.scaleX < 0.1){
this.game.ghostCount--;
this.actionTimer.stop();
this.deleteMe();
};
}
public function simulate():void{
this.speed = this.speed.add(this.force);
this.speed = this.multiplyPoint(this.speed, 0.92);
if (this.speed.length > 6){
this.speed.normalize(6);
};
this.x = (this.x + this.speed.x);
this.y = (this.y + this.speed.y);
if (((((((this.y + this.parent.y) > 520)) || (((this.x + this.parent.x) > 520)))) || (((this.x + this.parent.x) < -20)))){
this.die();
} else {
if ((this.y + this.parent.y) > 500){
this.y = (500 - this.parent.y);
} else {
if ((this.x + this.parent.x) > 500){
this.x = (500 - this.parent.x);
} else {
if ((this.x + this.parent.x) < 0){
this.x = -(this.parent.x);
};
};
};
};
if (this.angleCount++ > 3){
this.rotation = ((180 * Math.atan2(this.speed.x, -(this.speed.y))) / Math.PI);
this.angleCount = 0;
};
}
private function onDie(_arg1:TimerEvent):void{
this.game.ghostCount--;
this.actionTimer.stop();
this.deleteMe();
}
public function followPoint(_arg1:Point):void{
var _local2:Number;
this.force = new Point(0, 0);
this.location = this.locationPoint;
if (this.active){
_local2 = (_arg1.subtract(this.location).length / 200);
this.addForce(_arg1, _local2);
this.addGhostForces();
this.simulate();
this.checkBlocks();
this.checkHoles();
};
}
private function fall():void{
this.active = false;
this.dispatchEvent(new Event("removeGhost"));
this.gotoAndStop(3);
this.actionTimer = new Timer(50, 0);
this.actionTimer.addEventListener("timer", this.onFall);
this.actionTimer.start();
}
public function die():void{
this.active = false;
this.gotoAndStop(2);
this.dispatchEvent(new Event("removeGhost"));
this.actionTimer = new Timer(600, 1);
this.actionTimer.addEventListener("timer", this.onDie);
this.actionTimer.start();
}
private function checkHoles():void{
if (!ground.hitTestPoint((this.x + this.parent.x), (this.y + this.parent.y), true)){
this.fall();
};
}
public function followInFormation(_arg1:Point, _arg2:Array):void{
this.force = new Point(0, 0);
this.location = this.locationPoint;
if (this.active){
this.addFormationForce(_arg1, _arg2);
this.addGhostForces();
this.simulate();
this.checkBlocks();
this.checkHoles();
};
}
public function get area():Rectangle{
var _local1:Rectangle;
_local1 = new Rectangle(this.x, this.y, 0, 0);
_local1.inflate(9, 9);
return (_local1);
}
private function addFormationForce(_arg1:Point, _arg2:Array):void{
var _local3:Point;
var _local4:Number;
var _local5:Number;
_local3 = _arg1.add(_arg2[this.formID_int]);
_local4 = _local3.subtract(new Point(this.x, this.y)).length;
_local5 = _local4;
this.addForce(_local3, _local5);
if (_local4 < 7){
this.speed = this.multiplyPoint(this.speed, 0.5);
};
}
private function checkBlocks():void{
var _local1:int;
var _local2:int;
_local1 = blocks.numChildren;
_local2 = 0;
while (_local2 < _local1) {
if ((blocks.getChildAt(_local2) is SquareBlock)){
SquareBlock(blocks.getChildAt(_local2)).blockTest(this);
} else {
if ((blocks.getChildAt(_local2) is CircleBlock)){
CircleBlock(blocks.getChildAt(_local2)).blockTest(this);
};
};
_local2++;
};
}
public function deleteMe():void{
ghostList.splice(ghostList.indexOf(this), 1);
ghostCount = ghostList.length;
this.parent.removeChild(this);
}
private function addForce(_arg1:Point, _arg2:Number):void{
var _local3:Point;
_local3 = _arg1.subtract(new Point(this.x, this.y));
_local3.normalize(_arg2);
this.force = this.force.add(_local3);
}
private function multiplyPoint(_arg1:Point, _arg2:Number):Point{
return (new Point((_arg1.x * _arg2), (_arg1.y * _arg2)));
}
public function updateID():void{
this.formID_int = this.parent.getChildIndex(this);
}
public function get locationPoint():Point{
return (new Point(this.x, this.y));
}
private function addGhostForces():void{
var _local1:Number;
var _local2:Point;
var _local3:Number;
var _local4:Number;
_local1 = 0;
while (_local1 < ghostCount) {
if (ghostList[_local1] != undefined){
if (ghostList[_local1].active){
if (((((this.x - ghostList[_local1].x) < 25)) && (((this.x - ghostList[_local1].x) > -25)))){
if (((((this.y - ghostList[_local1].y) < 25)) && (((this.y - ghostList[_local1].y) > -25)))){
if (ghostList[_local1] != this){
_local2 = new Point(ghostList[_local1].x, ghostList[_local1].y);
_local3 = _local2.subtract(new Point(this.x, this.y)).length;
_local4 = (200000 / (((_local3 * _local3) * _local3) * _local3));
this.addForce(_local2, -(_local4));
};
};
};
};
};
_local1++;
};
}
public static function setEnvironment(_arg1:MovieClip, _arg2:MovieClip):void{
ground = _arg1;
blocks = _arg2;
}
public static function hitGhosts(_arg1:DisplayObject):void{
}
}
}//package
Section 43
//GhostClip (GhostClip)
package {
public dynamic class GhostClip extends Ghost {
}
}//package
Section 44
//HUD (HUD)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class HUD extends MovieClip {
public var total_txt:TextField;
public var secs_txt:TextField;
public var selection_mc:MovieClip;
public var level_mc:MovieClip;
public var num_txt:TextField;
private var timer:Timer;
private var ghostMax:int;
private var timeLeft:int;
public var mins_txt:TextField;
private var ghosts:int;
public function HUD(){
var _local1:Font;
var _local2:TextFormat;
super();
this.ghosts = (this.ghostMax = 40);
this.root.addEventListener("removeGhost", this.onRemoveGhost);
this.root.addEventListener("pause", this.onPause);
this.root.addEventListener("unpause", this.onUnpause);
_local1 = new Font1();
_local2 = new TextFormat();
_local2.font = _local1.fontName;
_local2.size = 39;
_local2.bold = true;
_local2.color = 3158045;
this.mins_txt = new TextField();
this.secs_txt = new TextField();
this.num_txt = new TextField();
this.total_txt = new TextField();
this.mins_txt.x = 15.3;
this.mins_txt.y = 16.4;
this.mins_txt.width = 71.5;
this.mins_txt.height = 67.3;
this.secs_txt.x = 76.7;
this.secs_txt.y = 19.4;
this.secs_txt.width = 55.4;
this.secs_txt.height = 67.3;
this.num_txt.x = 391.1;
this.num_txt.y = 17.6;
this.num_txt.width = 75;
this.num_txt.height = 67.3;
this.total_txt.x = 447.9;
this.total_txt.y = 14.7;
this.total_txt.width = 78.3;
this.total_txt.height = 67.3;
this.mins_txt.defaultTextFormat = _local2;
this.secs_txt.defaultTextFormat = _local2;
this.num_txt.defaultTextFormat = _local2;
this.total_txt.defaultTextFormat = _local2;
this.mins_txt.embedFonts = true;
this.secs_txt.embedFonts = true;
this.num_txt.embedFonts = true;
this.total_txt.embedFonts = true;
this.addChild(this.mins_txt);
this.addChild(this.secs_txt);
this.addChild(this.num_txt);
this.addChild(this.total_txt);
this.num_txt.text = "40";
this.total_txt.text = "40";
if (this.timer){
this.timer.stop();
};
this.timer = new Timer(100);
this.timer.addEventListener("timer", this.count);
this.timer.start();
}
public function onRemoveGhost(_arg1:Event):void{
this.ghosts--;
this.num_txt.text = ((this.ghosts)>9) ? this.ghosts.toString() : ("0" + this.ghosts.toString());
if (this.ghosts <= 0){
SpiritGuideGame(this.root).gameOver();
};
}
public function count(_arg1:TimerEvent):void{
var _local2:int;
var _local3:int;
this.timeLeft = (this.timeLeft - 100);
_local2 = Math.floor((this.timeLeft / 60000));
_local3 = ((this.timeLeft / 1000) - (_local2 * 60));
this.mins_txt.text = _local2.toString();
this.secs_txt.text = _local3.toString();
if (_local2 < 10){
this.mins_txt.text = ("0" + this.mins_txt.text);
};
if (_local3 < 10){
this.secs_txt.text = ("0" + this.secs_txt.text);
};
if ((((_local2 <= 0)) && ((_local3 <= 0)))){
SpiritGuideGame(this.root).gameOver();
};
}
public function onUnpause(_arg1:Event):void{
this.timer.start();
}
public function onPause(_arg1:Event):void{
this.timer.stop();
}
public function wipe():void{
this.root.removeEventListener("removeGhost", this.onRemoveGhost);
this.root.removeEventListener("pause", this.onPause);
this.root.removeEventListener("unpause", this.onUnpause);
this.timer.stop();
this.timer = null;
}
public function get ghostCount():int{
return (this.ghosts);
}
public function getTimeLeft():Number{
return ((this.timeLeft / 1000));
}
public function setTimeLeft(_arg1:int):void{
this.timeLeft = _arg1;
}
}
}//package
Section 45
//HUDClip (HUDClip)
package {
public dynamic class HUDClip extends HUD {
}
}//package
Section 46
//InfoScreen (InfoScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class InfoScreen extends MovieClip {
public var time_txt:TextField;
public var next_btn:MovieClip;
public var score_txt:TextField;
public var flash_mc:MovieClip;
public var fragments_txt:TextField;
public var rating_mc:MovieClip;
public function InfoScreen(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 47
//MovingPianoPlatform (MovingPianoPlatform)
package {
public dynamic class MovingPianoPlatform extends MovingPlatform {
}
}//package
Section 48
//MovingPlatform (MovingPlatform)
package {
import flash.events.*;
public class MovingPlatform extends PausableClip {
public var range:Number;
private var stillCount:int;
public var wait:int;
public function MovingPlatform(){
this.stillCount = 0;
this.y = 0;
this.wait = 100;
this.root.addEventListener("act", this.act);
}
private function act(_arg1:Event):void{
if (this.y == 0){
this.stillCount++;
};
if (this.stillCount > this.wait){
this.y = (this.y - 2);
};
if (this.y <= -(this.range)){
this.y = -(this.range);
this.stillCount--;
};
if (this.stillCount < 0){
this.y = (this.y + 2);
if (this.y >= 0){
this.y = 0;
};
};
}
}
}//package
Section 49
//MovingPlatformRounded (MovingPlatformRounded)
package {
public dynamic class MovingPlatformRounded extends MovingPlatform {
}
}//package
Section 50
//PausableClip (PausableClip)
package {
import flash.events.*;
import flash.display.*;
public class PausableClip extends MovieClip {
public function PausableClip(){
this.root.addEventListener("pause", this.onPause);
this.root.addEventListener("unpause", this.onUnpause);
}
public function onUnpause(_arg1:Event):void{
this.play();
}
public function onPause(_arg1:Event):void{
this.stop();
}
}
}//package
Section 51
//PotionDanger (PotionDanger)
package {
public dynamic class PotionDanger extends DangerObject {
}
}//package
Section 52
//PotionFade (PotionFade)
package {
public dynamic class PotionFade extends PausableClip {
}
}//package
Section 53
//PotionSmash (PotionSmash)
package {
public dynamic class PotionSmash extends PausableClip {
}
}//package
Section 54
//RoundChandelier (RoundChandelier)
package {
public dynamic class RoundChandelier extends PausableClip {
}
}//package
Section 55
//SoulFragment (SoulFragment)
package {
public dynamic class SoulFragment extends Ghost {
public function SoulFragment(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 56
//SpiritGuideGame (SpiritGuideGame)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.utils.*;
public class SpiritGuideGame extends MovieClip {
public var replay_btn:SimpleButton;
private var triangle:Array;
private var loader:URLRequest;
public var ag:MovieClip;
private var totalGhosts:Number;
public var t_sfb:ContextMenuItem;
private var totalTime:Number;
private var horizontal:Array;
private var infoSeen:Array;
public var t_menu:ContextMenu;
private var twoRows:Array;
private var tryAgain:GameOver;
public var ghostCounter:int;
public var sfb:MovieClip;
private var gameTimer:Timer;
private var key_d:Boolean;
public var sfb_btn:SimpleButton;
private var key_a:Boolean;
public var souls_txt:TextField;
private var key_f:Boolean;
private var key_w:Boolean;
private var key_q:Boolean;
private var key_s:Boolean;
private var key_e:Boolean;
private var key_r:Boolean;
public var t_high:ContextMenuItem;
public var pmg_btn:SimpleButton;
private var infoScreen:InfoScreen;
public var name_txt:TextField;
private var resetTime:Number;
private var circle:Array;
public var play_btn:SimpleButton;
public var over_mc:MovieClip;
private var diagonalRight:Array;
public var blocks_mc:MovieClip;
public var t_low:ContextMenuItem;
public var next_btn:SimpleButton;
public var highscores_mc:MovieClip;
public var agm_btn:SimpleButton;
private var square:Array;
public var email_btn:SimpleButton;
public var scores_btn:SimpleButton;
public var score_txt:TextField;
public var ground_mc:MovieClip;
private var vertical:Array;
public var rating_mc:MovieClip;
public var t_med:ContextMenuItem;
private var level:int;
private var selection:int;
public var skip_btn:SimpleButton;
public var submit_btn:SimpleButton;
private var totalScore:Number;
public var t_pmg:ContextMenuItem;
public var bg_mc:MovieClip;
public var t_ag:ContextMenuItem;
public var ghosts:Sprite;
private var diagonalLeft:Array;
public var hud_mc:HUDClip;
private var selector:FormationRing;
private var greyOut:Shape;
public var time_txt:TextField;
public function SpiritGuideGame(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 43, frame44, 59, frame60, 71, frame72, 181, frame182, 182, frame183, 183, frame184, 184, frame185, 271, frame272, 279, frame280);
this.totalGhosts = 0;
this.totalScore = 0;
this.totalTime = 0;
this.stage.quality = "medium";
this.ghostCount = 40;
this.level = 1;
this.infoSeen = [false, false, false, false, false, false, false, false, false, false, false, false, false, false];
}
function frame272(){
SoundMixer.stopAll();
this.hiscores();
}
public function setupIntro():void{
this.next_btn.addEventListener(MouseEvent.CLICK, this.onNext);
this.skip_btn.addEventListener(MouseEvent.CLICK, this.onSkipToGame);
}
private function generateVertical():Array{
var _local1:Number;
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local1 = 18;
_local2 = [];
_local3 = 1;
_local4 = 1;
_local2.push(new Point((-(_local1) / 2), 0));
_local5 = 0;
while (_local5 < this.ghostCount) {
_local2.push(new Point(((_local4 * _local1) / 2), ((-(_local1) * Math.ceil((_local5 / 4))) * _local3)));
_local4 = (_local4 * -1);
if (_local4 == -1){
_local3 = (_local3 * -1);
};
_local5++;
};
return (_local2);
}
public function onSFB(_arg1:Event):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.superflashbros.net/");
navigateToURL(_local2, "_blank");
}
public function onKeyUpHandler(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:int;
switch (_arg1.keyCode){
case 81:
this.key_q = false;
break;
case 87:
this.key_w = false;
break;
case 69:
this.key_e = false;
break;
case 82:
this.key_r = false;
break;
case 65:
this.key_a = false;
break;
case 83:
this.key_s = false;
break;
case 68:
this.key_d = false;
break;
case 70:
this.key_f = false;
break;
};
this.hud_mc.selection_mc.gotoAndStop(1);
_local2 = this.ghosts.numChildren;
_local3 = 0;
while (_local3 < _local2) {
Ghost(this.ghosts.getChildAt(_local3)).updateID();
_local3++;
};
}
public function checkPoints():void{
switch (this.level){
case 1:
if (this.ghosts.mouseY < 100){
this.level = 2;
this.openInfoScreen(3);
};
break;
case 2:
if (this.ghosts.mouseY < -208){
this.level = 3;
this.openInfoScreen(4);
};
break;
case 3:
if (this.ghosts.mouseY < -400){
this.level = 4;
this.openInfoScreen(5);
};
break;
case 4:
if ((((this.ghosts.mouseY < -1620)) && ((this.currentLabel == "level1")))){
this.openInfoScreen(11);
};
if ((((this.ghosts.mouseY < -2500)) && ((this.currentLabel == "level1")))){
this.openInfoScreen(12);
};
if ((((this.ghosts.mouseY < -1310)) && ((this.currentLabel == "level2")))){
this.level = 5;
this.openInfoScreen(6);
};
break;
case 5:
if ((((this.ghosts.mouseY < -2880)) && ((this.currentLabel == "level2")))){
this.level = 6;
this.openInfoScreen(7);
};
break;
case 6:
if ((((this.ghosts.mouseY < -5555)) && ((this.currentLabel == "level2")))){
this.openInfoScreen(12);
};
if ((((this.ghosts.mouseY < 100)) && ((this.currentLabel == "level3")))){
this.level = 7;
this.openInfoScreen(8);
};
break;
case 7:
if ((((this.ghosts.mouseY < -1100)) && ((this.currentLabel == "level3")))){
this.level = 9;
this.openInfoScreen(9);
};
break;
case 9:
if ((((this.ghosts.mouseY < -5310)) && ((this.currentLabel == "level3")))){
this.openInfoScreen(12);
};
if ((((this.ghosts.mouseY < -5700)) && ((this.currentLabel == "level4")))){
this.openInfoScreen(12);
};
break;
};
}
function frame280(){
this.stop();
}
public function onHigh(_arg1:Event):void{
stage.quality = StageQuality.HIGH;
}
public function gameOver():void{
this.removeEventListener(MouseEvent.MOUSE_DOWN, this.onMouseDownHandler);
this.removeEventListener(MouseEvent.MOUSE_UP, this.onMouseUpHandler);
this.dispatchEvent(new Event("pause"));
this.gameTimer.stop();
this.addChild(this.greyOut);
this.addChild(this.tryAgain);
this.tryAgain.x = 250;
this.tryAgain.y = 230;
}
public function skipToEnd(_arg1:TimerEvent):void{
this.openInfoScreen(12);
}
public function onKeyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:int;
switch (_arg1.keyCode){
case 81:
this.key_q = true;
this.selection = 0;
break;
case 87:
this.key_w = true;
this.selection = 0;
break;
case 69:
this.key_e = true;
this.selection = 0;
break;
case 82:
this.key_r = true;
this.selection = 0;
break;
case 65:
this.key_a = true;
this.selection = 0;
break;
case 83:
this.key_s = true;
this.selection = 0;
break;
case 68:
this.key_d = true;
this.selection = 0;
break;
case 70:
this.key_f = true;
this.selection = 0;
break;
};
_local2 = this.ghosts.numChildren;
_local3 = 0;
while (_local3 < _local2) {
Ghost(this.ghosts.getChildAt(_local3)).updateID();
_local3++;
};
}
public function onAG(_arg1:Event):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.armorgames.com/");
navigateToURL(_local2, "_blank");
}
private function nextLevel():void{
this.stage.removeEventListener(KeyboardEvent.KEY_UP, this.onKeyUpHandler);
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.onKeyDownHandler);
this.removeEventListener(MouseEvent.MOUSE_DOWN, this.onMouseDownHandler);
this.removeEventListener(MouseEvent.MOUSE_UP, this.onMouseUpHandler);
this.gameTimer.stop();
this.hud_mc.wipe();
this.hud_mc = null;
if (this.currentLabel != "level4"){
this.nextFrame();
} else {
this.dispatchEvent(new Event("pause"));
this.play();
};
}
public function updateScores(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
this.infoScreen.fragments_txt.text = (this.hud_mc.ghostCount + "/40");
this.infoScreen.time_txt.text = ((this.hud_mc.mins_txt.text + ":") + this.hud_mc.secs_txt.text);
_local2 = Math.round((this.hud_mc.ghostCount * this.hud_mc.getTimeLeft()));
this.infoScreen.score_txt.text = String(_local2);
if (_local2 < 200){
_local3 = 4;
} else {
if (_local2 < 500){
_local3 = 3;
} else {
if (_local2 < 900){
_local3 = 2;
} else {
_local3 = 1;
};
};
};
this.totalGhosts = (this.totalGhosts + this.hud_mc.ghostCount);
this.totalScore = (this.totalScore + _local2);
this.totalTime = (this.totalTime + this.hud_mc.getTimeLeft());
this.infoScreen.rating_mc.gotoAndStop(_local3);
}
function frame183(){
this.hud_mc.setTimeLeft(150000);
this.resetTime = 150000;
this.startGame();
stop();
}
function frame185(){
this.hud_mc.setTimeLeft(150000);
this.resetTime = 150000;
this.startGame();
stop();
}
function frame3(){
stop();
}
public function onSpace(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.SPACE){
switch (this.infoScreen.currentFrame){
case 1:
this.infoScreen.nextFrame();
this.infoScreen.flash_mc.gotoAndPlay(1);
break;
case 2:
this.closeInfoScreen();
break;
case 3:
this.closeInfoScreen();
break;
case 4:
this.closeInfoScreen();
break;
case 5:
this.closeInfoScreen();
break;
case 6:
this.closeInfoScreen();
break;
case 7:
this.closeInfoScreen();
break;
case 8:
this.closeInfoScreen();
break;
case 9:
this.infoScreen.nextFrame();
this.infoScreen.flash_mc.gotoAndPlay(1);
break;
case 10:
this.closeInfoScreen();
break;
case 11:
this.closeInfoScreen();
break;
case 12:
this.closeInfoScreen();
this.nextLevel();
break;
};
};
}
public function onMouseDownHandler(_arg1:MouseEvent):void{
this.addChild(this.selector);
this.selector.label_mc.gotoAndStop(1);
this.selector.gotoAndStop(this.level);
this.selector.x = this.mouseX;
this.selector.y = this.mouseY;
this.selector.setLevel(this.level);
this.addChildAt(this.greyOut, this.getChildIndex(this.selector));
this.addEventListener(MouseEvent.MOUSE_MOVE, this.selector.mouseMove);
this.dispatchEvent(new Event("pause"));
this.gameTimer.stop();
}
public function onLoadScores(_arg1:Event):void{
var _local2:URLLoader;
var _local3:URLVariables;
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data.substring(1, (_local2.data.length - 1)));
if (_local3["name1"] !== undefined){
this.highscores_mc.data = _local3;
this.highscores_mc.gotoAndStop(2);
} else {
this.highscores_mc.data = null;
this.highscores_mc.gotoAndStop(3);
};
}
function frame1(){
stop();
this.ag.addEventListener(MouseEvent.CLICK, onAG);
this.sfb.addEventListener(MouseEvent.CLICK, onSFB);
this.loaderInfo.addEventListener(Event.COMPLETE, onLoaded);
this.ag.buttonMode = true;
this.sfb.buttonMode = true;
this.ag.useHandCursor = true;
this.sfb.useHandCursor = true;
t_menu = new ContextMenu();
t_menu.hideBuiltInItems();
t_high = new ContextMenuItem("Quality: High");
t_high.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onHigh);
t_menu.customItems.push(t_high);
t_med = new ContextMenuItem("Quality: Medium");
t_med.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onMed);
t_menu.customItems.push(t_med);
t_low = new ContextMenuItem("Quality: Low");
t_low.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onLow);
t_menu.customItems.push(t_low);
t_sfb = new ContextMenuItem("SuperFlashBros.net", true);
t_sfb.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onSFB);
t_menu.customItems.push(t_sfb);
t_ag = new ContextMenuItem("ArmorGames.com");
t_ag.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onAG);
t_menu.customItems.push(t_ag);
t_pmg = new ContextMenuItem("Play More Games!");
t_pmg.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onAG);
t_menu.customItems.push(t_pmg);
this.contextMenu = t_menu;
stop();
}
function frame4(){
this.setupIntro();
}
public function hiscores():void{
var _local1:String;
var _local2:String;
this.score_txt.text = this.totalScore.toString();
this.souls_txt.text = (this.totalGhosts.toString() + "/160");
_local1 = Math.floor((this.totalTime / 60)).toString();
_local2 = (Math.round(this.totalTime) - (Number(_local1) * 60)).toString();
if (Number(_local1) < 10){
_local1 = ("0" + _local1);
};
if (Number(_local2) < 10){
_local2 = ("0" + _local2);
};
this.time_txt.text = ((_local1 + ":") + _local2);
this.submit_btn.addEventListener(MouseEvent.CLICK, this.onSubmit);
this.replay_btn.addEventListener(MouseEvent.CLICK, this.onReplay);
this.pmg_btn.addEventListener(MouseEvent.CLICK, this.onLink);
this.agm_btn.addEventListener(MouseEvent.CLICK, this.onLink);
this.email_btn.addEventListener(MouseEvent.CLICK, this.onLink);
this.scores_btn.addEventListener(MouseEvent.CLICK, this.onLink);
this.loadScores();
}
function frame2(){
this.setupMainMenu();
}
function frame182(){
this.hud_mc.setTimeLeft(80000);
this.resetTime = 80000;
this.startGame();
this.openInfoScreen(1);
stop();
}
public function setupMainMenu():void{
this.play_btn.addEventListener(MouseEvent.CLICK, this.onNext);
this.pmg_btn.addEventListener(MouseEvent.CLICK, this.onLink);
this.agm_btn.addEventListener(MouseEvent.CLICK, this.onLink);
this.sfb_btn.addEventListener(MouseEvent.CLICK, this.onLink);
}
public function onLink(_arg1:MouseEvent):void{
switch (_arg1.target){
case this.pmg_btn:
navigateToURL(new URLRequest("http://www.armorgames.com"), "_blank");
break;
case this.agm_btn:
navigateToURL(new URLRequest("http://www.armorgames.com"), "_blank");
break;
case this.sfb_btn:
navigateToURL(new URLRequest("http://www.superflashbros.net"), "_blank");
break;
case this.email_btn:
navigateToURL(new URLRequest("http://www.superflashbros.net/contacts/"), "_blank");
break;
case this.scores_btn:
navigateToURL(new URLRequest("http://armorbot.com/mytable/?id=1648"), "_blank");
break;
};
}
private function generateTriangle():Array{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Point;
var _local6:*;
_local1 = [];
_local1.push(new Point(0, 0));
_local2 = 1;
_local3 = 1;
_local4 = 1;
while (_local4 < this.ghostCount) {
if (_local3 >= _local2){
for (_local6 in _local1) {
_local1[_local6].y = (_local1[_local6].y - (15.588 / 2));
};
_local2++;
_local3 = 0;
};
_local5 = new Point(((9 + (_local3 * 18)) - ((18 * _local2) / 2)), ((15.588 * (_local2 - 1)) / 2));
_local1.push(_local5);
_local3++;
_local4++;
};
return (_local1);
}
public function onReplay(_arg1:MouseEvent):void{
this.totalGhosts = 0;
this.totalScore = 0;
this.totalTime = 0;
this.stage.quality = "medium";
this.ghostCount = 40;
this.level = 1;
this.infoSeen = [false, false, false, false, false, false, false, false, false, false, false, false, false, false];
this.gotoAndStop("level1", "Level 1");
}
public function openInfoScreen(_arg1:int):void{
var _local2:Timer;
if (((!(this.infoSeen[_arg1])) || ((_arg1 == 12)))){
this.infoSeen[_arg1] = true;
this.dispatchEvent(new Event("pause"));
this.gameTimer.stop();
this.removeEventListener(MouseEvent.MOUSE_DOWN, this.onMouseDownHandler);
this.removeEventListener(MouseEvent.MOUSE_UP, this.onMouseUpHandler);
this.addChild(this.infoScreen);
this.infoScreen.gotoAndStop(_arg1);
this.infoScreen.y = -(this.y);
this.infoScreen.flash_mc.gotoAndPlay(1);
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.onSpace);
};
if (_arg1 == 12){
_local2 = new Timer(100, 1);
_local2.addEventListener("timer", this.updateScores);
_local2.start();
this.hud_mc.onPause(new Event("Blank"));
};
new TimerEvent("blank").updateAfterEvent();
}
function frame44(){
stop();
}
public function loadScores():void{
var _local1:URLRequest;
var _local2:URLLoader;
this.highscores_mc.gotoAndStop(1);
_local1 = new URLRequest("http://www.armorbot.com/flashcomm/top10_b");
_local1.data = new URLVariables();
_local1.data.hid = "1648";
_local1.data.kid = "CJACZX";
_local1.method = "POST";
_local2 = new URLLoader();
_local2.addEventListener(Event.COMPLETE, onLoadScores);
_local2.load(_local1);
}
private function generateCircle():Array{
var _local1:Array;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:Number;
_local1 = [];
_local1.push(new Point(0, 0));
_local2 = 24;
_local3 = 1.8;
_local4 = 0;
_local5 = 1;
while (_local5 < this.ghostCount) {
_local6 = ((_local3 * _local5) + 18);
_local4 = (_local4 + (_local2 / _local6));
_local1.push(new Point((Math.sin(_local4) * _local6), (Math.cos(_local4) * _local6)));
_local5++;
};
return (_local1);
}
private function act(_arg1:TimerEvent):void{
var _local2:Point;
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:DisplayObject;
_local2 = new Point((this.mouseX - this.ghosts.x), (this.mouseY - this.ghosts.y));
_local3 = 0;
while (_local3 < ghostCount) {
if (((((this.key_q) || ((this.selection == 1)))) && ((this.level >= 2)))){
this.hud_mc.selection_mc.gotoAndStop(2);
SoulFragment(this.ghosts.getChildAt(_local3)).followInFormation(_local2, this.vertical);
} else {
if (((((this.key_w) || ((this.selection == 2)))) && ((this.level >= 3)))){
this.hud_mc.selection_mc.gotoAndStop(3);
SoulFragment(this.ghosts.getChildAt(_local3)).followInFormation(_local2, this.horizontal);
} else {
if (((((this.key_e) || ((this.selection == 3)))) && ((this.level >= 4)))){
this.hud_mc.selection_mc.gotoAndStop(4);
SoulFragment(this.ghosts.getChildAt(_local3)).followInFormation(_local2, this.twoRows);
} else {
if (((((this.key_r) || ((this.selection == 4)))) && ((this.level >= 5)))){
this.hud_mc.selection_mc.gotoAndStop(5);
SoulFragment(this.ghosts.getChildAt(_local3)).followInFormation(_local2, this.circle);
} else {
if (((((this.key_a) || ((this.selection == 5)))) && ((this.level >= 6)))){
this.hud_mc.selection_mc.gotoAndStop(6);
SoulFragment(this.ghosts.getChildAt(_local3)).followInFormation(_local2, this.triangle);
} else {
if (((((this.key_s) || ((this.selection == 6)))) && ((this.level >= 7)))){
this.hud_mc.selection_mc.gotoAndStop(7);
SoulFragment(this.ghosts.getChildAt(_local3)).followInFormation(_local2, this.square);
} else {
if (((((this.key_d) || ((this.selection == 7)))) && ((this.level >= 8)))){
this.hud_mc.selection_mc.gotoAndStop(8);
SoulFragment(this.ghosts.getChildAt(_local3)).followInFormation(_local2, this.diagonalRight);
} else {
if (((((this.key_f) || ((this.selection == 8)))) && ((this.level >= 9)))){
this.hud_mc.selection_mc.gotoAndStop(9);
SoulFragment(this.ghosts.getChildAt(_local3)).followInFormation(_local2, this.diagonalLeft);
} else {
SoulFragment(this.ghosts.getChildAt(_local3)).followPoint(_local2);
};
};
};
};
};
};
};
};
_local3++;
};
_local4 = 0;
_local5 = 0;
if (this.stage.mouseY < 220){
_local5 = ((220 - this.stage.mouseY) / 15);
};
if (_local5 > 7){
_local5 = 7;
};
if (this.stage.mouseX < 150){
_local4 = ((150 - this.stage.mouseX) / 15);
};
if (this.stage.mouseX > 350){
_local4 = ((350 - this.stage.mouseX) / 15);
};
if (_local4 < -9){
_local4 = -9;
};
if (_local4 > 9){
_local4 = 9;
};
_local3 = 0;
while (_local3 < this.numChildren) {
_local6 = this.getChildAt(_local3);
if (((((!((_local6 == this.bg_mc))) && (!((_local6 == this.hud_mc))))) && (!((_local6 == this.over_mc))))){
_local6.x = (_local6.x + _local4);
_local6.y = (_local6.y + _local5);
};
_local3++;
};
this.hud_mc.level_mc.gotoAndStop(this.level);
this.checkPoints();
this.dispatchEvent(new Event("act"));
_arg1.updateAfterEvent();
}
public function onLoaded(_arg1:Event){
this.play();
}
public function onMouseUpHandler(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:Sound;
if (this.selection != (this.selector.label_mc.currentFrame - 1)){
switch (Math.floor((Math.random() * 4))){
case 0:
_local4 = new Squeak1();
break;
case 1:
_local4 = new Squeak2();
break;
case 2:
_local4 = new Squeak3();
break;
case 3:
_local4 = new Squeak4();
break;
};
_local4.play();
};
_local2 = this.ghosts.numChildren;
_local3 = 0;
while (_local3 < _local2) {
Ghost(this.ghosts.getChildAt(_local3)).updateID();
_local3++;
};
this.selection = (this.selector.label_mc.currentFrame - 1);
this.hud_mc.selection_mc.gotoAndStop(this.selector.label_mc.currentFrame);
this.removeChild(this.selector);
this.removeEventListener(MouseEvent.MOUSE_MOVE, this.selector.mouseMove);
this.removeChild(this.greyOut);
this.dispatchEvent(new Event("unpause"));
this.gameTimer.start();
}
public function onSkipToGame(_arg1:MouseEvent):void{
SoundMixer.stopAll();
this.gotoAndStop("level1", "Level 1");
}
public function closeInfoScreen():void{
this.addEventListener(MouseEvent.MOUSE_DOWN, this.onMouseDownHandler);
this.addEventListener(MouseEvent.MOUSE_UP, this.onMouseUpHandler);
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.onSpace);
this.dispatchEvent(new Event("unpause"));
this.gameTimer.start();
this.removeChild(this.infoScreen);
}
function frame184(){
this.hud_mc.setTimeLeft(140000);
this.resetTime = 140000;
this.startGame();
stop();
}
public function onSubmit(_arg1:MouseEvent):void{
var _local2:URLRequest;
var _local3:URLLoader;
if ((((this.name_txt.text.length > 1)) && (!((this.name_txt.text == "YOUR NAME"))))){
TextField(this.name_txt).mouseEnabled = false;
this.submit_btn.visible = false;
_local2 = new URLRequest("http://armorbot.com/s_b");
_local2.data = new URLVariables();
_local2.data.x = ab30.encodeNum(this.totalScore);
_local2.data.c = 1648;
_local2.data.v = "CJACZX";
_local2.data.z = this.name_txt.text;
_local2.method = "POST";
_local3 = new URLLoader();
_local3.addEventListener(Event.COMPLETE, this.onSendScores);
_local3.load(_local2);
};
}
function frame60(){
stop();
}
public function onLow(_arg1:Event):void{
stage.quality = StageQuality.LOW;
}
private function generateSquare():Array{
var _local1:Number;
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:Point;
var _local6:int;
_local1 = 18;
_local2 = [];
_local3 = -(_local1);
_local4 = -(_local1);
_local5 = new Point(0, _local1);
_local2.push(new Point(0, 0));
_local2.push(new Point(0, -(_local1)));
_local6 = 2;
while (_local6 < (this.ghostCount + 2)) {
_local2.push(_local2[(_local6 - 1)].add(_local5));
if (_local5.x != 0){
if (_local2[_local6].x > _local4){
_local4 = _local2[_local6].x;
_local5 = new Point(0, _local1);
} else {
if (_local2[_local6].x < -(_local4)){
_local4 = (-(_local2[_local6].x) - _local1);
_local5 = new Point(0, -(_local1));
};
};
} else {
if (_local5.y != 0){
if (_local2[_local6].y > _local3){
_local3 = _local2[_local6].y;
_local5 = new Point(-(_local1), 0);
} else {
if (_local2[_local6].y < -(_local3)){
_local3 = (-(_local2[_local6].y) - _local1);
_local5 = new Point(_local1, 0);
};
};
};
};
_local6++;
};
_local2.shift();
_local2.shift();
return (_local2);
}
private function rotatePoint(_arg1:Point, _arg2:Number):Point{
var _local3:Number;
_local3 = Math.atan2(_arg1.y, _arg1.x);
_local3 = (_local3 + _arg2);
return (Point.polar(_arg1.length, _local3));
}
public function onSendScores(_arg1:Event):void{
var _local2:URLLoader;
var _local3:URLVariables;
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data.substring(1, (_local2.data.length - 1)));
if (Number(_local3.done) == 1){
this.loadScores();
} else {
this.highscores_mc.gotoAndStop(3);
};
}
function frame72(){
stop();
}
private function generateTwoRows():Array{
var _local1:Number;
var _local2:Number;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local1 = 18;
_local2 = 80;
_local3 = [];
_local4 = 1;
_local5 = 1;
_local6 = 1;
_local3.push(new Point((_local2 - (_local1 / 2)), 0));
_local3.push(new Point((-(_local2) - (_local1 / 2)), 0));
_local3.push(new Point((-(_local2) + (_local1 / 2)), 0));
_local7 = 0;
while (_local7 < this.ghostCount) {
_local3.push(new Point(((_local2 * _local6) + ((_local5 * _local1) / 2)), ((-(_local1) * Math.ceil((_local7 / 8))) * _local4)));
_local6 = (_local6 * -1);
if (_local6 == 1){
_local5 = (_local5 * -1);
};
if ((((_local5 == 1)) && ((_local6 == -1)))){
_local4 = (_local4 * -1);
};
_local7++;
};
return (_local3);
}
public function onMed(_arg1:Event):void{
stage.quality = StageQuality.MEDIUM;
}
private function generateDiagonalRight():Array{
var _local1:*;
var _local2:int;
_local1 = this.generateVertical();
_local2 = 0;
while (_local2 < this.ghostCount) {
_local1[_local2] = this.rotatePoint(_local1[_local2], (Math.PI / 4));
_local2++;
};
return (_local1);
}
private function resetLevel(_arg1:MouseEvent):void{
var _local2:String;
var _local3:String;
this.hud_mc.wipe();
this.removeChild(this.greyOut);
this.removeChild(this.tryAgain);
SoundMixer.stopAll();
_local2 = this.currentLabel;
_local3 = this.currentScene.name;
_arg1.updateAfterEvent();
this.gotoAndStop("reset", "Reset");
this.gotoAndStop(_local2, _local3);
_arg1.updateAfterEvent();
}
private function generateHorizontal():Array{
var _local1:Number;
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local1 = 18;
_local2 = [];
_local3 = 1;
_local4 = 1;
_local2.push(new Point(0, (-(_local1) / 2)));
_local5 = 0;
while (_local5 < this.ghostCount) {
_local2.push(new Point(((_local1 * Math.ceil((_local5 / 4))) * _local3), ((_local4 * _local1) / 2)));
_local4 = (_local4 * -1);
if (_local4 == -1){
_local3 = (_local3 * -1);
};
_local5++;
};
return (_local2);
}
public function startGame():void{
var _local1:Timer;
var _local2:int;
var _local3:int;
var _local4:SoulFragment;
var _local5:Number;
this.x = 0;
this.y = 0;
this.ghostCount = 40;
this.greyOut = new Shape();
this.greyOut.graphics.beginFill(0, 0.5);
this.greyOut.graphics.drawRect(-50, -50, (this.stage.width + 50), (this.stage.height + 50));
this.greyOut.graphics.endFill();
this.tryAgain = new GameOver();
this.tryAgain.tryAgain_btn.addEventListener(MouseEvent.CLICK, this.resetLevel);
this.updateFormations();
if (this.ghosts){
_local2 = this.ghosts.numChildren;
_local3 = 0;
while (_local3 < _local2) {
Ghost(this.ghosts.getChildAt(0)).deleteMe();
_local3++;
};
this.removeChild(this.ghosts);
};
this.ghosts = new Sprite();
this.addChild(this.ghosts);
this.setChildIndex(this.ghosts, 3);
Ghost.setEnvironment(this.ground_mc, this.blocks_mc);
_local3 = 0;
while (_local3 < ghostCount) {
_local4 = new SoulFragment();
this.ghosts.addChild(_local4);
_local4.x = (150 + (Math.random() * 200));
_local4.y = (150 + (Math.random() * 200));
_local4.game = this;
_local5 = (-(Math.random()) * 100);
_local4.transform.colorTransform = new ColorTransform(1, 1, 1, 1, _local5, _local5, _local5, 0);
_local4.addEventListener("removeGhost", HUD(this.hud_mc).onRemoveGhost);
_local4.updateID();
_local3++;
};
if (this.gameTimer){
this.gameTimer.stop();
};
this.gameTimer = new Timer(50, 0);
this.gameTimer.addEventListener("timer", this.act);
this.gameTimer.start();
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.onKeyDownHandler);
this.stage.addEventListener(KeyboardEvent.KEY_UP, this.onKeyUpHandler);
this.selector = new FormationRing();
this.selection = 0;
this.addEventListener(MouseEvent.MOUSE_DOWN, this.onMouseDownHandler);
this.addEventListener(MouseEvent.MOUSE_UP, this.onMouseUpHandler);
this.infoScreen = new InfoScreen();
this.infoScreen.cacheAsBitmap = true;
_local1 = new Timer(5000, 1);
_local1.addEventListener("timer", this.skipToEnd);
}
public function set ghostCount(_arg1:int){
this.ghostCounter = _arg1;
}
public function onNext(_arg1:MouseEvent):void{
if (_arg1.target == this.next_btn){
this.play();
} else {
if (_arg1.target == this.play_btn){
this.play();
};
};
}
private function updateFormations():void{
this.vertical = this.generateVertical();
this.horizontal = this.generateHorizontal();
this.twoRows = this.generateTwoRows();
this.circle = this.generateCircle();
this.triangle = this.generateTriangle();
this.square = this.generateSquare();
this.diagonalRight = this.generateDiagonalRight();
this.diagonalLeft = this.generateDiagonalLeft();
}
public function get ghostCount():int{
return (this.ghostCounter);
}
private function generateDiagonalLeft():Array{
var _local1:*;
var _local2:int;
_local1 = this.generateVertical();
_local2 = 0;
while (_local2 < this.ghostCount) {
_local1[_local2] = this.rotatePoint(_local1[_local2], (-(Math.PI) / 4));
_local2++;
};
return (_local1);
}
}
}//package
Section 57
//SquareBlock (SquareBlock)
package {
import flash.geom.*;
import flash.display.*;
public class SquareBlock extends MovieClip {
private var blockArea:Rectangle;
public function SquareBlock(){
this.blockArea = this.getRect(this.root);
this.blockArea.inflate(5, 5);
}
public function blockTest(_arg1:Ghost):void{
var _local2:Rectangle;
if (this.blockArea.containsPoint(_arg1.locationPoint)){
_local2 = this.blockArea.intersection(_arg1.area);
if (_local2.width >= _local2.height){
_arg1.y = ((_local2.top)==this.blockArea.top) ? this.blockArea.top : this.blockArea.bottom;
} else {
_arg1.x = ((_local2.left)==this.blockArea.left) ? this.blockArea.left : this.blockArea.right;
};
};
}
}
}//package
Section 58
//SquarePlat (SquarePlat)
package {
public dynamic class SquarePlat extends MovingPlatform {
}
}//package
Section 59
//Squeak1 (Squeak1)
package {
import flash.media.*;
public dynamic class Squeak1 extends Sound {
}
}//package
Section 60
//Squeak2 (Squeak2)
package {
import flash.media.*;
public dynamic class Squeak2 extends Sound {
}
}//package
Section 61
//Squeak3 (Squeak3)
package {
import flash.media.*;
public dynamic class Squeak3 extends Sound {
}
}//package
Section 62
//Squeak4 (Squeak4)
package {
import flash.media.*;
public dynamic class Squeak4 extends Sound {
}
}//package
Section 63
//TriPlat (TriPlat)
package {
public dynamic class TriPlat extends PausableClip {
}
}//package