Section 1
//all_9 (blobular_0523_fla.all_9)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class all_9 extends MovieClip {
public function all_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package blobular_0523_fla
Section 2
//colorPicker_146 (blobular_0523_fla.colorPicker_146)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class colorPicker_146 extends MovieClip {
public var bg:MovieClip;
public var bmd:BitmapData;
public var onPickColor:Function;
public var dropper:MovieClip;
public var onRollOut_:Function;
public function colorPicker_146(){
addFrameScript(0, frame1);
}
public function showDropper():void{
Mouse.hide();
dropper.visible = true;
dropper.startDrag(true);
this.addEventListener(Event.ENTER_FRAME, searchColor);
}
public function hideDropper():void{
Mouse.show();
dropper.visible = false;
stopDrag();
this.removeEventListener(Event.ENTER_FRAME, searchColor);
}
function frame1(){
bmd = new BitmapData(bg.width, bg.height, true, 0);
bmd.draw(bg);
this.buttonMode = true;
this.addEventListener(MouseEvent.MOUSE_OVER, rollOver);
this.addEventListener(MouseEvent.MOUSE_OUT, rollOut);
this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
dropper.visible = false;
}
public function rollOut(_arg1:MouseEvent):void{
hideDropper();
onRollOut_();
}
public function searchColor(_arg1:Event):void{
pickColor();
}
public function pickColor(_arg1:Boolean=false):void{
var _local2:int;
_local2 = bmd.getPixel(mouseX, mouseY);
dropper.setColor(_local2);
onPickColor(_local2, _arg1);
}
public function mouseDown(_arg1:MouseEvent):void{
pickColor(true);
}
public function rollOver(_arg1:MouseEvent):void{
showDropper();
}
}
}//package blobular_0523_fla
Section 3
//colorPicker_dropper_148 (blobular_0523_fla.colorPicker_dropper_148)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class colorPicker_dropper_148 extends MovieClip {
public var color_mc:MovieClip;
public function colorPicker_dropper_148(){
addFrameScript(0, frame1);
}
public function setColor(_arg1:int):void{
color_mc.graphics.clear();
color_mc.graphics.beginFill(_arg1);
color_mc.graphics.drawRect(0, 0, 25, 20);
color_mc.graphics.endFill();
}
function frame1(){
}
}
}//package blobular_0523_fla
Section 4
//colorSelect_144 (blobular_0523_fla.colorSelect_144)
package blobular_0523_fla {
import game.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class colorSelect_144 extends MovieClip {
public var onConfirmColor:Function;
public var eye:HeroEye;
public var heroEye10:HeroEye;
public var heroEye2:HeroEye;
public var heroEye3:HeroEye;
public var heroEye5:HeroEye;
public var heroEye6:HeroEye;
public var heroEye4:HeroEye;
public var heroEye8:HeroEye;
public var btn3:AlphaBtn;
public var btn7:AlphaBtn;
public var btn2:AlphaBtn;
public var btn4:AlphaBtn;
public var btn8:AlphaBtn;
public var btn6:AlphaBtn;
public var btn:AlphaBtn;
public var heroEye7:HeroEye;
public var i:int;
public var btn5:AlphaBtn;
public var btn9:AlphaBtn;
public var btn1:AlphaBtn;
public var heroEye9:HeroEye;
public var herosColor0:int;
public var btn10:AlphaBtn;
public var shape:MovieClip;
public var heroEye1:HeroEye;
public var heros:Heros;
public var herosEyeId0:int;
public var colorPicker:MovieClip;
public var onConfirmEyeId:Function;
public function colorSelect_144(){
addFrameScript(0, frame1);
}
public function herosRun(_arg1:Event):void{
heros.run();
}
public function getEyeId():int{
return (heros.eyeId);
}
public function getColor():int{
return (heros.color);
}
function frame1(){
heros.shape = shape;
heros.levelUp();
heros.levelUp();
heros.levelUp();
if ((((Main.main.stageNum >= 5)) && ((Main.main.stageNum <= 8)))){
herosEyeId0 = (heros.eyeId = 10);
} else {
herosEyeId0 = (heros.eyeId = Main.main.heroEyeId);
};
herosColor0 = (heros.color = Main.main.heroColor);
trace(("is water?" + Main.main.isWaterStage));
i = 1;
while (i <= 10) {
btn = this[("btn" + i)];
eye = this[("heroEye" + i)];
btn.id = i;
eye.gotoAndStop(i);
if (((((Main.main.isWaterStage) && ((i < 10)))) || (((!(Main.main.isWaterStage)) && ((i == 10)))))){
eye.visible = false;
btn.visible = false;
} else {
btn.onRollOver = function (){
setEyeId(this.id);
};
btn.onRollOut = function (){
heros.eyeId = herosEyeId0;
};
btn.onClick = function (){
setEyeId(this.id, true);
};
};
i++;
};
this.addEventListener(Event.ENTER_FRAME, herosRun);
colorPicker.onPickColor = function (_arg1:int, _arg2:Boolean=false):void{
var color = _arg1;
var confirm = _arg2;
if (confirm){
herosColor0 = color;
try {
onConfirmColor(herosColor0);
} catch(e) {
trace(("e=" + e));
};
};
heros.color = color;
};
colorPicker.onRollOut_ = function ():void{
heros.color = herosColor0;
};
}
public function setEyeId(_arg1:int, _arg2:Boolean=false):void{
var id = _arg1;
var confirm = _arg2;
if (confirm){
herosEyeId0 = id;
try {
onConfirmEyeId(herosEyeId0);
} catch(e) {
trace(("e=" + e));
};
};
heros.eyeId = id;
}
}
}//package blobular_0523_fla
Section 5
//gameMenu_286 (blobular_0523_fla.gameMenu_286)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class gameMenu_286 extends MovieClip {
public var btnNf:BtnNf;
public var colorSelect:MovieClip;
public var btnOk:BtnOK;
public var btnRtg:BtnRtg;
public function gameMenu_286(){
addFrameScript(0, frame1, 2, frame3, 4, frame5);
}
function frame3(){
btnNf.onClick = function (){
gotoAndStop("colorSelect");
};
btnRtg.onClick = function (){
hide();
};
}
function frame1(){
gotoAndStop("hide");
}
public function hide():void{
Main.main.clock.start();
Main.main.game.pause = false;
this.visible = false;
gotoAndStop("hide");
}
function frame5(){
colorSelect.onConfirmColor = function (_arg1:int):void{
Main.main.game.heroColor = _arg1;
};
colorSelect.onConfirmColor = function (_arg1:int):void{
Main.main.game.heroEyeId = _arg1;
};
btnOk.onClick = function (){
Main.main.saveSetting(colorSelect.getColor(), colorSelect.getEyeId());
Main.main.game.heroColor = Main.main.heroColor;
Main.main.game.heroEyeId = Main.main.heroEyeId;
Main.main.game.updateHerosColorAndEyeId();
Main.main.heroSymbol.update();
hide();
};
}
public function show():void{
Main.main.clock.stop();
Main.main.game.pause = true;
this.visible = true;
gotoAndStop("show");
}
}
}//package blobular_0523_fla
Section 6
//info_body_284 (blobular_0523_fla.info_body_284)
package blobular_0523_fla {
import flash.display.*;
public dynamic class info_body_284 extends MovieClip {
public var time_mc:MovieClip;
}
}//package blobular_0523_fla
Section 7
//info_mc_282 (blobular_0523_fla.info_mc_282)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class info_mc_282 extends MovieClip {
public var btnOK:BtnOK;
public var stageNum:int;
public var body:MovieClip;
public var onHide:Function;
public var time:int;
public function info_mc_282(){
addFrameScript(0, frame1, 14, frame15, 29, frame30);
}
function frame15(){
stop();
btnOK.onClick = function (){
hide();
};
}
function frame1(){
stop();
this.visible = false;
}
public function hide():void{
gotoAndPlay("f2");
}
function frame30(){
onHide();
}
public function show(_arg1:int, _arg2:int):void{
stageNum = _arg1;
body.gotoAndStop(stageNum);
body.time_mc.gotoAndStop(int((_arg2 / 30)));
visible = true;
gotoAndPlay(2);
}
}
}//package blobular_0523_fla
Section 8
//instructions_101 (blobular_0523_fla.instructions_101)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class instructions_101 extends MovieClip {
public var btnB:BtnB;
public var btnNext:BtnNext;
public var btnSkip:BtnSkip;
public function instructions_101(){
addFrameScript(0, frame1);
}
function frame1(){
nextFrame();
btnNext.onClick = function (){
nextFrame();
};
btnSkip.onClick = function (){
gotoAndStop(5);
};
btnB.onClick = function (){
prevFrame();
};
}
}
}//package blobular_0523_fla
Section 9
//loading_logo_loading_1 (blobular_0523_fla.loading_logo_loading_1)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class loading_logo_loading_1 extends MovieClip {
public function loading_logo_loading_1(){
addFrameScript(38, frame39);
}
function frame39(){
stop();
}
}
}//package blobular_0523_fla
Section 10
//loading_num_3 (blobular_0523_fla.loading_num_3)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class loading_num_3 extends MovieClip {
public var num_txt:TextField;
public var li:LoaderInfo;
public function loading_num_3(){
addFrameScript(0, frame1);
}
public function loading(_arg1:Event):void{
var _local2:int;
_local2 = int(((li.bytesLoaded / li.bytesTotal) * 100));
num_txt.text = (_local2 + "%");
if (_local2 >= 100){
removeEventListener(Event.ENTER_FRAME, loading);
if (!(Main.main._mochiad is MovieClip)){
Main.main.play();
};
};
}
function frame1(){
li = Main.main.loaderInfo;
this.addEventListener(Event.ENTER_FRAME, loading);
}
}
}//package blobular_0523_fla
Section 11
//loading_protect_text_6 (blobular_0523_fla.loading_protect_text_6)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class loading_protect_text_6 extends MovieClip {
public function loading_protect_text_6(){
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package blobular_0523_fla
Section 12
//logo_2 (blobular_0523_fla.logo_2)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class logo_2 extends MovieClip {
public function logo_2(){
addFrameScript(0, frame1);
}
function frame1(){
this.buttonMode = true;
this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
}
public function mouseDown(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.freeworldgroup.com/"), "_blank");
}
}
}//package blobular_0523_fla
Section 13
//lose_motion_268 (blobular_0523_fla.lose_motion_268)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class lose_motion_268 extends MovieClip {
public function lose_motion_268(){
addFrameScript(131, frame132);
}
function frame132(){
stop();
}
}
}//package blobular_0523_fla
Section 14
//resultPad_259 (blobular_0523_fla.resultPad_259)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class resultPad_259 extends MovieClip {
public var numTimeBounds:Num;
public var btnSs:BtnSs;
public var clock:Clock;
public var numTotalLevelBounds:Num;
public var numStage:Num;
public var btnNs:BtnNs;
public var submitScore:MovieClip;
public var btnPa:BtnPa;
public var onShow:Function;
public var numScore:Num;
public var topHitRec:MovieClip;
public var numTotalLevel:Num;
public var numTotalScore:Num;
public var onHide:Function;
public var stageClear:Boolean;
public var hitRec:MovieClip;
public function resultPad_259(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function show(_arg1:Boolean):void{
topHitRec.visible = false;
alpha = 0;
this.visible = true;
this.addEventListener(Event.ENTER_FRAME, showRun);
stageClear = _arg1;
if (stageClear){
gotoAndStop("stageClear");
} else {
gotoAndStop("lose");
};
}
public function showRun(_arg1:Event):void{
if ((alpha = (alpha + 0.05)) > 0.95){
alpha = 1;
removeEventListener(Event.ENTER_FRAME, showRun);
onShow(stageClear);
};
}
function frame3(){
numScore.value = Main.main.score;
if (Main.main.score > 0){
btnSs.onClick = function (){
btnSs.visible = false;
submitScore.show();
};
} else {
btnSs.visible = false;
};
btnPa.onClick = function (){
hide();
onHide = function (){
Main.main.game.clearAll();
Main.main.gotoAndStop("rest");
Main.main.fadeMain.hide();
Main.main.fadeMain.onHide = function (){
Main.main.restart();
Main.main.fadeMain.show();
Main.main.fadeMain.onShow = function (){
};
};
};
};
}
public function hide():void{
topHitRec.visible = true;
topHitRec.alpha = 0;
this.addEventListener(Event.ENTER_FRAME, hideRun);
}
function frame2(){
numStage.value = Main.main.stageNum;
numScore.value = Main.main.score;
clock.time = Main.main.time;
numTimeBounds.value = Main.main.time;
numTotalLevel.value = Main.main.game.world.heros.totalLevel;
numTotalLevelBounds.value = (numTotalLevel.value * 15);
Main.main.score = (numTotalScore.value = ((numScore.value + numTimeBounds.value) + numTotalLevelBounds.value));
onHide = function (){
Main.main.game.clearAll();
Main.main.gotoAndStop("rest");
Main.main.fadeMain.hide();
Main.main.fadeMain.onHide = function (){
Main.main.nextStage();
Main.main.fadeMain.show();
Main.main.fadeMain.onShow = function (){
};
};
};
if (Main.main.stageNum < 12){
btnNs.onClick = function (){
hide();
};
} else {
btnNs.visible = false;
setTimeout(onHide, 8000);
};
}
function frame1(){
stop();
stageClear = false;
this.visible = false;
}
public function hideRun(_arg1:Event):void{
if ((topHitRec.alpha = (topHitRec.alpha + 0.05)) > 0.95){
topHitRec.alpha = 1;
gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, hideRun);
onHide();
};
}
}
}//package blobular_0523_fla
Section 15
//submitScore_276 (blobular_0523_fla.submitScore_276)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class submitScore_276 extends MovieClip {
public var loader:URLLoader;
public var variables:URLVariables;
public var btnX:BtnX;
public var request:URLRequest;
public var btnSubmit:BtnSubmit;
public var scoreTxt:TextField;
public var game_name:String;
public var nameTxt:TextField;
public function submitScore_276(){
addFrameScript(0, frame1);
}
public function errorHandler(_arg1:IOErrorEvent):void{
trace(("error: " + _arg1));
}
public function submit():void{
variables.score = scoreTxt.text;
Main.main.playerName = (variables.name = nameTxt.text);
request.data = variables;
request.method = URLRequestMethod.POST;
trace(((("sendToURL: " + request.url) + "?") + request.data));
sendToURL(request);
loader.load(request);
gotoAndStop(2);
}
function frame1(){
hide();
game_name = Main.main.gameName;
nameTxt.text = Main.main.playerName;
scoreTxt.text = String(Main.main.score);
variables = new URLVariables();
request = new URLRequest("http://www.freeworldgroup.com/score/score.asp");
variables.game = "blobular";
scoreTxt.text = String(Main.main.score);
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
btnSubmit.onClick = function (){
submit();
};
btnX.onClick = function (){
hide();
};
}
public function hide(){
this.visible = false;
this.gotoAndStop(1);
}
public function completeHandler(_arg1:Event):void{
trace("complete");
gotoAndStop(3);
}
public function show(){
this.visible = true;
this.gotoAndStop(1);
}
}
}//package blobular_0523_fla
Section 16
//title_71 (blobular_0523_fla.title_71)
package blobular_0523_fla {
import game.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class title_71 extends MovieClip {
public var onEffect:Function;
public var shape:MovieClip;
public var heros:Heros;
public function title_71(){
addFrameScript(0, frame1, 105, frame106, 106, frame107);
}
public function herosRun(_arg1:Event):void{
heros.run();
}
function frame106(){
stop();
onEffect();
}
function frame1(){
stop();
}
function frame107(){
stop();
heros.addHero(new Hero(null, null, 30, -200));
heros.shape = shape;
this.addEventListener(Event.ENTER_FRAME, herosRun);
}
}
}//package blobular_0523_fla
Section 17
//title_bg_11 (blobular_0523_fla.title_bg_11)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class title_bg_11 extends MovieClip {
public function title_bg_11(){
addFrameScript(0, frame1, 84, frame85, 265, frame266);
}
function frame85(){
Main.main.shake();
}
function frame1(){
stop();
}
function frame266(){
stop();
}
}
}//package blobular_0523_fla
Section 18
//versionWarning_5 (blobular_0523_fla.versionWarning_5)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class versionWarning_5 extends MovieClip {
public function versionWarning_5(){
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package blobular_0523_fla
Section 19
//World1_159 (blobular_0523_fla.World1_159)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World1_159 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 20
//World10_233 (blobular_0523_fla.World10_233)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World10_233 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 21
//World11_239 (blobular_0523_fla.World11_239)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World11_239 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 22
//World12_244 (blobular_0523_fla.World12_244)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World12_244 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 23
//World2_164 (blobular_0523_fla.World2_164)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World2_164 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 24
//World3_169 (blobular_0523_fla.World3_169)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World3_169 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 25
//World4_176 (blobular_0523_fla.World4_176)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World4_176 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 26
//World5_198 (blobular_0523_fla.World5_198)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World5_198 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 27
//World6_207 (blobular_0523_fla.World6_207)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World6_207 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 28
//World7_214 (blobular_0523_fla.World7_214)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World7_214 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 29
//World8_220 (blobular_0523_fla.World8_220)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World8_220 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 30
//World9_226 (blobular_0523_fla.World9_226)
package blobular_0523_fla {
import game.*;
import flash.display.*;
public dynamic class World9_226 extends MovieClip {
public var mushroomArea:MovieClip;
public var thornArea:MovieClip;
public var flowerArea:MovieClip;
public var shape:MovieClip;
public var heros:Heros;
}
}//package blobular_0523_fla
Section 31
//youwin_mc_280 (blobular_0523_fla.youwin_mc_280)
package blobular_0523_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class youwin_mc_280 extends MovieClip {
public function youwin_mc_280(){
addFrameScript(0, frame1, 1, frame2, 217, frame218);
}
function frame218(){
stop();
}
function frame1(){
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package blobular_0523_fla
Section 32
//Apple (game.Apple)
package game {
public class Apple extends Mushroom {
}
}//package game
Section 33
//Dot (game.Dot)
package game {
import flash.display.*;
import flash.geom.*;
public class Dot extends Vector {
public var m:Number;
public var v:Vector;
public function Dot(_arg1:Number=0, _arg2:Number=0, _arg3:Number=1){
super(_arg1, _arg2);
v = new Vector();
m = _arg3;
}
public function mov(_arg1:Vector):void{
v.add(_arg1);
v.mul(0.95);
if (v.length > 15){
v.normalize(15);
};
this.add(v);
}
public function addForce(_arg1:Vector):void{
v.add(Vector.mul_(_arg1, (1 / m)));
}
}
}//package game
Section 34
//Game (game.Game)
package game {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class Game extends MovieClip {
public var yCenter:Number;
private var av:Number;
public var zoomHei:Number;
private var timeArr:Array;
public var isShowingAll:Boolean;
public var g:Vector;
public var onGetMushroom:Function;
private var bMushroomArea:Rectangle;
private var rotation0:Number;
public var onHurt:Function;
public var wid0:Number;
public var hei0:Number;
private var vr:Number;
private var isShowingAllOn:Boolean;
public var xCenter:Number;
public var zoomWid:Number;
private var vrMax:Number;
private var isShowingAllOff:Boolean;
public var keyCatcher:KeyCatcher;
public var heroEyeId:int;
public var heroColor:int;
public var world:MovieClip;
public var onLose:Function;
private var stageNum:int;
public var totalMushroom:int;
private var p0:Point;
public var onStart:Function;
private var totalEatMushroom:int;
public var pause:Boolean;
public function Game(){
g = new Vector(0, 0.5);
timeArr = [2.5, 3, 3, 4, 4, 4, 4, 4, 4, 2.5, 1.5, 1.25];
super();
addFrameScript(1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13);
zoomWid = 400;
zoomHei = 400;
xCenter = (zoomWid / 2);
yCenter = (zoomHei / 2);
vr = 0;
av = 0.6;
vrMax = 2;
p0 = new Point();
}
public function scrollBy(_arg1:Number, _arg2:Number):void{
world.x = (world.x + ((xCenter - _arg1) * 0.1));
world.y = (world.y + ((yCenter - _arg2) * 0.1));
}
public function clearAll():void{
while (this.numChildren > 0) {
trace(this.getChildAt(0));
this.removeChildAt(0);
};
this.removeEventListener(Event.ENTER_FRAME, run);
}
function frame10(){
start();
}
public function clearCtrl():void{
this.removeChild(keyCatcher);
}
function frame12(){
start();
}
public function start():void{
var totalChildren:int;
var i:int;
totalEatMushroom = 0;
bMushroomArea = world.mushroomArea.getBounds(world);
bMushroomArea.x = (bMushroomArea.x - 200);
bMushroomArea.y = (bMushroomArea.y - 200);
bMushroomArea.width = (bMushroomArea.width + 400);
bMushroomArea.height = (bMushroomArea.height + 400);
wid0 = bMushroomArea.width;
hei0 = bMushroomArea.height;
world.x = (xCenter - world.heros.x0);
world.y = (yCenter - world.heros.y0);
isShowingAll = false;
world.heros.shape = world.shape;
updateHerosColorAndEyeId();
if (Main.main.isWaterStage){
g.mul(-0.5);
};
world.heros.g = g;
world.heros.onDie = function (_arg1:Hero):void{
Game.moveMc(_arg1);
};
world.heros.onDieOut = function ():void{
lose();
};
keyCatcher.onKeyDown = function (_arg1:int){
if (isShowingAll){
} else {
switch (_arg1){
case 38:
if (Main.main.isWaterStage){
world.heros.jump(-1);
} else {
world.heros.jump(1);
};
break;
case 40:
if (Main.main.isWaterStage){
world.heros.jump(1);
} else {
world.heros.jump(-1);
};
break;
};
};
};
totalMushroom = 0;
totalChildren = world.mushroomArea.numChildren;
i = 0;
while (i < totalChildren) {
if (world.mushroomArea.getChildAt(i).type == "mushroom"){
totalMushroom++;
};
i = (i + 1);
};
onStart(totalMushroom, (timeArr[(stageNum - 1)] * 60));
this.addEventListener(Event.ENTER_FRAME, run);
}
function frame5(){
start();
}
function frame6(){
start();
}
function frame8(){
start();
}
function frame3(){
start();
}
function frame4(){
start();
}
function frame7(){
start();
}
function frame9(){
start();
}
function frame2(){
start();
}
function frame13(){
start();
}
function frame11(){
start();
}
public function run(_arg1:Event):void{
var _local2:Number;
var _local3:Rectangle;
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:int;
var _local8:Rectangle;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:*;
var _local13:int;
var _local14:Number;
var _local15:*;
if (pause){
return;
};
if (isShowingAll){
} else {
if (keyCatcher.isDown(83)){
world.heros.merge();
} else {
if (keyCatcher.isDown(65)){
world.heros.divide();
};
};
if (keyCatcher.isDown(37)){
rotate(-1);
} else {
if (keyCatcher.isDown(39)){
rotate(1);
} else {
slide();
};
};
};
if (isShowingAllOn){
_local2 = (0 - world.rotation);
if (_local2 >= 180){
_local2 = (_local2 - 180);
} else {
if (_local2 <= -180){
_local2 = (_local2 + 180);
};
};
rotateWorld((_local2 * 0.1));
if ((_local2 * _local2) < 1){
world.rotation = 0;
isShowingAllOn = false;
};
} else {
if (isShowingAllOff){
_local2 = (rotation0 - world.rotation);
if (_local2 >= 180){
_local2 = (_local2 - 180);
} else {
if (_local2 <= -180){
_local2 = (_local2 + 180);
};
};
world.rotation = (world.rotation + (_local2 * 0.1));
if ((_local2 * _local2) < 1){
world.rotation = rotation0;
isShowingAllOff = false;
isShowingAll = false;
};
};
};
if (world.heros.totalHero <= 0){
return;
};
if (Main.main.isWaterStage){
g.r = ((-90 - world.rotation) / (180 / Math.PI));
} else {
g.r = ((90 - world.rotation) / (180 / Math.PI));
};
_local3 = world.heros.getBounds(this);
_local3.x = (_local3.x - 10);
_local3.y = (_local3.y - 10);
_local3.width = (_local3.width + 10);
_local3.height = (_local3.height + 60);
_local4 = Math.min((zoomWid / _local3.width), (zoomHei / _local3.height));
_local5 = world.scaleX;
if (_local4 < 1){
_local5 = (_local5 + ((_local5 * (_local4 - 1)) * 0.2));
} else {
_local5 = (_local5 + ((_local5 * (_local4 - 1)) * 0.01));
};
if (_local5 > 1.5){
_local5 = 1.5;
};
_local6 = world.globalToLocal(new Point(xCenter, yCenter));
world.scaleY = (world.scaleX = _local5);
_local6 = world.localToGlobal(_local6);
world.x = (world.x + (xCenter - _local6.x));
world.y = (world.y + (yCenter - _local6.y));
_local3 = world.heros.getBounds(this);
scrollBy((_local3.x + (_local3.width / 2)), (_local3.y + (_local3.height / 2)));
if (isShowingAll){
} else {
world.heros.run();
};
setVisible(world.flowerArea);
setVisible(world.thornArea);
_local9 = world.thornArea.numChildren;
_local7 = 0;
while (_local7 < _local9) {
_local12 = world.thornArea.getChildAt(_local7);
if (_local12.visible){
_local8 = _local12.getBounds(stage);
_local12.getBounds(stage).x = (_local8.x + (_local8.width / 4));
_local8.y = (_local8.y + (_local8.height / 4));
_local8.width = (_local8.width / 2);
_local8.height = (_local8.height / 2);
_local13 = 0;
while (_local13 <= _local8.width) {
_local14 = 0;
while (_local14 <= _local8.height) {
if (world.heros.hitTestPoint((_local13 + _local8.x), (_local14 + _local8.y), true)){
if (world.heros.hitThron(new Point((_local13 + _local8.x), (_local14 + _local8.y)))){
onHurt(world.heros.totalLevel);
};
//unresolved jump
};
_local14 = (_local14 + _local8.height);
};
_local13 = (_local13 + _local8.width);
};
};
_local7++;
};
setVisible(world.mushroomArea);
_local9 = world.mushroomArea.numChildren;
_local7 = 0;
while (_local7 < _local9) {
_local15 = world.mushroomArea.getChildAt(_local7);
if (_local15.visible){
_local8 = _local15.getBounds(stage);
_local11 = 0;
while (_local11 <= _local8.height) {
_local10 = 0;
while (_local10 <= _local8.width) {
if (world.heros.hitTestPoint((_local10 + _local8.x), (_local11 + _local8.y), true)){
switch (_local15.remove()){
case "extra":
world.heros.levelUp((_local10 + _local8.x), (_local11 + _local8.y));
Main.main.score = (Main.main.score + 10);
break;
case "super":
Main.main.score = (Main.main.score + 50);
break;
case "time":
Main.main.time = (Main.main.time + 10);
Main.main.score = (Main.main.score + 10);
break;
case "shield":
world.heros.addShield();
Main.main.score = (Main.main.score + 10);
break;
default:
totalEatMushroom++;
totalMushroom--;
if ((totalEatMushroom % 15) == 0){
world.heros.levelUp((_local10 + _local8.x), (_local11 + _local8.y));
};
onGetMushroom(totalMushroom, world.heros.totalLevel);
break;
};
return;
};
_local10 = (_local10 + _local8.width);
};
_local11 = (_local11 + _local8.height);
};
};
_local7++;
};
}
public function rotateWorld(_arg1:Number):void{
var _local2:Point;
_local2 = world.globalToLocal(new Point(xCenter, yCenter));
world.rotation = (world.rotation + _arg1);
_local2 = world.localToGlobal(_local2);
world.x = (world.x + (xCenter - _local2.x));
world.y = (world.y + (yCenter - _local2.y));
}
public function init(_arg1:int):void{
stageNum = _arg1;
gotoAndStop((stageNum + 1));
}
public function lose():void{
pause = true;
moveMc(world.heros);
onLose();
}
public function notShowAll():void{
isShowingAllOff = true;
world.heros.graphics.clear();
}
public function rotate(_arg1:Number):void{
if (_arg1 > 0){
vr = (vr + av);
if (vr > vrMax){
vr = vrMax;
};
} else {
vr = (vr - av);
if (vr < -(vrMax)){
vr = -(vrMax);
};
};
rotateWorld(vr);
}
public function timeOut():void{
pause = true;
onLose();
}
public function showAll():void{
rotation0 = world.rotation;
isShowingAll = true;
isShowingAllOn = true;
world.heros.graphics.clear();
world.heros.graphics.lineStyle(1, 0xFF0000);
world.heros.graphics.drawRect(bMushroomArea.x, bMushroomArea.y, bMushroomArea.width, bMushroomArea.height);
}
public function updateHerosColorAndEyeId():void{
if (Main.main.isWaterStage){
world.heros.eyeId = 10;
} else {
world.heros.eyeId = heroEyeId;
};
world.heros.color = heroColor;
}
private function setVisible(_arg1):void{
var _local2:int;
var _local3:int;
var _local4:*;
var _local5:Rectangle;
_local2 = _arg1.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = _arg1.getChildAt(_local3);
_local5 = _local4.getBounds(stage);
_local4.visible = (((((((_local5.x <= zoomWid)) && ((_local5.y <= zoomHei)))) && (((_local5.width + _local5.x) >= 0)))) && (((_local5.height + _local5.y) >= 0)));
_local3++;
};
}
public function slide():void{
vr = (vr * 0.9);
rotateWorld(vr);
}
public static function moveMc(_arg1):void{
_arg1.x = (_arg1.x + _arg1.parent.x);
_arg1.y = (_arg1.y + _arg1.parent.y);
Main.main.game.world.addChild(_arg1);
}
}
}//package game
Section 35
//Helix (game.Helix)
package game {
public class Helix {
private var L0:Number;
private var f:Vector;
private var dot2:Dot;
public var k:Number;
private var dx:Vector;
private var dot1:Dot;
private var prevDx:Vector;
public function Helix(_arg1:Number, _arg2:Number){
L0 = _arg1;
k = _arg2;
}
public function unjoin():void{
dot1 = (dot2 = null);
}
public function join(_arg1:Dot, _arg2:Dot):void{
dot1 = _arg1;
dot2 = _arg2;
mov();
}
public function mov():void{
if ((((dot1 == null)) || ((dot2 == null)))){
return;
};
dx = Vector.sub_(dot2, dot1);
if (dx.length < 0.1){
dx = prevDx;
} else {
prevDx = dx;
};
dx.normalize((dx.length - L0));
f = Vector.mul_(dx, k);
dot1.addForce(f);
f.mul(-1);
dot2.addForce(f);
}
}
}//package game
Section 36
//Hero (game.Hero)
package game {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class Hero extends MovieClip {
private var _k:Number;
private var hitShapeV:Vector;
public var color:int;
public var varShield:int;
public var g:Vector;
private var dots:Array;
public var level:int;
private var totalDot:int;
private var shieldIcon:ShieldIcon;
private var totalHelix:int;
public var r:Number;
public var centerO:Vector;
private var helixs:Array;
public var centerDot:Dot;
private var dieAlpha:Number;
public var heroEye:HeroEye;
private var __heros:Heros;
private var _m:Number;
public var shieldLine:MovieClip;
public function Hero(_arg1:Hero=null, _arg2:Hero=null, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:Boolean=false){
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:Number;
var _local11:int;
var _local12:Number;
var _local13:int;
var _local14:int;
var _local15:int;
super();
_local6 = 4;
_local7 = 1;
varShield = 0;
if (_arg1 == null){
level = 1;
if (!isNaN(_arg3)){
x = _arg3;
y = _arg4;
};
} else {
if (_arg2 == null){
x = _arg1.centerO.x;
y = _arg1.centerO.y;
if (_arg5){
varShield = 120;
level = (_arg1.level - 1);
} else {
level = (_arg1.level + 1);
};
trace(("level=" + level));
} else {
x = ((_arg1.centerO.x + _arg2.centerO.x) / 2);
y = ((_arg1.centerO.y + _arg2.centerO.y) / 2);
level = (_arg1.level + _arg2.level);
};
};
r = Math.sqrt((level * 400));
totalDot = (5 + int(((2 / 3) * level)));
dots = new Array(totalDot);
_local8 = 0;
while (_local8 < totalDot) {
_local10 = ((((_local8 / totalDot) * 2) - 0.5) * Math.PI);
dots[_local8] = new Dot((this.x + (r * Math.cos(_local10))), (this.y + (r * Math.sin(_local10))), _local6);
_local8++;
};
centerDot = new Dot(this.x, this.y, _local6);
centerO = new Vector(this.x, this.y);
this.x = (this.y = 0);
heroEye = new HeroEye();
this.addChild(heroEye);
adjustEye();
helixs = new Array();
_local11 = ((totalDot >= 6)) ? 4 : (totalDot - 2);
_local8 = 0;
while (_local8 < totalDot) {
_local9 = 1;
while (_local9 <= _local11) {
addHelix(dots[_local8], dots[((_local8 + _local9) % totalDot)], _local7);
_local9++;
};
addHelix(dots[_local8], centerDot, _local7);
_local8++;
};
totalHelix = helixs.length;
if (_arg1 == null){
} else {
if (_arg2 == null){
if (_arg5){
_local12 = (r = Math.sqrt(((level + 1) * 400)));
} else {
_local12 = (r = Math.sqrt(((level - 1) * 400)));
};
_local8 = 0;
while (_local8 < totalDot) {
_local10 = ((((_local8 / totalDot) * 2) - 0.5) * Math.PI);
dots[_local8].x = (_arg1.centerO.x + (_local12 * Math.cos(_local10)));
dots[_local8].y = (_arg1.centerO.y + (_local12 * Math.sin(_local10)));
_local8++;
};
} else {
_local13 = (5 + int(((2 / 3) * _arg1.level)));
_local14 = (5 + int(((2 / 3) * _arg2.level)));
_local15 = int((totalDot * (_local13 / (_local13 + _local14))));
_local8 = 0;
while (_local8 < totalDot) {
_local10 = ((((_local8 / totalDot) * 2) - 0.5) * Math.PI);
if (_local8 <= _local15){
dots[_local8].x = (_arg1.centerO.x + (r * Math.cos(_local10)));
dots[_local8].y = (_arg1.centerO.y + (r * Math.sin(_local10)));
} else {
dots[_local8].x = (_arg2.centerO.x + (r * Math.cos(_local10)));
dots[_local8].y = (_arg2.centerO.y + (r * Math.sin(_local10)));
};
_local8++;
};
};
};
}
public function removeShield():void{
this.removeChild(shieldIcon);
shieldIcon = null;
this.shieldLine.graphics.clear();
}
public function hurt():Boolean{
if ((((heros.varShield > 0)) || ((varShield > 0)))){
return (false);
};
trace("hurt");
if (level > 1){
heros.addHero(new Hero(this, null, NaN, NaN, true));
heros.removeHero(this);
} else {
die();
heros.die(this);
};
return (true);
}
private function adjustEye():void{
heroEye.x = ((0.4 * dots[0].x) + (0.6 * centerDot.x));
heroEye.y = ((0.4 * dots[0].y) + (0.6 * centerDot.y));
heroEye.rotation = ((Vector.sub_(dots[0], centerDot).r * 180) / Math.PI);
}
public function jump(_arg1:int):void{
var _local2:Vector;
var _local3:Dot;
if (hitShapeV.length > 0){
_local2 = Vector.add_(Vector.mul_(g, ((-15 * _arg1) * centerDot.m)), Vector.normalize_(hitShapeV, ((-5 * _arg1) * centerDot.m)));
for each (_local3 in dots) {
_local3.addForce(_local2);
};
};
}
public function dieRun(_arg1:Event):void{
var _local2:Dot;
for each (_local2 in dots) {
_local2.mov(g);
};
centerDot.mov(g);
if ((dieAlpha = (dieAlpha / 1.2)) < 0.01){
this.removeEventListener(Event.ENTER_FRAME, dieRun);
this.parent.removeChild(this);
};
this.graphics.clear();
this.graphics.beginFill(color, dieAlpha);
centerO = SmoothDraw.draw(this, dots);
this.graphics.endFill();
adjustEye();
}
public function hitCheck(_arg1:Dot, _arg2):Vector{
var _local3:Vector;
var _local4:Vector;
var _local5:Vector;
var _local6:int;
_local3 = localToGlobalV(_arg1);
if (_arg2.hitTestPoint(_local3.x, _local3.y, true)){
_arg1.v.x = (_arg1.v.y = 0);
_local4 = centerO.clone();
_local5 = _arg1.clone();
_local6 = 0;
while (++_local6 < 10) {
_arg1.x = ((_local4.x + _local5.x) / 2);
_arg1.y = ((_local4.y + _local5.y) / 2);
_local3 = localToGlobalV(_arg1);
if (_arg2.hitTestPoint(_local3.x, _local3.y, true)){
_local5.x = _arg1.x;
_local5.y = _arg1.y;
} else {
_local4.x = _arg1.x;
_local4.y = _arg1.y;
};
};
return (Vector.sub_(_arg1, centerO));
};
return (new Vector());
}
private function addHelix(_arg1:Dot, _arg2:Dot, _arg3:Number):void{
var _local4:Helix;
_local4 = new Helix(Vector.sub_(_arg1, _arg2).length, _arg3);
_local4.join(_arg1, _arg2);
helixs.push(_local4);
}
public function addShield():void{
shieldIcon = new ShieldIcon();
shieldIcon.x = centerDot.x;
shieldIcon.y = centerDot.y;
shieldIcon.rotation = heroEye.rotation;
this.shieldLine.alpha = 1;
this.addChildAt(shieldIcon, this.getChildIndex(heroEye));
}
public function die():void{
var _local1:int;
var _local2:Helix;
var _local3:Dot;
dieAlpha = 1;
_local1 = 0;
for each (_local2 in helixs) {
_local2.unjoin();
};
for each (_local3 in dots) {
_local3.v = Vector.normalize_(new Vector((Math.random() - 0.5), (Math.random() - 0.5)), ((5 * Math.random()) + 5));
};
this.addEventListener(Event.ENTER_FRAME, dieRun);
}
public function run():void{
var _local1:Dot;
var _local2:int;
var _local3:int;
var _local4:Vector;
var _local5:Hero;
var _local6:int;
var _local7:Helix;
if (heros.varShield > 0){
varShield = 0;
shieldIcon.x = centerDot.x;
shieldIcon.y = centerDot.y;
shieldIcon.rotation = heroEye.rotation;
if (heros.varShield < 30){
this.shieldLine.alpha = (shieldIcon.alpha = (((heros.varShield % 4) < 2)) ? 1 : 0.2);
};
} else {
if (varShield > 0){
varShield--;
this.alpha = (((varShield % 4) < 2)) ? 1 : 0.8;
};
};
_local2 = 0;
hitShapeV = new Vector();
for each (_local1 in dots) {
_local1.mov(g);
hitShapeV.add(hitCheck(_local1, heros.shape));
};
_local6 = heros.numChildren;
_local2 = 0;
while (_local2 < _local6) {
_local5 = Hero(heros.getChildAt(_local2));
if (_local5 == this){
} else {
if (this.hitTestObject(_local5)){
for each (_local1 in dots) {
hitShapeV.add(hitCheck(_local1, _local5));
};
};
};
_local2++;
};
centerDot.addForce(Vector.normalize_(hitShapeV, -1));
centerDot.mov(g);
for each (_local7 in helixs) {
_local7.mov();
};
this.graphics.clear();
this.graphics.beginFill(color);
centerO = SmoothDraw.draw(this, dots);
this.graphics.endFill();
if (heros.varShield > 0){
this.shieldLine.graphics.clear();
this.shieldLine.graphics.lineStyle(1, 0xFFFFFF);
SmoothDraw.draw(this.shieldLine, dots);
};
adjustEye();
}
public function get heros():Heros{
return (__heros);
}
public function set heros(_arg1:Heros):void{
__heros = _arg1;
color = heros.color;
heroEye.gotoAndStop(heros.eyeId);
if (heros.varShield > 0){
addShield();
};
}
public function localToGlobalV(_arg1:Vector):Vector{
var _local2:Point;
_local2 = this.localToGlobal(new Point(_arg1.x, _arg1.y));
return (new Vector(_local2.x, _local2.y));
}
}
}//package game
Section 37
//HeroEye (game.HeroEye)
package game {
import flash.display.*;
public dynamic class HeroEye extends MovieClip {
}
}//package game
Section 38
//Heros (game.Heros)
package game {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class Heros extends MovieClip {
public var onDie:Function;
private var _totalLevel:int;
private var __eyeId:int;// = 1
public var i:int;
public var totalHero:int;
public var varShield:int;
public var onDieOut:Function;
private var __color:int;// = 0xFF9900
private var __g:Vector;
public var shape:MovieClip;
public var x0:Number;
public var y0:Number;
public function Heros(){
__color = 0xFF9900;
__eyeId = 1;
super();
g = new Vector(0, 1);
x0 = this.x;
y0 = this.y;
this.x = (this.y = 0);
addHero(new Hero(null, null, x0, y0));
varShield = 0;
}
public function removeShield():void{
i = 0;
while (i < totalHero) {
Hero(this.getChildAt(i)).removeShield();
i++;
};
}
public function hitThron(_arg1:Point):Boolean{
var _local2:Hero;
i = 0;
while (i < totalHero) {
_local2 = Hero(this.getChildAt(i));
if (_local2.hitTestPoint(_arg1.x, _arg1.y, true)){
return (_local2.hurt());
};
i++;
};
return (false);
}
public function get eyeId():int{
return (__eyeId);
}
public function jump(_arg1:int):void{
i = 0;
while (i < totalHero) {
Hero(this.getChildAt(i)).jump(_arg1);
i++;
};
}
public function merge():void{
var _local1:int;
var _local2:int;
var _local3:Hero;
var _local4:Hero;
_local1 = 0;
while (_local1 < totalHero) {
_local2 = 0;
while (_local2 < totalHero) {
if (_local1 == _local2){
} else {
_local3 = Hero(this.getChildAt(_local1));
_local4 = Hero(this.getChildAt(_local2));
if (_local3.hitTestObject(_local4)){
addHero(new Hero(_local3, _local4));
removeHero(_local3);
removeHero(_local4);
return;
};
};
_local2++;
};
_local1++;
};
}
public function addHero(_arg1:Hero):void{
_arg1.heros = this;
this.addChild(_arg1);
_arg1.g = g;
totalHero++;
}
public function levelUp(_arg1:Number=NaN, _arg2:Number=NaN):void{
var _local3:int;
var _local4:Hero;
if (totalLevel >= 9){
return;
};
if (isNaN(_arg1)){
addHero(new Hero(Hero(this.getChildAt(0))));
removeHero(Hero(this.getChildAt(0)));
return;
};
trace("levelUp");
_local3 = 0;
while (_local3 < totalHero) {
_local4 = Hero(this.getChildAt(_local3));
if (_local4.hitTestPoint(_arg1, _arg2, true)){
addHero(new Hero(_local4));
removeHero(_local4);
return;
};
_local3++;
};
}
public function set eyeId(_arg1:int):void{
__eyeId = _arg1;
i = 0;
while (i < totalHero) {
Hero(this.getChildAt(i)).heroEye.gotoAndStop(__eyeId);
i++;
};
}
public function get color():int{
return (__color);
}
public function addShield():void{
varShield = 1200;
i = 0;
while (i < totalHero) {
Hero(this.getChildAt(i)).addShield();
i++;
};
}
public function get g():Vector{
return (__g);
}
public function divide():void{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:Hero;
var _local5:Number;
var _local6:int;
var _local7:Number;
_local1 = new Array();
_local2 = 0;
while (_local2 < totalHero) {
_local4 = Hero(this.getChildAt(_local2));
if (_local4.level > 1){
_local1.push(_local4);
};
_local2++;
};
_local3 = _local1.length;
for each (_local4 in _local1) {
_local5 = (_local4.r * 0.5);
_local6 = 0;
while (_local6 < _local4.level) {
_local7 = (((_local6 / _local4.level) * Math.PI) * 2);
addHero(new Hero(null, null, (_local4.centerO.x + (_local5 * Math.cos(_local7))), (_local4.centerO.y + (_local5 * Math.sin(_local7)))));
_local6++;
};
removeHero(_local4);
};
}
public function run():void{
if (varShield > 0){
varShield--;
if (varShield == 0){
removeShield();
};
};
i = 0;
while (i < totalHero) {
Hero(this.getChildAt(i)).run();
i++;
};
}
public function get totalLevel():int{
_totalLevel = 0;
i = 0;
while (i < totalHero) {
_totalLevel = (_totalLevel + Hero(this.getChildAt(i)).level);
i++;
};
return (_totalLevel);
}
public function removeHero(_arg1:Hero=null):void{
if ((((_arg1 == null)) || (!((_arg1.parent == this))))){
} else {
this.removeChild(_arg1);
};
totalHero--;
}
public function die(_arg1:Hero):void{
onDie(_arg1);
removeHero(_arg1);
if (totalHero <= 0){
onDieOut();
};
}
public function set color(_arg1:int):void{
__color = _arg1;
i = 0;
while (i < totalHero) {
Hero(this.getChildAt(i)).color = __color;
i++;
};
}
public function set g(_arg1:Vector):void{
var _local2:int;
__g = _arg1;
_local2 = 0;
while (_local2 < totalHero) {
Hero(this.getChildAt(_local2)).g = g;
_local2++;
};
}
}
}//package game
Section 39
//Mushroom (game.Mushroom)
package game {
import flash.display.*;
import flash.events.*;
public class Mushroom extends MovieClip {
public var type:String;
public function Mushroom(){
type = "mushroom";
}
public function remove():String{
Game.moveMc(this);
addEventListener(Event.ENTER_FRAME, removeF);
return (type);
}
public function removeF(_arg1:Event):void{
this.alpha = (this.alpha / 1.5);
this.scaleX = (this.scaleY = (this.scaleY * 1.2));
if (this.alpha < 0.01){
removeEventListener(Event.ENTER_FRAME, removeF);
this.parent.removeChild(this);
};
}
}
}//package game
Section 40
//Mushroom1 (game.Mushroom1)
package game {
public class Mushroom1 extends Mushroom {
}
}//package game
Section 41
//Peach (game.Peach)
package game {
public class Peach extends Mushroom {
}
}//package game
Section 42
//Pear (game.Pear)
package game {
public class Pear extends Mushroom {
}
}//package game
Section 43
//PowerUpExtra (game.PowerUpExtra)
package game {
public class PowerUpExtra extends Mushroom {
public function PowerUpExtra(){
trace(this);
type = "extra";
}
}
}//package game
Section 44
//PowerUpShield (game.PowerUpShield)
package game {
public class PowerUpShield extends Mushroom {
public function PowerUpShield(){
trace(this);
type = "shield";
}
}
}//package game
Section 45
//PowerUpSuper (game.PowerUpSuper)
package game {
public class PowerUpSuper extends Mushroom {
public function PowerUpSuper(){
trace(this);
type = "super";
}
}
}//package game
Section 46
//PowerUpTime (game.PowerUpTime)
package game {
public class PowerUpTime extends Mushroom {
public function PowerUpTime(){
trace(this);
type = "time";
}
}
}//package game
Section 47
//Shell (game.Shell)
package game {
public class Shell extends Mushroom {
}
}//package game
Section 48
//SmoothDraw (game.SmoothDraw)
package game {
import flash.display.*;
public class SmoothDraw {
public static function draw(_arg1, _arg2:Array):Vector{
var _local3:Vector;
var _local4:int;
var _local5:Array;
var _local6:*;
var _local7:Number;
var _local8:Vector;
var _local9:Vector;
var _local10:Vector;
var _local11:Vector;
var _local12:Vector;
var _local13:Vector;
var _local14:Vector;
var _local15:int;
_local3 = new Vector();
_local4 = _arg2.length;
_local15 = 0;
while (_local15 < _local4) {
_local3.add(_arg2[_local15]);
_local15++;
};
_local3.mul((1 / _local4));
_local5 = new Array(_local4);
_local15 = 0;
while (_local15 < _local4) {
_local5[_local15] = Vector.sub_(_arg2[((_local15 + 1) % _local4)], _arg2[(((_local15 - 1) + _local4) % _local4)]);
_local15++;
};
_arg1.graphics.moveTo(_arg2[0].x, _arg2[0].y);
_local15 = 0;
for each (_local8 in _arg2) {
_local9 = _arg2[((_local15 + 1) % _local4)];
_local13 = _local5[_local15];
_local14 = _local5[((_local15 + 1) % _local4)];
_local7 = ((_local13.x * _local14.y) - (_local13.y * _local14.x));
_local6 = new Vector((((((_local13.x * _local14.x) * (_local8.y - _local9.y)) + ((_local13.x * _local14.y) * _local9.x)) - ((_local13.y * _local14.x) * _local8.x)) / _local7), (((((_local13.y * _local14.y) * (_local9.x - _local8.x)) + ((_local13.x * _local14.y) * _local8.y)) - ((_local13.y * _local14.x) * _local9.y)) / _local7));
if ((Vector.dotProduct_(Vector.sub_(_local8, _local6), _local5[_local15]) * Vector.dotProduct_(Vector.sub_(_local9, _local6), _local5[_local15])) <= 0){
_arg1.graphics.curveTo(_local6.x, _local6.y, _local9.x, _local9.y);
} else {
_local7 = (Vector.sub_(_local8, _local9).length * 0.3);
_local12 = Vector.add_(_local8, Vector.normalize_(_local13, _local7));
_local11 = Vector.add_(_local9, Vector.normalize_(_local14, -(_local7)));
_local10 = Vector.interpolate(_local12, _local11);
_arg1.graphics.curveTo(_local12.x, _local12.y, _local10.x, _local10.y);
_arg1.graphics.curveTo(_local11.x, _local11.y, _local9.x, _local9.y);
};
_local15++;
};
return (_local3);
}
}
}//package game
Section 49
//Watermelon (game.Watermelon)
package game {
public class Watermelon extends Mushroom {
}
}//package game
Section 50
//Vector (game.Vector)
package game {
public class Vector {
public var x:Number;
public var y:Number;
public function Vector(_arg1:Number=0, _arg2:Number=0){
x = _arg1;
y = _arg2;
}
public function sub(_arg1:Vector):void{
x = (x - _arg1.x);
y = (y - _arg1.y);
}
public function mul(_arg1:Number):void{
x = (x * _arg1);
y = (y * _arg1);
}
public function get length():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public function add(_arg1:Vector):void{
x = (x + _arg1.x);
y = (y + _arg1.y);
}
public function get r():Number{
return (Math.atan2(y, x));
}
public function set r(_arg1:Number):void{
var _local2:Number;
_local2 = length;
x = (_local2 * Math.cos(_arg1));
y = (_local2 * Math.sin(_arg1));
}
public function toString():String{
return ((((("(" + x) + ",") + y) + ")"));
}
public function normalize(_arg1:Number):void{
if (length == 0){
return;
};
mul((_arg1 / length));
}
public function rotate(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = Math.cos(_arg1);
_local3 = Math.sin(_arg1);
_local4 = x;
_local5 = y;
x = ((_local4 * _local2) - (_local5 * _local3));
y = ((_local4 * _local3) + (_local5 * _local2));
}
public function clone():Vector{
return (new Vector(x, y));
}
public static function normalize_(_arg1:Vector, _arg2:Number):Vector{
if (_arg1.length == 0){
return (new (Vector));
};
return (Vector.mul_(_arg1, (_arg2 / _arg1.length)));
}
public static function interpolate(_arg1:Vector, _arg2:Vector):Vector{
return (new Vector(((_arg1.x + _arg2.x) / 2), ((_arg1.y + _arg2.y) / 2)));
}
public static function dotProduct_(_arg1:Vector, _arg2:Vector):Number{
return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)));
}
public static function mul_(_arg1:Vector, _arg2:Number):Vector{
return (new Vector((_arg1.x * _arg2), (_arg1.y * _arg2)));
}
public static function add_(_arg1:Vector, _arg2:Vector):Vector{
return (new Vector((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)));
}
public static function sub_(_arg1:Vector, _arg2:Vector):Vector{
return (new Vector((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)));
}
}
}//package game
Section 51
//Alert (Alert)
package {
import flash.display.*;
import flash.text.*;
public class Alert extends MovieClip {
public var msgTxt:TextField;
public var onCallBack:Function;
public var btnY:BtnY;
public var btnN:BtnN;
public static var alert:Alert;
public function Alert(){
super();
_slot1.alert = this;
this.visible = false;
btnY.onClick = function (){
callBack(true);
};
btnN.onClick = function (){
callBack(false);
};
}
public function show_(_arg1:String, _arg2:Function):void{
this.visible = true;
msg = _arg1;
onCallBack = _arg2;
}
public function set msg(_arg1:String):void{
msgTxt.text = _arg1;
}
public function callBack(_arg1:Boolean):void{
this.visible = false;
onCallBack(_arg1);
}
public function get msg():String{
return (msgTxt.text);
}
public static function show(_arg1:String, _arg2:Function):void{
_slot1.alert.show_(_arg1, _arg2);
}
}
}//package
Section 52
//AlphaBtn (AlphaBtn)
package {
import flash.display.*;
import flash.events.*;
public class AlphaBtn extends MovieClip {
public var id:int;
public var onRollOut:Function;
public var onClick:Function;
public var onRollOver:Function;
public function AlphaBtn(){
this.buttonMode = true;
this.addEventListener(MouseEvent.MOUSE_OVER, rollOver);
this.addEventListener(MouseEvent.MOUSE_OUT, rollOut);
this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
}
private function rollOut(_arg1:MouseEvent):void{
onRollOut();
}
private function mouseDown(_arg1:MouseEvent):void{
onClick();
}
private function rollOver(_arg1:MouseEvent):void{
onRollOver();
}
}
}//package
Section 53
//Btn (Btn)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
public class Btn extends MovieClip {
public var text:String;
private var bg:MovieClip;
private var sndClick:SndClick;
private var sndRollOver:SndRollOver;
private var _linkURL:String;
public var onClick:Function;
public var onRollOver:Function;
public function Btn(){
var _local1:Rectangle;
super();
this.buttonMode = true;
this.tabEnabled = false;
sndRollOver = new SndRollOver();
sndClick = new SndClick();
addEventListener(MouseEvent.ROLL_OVER, rollOver);
addEventListener(MouseEvent.ROLL_OUT, rollOut);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
bg = new MovieClip();
this.addChildAt(bg, 0);
_local1 = this.getBounds(this);
bg.graphics.clear();
bg.graphics.beginFill(0xFFFFFF, 0.3);
if (_local1.height < 15){
bg.graphics.drawRoundRect((_local1.x - 5), -7, (_local1.width + 10), 14, 5, 5);
} else {
bg.graphics.drawRoundRect((_local1.x - 5), -15, (_local1.width + 10), 30, 10, 10);
};
bg.graphics.endFill();
bg.alpha = 0;
}
public function get linkURL():String{
return (_linkURL);
}
public function set linkURL(_arg1):void{
var __linkURL = _arg1;
_linkURL = __linkURL;
onClick = function (){
navigateToURL(new URLRequest(linkURL), "_blank");
};
}
private function rollOut(_arg1:MouseEvent):void{
bg.alpha = 0;
}
private function mouseDown(_arg1:MouseEvent):void{
bg.alpha = 0;
if (Main.mainCtrl.soundOn){
sndClick.play();
};
onClick();
}
private function rollOver(_arg1:MouseEvent):void{
bg.alpha = 1;
if (Main.mainCtrl.soundOn){
sndRollOver.play();
};
}
}
}//package
Section 54
//Btn3 (Btn3)
package {
public class Btn3 extends Btn {
public var ctrl:Function;
public function Btn3(){
super();
this.stop();
onClick = function (){
if (this.currentFrame == 1){
this.nextFrame();
ctrl(false);
} else {
this.prevFrame();
ctrl(true);
};
};
}
}
}//package
Section 55
//Btn3M (Btn3M)
package {
public class Btn3M extends Btn3 {
public function Btn3M(){
super();
ctrl = function (_arg1:Boolean):void{
Main.mainCtrl.musicOn = _arg1;
};
}
}
}//package
Section 56
//Btn3Q (Btn3Q)
package {
public class Btn3Q extends Btn3 {
public function Btn3Q(){
super();
ctrl = function (_arg1:Boolean):void{
Main.mainCtrl.showQualitySetting();
};
}
}
}//package
Section 57
//Btn3S (Btn3S)
package {
public class Btn3S extends Btn3 {
public function Btn3S(){
super();
ctrl = function (_arg1:Boolean):void{
Main.mainCtrl.soundOn = _arg1;
};
}
}
}//package
Section 58
//BtnAgtys (BtnAgtys)
package {
public class BtnAgtys extends Btn {
public function BtnAgtys(){
linkURL = "http://www.freeworldgroup.com/koalafiles.htm";
text = "Add Games To Your Site";
}
}
}//package
Section 59
//BtnB (BtnB)
package {
public class BtnB extends Btn {
public function BtnB(){
text = "Back";
}
}
}//package
Section 60
//BtnBlobstar (BtnBlobstar)
package {
public class BtnBlobstar extends Btn {
public function BtnBlobstar(){
linkURL = "http://www.freeworldgroup.com/games6/gameindex/blobstar.htm";
text = "Play the sequel: Blobstar";
}
}
}//package
Section 61
//BtnCopyRight (BtnCopyRight)
package {
public class BtnCopyRight extends Btn {
public function BtnCopyRight(){
linkURL = "http://www.freeworldgroup.com/";
text = "Copyright 2007 freeworldgroup.com";
}
}
}//package
Section 62
//BtnCredits (BtnCredits)
package {
public class BtnCredits extends Btn {
public function BtnCredits(){
super();
text = "Credits";
onClick = function (){
Main.mainCtrl.showCredits();
};
}
}
}//package
Section 63
//BtnDg (BtnDg)
package {
public class BtnDg extends Btn {
public function BtnDg(){
linkURL = "http://www.ifungames.com";
text = "Download Games";
}
}
}//package
Section 64
//BtnI (BtnI)
package {
public class BtnI extends Btn {
public function BtnI(){
text = "Instructions";
}
}
}//package
Section 65
//BtnM (BtnM)
package {
public class BtnM extends Btn {
public function BtnM(){
super();
text = "Menu";
onClick = function (){
Main.mainCtrl.gotoMenu();
};
}
}
}//package
Section 66
//BtnM2 (BtnM2)
package {
public class BtnM2 extends Btn {
public function BtnM2(){
text = "Menu";
}
}
}//package
Section 67
//BtnM3 (BtnM3)
package {
public class BtnM3 extends Btn {
public function BtnM3(){
super();
text = "Main Menu";
onClick = function (){
Main.mainCtrl.gotoMenu(false);
};
}
}
}//package
Section 68
//BtnMap (BtnMap)
package {
public class BtnMap extends Btn {
public function BtnMap(){
text = "Map";
}
}
}//package
Section 69
//BtnMog (BtnMog)
package {
public class BtnMog extends Btn {
public function BtnMog(){
linkURL = "http://www.freeworldgroup.com/";
text = "More Online Games";
}
}
}//package
Section 70
//BtnN (BtnN)
package {
public class BtnN extends Btn {
public function BtnN(){
text = "No";
}
}
}//package
Section 71
//BtnNext (BtnNext)
package {
public class BtnNext extends Btn {
public function BtnNext(){
text = "Next";
}
}
}//package
Section 72
//BtnNf (BtnNf)
package {
public class BtnNf extends Btn {
public function BtnNf(){
text = "New Face/Color";
}
}
}//package
Section 73
//BtnNs (BtnNs)
package {
public class BtnNs extends Btn {
public function BtnNs(){
text = "Next Stage";
}
}
}//package
Section 74
//BtnOK (BtnOK)
package {
public class BtnOK extends Btn {
public function BtnOK(){
text = "OK";
}
}
}//package
Section 75
//BtnPa (BtnPa)
package {
public class BtnPa extends Btn {
public function BtnPa(){
text = "Play Again";
}
}
}//package
Section 76
//BtnPg (BtnPg)
package {
public class BtnPg extends Btn {
public function BtnPg(){
super();
text = "Play Game";
onClick = function (){
Main.mainCtrl.playGame();
};
}
}
}//package
Section 77
//BtnQ0 (BtnQ0)
package {
public class BtnQ0 extends Btn {
public function BtnQ0(){
text = "LOW";
}
}
}//package
Section 78
//BtnQ1 (BtnQ1)
package {
public class BtnQ1 extends Btn {
public function BtnQ1(){
text = "MEDIUM";
}
}
}//package
Section 79
//BtnQ2 (BtnQ2)
package {
public class BtnQ2 extends Btn {
public function BtnQ2(){
text = "HIGH";
}
}
}//package
Section 80
//BtnQ3 (BtnQ3)
package {
public class BtnQ3 extends Btn {
public function BtnQ3(){
text = "BEST";
}
}
}//package
Section 81
//BtnRtg (BtnRtg)
package {
public class BtnRtg extends Btn {
public function BtnRtg(){
text = "Return To Game";
}
}
}//package
Section 82
//BtnSkip (BtnSkip)
package {
public class BtnSkip extends Btn {
public function BtnSkip(){
text = "Skip";
}
}
}//package
Section 83
//BtnSs (BtnSs)
package {
public class BtnSs extends Btn {
public function BtnSs(){
text = "Submit Score";
}
}
}//package
Section 84
//BtnSubmit (BtnSubmit)
package {
public class BtnSubmit extends Btn {
public function BtnSubmit(){
text = "Submit";
}
}
}//package
Section 85
//BtnVh (BtnVh)
package {
public class BtnVh extends Btn {
public function BtnVh(){
super();
text = "View Highscores";
onClick = function (){
Main.mainCtrl.viewHighscores();
};
}
}
}//package
Section 86
//BtnX (BtnX)
package {
public class BtnX extends Btn {
public function BtnX(){
text = "X";
}
}
}//package
Section 87
//BtnY (BtnY)
package {
public class BtnY extends Btn {
public function BtnY(){
text = "Yes";
}
}
}//package
Section 88
//Clock (Clock)
package {
import flash.display.*;
import flash.events.*;
public class Clock extends MovieClip {
public var totalTime:int;
public var num0:SingleNum;
public var num1:SingleNum;
public var num3:SingleNum;
public var onTimeOut:Function;
public var num2:SingleNum;
private var _time:int;
private var delayTime:int;
public function Clock(){
time = 0;
}
override public function stop():void{
removeEventListener(Event.ENTER_FRAME, run);
}
public function timeOut():void{
trace("timeOut");
stop();
onTimeOut();
}
public function start(_arg1:int=0):void{
trace("time start");
if (_arg1 <= 0){
totalTime = time;
} else {
time = (totalTime = _arg1);
};
delayTime = 30;
addEventListener(Event.ENTER_FRAME, run);
}
public function set time(_arg1:int):void{
var _local2:int;
var _local3:int;
if (_time == _arg1){
return;
};
_time = _arg1;
_local2 = int((_time / 60));
_local3 = (time % 60);
if (_local2 < 10){
num0.value = 0;
num1.value = _local2;
} else {
num0.value = int((_local2 / 10));
num1.value = (_local2 % 10);
};
if (_local3 < 10){
num2.value = 0;
num3.value = _local3;
} else {
num2.value = int((_local3 / 10));
num3.value = (_local3 % 10);
};
}
private function run(_arg1:Event):void{
if (--delayTime <= 0){
delayTime = 30;
time--;
if (time <= 0){
timeOut();
};
};
}
public function get time():int{
return (_time);
}
}
}//package
Section 89
//FadeEffect (FadeEffect)
package {
import flash.display.*;
import flash.events.*;
public class FadeEffect extends MovieClip {
public var onShow:Function;
public var onHide:Function;
public function FadeEffect(){
super();
onShow = function (){
};
onHide = function (){
};
}
private function showRun(_arg1:Event):void{
if ((this.alpha = (this.alpha - 0.05)) < 0.05){
this.alpha = 0;
this.visible = false;
onShow();
this.removeEventListener(Event.ENTER_FRAME, showRun);
};
}
public function hide():void{
this.alpha = 0;
this.visible = true;
this.addEventListener(Event.ENTER_FRAME, hideRun);
}
private function hideRun(_arg1:Event):void{
if ((this.alpha = (this.alpha + 0.05)) > 0.95){
this.alpha = 1;
onHide();
this.removeEventListener(Event.ENTER_FRAME, hideRun);
};
}
public function show():void{
this.alpha = 1;
this.visible = true;
this.addEventListener(Event.ENTER_FRAME, showRun);
}
}
}//package
Section 90
//HeroSymbol (HeroSymbol)
package {
import game.*;
import flash.display.*;
public class HeroSymbol extends MovieClip {
public var body:MovieClip;
public var heroEye:HeroEye;
public function HeroSymbol(){
update();
}
public function update():void{
heroEye.gotoAndStop(Main.main.heroEyeId);
body.graphics.clear();
body.graphics.beginFill(Main.main.heroColor);
body.graphics.drawRect(0, 0, body.width, body.height);
body.graphics.endFill();
}
}
}//package
Section 91
//KeyCatcher (KeyCatcher)
package {
import flash.display.*;
import flash.events.*;
public class KeyCatcher extends MovieClip {
private var keyFlags:Array;
public var onKeyUp:Function;
public var onKeyDown:Function;
public function KeyCatcher(){
keyFlags = new Array(0x0100);
super();
stage.focus = this;
this.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
this.addEventListener(KeyboardEvent.KEY_UP, keyUp);
this.addEventListener(FocusEvent.FOCUS_OUT, onFocusOut);
this.addEventListener(Event.REMOVED, onRemoved);
}
public function isDown(_arg1:int):Boolean{
return (keyFlags[_arg1]);
}
private function keyUp(_arg1:KeyboardEvent):void{
keyFlags[_arg1.keyCode] = false;
}
private function onFocusOut(_arg1:FocusEvent){
stage.focus = this;
}
public function onRemoved(_arg1:Event):void{
var _local2:int;
var _local3:int;
trace("keyCatcher,remove");
_local2 = keyFlags.length;
_local3 = 0;
while (_local3 < _local2) {
keyFlags[_local3] = 0;
_local3++;
};
this.removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
this.removeEventListener(KeyboardEvent.KEY_UP, keyUp);
this.removeEventListener(FocusEvent.FOCUS_OUT, onFocusOut);
}
private function keyDown(_arg1:KeyboardEvent):void{
if (keyFlags[_arg1.keyCode]){
} else {
trace(_arg1.keyCode);
onKeyDown(_arg1.keyCode);
keyFlags[_arg1.keyCode] = true;
};
}
}
}//package
Section 92
//Main (Main)
package {
import game.*;
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
public dynamic class Main extends MovieClip {
public var firstPlay:Boolean;
public var clock:Clock;
public var prevScore:int;
public var heroSymbol:HeroSymbol;
public var fadeBtns:FadeEffect;
public var colorSelect:MovieClip;
public var bg:MovieClip;
public var mushroom:MovieClip;
public var title:MovieClip;
public var qualitySetting:QualitySetting;
public var i:int;
public var fadeMain:FadeEffect;
public var gameMenu:MovieClip;
public var test:MovieClip;
public var numScore:Num;
public var musicCredits:MusicCredits;
public var numTotalLevel:Num;
public var info_mc:MovieClip;
public var btnM2:BtnM2;
private var _stageNum:int;
public var playerName:String;
public var numStage:Num;
public var resultPad:MovieClip;
public var heroEyeId:int;
public var btnOk:BtnOK;
public var submitScore:MovieClip;
public var btnI:BtnI;
public var btnMap:BtnMap;
public var heroColor:int;
private var _score:int;
public var gameName:String;
public var instructions:MovieClip;
public var lso;
public var mainCtrl:MainCtrl;
public var btnSs:BtnSs;
public var game:Game;
public var hitRec:MovieClip;
public var numMushroom:Num;
public static const rToA:Number = (180 / Math.PI);
public static var mainCtrl:MainCtrl;
public static var main:Main;
public function Main(){
addFrameScript(0, frame1, 2, frame3, 37, frame38, 135, frame136, 137, frame138, 138, frame139, 139, frame140, 143, frame144);
lso = SharedObject.getLocal("Blobular", "/");
if (lso.data.dataObj == undefined){
trace("第一次设定");
lso.data.dataObj = {heroColor:0xFF9900, heroEyeId:4};
};
heroColor = lso.data.dataObj.heroColor;
heroEyeId = lso.data.dataObj.heroEyeId;
_slot1.main = this;
gameName = "blobular";
playerName = "";
firstPlay = true;
}
public function restart():void{
score = Math.round((prevScore * 0.7));
gotoAndStop("game");
}
public function saveSetting(_arg1:int, _arg2:int):void{
heroColor = (lso.data.dataObj.heroColor = _arg1);
if (_arg2 > 9){
} else {
heroEyeId = (lso.data.dataObj.heroEyeId = _arg2);
};
}
public function set mushroomNum(_arg1:int):void{
numMushroom.value = _arg1;
if (numMushroom.value <= 0){
stageClear();
};
}
public function get mushroomNum():int{
return (numMushroom.value);
}
public function stopAll():void{
clock.stop();
}
public function mainInit():void{
_score = 0;
_stageNum = 1;
}
function frame3(){
if (this.loaderInfo.bytesLoaded < this.loaderInfo.bytesTotal){
gotoAndStop("loading");
};
}
function frame1(){
stage.showDefaultContextMenu = false;
MochiAd.showPreloaderAd({clip:this, id:"33a5fcf87ab90688", res:"400x400", background:6845841, color:788068, outline:12695210, no_bg:false});
}
public function get score():int{
return (_score);
}
function frame38(){
hitRec.buttonMode = true;
hitRec.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
}
public function get time():int{
return (clock.time);
}
public function mouseDown(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.freeworldgroup.com/"), "_blank");
}
public function get isWaterStage():Boolean{
return ((((stageNum >= 5)) && ((stageNum <= 8))));
}
public function shake():void{
x = (x + ((Math.random() - 0.5) * 20));
y = (y + ((Math.random() - 0.5) * 20));
this.addEventListener(Event.ENTER_FRAME, shakeRun);
}
public function init(_arg1:Boolean=true):void{
if (_arg1){
gotoAndStop("colorSelect");
} else {
gotoAndStop("game");
};
}
public function lose():void{
trace("lose");
stopAll();
game.clearCtrl();
}
public function set score(_arg1:int):void{
numScore.value = (_score = _arg1);
}
public function timeOut():void{
trace("time out");
stopAll();
game.timeOut();
}
public function set stageNum(_arg1:int):void{
numStage.value = (_stageNum = _arg1);
}
public function showInfo():void{
firstPlay = false;
gotoAndStop("instructions");
}
public function gotoMenu(_arg1:Boolean=true):void{
if (game == null){
} else {
game.pause = true;
};
if (_arg1){
Alert.show("Return To Menu?", gotoMenuCallBack);
} else {
gotoMenuCallBack(true);
};
}
public function set time(_arg1:int){
clock.time = _arg1;
}
public function get stageNum():int{
return (_stageNum);
}
private function shakeRun(_arg1:Event):void{
trace("shakeRun");
x = (x - (x * 1.8));
y = (y - (y * 1.8));
if (((x * x) + (y * y)) < 5){
x = (y = 0);
this.removeEventListener(Event.ENTER_FRAME, shakeRun);
};
}
function frame138(){
btnOk.onClick = function (){
saveSetting(colorSelect.getColor(), colorSelect.getEyeId());
fadeMain.hide();
fadeMain.onHide = function (){
gotoAndStop("game");
fadeMain.show();
fadeMain.onShow = function (){
};
};
};
}
function frame139(){
game.heroColor = heroColor;
game.heroEyeId = heroEyeId;
game.init(stageNum);
stageNum = stageNum;
game.onStart = function (_arg1:int, _arg2:int){
var totalMushroom = _arg1;
var _time = _arg2;
prevScore = score;
game.pause = true;
info_mc.show(stageNum, _time);
mushroom.gotoAndStop(stageNum);
numMushroom.value = totalMushroom;
score = score;
numTotalLevel.value = 1;
clock.time = _time;
clock.onTimeOut = timeOut;
btnMap.onClick = function (){
if (game.isShowingAll){
clock.start();
game.notShowAll();
} else {
clock.stop();
game.showAll();
};
};
info_mc.onHide = function (){
game.pause = false;
clock.start();
};
};
game.onGetMushroom = function (_arg1:int, _arg2:int):void{
mushroomNum = _arg1;
numTotalLevel.value = _arg2;
score++;
};
game.onHurt = function (_arg1:int):void{
numTotalLevel.value = _arg1;
};
game.onLose = function (){
clock.stop();
resultPad.show(false);
};
resultPad.onShow = function (_arg1:Boolean){
};
btnM2.onClick = function (){
gameMenu.show();
};
}
function frame136(){
stop();
if (game == null){
} else {
game.clearAll();
trace("--------------");
i = 0;
while (i < game.numChildren) {
trace(game.getChildAt(i));
i++;
};
trace(("game=" + game));
};
mainInit();
fadeMain.show();
fadeMain.onShow = function (){
title.play();
title.onEffect = function (){
fadeBtns.show();
fadeBtns.onShow = function (){
bg.play();
};
};
};
btnI.onClick = function (){
fadeMain.hide();
fadeMain.onHide = function (){
showInfo();
fadeMain.show();
fadeMain.onShow = function (){
};
};
};
}
public function nextStage():void{
stageNum++;
if (stageNum > 12){
win();
} else {
init(false);
};
}
function frame140(){
trace(("game=" + game));
if (game == null){
} else {
game.clearAll();
};
}
private function gotoMenuCallBack(_arg1:Boolean):void{
var flag = _arg1;
if (flag){
fadeMain.hide();
fadeMain.onHide = function (){
if (game == null){
} else {
game.clearAll();
};
gotoAndStop("menu");
};
} else {
if (game){
game.pause = false;
};
};
}
public function win():void{
trace("win");
gotoAndStop("win");
}
public function stageClear():void{
trace("stageClear");
game.world.removeChild(game.world.thornArea);
game.world.removeChild(game.world.mushroomArea);
game.clearCtrl();
stopAll();
resultPad.show(true);
}
function frame144(){
numScore.value = score;
btnSs.onClick = function (){
btnSs.visible = false;
submitScore.show();
};
}
}
}//package
Section 93
//MainCtrl (MainCtrl)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
public class MainCtrl extends Sprite {
private var sndBgChannal:SoundChannel;
private var _soundOn:Boolean;
private var sndBg:SndBg;
private var _musicOn:Boolean;
public function MainCtrl(){
sndBg = new SndBg();
musicOn = true;
soundOn = true;
Main.mainCtrl = this;
}
public function openOptions():void{
trace("open options");
}
public function get soundOn():Boolean{
return (_soundOn);
}
public function gotoMenu(_arg1:Boolean=true):void{
Main.main.gotoMenu(_arg1);
}
public function playGame():void{
Main.main.fadeMain.hide();
Main.main.fadeMain.onHide = function (){
if (Main.main.firstPlay){
trace("Main.main.firstPlay");
Main.main.showInfo();
} else {
Main.main.init();
};
Main.main.fadeMain.show();
Main.main.fadeMain.onShow = function (){
};
};
}
public function playAgain():void{
Main.main.restart();
}
public function showQualitySetting():void{
Main.main.clock.stop();
Main.main.game.pause = true;
Main.main.qualitySetting.show();
Main.main.qualitySetting.onHide = function (){
Main.main.clock.start();
Main.main.game.pause = false;
};
}
public function set soundOn(_arg1:Boolean){
_soundOn = _arg1;
}
public function set musicOn(_arg1:Boolean){
_musicOn = _arg1;
if (_musicOn){
sndBgChannal = sndBg.play();
sndBgChannal.addEventListener(Event.SOUND_COMPLETE, bgMusicCompleteHandler);
} else {
sndBgChannal.stop();
sndBgChannal.removeEventListener(Event.SOUND_COMPLETE, bgMusicCompleteHandler);
};
}
public function viewHighscores():void{
navigateToURL(new URLRequest(("http://www.freeworldgroup.com/score/index.asp?game=" + Main.main.gameName)), "_blank");
}
function bgMusicCompleteHandler(_arg1:Event):void{
trace((getTimer() + "replay"));
sndBgChannal.removeEventListener(Event.SOUND_COMPLETE, bgMusicCompleteHandler);
sndBgChannal = sndBg.play(1632);
sndBgChannal.addEventListener(Event.SOUND_COMPLETE, bgMusicCompleteHandler);
}
public function showCredits():void{
Main.main.musicCredits.show();
}
public function get musicOn():Boolean{
return (_musicOn);
}
}
}//package
Section 94
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.3");
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
_slot1.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _slot1._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = _slot1.getVersion();
clip = options.clip;
if (!_slot1._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = _slot1._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
_slot1.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = _slot1._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}};
options = _slot1._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!_slot1.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
_slot1._cleanup(mc);
options.ad_finished();
};
wh = _slot1._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
_slot1.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
_slot1.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
options.ad_failed();
_local3 = true;
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _slot1._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = _slot1.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!_slot1._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
_slot1._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}};
options = _slot1._parseOptions(options, DEFAULTS);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0){
options.ad_started();
options.ad_finished();
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!_slot1.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
_slot1._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = _slot1._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
_slot1.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
_slot1.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
_slot1.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
options.ad_failed();
_local4 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
options.ad_failed();
_local4 = true;
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
_slot1.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = _slot1._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 95
//MusicCredits (MusicCredits)
package {
import flash.display.*;
import flash.events.*;
public class MusicCredits extends MovieClip {
public var btnB:BtnB;
public function MusicCredits(){
this.visible = false;
}
private function showRun(_arg1:Event):void{
var event = _arg1;
if ((this.alpha = (this.alpha + 0.05)) > 0.95){
this.alpha = 1;
btnB.buttonMode = true;
btnB.enabled = true;
btnB.onClick = function (){
hide();
};
this.removeEventListener(Event.ENTER_FRAME, showRun);
};
}
public function hide():void{
btnB.onClick = function (){
};
btnB.buttonMode = false;
btnB.enabled = false;
this.addEventListener(Event.ENTER_FRAME, hideRun);
}
private function hideRun(_arg1:Event):void{
if ((this.alpha = (this.alpha - 0.05)) < 0.05){
this.alpha = 0;
this.visible = false;
this.removeEventListener(Event.ENTER_FRAME, hideRun);
};
}
public function show():void{
btnB.buttonMode = false;
btnB.enabled = false;
btnB.onClick = function (){
};
this.visible = true;
this.alpha = 0;
this.addEventListener(Event.ENTER_FRAME, showRun);
}
}
}//package
Section 96
//Num (Num)
package {
import flash.display.*;
public class Num extends MovieClip {
private var total:int;
public var num0:SingleNum;
public var num1:SingleNum;
public var num3:SingleNum;
public var num4:SingleNum;
public var num2:SingleNum;
private var _value:int;
public function Num(_arg1:int=0){
var _local2:int;
super();
total = this.numChildren;
_local2 = 0;
while (_local2 < total) {
this[("num" + _local2)].stop();
_local2++;
};
value = _arg1;
}
public function get value():int{
return (_value);
}
public function set value(_arg1:int):void{
var _local2:String;
var _local3:int;
_value = _arg1;
_local2 = String(_value);
_local3 = 0;
while (_local3 < total) {
if (_local3 < _local2.length){
this[("num" + _local3)].visible = true;
this[("num" + _local3)].value = int(_local2.charAt(_local3));
} else {
this[("num" + _local3)].visible = false;
};
_local3++;
};
}
}
}//package
Section 97
//QualitySetting (QualitySetting)
package {
import flash.display.*;
import flash.events.*;
public class QualitySetting extends MovieClip {
public var btnOK:BtnOK;
public var btnQ0:BtnQ0;
public var btnQ2:BtnQ2;
public var btnQ1:BtnQ1;
public var btnQ3:BtnQ3;
public var rec:MovieClip;
public var onHide:Function;
public var hitRec:MovieClip;
public function QualitySetting(){
var i:int;
super();
quality = stage.quality;
this.visible = false;
hitRec.onClick = hide;
i = 0;
while (i < 4) {
this[("btnQ" + i)].onClick = function (){
quality = this.text;
};
i = (i + 1);
};
hitRec.addEventListener(MouseEvent.CLICK, hide);
btnOK.onClick = hide;
}
public function show():void{
this.visible = true;
quality = stage.quality;
}
public function set quality(_arg1:String):void{
var _local2:int;
_local2 = 0;
while (_local2 < 4) {
if (this[("btnQ" + _local2)].text == _arg1){
rec.x = this[("btnQ" + _local2)].x;
rec.y = this[("btnQ" + _local2)].y;
break;
};
_local2++;
};
stage.quality = _arg1;
}
public function hide(_arg1:MouseEvent=null):void{
this.visible = false;
onHide();
}
}
}//package
Section 98
//ShieldIcon (ShieldIcon)
package {
import flash.display.*;
public dynamic class ShieldIcon extends MovieClip {
}
}//package
Section 99
//SingleNum (SingleNum)
package {
import flash.display.*;
public class SingleNum extends MovieClip {
private var _value:int;
public function SingleNum(){
stop();
}
public function get value():int{
return (_value);
}
public function set value(_arg1:int):void{
_value = _arg1;
this.gotoAndStop((_value + 1));
}
}
}//package
Section 100
//SndBg (SndBg)
package {
import flash.media.*;
public dynamic class SndBg extends Sound {
}
}//package
Section 101
//SndClick (SndClick)
package {
import flash.media.*;
public dynamic class SndClick extends Sound {
}
}//package
Section 102
//SndRollOver (SndRollOver)
package {
import flash.media.*;
public dynamic class SndRollOver extends Sound {
}
}//package