Section 1
//CameraChase (camera.CameraChase)
package camera {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class CameraChase extends Sprite {
var target_mc:MovieClip;
var boundsObj:Object;
var root_mc:MovieClip;
var loader_mc:MovieClip;
var enterFrame_mc:MovieClip;
var areaRec:Object;
var cameraX:Number;
var cameraY:Number;
public static var self;
public function CameraChase(_arg1:Object){
self = this;
target_mc = _arg1.target_mc;
loader_mc = _arg1.loader_mc;
root_mc = _arg1.root_mc;
cameraX = _arg1.cameraX;
cameraY = _arg1.cameraY;
areaRec = _arg1.areaRec;
boundsObj = _arg1.boundsObj;
enterFrame_mc = new MovieClip();
addChild(enterFrame_mc);
this.addEventListener(Event.REMOVED_FROM_STAGE, removedFunc);
}
public function stopChase(){
try {
enterFrame_mc.removeEventListener(Event.ENTER_FRAME, chase);
} catch(e) {
};
}
function removedFunc(_arg1){
var e = _arg1;
try {
enterFrame_mc.removeEventListener(Event.ENTER_FRAME, chase);
} catch(e) {
};
}
public function startChase(){
if (enterFrame_mc.willTrigger(Event.ENTER_FRAME)){
enterFrame_mc.removeEventListener(Event.ENTER_FRAME, chase);
};
enterFrame_mc.addEventListener(Event.ENTER_FRAME, chase, false, 0, true);
}
function chase(_arg1){
var _local2:*;
var _local3:Rectangle;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if (Main.self.inPause){
return;
};
if (Main.self.inZoom){
return;
};
_local2 = Pos.LtoG(target_mc);
_local3 = loader_mc.getBounds(root_mc);
_local4 = (cameraX - _local2.x);
_local5 = (cameraY - _local2.y);
if (((((_local3.left + _local4) >= areaRec.l)) && ((_local4 > 0)))){
_local4 = (areaRec.l - _local3.left);
} else {
if (((((_local3.right + _local4) < areaRec.r)) && ((_local4 < 0)))){
_local4 = (areaRec.r - _local3.right);
//unresolved jump
};
};
if (((((_local3.top + _local5) >= areaRec.t)) && ((_local5 > 0)))){
_local5 = (areaRec.t - _local3.top);
} else {
if (((((_local3.bottom + _local5) < areaRec.b)) && ((_local5 < 0)))){
_local5 = (areaRec.b - _local3.bottom);
//unresolved jump
};
};
_local6 = (_local4 * 0.2);
_local7 = (_local5 * 0.2);
loader_mc.x = (loader_mc.x + _local6);
loader_mc.y = (loader_mc.y + _local7);
}
}
}//package camera
Section 2
//CameraZoom (camera.CameraZoom)
package camera {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class CameraZoom extends Sprite {
var boundsObj:Object;
var root_mc:MovieClip;
var stageW:Number;
var stageMC:MovieClip;
var stageH:Number;
var old_scale:Number;
public var onShowAll_end:Function;
var loader_mc:MovieClip;
var old_x:Number;
var old_y:Number;
public var onShowAll:Function;
var centerY:Number;
var enterFrame_mc:MovieClip;
var do_showAll:Function;
var centerX:Number;
var areaRec:Object;
var cameraX:Number;
var cameraY:Number;
public static var self;
public function CameraZoom(_arg1:Object){
self = this;
stageMC = _arg1.stageMC;
root_mc = _arg1.root_mc;
centerX = _arg1.cameraX;
centerY = _arg1.cameraY;
areaRec = _arg1.areaRec;
boundsObj = _arg1.boundsObj;
stageW = areaRec.r;
stageH = areaRec.b;
enterFrame_mc = new MovieClip();
addChild(enterFrame_mc);
this.addEventListener(Event.REMOVED_FROM_STAGE, removedFunc);
}
function removedFunc(_arg1){
var e = _arg1;
try {
stageMC.removeEventListener(Event.ENTER_FRAME, do_showAll);
} catch(e) {
};
}
public function showAll():void{
var rec:Rectangle;
var rateX:*;
var rateY:*;
var rateScale:*;
var rate_v:*;
try {
stageMC.removeEventListener(Event.ENTER_FRAME, do_showAll);
} catch(e) {
};
rec = stageMC.getBounds(stageMC.parent);
rateX = (stageW / rec.width);
rateY = (stageH / rec.height);
rateScale = Math.min(rateX, rateY);
rate_v = 0.2;
old_x = stageMC.x;
old_y = stageMC.y;
old_scale = stageMC.scaleX;
do_showAll = function (_arg1){
var d_scale:*;
var v_scale:*;
var rec:Rectangle;
var dx:*;
var dy:*;
var vx:*;
var vy:*;
var e = _arg1;
if (Main.self.inPause){
return;
};
d_scale = (rateScale - stageMC.scaleX);
v_scale = (d_scale * rate_v);
stageMC.scaleX = (stageMC.scaleX + v_scale);
stageMC.scaleY = (stageMC.scaleY + v_scale);
rec = stageMC.getBounds(stageMC.parent);
dx = (centerX - ((rec.left + rec.right) / 2));
dy = (centerY - ((rec.top + rec.bottom) / 2));
vx = (dx * rate_v);
vy = (dy * rate_v);
stageMC.x = (stageMC.x + vx);
stageMC.y = (stageMC.y + vy);
if (Math.abs(d_scale) < 0.01){
onShowAll();
stageMC.removeEventListener(Event.ENTER_FRAME, do_showAll);
do_showAll = function (){
};
};
};
stageMC.addEventListener(Event.ENTER_FRAME, do_showAll, false, 0, true);
}
public function showAll_end():void{
var rateScale:*;
var rate_v:*;
try {
stageMC.removeEventListener(Event.ENTER_FRAME, do_showAll);
} catch(e) {
};
rateScale = old_scale;
rate_v = 0.1;
do_showAll = function (_arg1){
var d_scale:*;
var v_scale:*;
var dx:*;
var dy:*;
var vx:*;
var vy:*;
var e = _arg1;
d_scale = (rateScale - stageMC.scaleX);
v_scale = (d_scale * rate_v);
stageMC.scaleX = (stageMC.scaleX + v_scale);
stageMC.scaleY = (stageMC.scaleY + v_scale);
dx = (old_x - stageMC.x);
dy = (old_y - stageMC.y);
vx = (dx * rate_v);
vy = (dy * rate_v);
stageMC.x = (stageMC.x + vx);
stageMC.y = (stageMC.y + vy);
if (Math.abs(d_scale) < 1E-5){
onShowAll_end();
stageMC.removeEventListener(Event.ENTER_FRAME, do_showAll);
do_showAll = function (){
};
};
};
stageMC.addEventListener(Event.ENTER_FRAME, do_showAll, false, 0, true);
}
}
}//package camera
Section 3
//Cpu (game.Cpu)
package game {
public class Cpu extends Role {
public function Cpu(_arg1){
var _local2:*;
var _local3:*;
super(_arg1);
_local2 = Main.self.cpuSpeed[(Main.self.stageID - 1)];
if (Main.self.difficulty == 1){
_local3 = 1;
} else {
if (Main.self.difficulty == 2){
_local3 = 1.1;
} else {
if (Main.self.difficulty == 3){
_local3 = 1.15;
};
};
};
v = (_local2 * _local3);
}
public function startMove(){
nextStep(100, 1);
}
}
}//package game
Section 4
//Game (game.Game)
package game {
import flash.display.*;
import flash.events.*;
import camera.*;
import flash.utils.*;
import flash.geom.*;
public class Game extends Sprite {
const g;
public var math;
var diffRate1:Number;
var diffRate3:Number;
public var map;
var mathLevel_same:Number;
var diffRate2:Number;
public var role;
public var role1;
public var role2;
var levelScore1:Number;// = 0
var levelScore2:Number;// = 0
var cameraChase2;
var cameraZoom;
public var cpu;
public var cpuDot:Array;
var cameraChase;
public var roleDot:Array;
public static var self;
public static var mc;
public function Game(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Rectangle;
var _local11:*;
var _local12:*;
var _local13:*;
g = Main.self;
roleDot = new Array();
cpuDot = new Array();
levelScore1 = 0;
levelScore2 = 0;
super();
self = this;
_local2 = getDefinitionByName(("bg" + Main.self.stageID));
_local3 = new (_local2);
addChild(_local3);
_local4 = getDefinitionByName(_arg1);
mc = new (_local4);
addChild(mc);
roleDot = getDot(mc.dot_role);
cpuDot = getDot(mc.dot_cpu);
if (Main.self.gameMode == "cpu"){
addItem(roleDot);
};
_local5 = getDefinitionByName(("role_" + Main.self.char_p1));
_local6 = new (_local5);
mc.dot_role.addChild(_local6);
_local6.x = roleDot[0].x;
_local6.y = roleDot[0].y;
role1 = new Role(_local6);
role1.dotData = roleDot;
role1.itemNumArray = Main.self.itemNum_role1;
_local7 = getDefinitionByName(("role_" + Main.self.char_p2));
_local8 = new (_local7);
mc.dot_cpu.addChild(_local8);
_local8.x = cpuDot[0].x;
_local8.y = cpuDot[0].y;
_local8.scaleX = -1;
if (Main.self.gameMode == "player"){
cpu = new Role(_local8);
} else {
cpu = new Cpu(_local8);
};
cpu.dotData = cpuDot;
role1.opp = cpu;
cpu.opp = role1;
math = new math_loader();
addChild(math);
math.x = 450;
math.y = 200;
_local9 = new mapLoader();
addChild(_local9);
_local9.x = 80;
_local9.y = 85;
map = new Map(roleDot, cpuDot, _local6, _local8, mc);
addChild(map);
_local10 = map.getBounds(this);
_local11 = ((_local9.width - 20) / map.width);
_local12 = ((_local9.height - 20) / map.height);
_local13 = Math.min(_local11, _local12);
map.scaleX = (map.scaleY = _local13);
map.x = _local9.x;
map.y = _local9.y;
map.setRoleScale();
cameraChase = new CameraChase({target_mc:_local6, loader_mc:mc, root_mc:Main.self, cameraX:275, cameraY:200, areaRec:{l:0, r:550, t:0, b:400}, boundsObj:{l:mc.l, r:mc.r, t:mc.t, b:mc.b}});
addChild(cameraChase);
cameraChase2 = new CameraChase({target_mc:_local8, loader_mc:mc, root_mc:Main.self, cameraX:275, cameraY:200, areaRec:{l:0, r:550, t:0, b:400}, boundsObj:{l:mc.l, r:mc.r, t:mc.t, b:mc.b}});
addChild(cameraChase2);
cameraZoom = new CameraZoom({stageMC:mc, root_mc:Main.self, cameraX:275, cameraY:200, areaRec:{l:0, r:550, t:0, b:400}, boundsObj:{l:mc.l, r:mc.r, t:mc.t, b:mc.b}});
addChild(cameraZoom);
if (Main.self.gameMode == "player"){
setTimeout(getFirstTurn, 2000);
} else {
role = role1;
cameraChase.startChase();
};
diffRate1 = Main.self.difficultyArray[(Main.self.stageID - 1)][0];
diffRate2 = Main.self.difficultyArray[(Main.self.stageID - 1)][1];
diffRate3 = Main.self.difficultyArray[(Main.self.stageID - 1)][2];
}
public function onWrong(_arg1:Number){
var _local2:*;
var _local3:*;
var _local4:*;
trace(("onWrong: " + _arg1));
_local2 = role.useItem4();
if (_local2){
setTimeout(showQuestion, 500);
Main.self.showText((("Second chance" + "\n") + "power-up used"));
if (role == role1){
Main.self.life1--;
Main.self.UI.chance_p1.num_txt.text = Main.self.life1;
if (Main.self.life1 == 0){
role.opp.inWin = true;
if (Main.self.gameMode == "cpu"){
setTimeout(Main.self.game_over, 500);
} else {
setTimeout(Main.self.game_pass_player, 200);
};
};
} else {
role.opp.inWin = true;
Main.self.life2--;
Main.self.UI.chance_p2.num_txt.text = Main.self.life2;
if (Main.self.life2 == 0){
setTimeout(Main.self.game_pass_player, 200);
};
};
return;
};
role.backStep(_arg1, -1);
role.checkItem("fail");
_local3 = 75;
if (role == role1){
Main.self.moveTimes1++;
trace(("Main.self.moveTimes1: " + Main.self.moveTimes1));
levelScore1 = (levelScore1 + _local3);
trace(("levelScore1: " + levelScore1));
_local4 = int(((levelScore1 + Main.self.lastScore1) / Main.self.moveTimes1));
trace(("score_avg: " + _local4));
Main.self.IQ1 = _local4;
Main.self.life1--;
Main.self.UI.chance_p1.num_txt.text = Main.self.life1;
if (Main.self.life1 == 0){
role.opp.inWin = true;
if (Main.self.gameMode == "cpu"){
setTimeout(Main.self.game_over, 500);
} else {
setTimeout(Main.self.game_pass_player, 200);
};
};
} else {
Main.self.moveTimes2++;
levelScore2 = (levelScore2 + _local3);
_local4 = int(((levelScore2 + Main.self.lastScore2) / Main.self.moveTimes2));
Main.self.IQ2 = _local4;
Main.self.life2--;
Main.self.UI.chance_p2.num_txt.text = Main.self.life2;
if (Main.self.life2 == 0){
setTimeout(Main.self.game_pass_player, 200);
};
};
}
function getDot(_arg1:MovieClip){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = _arg1.numChildren;
_local3 = new Array();
_local4 = 0;
while (_local4 < _local2) {
_local6 = _arg1.getChildAt(_local4);
if ((_local6 is dot) != true){
} else {
_local3.push({obj:_local6, y:_local6.y});
};
_local4++;
};
_local3.sortOn("y", (Array.NUMERIC | Array.DESCENDING));
_local5 = new Array();
_local4 = 0;
while (_local4 < _local3.length) {
_local5.push(_local3[_local4].obj);
_local4++;
};
trace(("dotNum: " + _local3.length));
return (_local5);
}
public function showQuestion(){
var _local1:*;
var _local2:*;
if (this.root == null){
return;
};
_local1 = Math.random();
if (Main.self.gameMode == "player"){
if (role == role1){
if (_local1 < 0.3){
_local2 = 1;
} else {
if (_local1 < 0.7){
_local2 = 2;
} else {
_local2 = 3;
};
};
mathLevel_same = _local2;
} else {
_local2 = mathLevel_same;
};
} else {
if (_local1 < diffRate1){
_local2 = 1;
} else {
if (_local1 < diffRate2){
_local2 = 2;
} else {
_local2 = 3;
};
};
};
math.mc.setLevel(_local2);
setTimeout(math.show, 200);
}
public function changeChar(){
var _local1:*;
_local1 = new UI_turn_txt();
addChild(_local1);
_local1.x = Main.self.centerX;
_local1.y = Main.self.centerY;
if (role == role1){
role = cpu;
cameraChase.stopChase();
cameraChase2.startChase();
_local1.mc.gotoAndStop(2);
setTimeout(showQuestion, 1000);
} else {
if (role == cpu){
role = role1;
cameraChase2.stopChase();
cameraChase.startChase();
_local1.mc.gotoAndStop(1);
setTimeout(showQuestion, 1000);
};
};
}
function removedFunc(_arg1){
var e = _arg1;
try {
} catch(e) {
};
}
function addItem(_arg1:Array){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
_local2 = Main.self.itemNum[(Main.self.stageID - 1)];
_local3 = 0;
_local5 = new Array();
for (_local4 in _local2) {
_local8 = _local2[_local4];
_local3 = (_local3 + _local8);
_local9 = 0;
while (_local9 < _local8) {
_local5.push(_local4);
_local9++;
};
};
_local6 = _arg1.slice();
_local6.shift();
_local6.pop();
_local7 = ArrayFunc.getNoRepeat(_local6, _local3);
for (_local4 in _local7) {
_local10 = _local5[_local4];
_local11 = new Item(_local10);
_local7[_local4].addChild(_local11);
_local7[_local4].hasItem = true;
_local7[_local4].itemType = _local10;
_local7[_local4].item = _local11;
};
}
public function nextStep(_arg1){
role.nextStep(_arg1, 1);
}
public function backStep(_arg1){
role.backStep(_arg1);
}
function getFirstTurn(){
var _local1:*;
_local1 = new UI_turn_txt();
addChild(_local1);
_local1.x = Main.self.centerX;
_local1.y = Main.self.centerY;
_local1.mc.gotoAndStop(1);
role = role1;
cameraChase.startChase();
}
public function getItem(_arg1){
}
public function cpuStart(){
cpu.startMove();
}
public function onCorrect(_arg1:Number, _arg2:Number){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
trace(("onCorrect: " + _arg1));
if (_arg1 == 1){
_local3 = (100 + ((Main.self.stageID - 1) * 1));
} else {
if (_arg1 == 2){
_local3 = (120 + ((Main.self.stageID - 1) * 1));
} else {
if (_arg1 == 3){
_local3 = (150 + ((Main.self.stageID - 1) * 1));
};
};
};
_local4 = (_local3 + _arg2);
if (role == role1){
Main.self.moveTimes1++;
trace(("Main.self.moveTimes1: " + Main.self.moveTimes1));
levelScore1 = (levelScore1 + _local4);
trace(("levelScore1: " + levelScore1));
trace(("Main.self.lastScore1: " + Main.self.lastScore1));
trace(("totalScore1: " + (levelScore1 + Main.self.lastScore1)));
_local5 = int(((levelScore1 + Main.self.lastScore1) / Main.self.moveTimes1));
trace(("score_avg: " + _local5));
Main.self.IQ1 = _local5;
} else {
Main.self.moveTimes2++;
levelScore2 = (levelScore2 + _local4);
_local5 = int(((levelScore2 + Main.self.lastScore2) / Main.self.moveTimes2));
Main.self.IQ2 = _local5;
};
_local6 = role.checkItem("OK");
if (_local6){
role.nextStep((_arg1 * 2), 1);
Main.self.showText((("Movement x2" + "\n") + "power-up used"));
} else {
role.nextStep(_arg1, 1);
};
}
public function getToEnd(_arg1){
var _local2:*;
if (Main.self.gameMode == "cpu"){
if (_arg1 == cpu){
role.stopMove();
cameraChase.stopChase();
cameraChase2.startChase();
setTimeout(Main.self.showWin, 500, "cpu");
setTimeout(Main.self.game_over, 3000);
} else {
cpu.stopMove();
setTimeout(Main.self.showWin, 500, "1p");
setTimeout(Main.self.game_pass, 2000);
};
} else {
if (_arg1 == role1){
_local2 = "1p";
} else {
_local2 = "2p";
};
setTimeout(Main.self.showWin, 500, _local2);
setTimeout(Main.self.game_pass_player, 2500);
};
}
public function hasItem(_arg1, _arg2){
if (_arg1[_arg2].hasItem){
return (true);
};
}
}
}//package game
Section 5
//Item (game.Item)
package game {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Item extends MovieClip {
public var mc:MovieClip;
var posy:Number;
var type:Number;
var posx:Number;
public var text_mc:MovieClip;
public function Item(_arg1){
addFrameScript(0, frame1, 1, frame2, 8, frame9, 17, frame18, 18, frame19, 59, frame60);
type = _arg1;
posx = x;
posy = y;
this["mc"].gotoAndStop((type + 1));
}
function frame18(){
stop();
}
function frame1(){
stop();
}
function frame19(){
SoundC.playS("powerup2_snd");
text_mc.gotoAndStop(mc.currentFrame);
}
function frame9(){
stop();
}
function frame2(){
SoundC.playS("powerup1_snd");
}
function getItem(){
gotoAndPlay("up");
}
function getOK(){
gotoAndPlay("get");
MovieClip(parent).hasItem = false;
}
function getFail(){
gotoAndPlay("down");
}
function frame60(){
stop();
MovieClip(parent).hasItem = false;
parent.removeChild(this);
}
}
}//package game
Section 6
//Map (game.Map)
package game {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class Map extends Sprite {
var loader;
var pos_cpu;
var map;
var role;
var interval_update:Number;
var pos_role;
var mapLoader;
var dotArray1:Array;
var cpu;
var dotArray2:Array;
public function Map(_arg1:Array, _arg2:Array, _arg3, _arg4, _arg5){
var _local6:*;
var _local7:*;
dotArray1 = new Array();
dotArray2 = new Array();
super();
loader = _arg5;
dotArray1 = getDotPos(_arg1);
dotArray2 = getDotPos(_arg2);
role = _arg3;
cpu = _arg4;
mapLoader = new Sprite();
addChild(mapLoader);
createMap();
pos_role = new rolePos_role();
mapLoader.addChild(pos_role);
pos_cpu = new rolePos_cpu();
mapLoader.addChild(pos_cpu);
_local6 = ((dotArray1[0].x + dotArray2[0].x) / 2);
_local7 = ((dotArray1[0].y + dotArray1[(dotArray1.length - 1)].y) / 2);
mapLoader.x = (0 - _local6);
mapLoader.y = (0 - _local7);
interval_update = setInterval(updatePos, 50);
this.addEventListener(Event.REMOVED_FROM_STAGE, removedFunc);
}
public function setRoleScale(){
pos_role.scaleX = (pos_role.scaleY = (1 / scaleX));
pos_cpu.scaleX = (pos_cpu.scaleY = (1 / scaleX));
}
private function getDotPos(_arg1:Array){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1[_local3];
_local5 = Pos.LtoL(_local4, loader);
_local2.push(_local5);
_local3++;
};
return (_local2);
}
private function removedFunc(_arg1){
clearInterval(interval_update);
}
private function createMap(){
var _local1:*;
var _local2:*;
map = new Shape();
mapLoader.addChild(map);
map.graphics.lineStyle(2, 0);
_local2 = dotArray1[0];
map.graphics.moveTo(_local2.x, _local2.y);
_local1 = 1;
while (_local1 < dotArray1.length) {
_local2 = dotArray1[_local1];
map.graphics.lineTo(_local2.x, _local2.y);
_local1++;
};
_local2 = dotArray2[0];
map.graphics.moveTo(_local2.x, _local2.y);
_local1 = 1;
while (_local1 < dotArray2.length) {
_local2 = dotArray2[_local1];
map.graphics.lineTo(_local2.x, _local2.y);
_local1++;
};
map.graphics.moveTo(dotArray1[0].x, dotArray1[0].y);
map.graphics.lineTo(dotArray2[0].x, dotArray2[0].y);
map.graphics.moveTo(dotArray1[(dotArray1.length - 1)].x, dotArray1[(dotArray1.length - 1)].y);
map.graphics.lineTo(dotArray2[(dotArray2.length - 1)].x, dotArray2[(dotArray2.length - 1)].y);
}
public function updatePos(){
var _local1:*;
var _local2:*;
_local1 = Pos.LtoL(role, loader);
pos_role.x = _local1.x;
pos_role.y = _local1.y;
_local2 = Pos.LtoL(cpu, loader);
pos_cpu.x = _local2.x;
pos_cpu.y = _local2.y;
}
}
}//package game
Section 7
//Move (game.Move)
package game {
import flash.events.*;
import flash.utils.*;
public class Move {
var moveFunc:Function;
public function Move(){
super();
moveFunc = function (){
};
}
public function moveMC_tween(_arg1, _arg2, _arg3){
var mc = _arg1;
var posx = _arg2;
var posy = _arg3;
moveFunc = function (){
var dx:*;
var dy:*;
dx = (posx - mc.x);
dy = (posy - mc.y);
if (((dx * dx) + (dy * dy)) < 1){
mc.x = posx;
mc.y = posy;
mc.removeEventListener(Event.ENTER_FRAME, moveFunc);
try {
mc.onMoveEnd();
} catch(e) {
};
};
mc.x = (mc.x + (dx * 0.1));
mc.y = (mc.y + (dy * 0.1));
};
mc.addEventListener(Event.ENTER_FRAME, moveFunc, false, 0, true);
}
public function moveContinue(_arg1){
var mc = _arg1;
try {
mc.addEventListener(Event.ENTER_FRAME, moveFunc, false, 0, true);
} catch(e) {
};
}
public function stop(_arg1){
var mc = _arg1;
try {
mc.removeEventListener(Event.ENTER_FRAME, moveFunc);
} catch(e) {
};
}
public function movePause(_arg1){
var mc = _arg1;
try {
mc.removeEventListener(Event.ENTER_FRAME, moveFunc);
} catch(e) {
};
}
public function moveMC_v(_arg1, _arg2, _arg3, _arg4){
var mc = _arg1;
var posx = _arg2;
var posy = _arg3;
var v = _arg4;
moveFunc = function (){
var angle:*;
var vx:*;
var vy:*;
angle = ExtMath.angleOfLine(mc.x, mc.y, posx, posy);
vx = (v * ExtMath.cosD(angle));
vy = (v * ExtMath.sinD(angle));
if (ExtMath.distance(mc.x, mc.y, posx, posy) <= v){
mc.x = posx;
mc.y = posy;
mc.removeEventListener(Event.ENTER_FRAME, moveFunc);
try {
mc.onMoveEnd();
} catch(e) {
};
};
mc.x = (mc.x + vx);
mc.y = (mc.y + vy);
};
mc.addEventListener(Event.ENTER_FRAME, moveFunc, false, 0, true);
}
}
}//package game
Section 8
//Role (game.Role)
package game {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Role extends MovieClip {
const g;
var stepNum:Number;
var moveFunc:Function;
public var onMoveEnd:Function;
public var inWin:Boolean;// = false
var posNext:Number;
var v:Number;
var moveC:Move;
public var dotData:Array;
var mc;
var itemNumArray:Array;
var v_now:Number;
public var opp;
public var posNow:Number;
public function Role(_arg1){
g = Main.self;
itemNumArray = new Array(0, 0, 0, 0, 0);
inWin = false;
super();
mc = _arg1;
posNow = 0;
v = 1;
mc.addEventListener(Event.REMOVED_FROM_STAGE, removedFunc);
}
public function stopMove(){
try {
mc.removeEventListener(Event.ENTER_FRAME, moveFunc);
} catch(e) {
};
mc.gotoAndStop("stand");
}
public function continueMove(){
if (opp.inWin){
return;
};
mc.addEventListener(Event.ENTER_FRAME, moveFunc, false, 0, true);
mc.gotoAndStop("walk");
}
public function useItem0(){
var _local1:*;
_local1 = 0;
if (itemNumArray[_local1] == 0){
return;
};
var _local2 = itemNumArray;
var _local3 = _local1;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
Main.self.UI.item_mc.setNum(_local1, itemNumArray[_local1]);
Main.self.game_mc.math.mc.useItem0();
}
public function useItem2(){
var _local1:*;
_local1 = 2;
if (itemNumArray[_local1] == 0){
return;
};
var _local2 = itemNumArray;
var _local3 = _local1;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
Main.self.UI.item_mc.setNum(_local1, itemNumArray[_local1]);
opp.pauseMove();
}
public function recoverSpeed(){
v_now = v;
}
function removedFunc(_arg1){
var e = _arg1;
try {
mc.removeEventListener(Event.ENTER_FRAME, moveFunc);
} catch(e) {
};
}
public function useItem3(){
var _local1:*;
_local1 = 3;
if (itemNumArray[_local1] == 0){
return;
};
var _local2 = itemNumArray;
var _local3 = _local1;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
Main.self.UI.item_mc.setNum(_local1, itemNumArray[_local1]);
opp.slowMove();
}
public function checkItem(_arg1){
var _local2:*;
_local2 = dotData[posNow];
if (((_local2.hasItem) && (!(isNaN(_local2.itemType))))){
if (_arg1 == "OK"){
_local2.item.getOK();
var _local3 = itemNumArray;
var _local4 = _local2.itemType;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
Main.self.UI.item_mc.setNum(_local2.itemType, itemNumArray[_local2.itemType]);
if (_local2.itemType == 1){
return (true);
};
} else {
if (_arg1 == "fail"){
_local2.item.getFail();
};
};
};
}
public function nextStep(_arg1, _arg2){
var posNext_mc:*;
var owner:*;
var num = _arg1;
var dir = _arg2;
stepNum = num;
if (stepNum == 0){
return;
};
if (dir > 0){
posNext = (posNow + 1);
} else {
posNext = (posNow - 1);
};
if (posNext < 0){
setTimeout(Main.self.game_mc.showQuestion, 1000);
return;
};
if (posNext > (dotData.length - 1)){
return;
};
posNext_mc = dotData[posNext];
move(mc, posNext_mc.x, posNext_mc.y, v);
mc.gotoAndStop("walk");
owner = this;
mc.onMoveEnd = function (){
var _local1:*;
var _local2:*;
if (dir < 0){
posNow--;
} else {
posNow++;
};
stepNum--;
if (posNow == 0){
setTimeout(Main.self.game_mc.showQuestion, 500);
mc.gotoAndStop("stand");
} else {
if (posNow == (dotData.length - 1)){
winFunc();
mc.gotoAndStop("stand");
} else {
if (stepNum > 0){
nextStep(stepNum, dir);
} else {
if (stepNum == 0){
mc.gotoAndStop("stand");
_local1 = dotData[posNow];
if (Main.self.gameMode == "player"){
setTimeout(Main.self.game_mc.changeChar, 500);
} else {
if (_local1.hasItem){
_local2 = _local1.item;
setTimeout(_local2.getItem, 100);
setTimeout(Main.self.game_mc.showQuestion, 1000);
} else {
setTimeout(Main.self.game_mc.showQuestion, 500);
};
};
};
};
};
};
};
}
public function backStep(_arg1, _arg2:Number=-1){
var posNext_mc:*;
var num = _arg1;
var dir = _arg2;
stepNum = num;
if (stepNum == 0){
return;
};
posNext = (posNow - 1);
if (posNext < 0){
if (Main.self.gameMode == "player"){
setTimeout(Main.self.game_mc.changeChar, 500);
} else {
setTimeout(Main.self.game_mc.showQuestion, 700);
};
return;
};
posNext_mc = dotData[posNext];
move(mc, posNext_mc.x, posNext_mc.y, 3);
if (mc.currentLabel == "stand"){
mc.gotoAndStop("fall");
mc.inStop = false;
};
mc.onMoveEnd = function (){
posNow--;
stepNum--;
if (posNow == 0){
if (Main.self.gameMode == "player"){
setTimeout(Main.self.game_mc.changeChar, 1000);
} else {
setTimeout(Main.self.game_mc.showQuestion, 500);
};
mc.doStop();
mc.inStop = true;
} else {
if (stepNum > 0){
backStep(stepNum);
} else {
if (stepNum == 0){
if (Main.self.gameMode == "player"){
setTimeout(Main.self.game_mc.changeChar, 1000);
} else {
setTimeout(Main.self.game_mc.showQuestion, 500);
};
mc.doStop();
mc.inStop = true;
};
};
};
};
}
public function slowMove(){
v_now = (v / 2);
}
public function useItem(_arg1){
if (itemNumArray[_arg1] == 0){
return;
};
var _local2 = itemNumArray;
var _local3 = _arg1;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
Main.self.UI.item_mc.setNum(_arg1, itemNumArray[_arg1]);
}
public function winFunc(){
if (opp.inWin){
return;
};
inWin = true;
setTimeout(Main.self.game_mc.getToEnd, 1000, this);
}
public function useItem4(){
var _local1:*;
_local1 = 4;
if (itemNumArray[_local1] == 0){
return (false);
};
var _local2 = itemNumArray;
var _local3 = _local1;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
Main.self.UI.item_mc.setNum(_local1, itemNumArray[_local1]);
return (true);
}
function move(_arg1, _arg2, _arg3, _arg4){
var mc = _arg1;
var posx = _arg2;
var posy = _arg3;
var v = _arg4;
v_now = v;
moveFunc = function (){
var angle:*;
var vx:*;
var vy:*;
if (Main.self.inPause){
return;
};
angle = ExtMath.angleOfLine(mc.x, mc.y, posx, posy);
vx = (v_now * ExtMath.cosD(angle));
vy = (v_now * ExtMath.sinD(angle));
if (ExtMath.distance(mc.x, mc.y, posx, posy) <= v_now){
mc.x = posx;
mc.y = posy;
mc.removeEventListener(Event.ENTER_FRAME, moveFunc);
try {
mc.onMoveEnd();
} catch(e) {
};
};
mc.x = (mc.x + vx);
mc.y = (mc.y + vy);
};
mc.addEventListener(Event.ENTER_FRAME, moveFunc, false, 0, true);
}
public function pauseMove(){
mc.removeEventListener(Event.ENTER_FRAME, moveFunc);
mc.gotoAndStop("stand");
}
}
}//package game
Section 9
//answer_btn_20 (main_noprotection_fla.answer_btn_20)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class answer_btn_20 extends MovieClip {
public var numAnswer;
public var num_txt:TextField;
public var btn:SimpleButton;
public var numShow;
public function answer_btn_20(){
addFrameScript(0, frame1);
}
function frame1(){
num_txt.mouseEnabled = false;
this.addEventListener(MouseEvent.CLICK, clickFunc);
}
public function clickFunc(_arg1){
trace("clickFunc;;;;;");
checkAnswer();
}
public function setText(_arg1, _arg2){
numShow = _arg1;
numAnswer = _arg2;
num_txt.text = String(_arg1);
}
public function checkAnswer(){
if (numShow == numAnswer){
MovieClip(parent).pass();
} else {
MovieClip(parent).fail();
};
}
}
}//package main_noprotection_fla
Section 10
//answer_mc_19 (main_noprotection_fla.answer_mc_19)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class answer_mc_19 extends MovieClip {
public var a6:MovieClip;
public var a4:MovieClip;
public var a9:MovieClip;
public var a5:MovieClip;
public var a8:MovieClip;
public var answerArray;
public var offsetArray;
public var answer_mc;
public var a2:MovieClip;
public var a3:MovieClip;
public var a7:MovieClip;
public var a1:MovieClip;
public function answer_mc_19(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
public function fail(){
trace("fail");
MovieClip(parent).endQuestion("fail");
}
public function pass(){
trace("pass");
MovieClip(parent).endQuestion("pass");
}
public function init(){
var _local1:*;
_local1 = (Main.self.stageID + 1);
if (_local1 > 7){
_local1 = 7;
};
gotoAndStop(_local1);
}
function frame3(){
answerArray = [a1, a2, a3, a4, a5];
}
function frame6(){
answerArray = [a1, a2, a3, a4, a5, a6, a7, a8];
}
function frame7(){
answerArray = [a1, a2, a3, a4, a5, a6, a7, a8, a9];
}
function frame1(){
stop();
answerArray = new Array();
offsetArray = new Array();
offsetArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
init();
}
function frame5(){
answerArray = [a1, a2, a3, a4, a5, a6, a7];
}
function frame4(){
answerArray = [a1, a2, a3, a4, a5, a6];
}
function frame2(){
answerArray = [a1, a2, a3, a4];
}
public function setAnswer(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = _arg1;
_local3 = ArrayFunc.getNoRepeat(offsetArray, answerArray.length);
for (_local4 in answerArray) {
_local5 = (_local2 + _local3[_local4]);
answerArray[_local4].setText(_local5, _local2);
answerArray[_local4].visible = true;
};
answer_mc = ArrayFunc.getRandom(answerArray);
answer_mc.setText(_local2, _local2);
}
}
}//package main_noprotection_fla
Section 11
//award_mc_185 (main_noprotection_fla.award_mc_185)
package main_noprotection_fla {
import flash.display.*;
public dynamic class award_mc_185 extends MovieClip {
public function award_mc_185(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Main.self.stageID);
}
}
}//package main_noprotection_fla
Section 12
//btn_add_56 (main_noprotection_fla.btn_add_56)
package main_noprotection_fla {
import flash.display.*;
public dynamic class btn_add_56 extends MovieClip {
public var btn:SimpleButton;
public function btn_add_56(){
addFrameScript(0, frame1);
}
function frame1(){
Click.onClick(btn, func);
}
public function func(){
URL.getURL(URL.URL_ADD);
}
}
}//package main_noprotection_fla
Section 13
//btn_copyRight_155 (main_noprotection_fla.btn_copyRight_155)
package main_noprotection_fla {
import flash.display.*;
public dynamic class btn_copyRight_155 extends MovieClip {
public var btn:SimpleButton;
public function btn_copyRight_155(){
addFrameScript(0, frame1);
}
function frame1(){
Click.onClick(btn, func);
}
public function func(){
URL.getURL(URL.URL_MORE);
}
}
}//package main_noprotection_fla
Section 14
//btn_down_55 (main_noprotection_fla.btn_down_55)
package main_noprotection_fla {
import flash.display.*;
public dynamic class btn_down_55 extends MovieClip {
public var btn:SimpleButton;
public function btn_down_55(){
addFrameScript(0, frame1);
}
function frame1(){
Click.onClick(btn, func);
}
public function func(){
URL.getURL(URL.URL_DOWN);
}
}
}//package main_noprotection_fla
Section 15
//btn_more_54 (main_noprotection_fla.btn_more_54)
package main_noprotection_fla {
import flash.display.*;
public dynamic class btn_more_54 extends MovieClip {
public var btn:SimpleButton;
public function btn_more_54(){
addFrameScript(0, frame1);
}
function frame1(){
Click.onClick(btn, func);
}
public function func(){
URL.getURL(URL.URL_MORE);
}
}
}//package main_noprotection_fla
Section 16
//btn_view_28 (main_noprotection_fla.btn_view_28)
package main_noprotection_fla {
import flash.display.*;
public dynamic class btn_view_28 extends MovieClip {
public var btn:SimpleButton;
public function btn_view_28(){
addFrameScript(0, frame1);
}
function frame1(){
Click.onClick(btn, Main.self.viewScore);
}
}
}//package main_noprotection_fla
Section 17
//charFail_mc_197 (main_noprotection_fla.charFail_mc_197)
package main_noprotection_fla {
import flash.display.*;
public dynamic class charFail_mc_197 extends MovieClip {
public function charFail_mc_197(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 18
//charWin_mc_186 (main_noprotection_fla.charWin_mc_186)
package main_noprotection_fla {
import flash.display.*;
public dynamic class charWin_mc_186 extends MovieClip {
public function charWin_mc_186(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 19
//count_g_17 (main_noprotection_fla.count_g_17)
package main_noprotection_fla {
import flash.display.*;
import flash.text.*;
public dynamic class count_g_17 extends MovieClip {
public var num_txt:TextField;
}
}//package main_noprotection_fla
Section 20
//count_mc_16 (main_noprotection_fla.count_mc_16)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class count_mc_16 extends MovieClip {
public var num_txt:TextField;
public var num;
public var num_mc:MovieClip;
public function count_mc_16(){
addFrameScript(0, frame1, 1, frame2, 27, frame28);
}
function frame1(){
stop();
num = 5;
this.visible = false;
}
function frame2(){
this.visible = true;
num_mc.num_txt.text = num;
}
function frame28(){
num--;
if (num == -1){
MovieClip(parent).timeOver();
gotoAndStop(1);
} else {
gotoAndPlay(2);
};
}
}
}//package main_noprotection_fla
Section 21
//count_mc2_35 (main_noprotection_fla.count_mc2_35)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class count_mc2_35 extends MovieClip {
public var num_txt:TextField;
public var num;
public var type_mc:MovieClip;
public var num_mc:MovieClip;
public function count_mc2_35(){
addFrameScript(0, frame1, 1, frame2, 28, frame29);
}
function frame1(){
stop();
num = 10;
this.visible = false;
}
function frame29(){
num--;
if (num == -1){
MovieClip(parent).timeOver();
gotoAndStop(1);
} else {
gotoAndPlay(2);
};
}
function frame2(){
this.visible = true;
num_mc.num_txt.text = num;
}
}
}//package main_noprotection_fla
Section 22
//difficult_btn_170 (main_noprotection_fla.difficult_btn_170)
package main_noprotection_fla {
import flash.display.*;
public dynamic class difficult_btn_170 extends MovieClip {
public function difficult_btn_170(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 23
//difficult_btn2_171 (main_noprotection_fla.difficult_btn2_171)
package main_noprotection_fla {
import flash.display.*;
public dynamic class difficult_btn2_171 extends MovieClip {
public function difficult_btn2_171(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 24
//difficult_btn3_172 (main_noprotection_fla.difficult_btn3_172)
package main_noprotection_fla {
import flash.display.*;
public dynamic class difficult_btn3_172 extends MovieClip {
public function difficult_btn3_172(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 25
//difficult_mc_169 (main_noprotection_fla.difficult_mc_169)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class difficult_mc_169 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var objArray;
public function difficult_mc_169(){
addFrameScript(0, frame1);
}
public function game_getDifficult(){
game_setDifficult(Main.self.difficulty);
}
public function game_setDifficult(_arg1){
var _local2:*;
for (_local2 in objArray) {
objArray[_local2].gotoAndStop(1);
};
this[("mc" + _arg1)].gotoAndStop(2);
Main.self.difficulty = _arg1;
}
function frame1(){
stop();
objArray = new Array(mc1, mc2, mc3);
Click.onClick(mc1, game_setDifficult, 1);
Click.onClick(mc2, game_setDifficult, 2);
Click.onClick(mc3, game_setDifficult, 3);
game_getDifficult();
}
}
}//package main_noprotection_fla
Section 26
//dot_cpu1_2_75 (main_noprotection_fla.dot_cpu1_2_75)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu1_2_75 extends MovieClip {
public function dot_cpu1_2_75(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 27
//dot_cpu1_71 (main_noprotection_fla.dot_cpu1_71)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu1_71 extends MovieClip {
public var p11:dot;
public var p12:dot;
public var p18:dot;
public var p19:dot;
public var p14:dot;
public var p17:dot;
public var p13:dot;
public var p10:dot;
public var p15:dot;
public var p9:dot;
public var p6:dot;
public var p7:dot;
public var p8:dot;
public function dot_cpu1_71(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 28
//dot_cpu10_109 (main_noprotection_fla.dot_cpu10_109)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu10_109 extends MovieClip {
public function dot_cpu10_109(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 29
//dot_cpu2_2_84 (main_noprotection_fla.dot_cpu2_2_84)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu2_2_84 extends MovieClip {
public function dot_cpu2_2_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 30
//dot_cpu2_81 (main_noprotection_fla.dot_cpu2_81)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu2_81 extends MovieClip {
public function dot_cpu2_81(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 31
//dot_cpu3_90 (main_noprotection_fla.dot_cpu3_90)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu3_90 extends MovieClip {
public function dot_cpu3_90(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 32
//dot_cpu4_100 (main_noprotection_fla.dot_cpu4_100)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu4_100 extends MovieClip {
public function dot_cpu4_100(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 33
//dot_cpu5_106 (main_noprotection_fla.dot_cpu5_106)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu5_106 extends MovieClip {
public function dot_cpu5_106(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 34
//dot_cpu6_95 (main_noprotection_fla.dot_cpu6_95)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_cpu6_95 extends MovieClip {
public function dot_cpu6_95(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 35
//dot_role1_2_74 (main_noprotection_fla.dot_role1_2_74)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_role1_2_74 extends MovieClip {
public var p11:dot;
public var p16:dot;
public var p12:dot;
public var p14:dot;
public var p17:dot;
public var p13:dot;
public var p10:dot;
public var p15:dot;
public var p1:dot;
public var p2:dot;
public var p3:dot;
public var p5:dot;
public var p9:dot;
public var p6:dot;
public var p7:dot;
public var p0:dot;
public var p4:dot;
public var p8:dot;
public function dot_role1_2_74(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 36
//dot_role10_108 (main_noprotection_fla.dot_role10_108)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_role10_108 extends MovieClip {
public function dot_role10_108(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 37
//dot_role2_2_83 (main_noprotection_fla.dot_role2_2_83)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_role2_2_83 extends MovieClip {
public function dot_role2_2_83(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 38
//dot_role2_80 (main_noprotection_fla.dot_role2_80)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_role2_80 extends MovieClip {
public function dot_role2_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 39
//dot_role3_89 (main_noprotection_fla.dot_role3_89)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_role3_89 extends MovieClip {
public function dot_role3_89(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 40
//dot_role4_99 (main_noprotection_fla.dot_role4_99)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_role4_99 extends MovieClip {
public function dot_role4_99(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 41
//dot_role5_105 (main_noprotection_fla.dot_role5_105)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_role5_105 extends MovieClip {
public function dot_role5_105(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 42
//dot_role6_94 (main_noprotection_fla.dot_role6_94)
package main_noprotection_fla {
import flash.display.*;
public dynamic class dot_role6_94 extends MovieClip {
public function dot_role6_94(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 43
//egdePos_72 (main_noprotection_fla.egdePos_72)
package main_noprotection_fla {
import flash.display.*;
public dynamic class egdePos_72 extends MovieClip {
public function egdePos_72(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package main_noprotection_fla
Section 44
//failed_mc_198 (main_noprotection_fla.failed_mc_198)
package main_noprotection_fla {
import flash.display.*;
public dynamic class failed_mc_198 extends MovieClip {
public function failed_mc_198(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package main_noprotection_fla
Section 45
//hat_mc_188 (main_noprotection_fla.hat_mc_188)
package main_noprotection_fla {
import flash.display.*;
public dynamic class hat_mc_188 extends MovieClip {
public function hat_mc_188(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Main.self.stageID);
}
}
}//package main_noprotection_fla
Section 46
//intro_math_161 (main_noprotection_fla.intro_math_161)
package main_noprotection_fla {
import flash.display.*;
public dynamic class intro_math_161 extends MovieClip {
public var btn:SimpleButton;
}
}//package main_noprotection_fla
Section 47
//iqText_mc_199 (main_noprotection_fla.iqText_mc_199)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class iqText_mc_199 extends MovieClip {
public var f;
public var iq;
public function iqText_mc_199(){
addFrameScript(0, frame1);
}
function frame1(){
setTimeout(show, 30);
}
public function show(){
if (Main.self.gameMode == "cpu"){
iq = Main.self.finalIQ;
trace(("iq::" + iq));
if (iq < 70){
f = 7;
} else {
if (iq < 80){
f = 6;
} else {
if (iq < 90){
f = 5;
} else {
if (iq < 110){
f = 4;
} else {
if (iq < 120){
f = 3;
} else {
if (iq < 140){
f = 2;
} else {
if (iq >= 140){
f = 1;
};
};
};
};
};
};
};
} else {
if (Main.self.game_mc.role1.inWin){
if (Main.self.IQ1 < 70){
f = 7;
} else {
if (Main.self.IQ1 < 80){
f = 6;
} else {
if (Main.self.IQ1 < 90){
f = 5;
} else {
if (Main.self.IQ1 < 110){
f = 4;
} else {
if (Main.self.IQ1 < 120){
f = 3;
} else {
if (Main.self.IQ1 < 140){
f = 2;
} else {
if (Main.self.IQ1 >= 140){
f = 1;
};
};
};
};
};
};
};
} else {
if (Main.self.IQ2 < 70){
f = 7;
} else {
if (Main.self.IQ2 < 80){
f = 6;
} else {
if (Main.self.IQ2 < 90){
f = 5;
} else {
if (Main.self.IQ2 < 110){
f = 4;
} else {
if (Main.self.IQ2 < 120){
f = 3;
} else {
if (Main.self.IQ2 < 140){
f = 2;
} else {
if (Main.self.IQ2 >= 140){
f = 1;
};
};
};
};
};
};
};
};
};
gotoAndStop(f);
}
}
}//package main_noprotection_fla
Section 48
//item_g_111 (main_noprotection_fla.item_g_111)
package main_noprotection_fla {
import flash.display.*;
public dynamic class item_g_111 extends MovieClip {
public var mc:MovieClip;
public function item_g_111(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 49
//item_mc_34 (main_noprotection_fla.item_mc_34)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class item_mc_34 extends MovieClip {
public var item3_txt:TextField;
public var item1_txt:TextField;
public var time_mc:MovieClip;
public var btn3:SimpleButton;
public var btn0:SimpleButton;
public var btn2:SimpleButton;
public var btn4:SimpleButton;
public var role;
public var type;
public var item0_txt:TextField;
public var item2_txt:TextField;
public var item4_txt:TextField;
public var inCount;
public function item_mc_34(){
addFrameScript(0, frame1);
}
public function init(_arg1, _arg2){
var _local3:*;
for (_local3 in _arg1) {
setNum(_local3, _arg1[_local3]);
};
role = _arg2;
}
public function useItem2(){
if (time_mc.currentFrame != 1){
return;
};
if (item2_txt.text == "0"){
return;
};
role.useItem2();
timeCount("stop");
}
public function useItem0(){
if (Main.self.game_mc.math.visible == false){
return;
};
if (Main.self.game_mc.math.item0Used){
return;
};
role.useItem0();
}
public function timeOver(){
inCount = false;
if (((Main.self.game_mc.role1.inWin) || (Main.self.game_mc.cpu.inWin))){
return;
};
if (type == "stop"){
Main.self.game_mc.cpu.continueMove();
} else {
if (type == "slow"){
Main.self.game_mc.cpu.recoverSpeed();
};
};
}
public function useItem3(){
if (time_mc.currentFrame != 1){
return;
};
if (item3_txt.text == "0"){
return;
};
role.useItem3();
timeCount("slow");
}
function frame1(){
item1_txt.visible = false;
Click.onClick(btn0, useItem0);
Click.onClick(btn2, useItem2);
Click.onClick(btn3, useItem3);
Click.onClick(btn4, useItem4);
btn4.useHandCursor = false;
time_mc.mouseEnabled = false;
inCount = false;
}
public function timeCount_end(){
time_mc.stop();
}
public function useItem4(){
}
public function setNum(_arg1, _arg2){
this[(("item" + _arg1) + "_txt")].text = String(_arg2);
}
public function timeCount(_arg1){
type = _arg1;
inCount = true;
time_mc.num = 9;
time_mc.type_mc.gotoAndStop(type);
time_mc.gotoAndPlay("count");
}
}
}//package main_noprotection_fla
Section 50
//item1_113 (main_noprotection_fla.item1_113)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class item1_113 extends MovieClip {
public function item1_113(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function getItem(){
var _local1:*;
trace(("fffff:" + getItem));
_local1 = new Tween2();
_local1.pos(this, x, y, x, (y - 50), 0.2);
}
}
}//package main_noprotection_fla
Section 51
//item1_g_112 (main_noprotection_fla.item1_g_112)
package main_noprotection_fla {
import flash.display.*;
public dynamic class item1_g_112 extends MovieClip {
public function item1_g_112(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 52
//item2_114 (main_noprotection_fla.item2_114)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class item2_114 extends MovieClip {
public function item2_114(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function getItem(){
var _local1:*;
trace(("fffff:" + getItem));
_local1 = new Tween2();
_local1.pos(this, x, y, x, (y - 50), 0.2);
}
}
}//package main_noprotection_fla
Section 53
//item3_115 (main_noprotection_fla.item3_115)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class item3_115 extends MovieClip {
public function item3_115(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function getItem(){
var _local1:*;
trace(("fffff:" + getItem));
_local1 = new Tween2();
_local1.pos(this, x, y, x, (y - 50), 0.2);
}
}
}//package main_noprotection_fla
Section 54
//item4_116 (main_noprotection_fla.item4_116)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class item4_116 extends MovieClip {
public function item4_116(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function getItem(){
var _local1:*;
trace(("fffff:" + getItem));
_local1 = new Tween2();
_local1.pos(this, x, y, x, (y - 50), 0.2);
}
}
}//package main_noprotection_fla
Section 55
//itemText_mc_117 (main_noprotection_fla.itemText_mc_117)
package main_noprotection_fla {
import flash.display.*;
public dynamic class itemText_mc_117 extends MovieClip {
public var mc:MovieClip;
public function itemText_mc_117(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 56
//key_select_166 (main_noprotection_fla.key_select_166)
package main_noprotection_fla {
import flash.display.*;
public dynamic class key_select_166 extends MovieClip {
public function key_select_166(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 57
//level_t_58 (main_noprotection_fla.level_t_58)
package main_noprotection_fla {
import flash.display.*;
import flash.text.*;
public dynamic class level_t_58 extends MovieClip {
public var num_txt:TextField;
public function level_t_58(){
addFrameScript(0, frame1);
}
function frame1(){
num_txt.text = String(Main.self.stageID);
}
}
}//package main_noprotection_fla
Section 58
//loader_7 (main_noprotection_fla.loader_7)
package main_noprotection_fla {
import flash.display.*;
public dynamic class loader_7 extends MovieClip {
public function loader_7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 59
//loading_logo_loading_2 (main_noprotection_fla.loading_logo_loading_2)
package main_noprotection_fla {
import flash.display.*;
public dynamic class loading_logo_loading_2 extends MovieClip {
public function loading_logo_loading_2(){
addFrameScript(38, frame39);
}
function frame39(){
stop();
}
}
}//package main_noprotection_fla
Section 60
//loading_num_4 (main_noprotection_fla.loading_num_4)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class loading_num_4 extends MovieClip {
public var num_txt:TextField;
public var li:LoaderInfo;
public var _root;
public function loading_num_4(){
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 (!(_root._mochiad is MovieClip)){
_root.play();
};
};
}
function frame1(){
_root = stage.getChildAt(0);
li = _root.loaderInfo;
this.addEventListener(Event.ENTER_FRAME, loading);
}
}
}//package main_noprotection_fla
Section 61
//logo_3 (main_noprotection_fla.logo_3)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class logo_3 extends MovieClip {
public function logo_3(){
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 main_noprotection_fla
Section 62
//logo_main_158 (main_noprotection_fla.logo_main_158)
package main_noprotection_fla {
import flash.display.*;
public dynamic class logo_main_158 extends MovieClip {
public var btn:SimpleButton;
public function logo_main_158(){
addFrameScript(0, frame1);
}
function frame1(){
Click.onClick(btn, func);
}
public function func(){
URL.getURL(URL.URL_MORE);
}
}
}//package main_noprotection_fla
Section 63
//math_mc_g_12 (main_noprotection_fla.math_mc_g_12)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class math_mc_g_12 extends MovieClip {
public var q_mc:MovieClip;
public var time_mc:MovieClip;
public var level:Number;
public var timeStart:Number;
public var answer_mc:MovieClip;
public var bg_mc:MovieClip;
public var item0Used;
public var answered:Boolean;
public var step_mc:MovieClip;
public var result_mc:MovieClip;
public function math_mc_g_12(){
addFrameScript(0, frame1);
}
public function showQuestion(){
if (this.root == null){
return;
};
if (level == 1){
showQ1();
} else {
if (level == 2){
showQ2();
} else {
if (level == 3){
showQ3();
};
};
};
}
public function useItem0(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
item0Used = true;
_local1 = answer_mc.answerArray.slice();
_local2 = _local1.indexOf(answer_mc.answer_mc);
_local1.splice(_local2, 1);
_local3 = ArrayFunc.getRandom(_local1);
_local2 = _local1.indexOf(_local3);
_local1.splice(_local2, 1);
for (_local4 in _local1) {
_local1[_local4].visible = false;
};
}
public function removedFunc(_arg1){
time_mc.gotoAndStop(1);
}
public function timeOver(){
endQuestion("fail");
}
public function start(){
if (((Main.self.timed) || ((Main.self.gameMode == "player")))){
timeCount();
};
timeStart = getTimer();
}
function frame1(){
level = 1;
answered = false;
this.addEventListener(Event.REMOVED_FROM_STAGE, removedFunc);
item0Used = false;
}
public function timeCount_end(){
time_mc.stop();
}
public function hide(){
if (Main.self.timed){
time_mc.gotoAndStop(1);
};
MovieClip(parent).hide();
}
public function useItem4(){
}
public function showResult(_arg1){
if (_arg1 == "pass"){
result_mc.gotoAndPlay("right");
} else {
if (_arg1 == "fail"){
result_mc.gotoAndPlay("wrong");
};
};
setTimeout(hide, 300);
}
public function setLevel(_arg1:Number){
level = _arg1;
}
public function showQ1(){
var _local1:*;
_local1 = q_mc.getQ_1();
answer_mc.setAnswer(_local1);
}
public function showQ2(){
var _local1:*;
_local1 = q_mc.getQ_2();
answer_mc.setAnswer(_local1);
}
public function timeCount(){
time_mc.num = 9;
time_mc.gotoAndPlay("count");
}
public function showQ3(){
var _local1:*;
_local1 = q_mc.getQ_3();
answer_mc.setAnswer(_local1);
}
public function endQuestion(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
if (this.root == null){
return;
};
trace("endQuestion:");
trace(("answered:" + answered));
if (answered){
return;
};
answered = true;
time_mc.gotoAndStop(1);
if ((((Main.self.game_mc.role.posNow == 0)) && ((_arg1 == "fail")))){
} else {
step_mc.visible = true;
step_mc.gotoAndStop(q_mc.questionLevel);
};
setTimeout(hide, 1000);
if (_arg1 == "pass"){
_local2 = int(((getTimer() - timeStart) / 1000));
if (q_mc.questionLevel == 1){
_local3 = 1;
} else {
if (q_mc.questionLevel == 2){
_local3 = 2;
} else {
if (q_mc.questionLevel == 3){
_local3 = 3;
};
};
};
_local4 = ((10 - _local2) * _local3);
_local4 = ((_local4)>0) ? _local4 : 0;
setTimeout(Main.self.game_mc.onCorrect, 1000, q_mc.questionLevel, _local4);
result_mc.gotoAndPlay("right");
} else {
if (_arg1 == "fail"){
setTimeout(Main.self.game_mc.onWrong, 1000, q_mc.questionLevel);
result_mc.gotoAndPlay("wrong");
};
};
}
public function show(){
step_mc.visible = false;
answered = false;
item0Used = false;
showQuestion();
}
}
}//package main_noprotection_fla
Section 64
//music_btn_43 (main_noprotection_fla.music_btn_43)
package main_noprotection_fla {
import flash.display.*;
public dynamic class music_btn_43 extends MovieClip {
public var btn:SimpleButton;
public function music_btn_43(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 65
//N1_147 (main_noprotection_fla.N1_147)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N1_147 extends MovieClip {
public function N1_147(){
addFrameScript(11, frame12, 23, frame24);
}
function frame12(){
MovieClip(parent).gotoAndStop("fall2");
}
function frame24(){
}
}
}//package main_noprotection_fla
Section 66
//N1_149 (main_noprotection_fla.N1_149)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N1_149 extends MovieClip {
public function N1_149(){
addFrameScript(5, frame6);
}
function frame6(){
MovieClip(parent).gotoAndStop("stand");
}
}
}//package main_noprotection_fla
Section 67
//N2_132 (main_noprotection_fla.N2_132)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N2_132 extends MovieClip {
public function N2_132(){
addFrameScript(5, frame6);
}
function frame6(){
MovieClip(parent).gotoAndStop("fall2");
}
}
}//package main_noprotection_fla
Section 68
//N2_133 (main_noprotection_fla.N2_133)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class N2_133 extends MovieClip {
public function N2_133(){
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent).inStop){
MovieClip(parent).gotoAndStop("fall3");
};
}
}
}//package main_noprotection_fla
Section 69
//N2_134 (main_noprotection_fla.N2_134)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N2_134 extends MovieClip {
public function N2_134(){
addFrameScript(3, frame4);
}
function frame4(){
MovieClip(parent).gotoAndStop("stand");
}
}
}//package main_noprotection_fla
Section 70
//N3_122 (main_noprotection_fla.N3_122)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N3_122 extends MovieClip {
public function N3_122(){
addFrameScript(5, frame6);
}
function frame6(){
MovieClip(parent).gotoAndStop("fall2");
}
}
}//package main_noprotection_fla
Section 71
//N3_124 (main_noprotection_fla.N3_124)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N3_124 extends MovieClip {
public function N3_124(){
addFrameScript(3, frame4);
}
function frame4(){
MovieClip(parent).gotoAndStop("stand");
}
}
}//package main_noprotection_fla
Section 72
//N4_137 (main_noprotection_fla.N4_137)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N4_137 extends MovieClip {
public function N4_137(){
addFrameScript(2, frame3);
}
function frame3(){
MovieClip(parent).gotoAndStop("fall2");
}
}
}//package main_noprotection_fla
Section 73
//N4_138 (main_noprotection_fla.N4_138)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class N4_138 extends MovieClip {
public function N4_138(){
addFrameScript(23, frame24);
}
function frame24(){
if (MovieClip(parent).inStop){
MovieClip(parent).gotoAndStop("fall3");
};
}
}
}//package main_noprotection_fla
Section 74
//N4_139 (main_noprotection_fla.N4_139)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N4_139 extends MovieClip {
public function N4_139(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).gotoAndStop("stand");
}
}
}//package main_noprotection_fla
Section 75
//N5_127 (main_noprotection_fla.N5_127)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N5_127 extends MovieClip {
public function N5_127(){
addFrameScript(5, frame6);
}
function frame6(){
MovieClip(parent).gotoAndStop("fall2");
}
}
}//package main_noprotection_fla
Section 76
//N5_129 (main_noprotection_fla.N5_129)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N5_129 extends MovieClip {
public function N5_129(){
addFrameScript(2, frame3);
}
function frame3(){
MovieClip(parent).gotoAndStop("stand");
}
}
}//package main_noprotection_fla
Section 77
//N6_142 (main_noprotection_fla.N6_142)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N6_142 extends MovieClip {
public function N6_142(){
addFrameScript(5, frame6);
}
function frame6(){
MovieClip(parent).gotoAndStop("fall2");
}
}
}//package main_noprotection_fla
Section 78
//N6_144 (main_noprotection_fla.N6_144)
package main_noprotection_fla {
import flash.display.*;
public dynamic class N6_144 extends MovieClip {
public function N6_144(){
addFrameScript(3, frame4);
}
function frame4(){
MovieClip(parent).gotoAndStop("stand");
}
}
}//package main_noprotection_fla
Section 79
//pop_mc_18 (main_noprotection_fla.pop_mc_18)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class pop_mc_18 extends MovieClip {
public var opratorArray;
public var questionLevel:Number;
public var q_txt:TextField;
public function pop_mc_18(){
addFrameScript(0, frame1);
}
public function getNumbers(_arg1){
if (_arg1 < 10){
return (1);
};
if (_arg1 < 100){
return (2);
};
if (_arg1 < 1000){
return (3);
};
}
public function getNum(_arg1, _arg2:Number=100){
var _local3:*;
_local3 = int((Math.random() * Math.pow(10, _arg1)));
if (_local3 == 0){
_local3 = int(((Math.random() * 9) + 1));
};
if ((((_arg1 == 2)) && ((_local3 < 10)))){
_local3 = (_local3 + (int(((Math.random() * 9) + 1)) * 10));
};
if (_local3 > _arg2){
return (getNum(_arg1, _arg2));
};
trace(("getNum::::" + _local3));
return (_local3);
}
public function getDiv(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
if ((((_arg1 == 1)) && ((_arg2 == 1)))){
_local3 = getNum(1);
_local4 = getNum(1);
_local5 = (_local3 * _local4);
if (_local5 > 9){
return (getDiv(1, 1));
};
return ({num1:_local5, num2:_local4});
} else {
if ((((_arg1 == 2)) && ((_arg2 == 1)))){
_local3 = getNum(2);
_local4 = getNum(1);
_local5 = (_local3 * _local4);
if (_local5 > 99){
return (getDiv(2, 1));
};
return ({num1:_local5, num2:_local4});
} else {
if ((((_arg1 == 1)) && ((_arg2 == 2)))){
_local3 = getNum(1);
_local4 = getNum(2);
_local5 = (_local3 * _local4);
if (_local5 > 99){
return (getDiv(1, 2));
};
if (_local5 == _local4){
return (getDiv(1, 2));
};
return ({num1:_local5, num2:_local4});
};
};
};
}
public function getOprator(){
var _local1:*;
var _local2:*;
_local1 = int((Math.random() * opratorArray.length));
_local2 = opratorArray[_local1];
trace(("getOprator::::" + _local2));
return (_local2);
}
function frame1(){
opratorArray = new Array("+", "-", "x", "/");
}
public function getQ_1(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
trace("getQ_1::");
_local1 = getNum(1);
_local2 = getNum(1);
_local3 = getOprator();
questionLevel = 1;
if (_local3 == "/"){
_local4 = getDiv(1, 1);
_local1 = _local4.num1;
_local2 = _local4.num2;
} else {
if (_local3 == "-"){
if (_local1 < _local2){
_local5 = _local1;
_local1 = _local2;
_local2 = _local5;
};
};
};
q_txt.text = (((((_local1 + " ") + _local3) + " ") + _local2) + " =?");
return (getAnswer(_local1, _local3, _local2));
}
public function getQ_3(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
trace("getQ_3::");
_local3 = getOprator();
questionLevel = 3;
if (_local3 == "x"){
_local1 = getNum(2, 12);
_local2 = getNum(1);
questionLevel = 2;
if (_local2 == 1){
questionLevel = 1;
} else {
if (_local1 == 10){
questionLevel = 2;
} else {
if (getNumbers(getAnswer(_local1, _local3, _local2)) > 2){
questionLevel = 3;
};
};
};
} else {
if (_local3 == "/"){
_local4 = getDiv(1, 2);
_local1 = _local4.num1;
_local2 = _local4.num2;
if (_local2 == 1){
questionLevel = 1;
} else {
if (_local1 < 10){
questionLevel = 1;
} else {
if (_local1 < 20){
questionLevel = 2;
} else {
questionLevel = 2;
};
};
};
} else {
if (_local3 == "-"){
_local1 = getNum(2);
_local2 = getNum(2);
if (_local1 < _local2){
_local5 = _local1;
_local1 = _local2;
_local2 = _local5;
};
if (_local2 == 10){
questionLevel = 2;
} else {
if ((_local2 % 10) == 0){
questionLevel = 2;
} else {
if (getNumbers(getAnswer(_local1, _local3, _local2)) == 1){
questionLevel = 2;
};
};
};
} else {
_local1 = getNum(2);
_local2 = getNum(2);
if (((((_local2 % 10) == 0)) || (((_local2 % 10) == 0)))){
questionLevel = 2;
};
if (getNumbers(getAnswer(_local1, _local3, _local2)) == 2){
questionLevel = 2;
};
};
};
};
q_txt.text = (((((_local1 + " ") + _local3) + " ") + _local2) + " =?");
return (getAnswer(_local1, _local3, _local2));
}
public function getQ_2(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
trace("getQ_2::");
_local3 = getOprator();
questionLevel = 2;
if (_local3 == "x"){
_local1 = getNum(1);
_local2 = getNum(2, 12);
if (_local1 == 1){
questionLevel = 1;
} else {
if (getNumbers(getAnswer(_local1, _local3, _local2)) > 2){
questionLevel = 3;
};
};
} else {
if (_local3 == "/"){
_local4 = getDiv(2, 1);
_local1 = _local4.num1;
_local2 = _local4.num2;
if (_local2 == 1){
questionLevel = 1;
} else {
if (_local1 < 10){
questionLevel = 1;
};
};
} else {
if (_local3 == "-"){
_local1 = getNum(2);
_local2 = getNum(1);
if (_local1 < _local2){
_local5 = _local1;
_local1 = _local2;
_local2 = _local5;
};
if (_local2 < 6){
questionLevel = 1;
};
} else {
if (Math.random() < 0.5){
_local1 = getNum(2);
_local2 = getNum(1);
} else {
_local1 = getNum(1);
_local2 = getNum(2);
};
};
};
};
q_txt.text = (((((_local1 + " ") + _local3) + " ") + _local2) + " =?");
return (getAnswer(_local1, _local3, _local2));
}
public function getAnswer(_arg1, _arg2, _arg3){
if (_arg2 == "+"){
return ((_arg1 + _arg3));
};
if (_arg2 == "-"){
return ((_arg1 - _arg3));
};
if (_arg2 == "x"){
return ((_arg1 * _arg3));
};
if (_arg2 == "/"){
return ((_arg1 / _arg3));
};
}
}
}//package main_noprotection_fla
Section 80
//q_btn1_47 (main_noprotection_fla.q_btn1_47)
package main_noprotection_fla {
import flash.display.*;
public dynamic class q_btn1_47 extends MovieClip {
public var btn:SimpleButton;
public function q_btn1_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 81
//q_btn2_48 (main_noprotection_fla.q_btn2_48)
package main_noprotection_fla {
import flash.display.*;
public dynamic class q_btn2_48 extends MovieClip {
public var btn:SimpleButton;
public function q_btn2_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 82
//q_btn3_49 (main_noprotection_fla.q_btn3_49)
package main_noprotection_fla {
import flash.display.*;
public dynamic class q_btn3_49 extends MovieClip {
public var btn:SimpleButton;
public function q_btn3_49(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 83
//q_btn4_50 (main_noprotection_fla.q_btn4_50)
package main_noprotection_fla {
import flash.display.*;
public dynamic class q_btn4_50 extends MovieClip {
public var btn:SimpleButton;
public function q_btn4_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 84
//q_mc_45 (main_noprotection_fla.q_mc_45)
package main_noprotection_fla {
import flash.display.*;
public dynamic class q_mc_45 extends MovieClip {
public var btn:SimpleButton;
public function q_mc_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 85
//q_mc2_46 (main_noprotection_fla.q_mc2_46)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class q_mc2_46 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var mc4:MovieClip;
public var objArray;
public function q_mc2_46(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
objArray = new Array(mc1, mc2, mc3, mc4);
Click.onClick(mc1.btn, setFunc1);
Click.onClick(mc2.btn, setFunc2);
Click.onClick(mc3.btn, setFunc3);
Click.onClick(mc4.btn, setFunc4);
if (stage.quality == "LOW"){
mc1.gotoAndStop(2);
} else {
if (stage.quality == "MEDIUM"){
mc2.gotoAndStop(2);
} else {
if (stage.quality == "HIGH"){
mc3.gotoAndStop(2);
} else {
if (stage.quality == "BEST"){
mc4.gotoAndStop(2);
};
};
};
};
}
public function setFunc2(){
stage.quality = StageQuality.MEDIUM;
game_setQuality(mc2);
}
public function setFunc3(){
stage.quality = StageQuality.HIGH;
game_setQuality(mc3);
}
public function game_setQuality(_arg1){
var _local2:*;
for (_local2 in objArray) {
objArray[_local2].gotoAndStop(1);
};
_arg1.gotoAndStop(2);
Main.self.game_pause_end();
MovieClip(parent).gotoAndStop(1);
}
public function setFunc4(){
stage.quality = StageQuality.BEST;
game_setQuality(mc4);
}
public function setFunc1(){
stage.quality = StageQuality.LOW;
game_setQuality(mc1);
}
}
}//package main_noprotection_fla
Section 86
//question_t_15 (main_noprotection_fla.question_t_15)
package main_noprotection_fla {
import flash.display.*;
public dynamic class question_t_15 extends MovieClip {
public function question_t_15(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 87
//R1_178 (main_noprotection_fla.R1_178)
package main_noprotection_fla {
import flash.display.*;
public dynamic class R1_178 extends MovieClip {
public var select_mc:MovieClip;
public function R1_178(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
buttonMode = true;
}
}
}//package main_noprotection_fla
Section 88
//R2_180 (main_noprotection_fla.R2_180)
package main_noprotection_fla {
import flash.display.*;
public dynamic class R2_180 extends MovieClip {
public var select_mc:MovieClip;
public function R2_180(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
buttonMode = true;
}
}
}//package main_noprotection_fla
Section 89
//R3_182 (main_noprotection_fla.R3_182)
package main_noprotection_fla {
import flash.display.*;
public dynamic class R3_182 extends MovieClip {
public var select_mc:MovieClip;
public function R3_182(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
buttonMode = true;
}
}
}//package main_noprotection_fla
Section 90
//R4_181 (main_noprotection_fla.R4_181)
package main_noprotection_fla {
import flash.display.*;
public dynamic class R4_181 extends MovieClip {
public var select_mc:MovieClip;
public function R4_181(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
buttonMode = true;
}
}
}//package main_noprotection_fla
Section 91
//R5_179 (main_noprotection_fla.R5_179)
package main_noprotection_fla {
import flash.display.*;
public dynamic class R5_179 extends MovieClip {
public var select_mc:MovieClip;
public function R5_179(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
buttonMode = true;
}
}
}//package main_noprotection_fla
Section 92
//R6_176 (main_noprotection_fla.R6_176)
package main_noprotection_fla {
import flash.display.*;
public dynamic class R6_176 extends MovieClip {
public var select_mc:MovieClip;
public function R6_176(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
buttonMode = true;
}
}
}//package main_noprotection_fla
Section 93
//result_mc_14 (main_noprotection_fla.result_mc_14)
package main_noprotection_fla {
import flash.display.*;
import flash.text.*;
public dynamic class result_mc_14 extends MovieClip {
public var step_txt:TextField;
public function result_mc_14(){
addFrameScript(0, frame1, 1, frame2, 17, frame18, 18, frame19, 35, frame36);
}
function frame18(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame19(){
SoundC.playS("right_snd");
}
function frame2(){
SoundC.playS("wrong_snd");
}
function frame36(){
gotoAndStop(1);
}
}
}//package main_noprotection_fla
Section 94
//select_mc_177 (main_noprotection_fla.select_mc_177)
package main_noprotection_fla {
import flash.display.*;
public dynamic class select_mc_177 extends MovieClip {
public function select_mc_177(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
visible = true;
}
function frame1(){
stop();
visible = false;
}
function frame4(){
visible = true;
}
function frame2(){
visible = true;
}
}
}//package main_noprotection_fla
Section 95
//showText_g_23 (main_noprotection_fla.showText_g_23)
package main_noprotection_fla {
import flash.display.*;
import flash.text.*;
public dynamic class showText_g_23 extends MovieClip {
public var text_txt:TextField;
public function showText_g_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 96
//slow_stop_t_36 (main_noprotection_fla.slow_stop_t_36)
package main_noprotection_fla {
import flash.display.*;
public dynamic class slow_stop_t_36 extends MovieClip {
public function slow_stop_t_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 97
//sound_btn_44 (main_noprotection_fla.sound_btn_44)
package main_noprotection_fla {
import flash.display.*;
public dynamic class sound_btn_44 extends MovieClip {
public var btn:SimpleButton;
public function sound_btn_44(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 98
//turn_t_61 (main_noprotection_fla.turn_t_61)
package main_noprotection_fla {
import flash.display.*;
public dynamic class turn_t_61 extends MovieClip {
public function turn_t_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 99
//UI_chance_mc_33 (main_noprotection_fla.UI_chance_mc_33)
package main_noprotection_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_chance_mc_33 extends MovieClip {
public var num_txt:TextField;
}
}//package main_noprotection_fla
Section 100
//UI_credits_174 (main_noprotection_fla.UI_credits_174)
package main_noprotection_fla {
import flash.display.*;
public dynamic class UI_credits_174 extends MovieClip {
public var back_btn:SimpleButton;
public function UI_credits_174(){
addFrameScript(0, frame1);
}
public function backFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("main");
};
trans = new Trans(Main.self, funcIn);
}
function frame1(){
Click.onClick(back_btn, backFunc);
}
}
}//package main_noprotection_fla
Section 101
//UI_gameOver_196 (main_noprotection_fla.UI_gameOver_196)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_gameOver_196 extends MovieClip {
public var mainClicked;
public var t3_txt:TextField;
public var iq1_txt:TextField;
public var againClicked;
public var submit_btn:SimpleButton;
public var main_btn:SimpleButton;
public var levels_left;
public var role1_mc:MovieClip;
public var t2_txt:TextField;
public var t4_txt:TextField;
public var again_btn:SimpleButton;
public function UI_gameOver_196(){
addFrameScript(0, frame1);
}
public function submitFunc(){
var _local1:*;
_local1 = new submitScore_mc();
addChild(_local1);
_local1.x = Main.self.centerX;
_local1.y = Main.self.centerY;
}
public function mainFunc(){
if (mainClicked){
return;
};
mainClicked = true;
Main.self.game_mainMenu();
}
public function againFunc(){
if (againClicked){
return;
};
againClicked = true;
Main.self.game_continue();
}
function frame1(){
role1_mc.gotoAndStop(Main.self.char_p1);
iq1_txt.text = String(Main.self.IQ1);
levels_left = String(((10 - Main.self.stageID) + 1));
t2_txt.text = levels_left;
t3_txt.text = String((levels_left * 5));
Main.self.finalIQ = (Main.self.IQ1 - (levels_left * 5));
t4_txt.text = String(Main.self.finalIQ);
Click.onClick(again_btn, againFunc);
Click.onClick(main_btn, mainFunc);
Click.onClick(submit_btn, submitFunc);
againClicked = false;
mainClicked = false;
}
}
}//package main_noprotection_fla
Section 102
//UI_intro_160 (main_noprotection_fla.UI_intro_160)
package main_noprotection_fla {
import flash.display.*;
public dynamic class UI_intro_160 extends MovieClip {
public var back_btn:SimpleButton;
public var funcIn;
public var next_btn:SimpleButton;
public var menu_btn:SimpleButton;
public var mc:MovieClip;
public var trans;
public var skip_btn:SimpleButton;
public function UI_intro_160(){
addFrameScript(0, frame1, 4, frame5);
}
public function skipFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("mode");
};
trans = new Trans(Main.self, funcIn);
}
public function nextFunc(){
var funcIn:*;
var trans:*;
if (currentFrame == totalFrames){
funcIn = function (){
Main.self.gotoAndStop("mode");
};
trans = new Trans(Main.self, funcIn);
} else {
nextFrame();
};
}
public function backFunc(){
var funcIn:*;
var trans:*;
if (currentFrame == 1){
funcIn = function (){
Main.self.gotoAndStop("main");
};
trans = new Trans(Main.self, funcIn);
} else {
prevFrame();
};
}
function frame1(){
stop();
Click.onClick(skip_btn, skipFunc);
Click.onClick(back_btn, backFunc);
Click.onClick(next_btn, nextFunc);
Click.onClick(menu_btn, menuFunc);
}
function frame5(){
funcIn = function (){
Main.self.gotoAndStop("mode");
};
trans = new Trans(Main.self, funcIn);
}
public function menuFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("main");
};
trans = new Trans(Main.self, funcIn);
}
}
}//package main_noprotection_fla
Section 103
//UI_main_150 (main_noprotection_fla.UI_main_150)
package main_noprotection_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_main_150 extends MovieClip {
public var credits_btn:SimpleButton;
public var stage_txt:TextField;
public var play_btn:SimpleButton;
public var setting_btn:SimpleButton;
public function UI_main_150(){
addFrameScript(0, frame1);
}
public function playFunc(){
var funcIn:*;
var trans:*;
Main.self.stageID = int(stage_txt.text);
funcIn = function (){
if (Main.self.gamePassed){
Main.self.gotoAndStop("mode");
} else {
Main.self.gotoAndStop("intro");
};
};
trans = new Trans(Main.self, funcIn);
}
public function settingFunc(){
var funcIn:*;
var funcOut:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("setting");
};
funcOut = function (){
};
trans = new Trans(Main.self, funcIn);
}
function frame1(){
Click.onClick(play_btn, playFunc);
Click.onClick(setting_btn, settingFunc);
Click.onClick(credits_btn, creditsFunc);
}
public function creditsFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("credits");
};
trans = new Trans(Main.self, funcIn);
}
}
}//package main_noprotection_fla
Section 104
//UI_menu_g_52 (main_noprotection_fla.UI_menu_g_52)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_menu_g_52 extends MovieClip {
public var return_btn:SimpleButton;
public var main_btn:SimpleButton;
public function UI_menu_g_52(){
addFrameScript(0, frame1);
}
public function returnFunc(){
MovieClip(parent).type = "return";
Main.self.game_pause_end();
MovieClip(parent).play();
}
public function mainFunc(){
MovieClip(parent).type = "main";
Main.self.game_pause_end();
MovieClip(parent).play();
}
function frame1(){
Click.onClick(return_btn, returnFunc);
Click.onClick(main_btn, mainFunc);
}
}
}//package main_noprotection_fla
Section 105
//UI_mode_163 (main_noprotection_fla.UI_mode_163)
package main_noprotection_fla {
import flash.display.*;
public dynamic class UI_mode_163 extends MovieClip {
public var back_btn:SimpleButton;
public var vsHuman_btn:SimpleButton;
public var menu_btn:SimpleButton;
public var vsCpu_btn:SimpleButton;
public var time_btn:MovieClip;
public function UI_mode_163(){
addFrameScript(0, frame1);
}
public function skipFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("select");
};
trans = new Trans(Main.self, funcIn);
}
public function vsCpuFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gameMode = "cpu";
Main.self.gotoAndStop("select");
};
trans = new Trans(Main.self, funcIn);
}
public function timeFunc(){
if (time_btn.currentFrame == 1){
time_btn.gotoAndStop(2);
Main.self.timed = true;
} else {
time_btn.gotoAndStop(1);
Main.self.timed = false;
};
}
public function nextFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("select");
};
trans = new Trans(Main.self, funcIn);
}
public function vsHumanFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gameMode = "player";
Main.self.gotoAndStop("select");
};
trans = new Trans(Main.self, funcIn);
}
public function backFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("intro");
};
trans = new Trans(Main.self, funcIn);
}
function frame1(){
Click.onClick(back_btn, backFunc);
Click.onClick(menu_btn, menuFunc);
Click.onClick(vsCpu_btn, vsCpuFunc);
Click.onClick(vsHuman_btn, vsHumanFunc);
Click.onClick(time_btn, timeFunc);
timeFunc();
}
public function menuFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("main");
};
trans = new Trans(Main.self, funcIn);
}
}
}//package main_noprotection_fla
Section 106
//UI_pass_183 (main_noprotection_fla.UI_pass_183)
package main_noprotection_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_pass_183 extends MovieClip {
public var next_btn:SimpleButton;
public var iq1_txt:TextField;
public var main_btn:SimpleButton;
public var role1_mc:MovieClip;
public function UI_pass_183(){
addFrameScript(0, frame1);
}
public function mainFunc(){
Main.self.game_mainMenu();
}
public function nextFunc(){
Main.self.game_nextLevel();
}
function frame1(){
Click.onClick(next_btn, nextFunc);
Click.onClick(main_btn, mainFunc);
role1_mc.gotoAndStop(Main.self.char_p1);
iq1_txt.text = String(Main.self.IQ1);
}
}
}//package main_noprotection_fla
Section 107
//UI_pass_player_194 (main_noprotection_fla.UI_pass_player_194)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_pass_player_194 extends MovieClip {
public var next_btn:SimpleButton;
public var iq1_txt:TextField;
public var main_btn:SimpleButton;
public var win_mc:MovieClip;
public var role1_mc:MovieClip;
public function UI_pass_player_194(){
addFrameScript(0, frame1);
}
public function mainFunc(){
Main.self.game_mainMenu();
}
public function nextFunc(){
Main.self.game_nextLevel();
}
function frame1(){
Click.onClick(next_btn, nextFunc);
Click.onClick(main_btn, mainFunc);
if (Main.self.game_mc.role1.inWin){
win_mc.gotoAndStop(1);
role1_mc.gotoAndStop(Main.self.char_p1);
iq1_txt.text = String(Main.self.IQ1);
} else {
win_mc.gotoAndStop(2);
role1_mc.gotoAndStop(Main.self.char_p2);
iq1_txt.text = String(Main.self.IQ2);
};
}
}
}//package main_noprotection_fla
Section 108
//UI_select_175 (main_noprotection_fla.UI_select_175)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_select_175 extends MovieClip {
public var back_btn:SimpleButton;
public var selectOK;
public var man_btn:MovieClip;
public var woman_btn:MovieClip;
public var old_btn:MovieClip;
public var girl_btn:MovieClip;
public var char_p2;
public var boy_btn:MovieClip;
public var char_p1;
public var menu_btn:SimpleButton;
public var young_btn:MovieClip;
public function UI_select_175(){
addFrameScript(0, frame1);
}
public function select(_arg1){
if (this[(_arg1 + "_btn")].selected){
return;
};
this[(_arg1 + "_btn")].gotoAndStop(3);
this[(_arg1 + "_btn")].selected = true;
if (Main.self.gameMode == "cpu"){
if (char_p1 != ""){
return;
};
char_p1 = _arg1;
Main.self.char_p1 = _arg1;
this[(_arg1 + "_btn")].select_mc.gotoAndStop("1p");
setTimeout(select_cpu, 300);
setTimeout(selectEnd, 1000);
selectOK = true;
} else {
if (char_p1 == ""){
char_p1 = _arg1;
Main.self.char_p1 = _arg1;
this[(_arg1 + "_btn")].select_mc.gotoAndStop("1p");
} else {
if (char_p2 == ""){
char_p2 = _arg1;
Main.self.char_p2 = _arg1;
this[(_arg1 + "_btn")].select_mc.gotoAndStop("2p");
setTimeout(selectEnd, 1000);
selectOK = true;
};
};
};
trace(((("char_p1::" + Main.self.char_p1) + " char_p2::") + Main.self.char_p2));
}
public function skipFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("game");
};
trans = new Trans(Main.self, funcIn);
}
public function outFunc(_arg1){
if (selectOK){
return;
};
if (this[(_arg1 + "_btn")].selected){
return;
};
this[(_arg1 + "_btn")].gotoAndStop(1);
}
public function selectEnd(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("game");
};
trans = new Trans(Main.self, funcIn);
}
public function nextFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("game");
};
trans = new Trans(Main.self, funcIn);
}
function frame1(){
char_p1 = "";
char_p2 = "";
selectOK = false;
Click.onClick(back_btn, backFunc);
Click.onClick(menu_btn, menuFunc);
Click.onClick(man_btn, select, "man");
Click.onRollOver(man_btn, overFunc, "man");
Click.onRollOut(man_btn, outFunc, "man");
Click.onClick(woman_btn, select, "woman");
Click.onRollOver(woman_btn, overFunc, "woman");
Click.onRollOut(woman_btn, outFunc, "woman");
Click.onClick(young_btn, select, "young");
Click.onRollOver(young_btn, overFunc, "young");
Click.onRollOut(young_btn, outFunc, "young");
Click.onClick(boy_btn, select, "boy");
Click.onRollOver(boy_btn, overFunc, "boy");
Click.onRollOut(boy_btn, outFunc, "boy");
Click.onClick(girl_btn, select, "girl");
Click.onRollOver(girl_btn, overFunc, "girl");
Click.onRollOut(girl_btn, outFunc, "girl");
Click.onClick(old_btn, select, "old");
Click.onRollOver(old_btn, overFunc, "old");
Click.onRollOut(old_btn, outFunc, "old");
}
public function backFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("mode");
};
trans = new Trans(Main.self, funcIn);
}
public function menuFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("main");
};
trans = new Trans(Main.self, funcIn);
}
public function overFunc(_arg1){
if (selectOK){
return;
};
if (this[(_arg1 + "_btn")].selected){
return;
};
this[(_arg1 + "_btn")].gotoAndStop(2);
}
public function select_cpu(){
Main.self.getCpuArray(Main.self.char_p1);
Main.self.char_p2 = Main.self.getCpu();
this[(Main.self.char_p2 + "_btn")].select_mc.gotoAndStop("cpu");
}
}
}//package main_noprotection_fla
Section 109
//UI_setting_173 (main_noprotection_fla.UI_setting_173)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_setting_173 extends MovieClip {
public var back_btn:SimpleButton;
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var mc4:MovieClip;
public var objArray;
public function UI_setting_173(){
addFrameScript(0, frame1);
}
public function game_getQuality(){
if (stage.quality == "LOW"){
game_setQuality(mc1);
} else {
if (stage.quality == "MEDIUM"){
game_setQuality(mc2);
} else {
if (stage.quality == "HIGH"){
game_setQuality(mc3);
} else {
if (stage.quality == "BEST"){
game_setQuality(mc4);
};
};
};
};
}
function frame1(){
stop();
objArray = new Array(mc1, mc2, mc3, mc4);
game_getQuality();
Click.onClick(mc1.btn, setFunc1);
Click.onClick(mc2.btn, setFunc2);
Click.onClick(mc3.btn, setFunc3);
Click.onClick(mc4.btn, setFunc4);
Click.onClick(back_btn, backFunc);
}
public function backFunc(){
var funcIn:*;
var trans:*;
funcIn = function (){
Main.self.gotoAndStop("main");
};
trans = new Trans(Main.self, funcIn);
}
public function setFunc2(){
stage.quality = StageQuality.MEDIUM;
game_setQuality(mc2);
}
public function setFunc3(){
stage.quality = StageQuality.HIGH;
game_setQuality(mc3);
}
public function game_setQuality(_arg1){
var _local2:*;
for (_local2 in objArray) {
objArray[_local2].gotoAndStop(1);
};
_arg1.gotoAndStop(2);
}
public function setFunc4(){
stage.quality = StageQuality.BEST;
game_setQuality(mc4);
}
public function setFunc1(){
stage.quality = StageQuality.LOW;
game_setQuality(mc1);
}
}
}//package main_noprotection_fla
Section 110
//UI_status_32 (main_noprotection_fla.UI_status_32)
package main_noprotection_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_status_32 extends MovieClip {
public var iq_txt:TextField;
public function UI_status_32(){
addFrameScript(0, frame1);
}
public function setScore(_arg1){
iq_txt.text = _arg1;
}
function frame1(){
}
public function setDis(_arg1){
}
}
}//package main_noprotection_fla
Section 111
//UI_win_200 (main_noprotection_fla.UI_win_200)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_win_200 extends MovieClip {
public var iq1_txt:TextField;
public var submit_btn:SimpleButton;
public var main_btn:SimpleButton;
public function UI_win_200(){
addFrameScript(0, frame1);
}
public function submitFunc(){
var _local1:*;
_local1 = new submitScore_mc();
addChild(_local1);
_local1.x = Main.self.centerX;
_local1.y = Main.self.centerY;
}
public function mainFunc(){
Main.self.game_mainMenu();
}
public function nextFunc(){
Main.self.game_nextLevel();
}
function frame1(){
Click.onClick(main_btn, mainFunc);
Click.onClick(submit_btn, submitFunc);
Main.self.finalIQ = Main.self.IQ1;
iq1_txt.text = String(Main.self.IQ1);
}
}
}//package main_noprotection_fla
Section 112
//UI_win_player2_204 (main_noprotection_fla.UI_win_player2_204)
package main_noprotection_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_win_player2_204 extends MovieClip {
public var iq1_txt:TextField;
public var submit_btn:SimpleButton;
public var main_btn:SimpleButton;
public var win_mc:MovieClip;
public function UI_win_player2_204(){
addFrameScript(0, frame1);
}
public function submitFunc(){
var _local1:*;
_local1 = new submitScore_player();
addChild(_local1);
_local1.x = Main.self.centerX;
_local1.y = Main.self.centerY;
}
public function mainFunc(){
Main.self.game_mainMenu();
}
public function nextFunc(){
Main.self.game_nextLevel();
}
function frame1(){
Click.onClick(main_btn, mainFunc);
Click.onClick(submit_btn, submitFunc);
if (Main.self.game_mc.role1.inWin){
win_mc.gotoAndStop(1);
iq1_txt.text = String(Main.self.IQ1);
} else {
win_mc.gotoAndStop(2);
iq1_txt.text = String(Main.self.IQ2);
};
}
}
}//package main_noprotection_fla
Section 113
//versionWarning_6 (main_noprotection_fla.versionWarning_6)
package main_noprotection_fla {
import flash.display.*;
public dynamic class versionWarning_6 extends MovieClip {
public function versionWarning_6(){
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package main_noprotection_fla
Section 114
//win_t_g_63 (main_noprotection_fla.win_t_g_63)
package main_noprotection_fla {
import flash.display.*;
public dynamic class win_t_g_63 extends MovieClip {
public function win_t_g_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 115
//zoom_btn_42 (main_noprotection_fla.zoom_btn_42)
package main_noprotection_fla {
import flash.display.*;
public dynamic class zoom_btn_42 extends MovieClip {
public var btn:SimpleButton;
public function zoom_btn_42(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_noprotection_fla
Section 116
//ArrayFunc (ArrayFunc)
package {
import flash.utils.*;
public class ArrayFunc {
public static function getRandom(_arg1){
var _local2:*;
var _local3:*;
_local2 = _arg1.length;
_local3 = int((Math.random() * _local2));
return (_arg1[_local3]);
}
public static function getNoRepeat(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local3 = _arg1.concat();
_local4 = new Array();
_local5 = 0;
while (_local5 < _arg2) {
_local6 = _local3.length;
_local7 = int((Math.random() * _local6));
_local8 = _local3[_local7];
_local4.push(_local8);
_local3.splice(_local7, 1);
_local5++;
};
return (_local4);
}
}
}//package
Section 117
//bg1 (bg1)
package {
import flash.display.*;
public dynamic class bg1 extends MovieClip {
}
}//package
Section 118
//bg10 (bg10)
package {
import flash.display.*;
public dynamic class bg10 extends MovieClip {
}
}//package
Section 119
//bg2 (bg2)
package {
import flash.display.*;
public dynamic class bg2 extends MovieClip {
}
}//package
Section 120
//bg3 (bg3)
package {
import flash.display.*;
public dynamic class bg3 extends MovieClip {
}
}//package
Section 121
//bg4 (bg4)
package {
import flash.display.*;
public dynamic class bg4 extends MovieClip {
}
}//package
Section 122
//bg5 (bg5)
package {
import flash.display.*;
public dynamic class bg5 extends MovieClip {
}
}//package
Section 123
//bg6 (bg6)
package {
import flash.display.*;
public dynamic class bg6 extends MovieClip {
}
}//package
Section 124
//bg7 (bg7)
package {
import flash.display.*;
public dynamic class bg7 extends MovieClip {
}
}//package
Section 125
//bg8 (bg8)
package {
import flash.display.*;
public dynamic class bg8 extends MovieClip {
}
}//package
Section 126
//bg9 (bg9)
package {
import flash.display.*;
public dynamic class bg9 extends MovieClip {
}
}//package
Section 127
//bgm_snd (bgm_snd)
package {
import flash.media.*;
public dynamic class bgm_snd extends Sound {
}
}//package
Section 128
//Click (Click)
package {
import flash.events.*;
public class Click {
public var onClick:Function;
public var onRollOver:Function;
public var onRollOut:Function;
var mc;
static var debug:Boolean = true;
static var eventList:Array = new Array();
public function Click(_arg1){
var _mc = _arg1;
onRollOver = function (){
};
onRollOut = function (){
};
onClick = function (){
};
super();
mc = _mc;
try {
mc.mouseEnabled = true;
} catch(e) {
};
mc.addEventListener(MouseEvent.ROLL_OVER, rollOver);
mc.addEventListener(MouseEvent.ROLL_OUT, rollOut);
mc.addEventListener(MouseEvent.CLICK, click);
}
function click(_arg1:MouseEvent):void{
}
function rollOver(_arg1:MouseEvent):void{
onRollOver();
}
function rollOut(_arg1:MouseEvent):void{
onRollOut();
}
public static function onMouseUp(_arg1, _arg2, _arg3=null){
var clickHandle:*;
var sourceObj = _arg1;
var _function = _arg2;
var parament = _arg3;
if (sourceObj.willTrigger(MouseEvent.MOUSE_UP)){
if (debug){
trace("按钮监听器已注册");
};
return;
};
clickHandle = function (_arg1:Event){
if (parament == null){
_function.call();
} else {
_function.call(null, parament);
};
};
sourceObj.addEventListener(MouseEvent.MOUSE_UP, clickHandle, false, 0, true);
eventList.push({sourceObj:sourceObj, type:MouseEvent.MOUSE_UP, listener:clickHandle});
}
static function upDateList(){
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < eventList.length) {
_local3 = eventList[_local2];
if (_local3.sourceObj.willTrigger(_local3.type)){
_local1.push(_local3);
};
_local2++;
};
eventList = _local1;
if (debug){
trace(("监听器列表长度: " + eventList.length));
};
return (eventList);
}
public static function onMouseDown(_arg1, _arg2, _arg3=null){
var clickHandle:*;
var sourceObj = _arg1;
var _function = _arg2;
var parament = _arg3;
if (sourceObj.willTrigger(MouseEvent.MOUSE_DOWN)){
if (debug){
trace("按钮监听器已注册");
};
return;
};
clickHandle = function (_arg1:Event){
if (parament == null){
_function.call();
} else {
_function.call(null, parament);
};
};
sourceObj.addEventListener(MouseEvent.MOUSE_DOWN, clickHandle, false, 0, true);
eventList.push({sourceObj:sourceObj, type:MouseEvent.MOUSE_DOWN, listener:clickHandle});
}
public static function onClick(_arg1, _arg2, _arg3=null){
var clickHandle:*;
var sourceObj = _arg1;
var _function = _arg2;
var parament = _arg3;
if (sourceObj.willTrigger(MouseEvent.CLICK)){
if (debug){
trace("按钮监听器已注册");
};
return;
};
clickHandle = function (_arg1:Event){
if (parament == null){
_function.call();
} else {
_function.call(null, parament);
};
};
sourceObj.addEventListener(MouseEvent.CLICK, clickHandle, false, 0, true);
eventList.push({sourceObj:sourceObj, type:MouseEvent.CLICK, listener:clickHandle});
}
static function toString(_arg1):void{
}
public static function onRollOut(_arg1, _arg2, _arg3=null){
var clickHandle:*;
var sourceObj = _arg1;
var _function = _arg2;
var parament = _arg3;
if (sourceObj.willTrigger(MouseEvent.ROLL_OUT)){
if (debug){
trace("按钮监听器已注册");
};
return;
};
clickHandle = function (_arg1:Event){
if (parament == null){
_function.call();
} else {
_function.call(null, parament);
};
};
sourceObj.addEventListener(MouseEvent.ROLL_OUT, clickHandle, false, 0, true);
eventList.push({sourceObj:sourceObj, type:MouseEvent.ROLL_OUT, listener:clickHandle});
}
public static function getList():Array{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = new Array();
if (debug){
trace(("监听器总数:" + eventList.length));
};
_local2 = 0;
while (_local2 < eventList.length) {
_local3 = eventList[_local2];
_local4 = ((((((("No." + _local2) + " sourceObj: ") + _local3.sourceObj) + " type:") + _local3.type) + " listener:") + _local3.listener);
_local1.push(_local4);
if (debug){
trace(("监听器列表:" + _local4));
};
_local2++;
};
return (_local1);
}
public static function onRollOver(_arg1, _arg2, _arg3=null){
var clickHandle:*;
var sourceObj = _arg1;
var _function = _arg2;
var parament = _arg3;
if (sourceObj.willTrigger(MouseEvent.ROLL_OVER)){
if (debug){
trace("按钮监听器已注册");
};
return;
};
clickHandle = function (_arg1:Event){
if (parament == null){
_function.call();
} else {
_function.call(null, parament);
};
};
sourceObj.addEventListener(MouseEvent.ROLL_OVER, clickHandle, false, 0, true);
eventList.push({sourceObj:sourceObj, type:MouseEvent.ROLL_OVER, listener:clickHandle});
}
public static function removeAll():void{
var _local1:*;
var _local2:*;
for (_local1 in eventList) {
_local2 = eventList[_local1];
_local2.sourceObj.removeEventListener(_local2.type, _local2.listener);
};
upDateList();
}
}
}//package
Section 129
//dot (dot)
package {
import flash.display.*;
public dynamic class dot extends MovieClip {
}
}//package
Section 130
//EventSender (EventSender)
package {
import flash.events.*;
public class EventSender extends EventDispatcher {
var debug:Boolean;// = true
var eventList:Array;
public var _dispatcher:EventDispatcher;
public static var self;
public function EventSender(){
debug = true;
eventList = new Array();
super();
if (self != undefined){
trace("EventSender多次实例化");
};
initSender();
self = this;
}
public function remove(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public function getList():Array{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < eventList.length) {
_local3 = eventList[_local2];
_local1.push(((((("No." + _local2) + " type:") + _local3.type) + " listener:") + _local3.listener));
_local2++;
};
if (debug){
trace(("监听器总数:" + _local1.length));
trace(("监听器列表:" + _local1));
};
return (_local1);
}
public function add(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=true):void{
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
eventList.push({type:_arg1, listener:_arg2});
getList();
}
private function initSender():void{
_dispatcher = this;
}
public function dispatch(_arg1:Event):Boolean{
return (_dispatcher.dispatchEvent(_arg1));
}
public function removeAll():void{
var _local1:*;
var _local2:*;
for (_local1 in eventList) {
_local2 = eventList[_local1];
_dispatcher.removeEventListener(_local2.type, _local2.listener);
};
if (debug){
trace(("剩余监听器:" + eventList.length));
};
}
}
}//package
Section 131
//ExtMath (ExtMath)
package {
public class ExtMath {
static var __proto__ = Math;
public static function tanD(_arg1){
return (Math.tan(((_arg1 * 3.141593) / 180)));
}
public static function cosD(_arg1){
return (Math.cos(((_arg1 * 3.141593) / 180)));
}
public static function acosD(_arg1){
return ((Math.acos(_arg1) * 57.29578));
}
public static function sinD(_arg1){
return (Math.sin(((_arg1 * 3.141593) / 180)));
}
public static function asinD(_arg1){
return ((Math.asin(_arg1) * 57.29578));
}
public static function polarToCartesian(_arg1){
var _local2:*;
var _local3:*;
_local2 = (_arg1.r * ExtMath.cosD(_arg1.t));
_local3 = (_arg1.r * ExtMath.sinD(_arg1.t));
return ({x:_local2, y:_local3});
}
public static function degreesToRadians(_arg1){
return ((_arg1 * 0.01745329));
}
public static function atan2D(_arg1, _arg2){
return ((Math.atan2(_arg1, _arg2) * 57.29578));
}
public static function cartesianToFlash(_arg1){
_arg1._y = (_arg1._y * -1);
_arg1._rotation = (_arg1._rotation * -1);
}
public static function distance(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
_local5 = (_arg3 - _arg1);
_local6 = (_arg4 - _arg2);
return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))));
}
public static function fixAngle(_arg1){
_arg1 = (_arg1 % 360);
return ((((_arg1 % 360) < 0)) ? (_arg1 + 360) : _arg1);
}
public static function radiansToDegrees(_arg1){
return ((_arg1 * 57.29578));
}
public static function cartesianToPolar(_arg1){
var _local2:*;
var _local3:*;
_local2 = Math.sqrt(((_arg1.x * _arg1.x) + (_arg1.y * _arg1.y)));
_local3 = ExtMath.atan2D(_arg1.y, _arg1.x);
return ({r:_local2, t:_local3});
}
public static function distance2(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
_local5 = (_arg3 - _arg1);
_local6 = (_arg4 - _arg2);
return (((_local5 * _local5) + (_local6 * _local6)));
}
public static function angleOfLine(_arg1, _arg2, _arg3, _arg4){
return (ExtMath.atan2D((_arg4 - _arg2), (_arg3 - _arg1)));
}
public static function flashToCartesian(_arg1){
return (ExtMath.cartesianToFlash(_arg1));
}
}
}//package
Section 132
//game1 (game1)
package {
import flash.display.*;
public dynamic class game1 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var mountain_mc:MovieClip;
public var dot_role:mountain1;
public var dot_cpu:MovieClip;
}
}//package
Section 133
//game10 (game10)
package {
import flash.display.*;
public dynamic class game10 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 134
//game2 (game2)
package {
import flash.display.*;
public dynamic class game2 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var mountain_mc:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 135
//game3 (game3)
package {
import flash.display.*;
public dynamic class game3 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 136
//game4 (game4)
package {
import flash.display.*;
public dynamic class game4 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 137
//game5 (game5)
package {
import flash.display.*;
public dynamic class game5 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 138
//game6 (game6)
package {
import flash.display.*;
public dynamic class game6 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 139
//game7 (game7)
package {
import flash.display.*;
public dynamic class game7 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 140
//game8 (game8)
package {
import flash.display.*;
public dynamic class game8 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 141
//game9 (game9)
package {
import flash.display.*;
public dynamic class game9 extends MovieClip {
public var b:MovieClip;
public var l:MovieClip;
public var t:MovieClip;
public var r:MovieClip;
public var dot_role:MovieClip;
public var dot_cpu:MovieClip;
}
}//package
Section 142
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
import game.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public dynamic class Main extends MovieClip {
public const centerX:Number = 275;
public const centerY:Number = 200;
public const game_name:String = "math_mountain";
public const stageH:Number = 400;
public const stageW:Number = 550;
public var lastScore2:Number;// = 0
public var lastScore1:Number;// = 0
public var UI;
public var inZoom:Boolean;// = false
public var stageID:Number;// = 1
public var m_mc;
public var itemNum_role1:Array;
public var itemNum_role2:Array;
public var gameMode:String;
public var charArray:Array;
public var life2:Number;// = 5
public var life1:Number;// = 5
public var moveTimes1:Number;// = 0
public var moveTimes2:Number;// = 0
private var $score:Number;// = 0
private var scoreArray;
public var game_mc;
private var $score2:Number;// = 0
private var $life2:Number;// = 5
public var gamePassed:Boolean;// = false
public var finalIQ:Number;// = 0
private var $life1:Number;// = 5
public var timed:Boolean;// = false
public var char_p2:String;
public var char_p1:String;
private var $IQ2:Number;// = 0
public var difficultyArray;
public var eventSender:EventSender;
public var bgm_snd;
public var itemNum;
private var $IQ1:Number;// = 0
public var cpuSpeed;
public var cpuArray:Array;
public var difficulty;// = 1
public var inPause:Boolean;// = false
public var hitRec:MovieClip;
public static var $frameRate:Number;
public static var self:Main;
public function Main(){
scoreArray = new Array(100, 120, 150);
cpuSpeed = new Array(0.18, 0.2, 0.25, 0.25, 0.25, 0.3, 0.35, 0.35, 0.35, 0.35);
difficultyArray = new Array();
itemNum = new Array();
charArray = new Array("man", "woman", "boy", "girl", "young", "old");
cpuArray = new Array();
inPause = false;
inZoom = false;
timed = false;
itemNum_role1 = new Array(0, 0, 0, 0, 0);
itemNum_role2 = new Array(0, 0, 0, 0, 0);
$score = 0;
$score2 = 0;
lastScore1 = 0;
lastScore2 = 0;
$IQ1 = 0;
$IQ2 = 0;
finalIQ = 0;
moveTimes1 = 0;
moveTimes2 = 0;
$life1 = 5;
$life2 = 5;
life1 = 5;
life2 = 5;
stageID = 1;
difficulty = 1;
gamePassed = false;
super();
addFrameScript(0, frame1, 2, frame3, 37, frame38, 133, frame134, 134, frame135, 169, frame170);
self = this;
$frameRate = stage.frameRate;
itemNum[0] = [2, 1, 1, 1, 2];
itemNum[1] = [2, 2, 1, 2, 2];
itemNum[2] = [2, 2, 2, 2, 2];
itemNum[3] = [2, 2, 2, 2, 2];
itemNum[4] = [2, 2, 2, 2, 2];
itemNum[5] = [2, 2, 2, 2, 2];
itemNum[6] = [2, 2, 2, 2, 2];
itemNum[7] = [2, 2, 2, 2, 2];
itemNum[8] = [2, 2, 2, 2, 2];
itemNum[9] = [2, 2, 2, 2, 2];
difficultyArray[0] = [0.5, 1, 1];
difficultyArray[1] = [0.5, 0.8, 1];
difficultyArray[2] = [0.4, 0.75, 1];
difficultyArray[3] = [0.35, 0.75, 1];
difficultyArray[4] = [0.35, 0.7, 1];
difficultyArray[5] = [0.33, 0.7, 1];
difficultyArray[6] = [0.33, 0.66, 1];
difficultyArray[7] = [0.3, 0.6, 1];
difficultyArray[8] = [0.3, 0.6, 1];
difficultyArray[9] = [0.2, 0.6, 1];
gameMode = "cpu";
}
public function game_pass_player(){
var funcIn:*;
var trans:*;
funcIn = function (){
if (stageID == 10){
gotoAndStop("win_player");
gamePassed = true;
} else {
gotoAndStop("pass_player");
};
};
trans = new Trans(this, funcIn);
}
public function get IQ2():Number{
return ($IQ2);
}
public function get IQ1():Number{
return ($IQ1);
}
public function set IQ1(_arg1:Number){
var s = _arg1;
$IQ1 = s;
try {
UI.status_p1.setScore(s);
} catch(e) {
};
}
public function set IQ2(_arg1:Number){
var s = _arg1;
$IQ2 = s;
try {
UI.status_p2.setScore(s);
} catch(e) {
};
}
public function game_pass(){
var funcIn:*;
var trans:*;
funcIn = function (){
if (stageID == 10){
gotoAndStop("win");
gamePassed = true;
} else {
gotoAndStop("pass");
};
};
trans = new Trans(this, funcIn);
}
public function game_nextLevel(){
var funcIn:*;
var trans:*;
funcIn = function (){
game_clear();
stageID++;
moveTimes1 = 1;
moveTimes2 = 1;
inPause = false;
inZoom = false;
lastScore1 = IQ1;
lastScore2 = IQ2;
gotoAndStop("game");
};
trans = new Trans(this, funcIn);
}
public function creatGame(){
var _local1:*;
game_mc = new Game(("game" + stageID));
addChild(game_mc);
UI = new UI_mc();
addChild(UI);
_local1 = new UI_start();
addChild(_local1);
_local1.x = centerX;
_local1.y = centerY;
}
function frame170(){
creatGame();
if (Main.self.gameMode == "player"){
setTimeout(game_start, 3500);
} else {
setTimeout(game_start, 2000);
};
}
public function game_continue(){
var funcIn:*;
var trans:*;
funcIn = function (){
life1 = $life1;
life2 = $life2;
moveTimes1 = 1;
moveTimes2 = 1;
inPause = false;
inZoom = false;
IQ1 = (IQ1 - 15);
lastScore1 = IQ1;
lastScore2 = IQ2;
score = (IQ1 * moveTimes1);
gotoAndStop("game");
};
trans = new Trans(this, funcIn);
}
public function game_mainMenu(){
var funcIn:*;
var trans:*;
funcIn = function (){
score = 0;
score2 = 0;
IQ1 = 0;
IQ2 = 0;
life1 = $life1;
life2 = $life2;
lastScore1 = 0;
lastScore2 = 0;
moveTimes1 = 0;
moveTimes2 = 0;
stageID = 1;
inPause = false;
inZoom = false;
timed = false;
itemNum_role1 = [0, 0, 0, 0, 0];
game_clear();
gotoAndStop("main");
};
trans = new Trans(this, funcIn);
}
function frame3(){
if (this.loaderInfo.bytesLoaded < this.loaderInfo.bytesTotal){
gotoAndStop("loading");
};
}
function frame1(){
stage.showDefaultContextMenu = false;
MochiAd.showPreloaderAd({clip:this, id:"baa50bb886bc5819", res:"550x440"});
}
public function getCpu():String{
var _local1:*;
_local1 = cpuArray[(stageID - 1)];
return (_local1);
}
public function get score():Number{
return ($score);
}
function frame38(){
hitRec.buttonMode = true;
hitRec.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
}
public function mouseDown(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.freeworldgroup.com/"), "_blank");
}
public function viewScore(){
var url:String;
var request:URLRequest;
url = ("http://www.freeworldgroup.com/score/index.asp?game=" + game_name);
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace(("viewScore rror: " + e));
};
}
public function game_over(){
var funcIn:*;
var trans:*;
gamePassed = true;
funcIn = function (){
gotoAndStop("gameOver");
game_clear();
};
trans = new Trans(this, funcIn);
}
public function getCpuArray(_arg1){
var _local2:*;
var _local3:*;
_local2 = charArray.slice();
_local3 = _local2.indexOf(_arg1);
_local2.splice(_local3, 1);
_local2 = ArrayFunc.getNoRepeat(_local2, 5);
cpuArray = _local2.concat(_local2);
}
public function game_pause_end(){
inPause = false;
stage.frameRate = $frameRate;
}
public function set score(_arg1:Number){
$score = _arg1;
}
public function musicStart(){
try {
bgm_snd.stop();
} catch(e) {
};
bgm_snd = SoundC.playM("bgm_snd");
}
public function game_pause(){
inPause = true;
stage.frameRate = 0;
}
public function showWin(_arg1:String){
var _local2:*;
_local2 = new win_mc();
addChild(_local2);
_local2.mc.gotoAndStop(_arg1);
_local2.x = 275;
_local2.y = 100;
}
public function game_clear(){
try {
removeChild(game_mc);
removeChild(UI);
} catch(e) {
};
}
function frame134(){
SoundC.init();
musicStart();
}
public function showText(_arg1){
var _local2:*;
_local2 = new showText_mc();
addChild(_local2);
_local2.x = 100;
_local2.y = 148;
_local2.mc.text_txt.text = _arg1;
}
function frame135(){
stop();
m_mc = new mask_mc();
addChild(m_mc);
Main.self.mask = m_mc;
}
public function set score2(_arg1:Number){
$score2 = _arg1;
}
public function game_start(){
game_mc.showQuestion();
if (gameMode == "cpu"){
game_mc.cpuStart();
};
}
public function get score2():Number{
return ($score2);
}
}
}//package
Section 143
//mapLoader (mapLoader)
package {
import flash.display.*;
public dynamic class mapLoader extends MovieClip {
}
}//package
Section 144
//mask_mc (mask_mc)
package {
import flash.display.*;
public dynamic class mask_mc extends MovieClip {
}
}//package
Section 145
//math_loader (math_loader)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class math_loader extends MovieClip {
public var mc:MovieClip;
public function math_loader(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 8, frame9, 16, frame17);
}
public function dragEnd(){
this.stopDrag();
}
public function drag(){
this.startDrag();
}
function frame3(){
visible = true;
mc.show();
}
function frame1(){
Click.onMouseDown(mc.bg_mc, drag);
Click.onMouseUp(Main.self, dragEnd);
}
function frame17(){
gotoAndStop("stop");
}
public function hide(){
gotoAndPlay("hide");
}
function frame9(){
stop();
mc.start();
}
function frame2(){
stop();
visible = false;
}
public function show(){
gotoAndPlay("show");
}
}
}//package
Section 146
//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 ("1.5");
}
public static function showTimedAd(_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{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._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 (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
options.ad_finished();
};
wh = MochiAd._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;
var _local2:MovieClip;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
_local2 = this.parent.parent;
MochiAd.unload(_local2);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = 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;
_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){
_local3 = true;
};
};
};
if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_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 _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 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();
};
_arg1.removeChild(_arg1._mochiad);
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._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];
};
};
_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++;
};
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
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 req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip._mochiad_loaded){
return (null);
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
if (clip.loaderInfo.loaderURL.indexOf("http") != 0){
options.no_page = true;
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
mc["onEnterFrame"] = function ():void{
if (!this._mochiad_ctr){
delete this["onEnterFrame"];
MochiAd.unload(this.parent);
};
};
doOnEnterFrame(mc);
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{
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
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 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 _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 _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 = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._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 showPreloaderAd(_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 options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._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 (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
options.ad_finished();
};
wh = MochiAd._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;
var _local2:MovieClip;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
_local2 = this.parent.parent;
MochiAd.unload(_local2);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = 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;
_local1 = this.parent.parent.root;
if (!_local1){
delete this["onEnterFrame"];
return;
};
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
_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){
_local4 = true;
};
};
};
if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local4 = true;
};
if ((((((_local5 > 0)) && ((_local6 >= _local5)))) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._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 {
mc.removeEventListener(Event.ENTER_FRAME, f);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 147
//mountain1 (mountain1)
package {
import flash.display.*;
public dynamic class mountain1 extends MovieClip {
public var p11:dot;
public var p16:dot;
public var p18:dot;
public var p19:dot;
public var p14:dot;
public var p17:dot;
public var p13:dot;
public var p10:dot;
public var p12:dot;
public var p15:dot;
public var p1:dot;
public var p2:dot;
public var p3:dot;
public var p5:dot;
public var p9:dot;
public var p6:dot;
public var p7:dot;
public var p0:dot;
public var p4:dot;
public var p8:dot;
public function mountain1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 148
//Pos (Pos)
package {
import flash.geom.*;
public class Pos {
public static function LtoG(_arg1):Object{
var _local2:*;
_local2 = new Point(_arg1.x, _arg1.y);
_local2 = _arg1.parent.localToGlobal(_local2);
return (_local2);
}
public static function LtoL(_arg1, _arg2):Object{
var _local3:*;
_local3 = new Point(_arg1.x, _arg1.y);
_local3 = _arg1.parent.localToGlobal(_local3);
_local3 = _arg2.globalToLocal(_local3);
return (_local3);
}
}
}//package
Section 149
//powerup1_snd (powerup1_snd)
package {
import flash.media.*;
public dynamic class powerup1_snd extends Sound {
}
}//package
Section 150
//powerup2_snd (powerup2_snd)
package {
import flash.media.*;
public dynamic class powerup2_snd extends Sound {
}
}//package
Section 151
//right_snd (right_snd)
package {
import flash.media.*;
public dynamic class right_snd extends Sound {
}
}//package
Section 152
//role_boy (role_boy)
package {
import flash.display.*;
public dynamic class role_boy extends MovieClip {
public function role_boy(){
addFrameScript(0, frame1);
}
public function doStop(){
gotoAndStop("fall3");
}
function frame1(){
stop();
}
}
}//package
Section 153
//role_girl (role_girl)
package {
import flash.display.*;
public dynamic class role_girl extends MovieClip {
public function role_girl(){
addFrameScript(0, frame1);
}
public function doStop(){
gotoAndStop("fall3");
}
function frame1(){
stop();
}
}
}//package
Section 154
//role_man (role_man)
package {
import flash.display.*;
public dynamic class role_man extends MovieClip {
public function role_man(){
addFrameScript(0, frame1);
}
public function doStop(){
gotoAndStop("fall3");
}
function frame1(){
stop();
}
}
}//package
Section 155
//role_old (role_old)
package {
import flash.display.*;
public dynamic class role_old extends MovieClip {
public function role_old(){
addFrameScript(0, frame1);
}
public function doStop(){
}
function frame1(){
stop();
}
}
}//package
Section 156
//role_woman (role_woman)
package {
import flash.display.*;
public dynamic class role_woman extends MovieClip {
public function role_woman(){
addFrameScript(0, frame1);
}
public function doStop(){
gotoAndStop("fall3");
}
function frame1(){
stop();
}
}
}//package
Section 157
//role_young (role_young)
package {
import flash.display.*;
public dynamic class role_young extends MovieClip {
public function role_young(){
addFrameScript(0, frame1);
}
public function doStop(){
gotoAndStop("fall3");
}
function frame1(){
stop();
}
}
}//package
Section 158
//rolePos_cpu (rolePos_cpu)
package {
import flash.display.*;
public dynamic class rolePos_cpu extends MovieClip {
}
}//package
Section 159
//rolePos_role (rolePos_role)
package {
import flash.display.*;
public dynamic class rolePos_role extends MovieClip {
}
}//package
Section 160
//showText_mc (showText_mc)
package {
import flash.display.*;
public dynamic class showText_mc extends MovieClip {
public var mc:MovieClip;
public function showText_mc(){
addFrameScript(100, frame101);
}
function frame101(){
stop();
parent.removeChild(this);
}
}
}//package
Section 161
//SoundC (SoundC)
package {
import flash.utils.*;
public class SoundC {
public static var musicOn:Boolean = true;
public static var soundOn:Boolean = true;
public static function init():void{
soundOn = true;
musicOn = true;
}
public static function musicContinue(_arg1){
var _local2:*;
_local2 = _arg1.soundTransform;
_local2.volume = 1;
_arg1.soundTransform = _local2;
}
public static function playM(_arg1:String){
var _local2:*;
if (musicOn){
_local2 = new (getDefinitionByName(_arg1)).play(0, 999);
return (_local2);
};
}
public static function musicOff(_arg1){
var _local2:*;
_local2 = _arg1.soundTransform;
_local2.volume = 0;
_arg1.soundTransform = _local2;
}
public static function setV(_arg1, _arg2){
var trans:*;
var snd = _arg1;
var _volume = _arg2;
try {
trans = snd.soundTransform;
trans.volume = _volume;
snd.soundTransform = trans;
} catch(e) {
};
}
public static function playS(_arg1:String){
var _local2:*;
if (soundOn){
_local2 = new (getDefinitionByName(_arg1)).play();
return (_local2);
};
}
}
}//package
Section 162
//submitScore_mc (submitScore_mc)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class submitScore_mc extends MovieClip {
public var loader:URLLoader;
public var variables:URLVariables;
public var btnX:SimpleButton;
public var request:URLRequest;
public var btnSubmit:SimpleButton;
public var scoreTxt:TextField;
public var nameTxt:TextField;
public function submitScore_mc(){
addFrameScript(0, frame1, 2, frame3);
}
public function errorHandler(_arg1:IOErrorEvent):void{
trace(("error: " + _arg1));
}
public function submit():void{
variables.score = scoreTxt.text;
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 frame3(){
}
function frame1(){
Click.onClick(btnSubmit, submit);
Click.onClick(btnX, hide);
stop();
variables = new URLVariables();
request = new URLRequest("http://www.freeworldgroup.com/score/score.asp");
variables.game = Main.self.game_name;
scoreTxt.text = String(Main.self.finalIQ);
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
}
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
Section 163
//submitScore_player (submitScore_player)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class submitScore_player extends MovieClip {
public var loader:URLLoader;
public var variables:URLVariables;
public var btnX:SimpleButton;
public var request:URLRequest;
public var btnSubmit:SimpleButton;
public var scoreTxt:TextField;
public var nameTxt:TextField;
public function submitScore_player(){
addFrameScript(0, frame1, 2, frame3);
}
public function errorHandler(_arg1:IOErrorEvent):void{
trace(("error: " + _arg1));
}
public function submit():void{
variables.score = scoreTxt.text;
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 frame3(){
}
function frame1(){
Click.onClick(btnSubmit, submit);
Click.onClick(btnX, hide);
stop();
variables = new URLVariables();
request = new URLRequest("http://www.freeworldgroup.com/score/score.asp");
variables.game = Main.self.game_name;
if (Main.self.game_mc.role1.inWin){
scoreTxt.text = String(Main.self.IQ1);
} else {
scoreTxt.text = String(Main.self.IQ2);
};
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
}
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
Section 164
//Trans (Trans)
package {
import flash.display.*;
import flash.events.*;
public class Trans extends MovieClip {
public var onTransIn:Function;
public var onTransOut:Function;
public function Trans(_arg1:MovieClip, _arg2:Function=null, _arg3:Function=null){
var sourceObj = _arg1;
var functionIn = _arg2;
var functionOut = _arg3;
onTransIn = function (){
};
onTransOut = function (){
};
super();
addFrameScript(9, frame10, 20, frame21);
sourceObj.addChild(this);
onTransIn = functionIn;
onTransOut = functionOut;
if (functionIn == null){
onTransIn = function (){
};
};
if (functionOut == null){
onTransOut = function (){
};
};
}
function frame10(){
onTransIn();
onTransIn = function (){
};
}
function frame21(){
stop();
onTransOut();
onTransOut = function (){
};
remove();
}
function remove(){
parent.removeChild(this);
}
public static function transIn(_arg1, _arg2){
var _local3:*;
_local3 = new Trans(_arg1, _arg2);
_local3.onTransIn = _arg2;
return (_local3);
}
}
}//package
Section 165
//Tween2 (Tween2)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class Tween2 {
var loader_mc:MovieClip;
var areaRec:Object;
var target_mc:MovieClip;
var boundsObj:Object;
var root_mc:MovieClip;
var cameraY:Number;
var tweenFunc:Function;
var cameraX:Number;
var enterFrame_mc:MovieClip;
var onFinished:Function;
public static var self;
public function Tween2(){
onFinished = function (){
};
super();
}
public function scale(_arg1, _arg2, _arg3, _arg4):void{
var mc = _arg1;
var startNum = _arg2;
var stopNum = _arg3;
var v_rate = _arg4;
mc.scaleX = startNum;
mc.scaleY = startNum;
tweenFunc = function (_arg1){
var d_scale:*;
var v_scale:*;
var e = _arg1;
if (Main.self.inPause){
return;
};
d_scale = (stopNum - mc.scaleX);
v_scale = (d_scale * v_rate);
mc.scaleX = (mc.scaleX + v_scale);
mc.scaleY = (mc.scaleY + v_scale);
if (Math.abs(d_scale) < 0.0001){
mc.scaleX = stopNum;
mc.scaleY = stopNum;
onFinished();
mc.removeEventListener(Event.ENTER_FRAME, tweenFunc);
onFinished = function (){
};
};
};
mc.addEventListener(Event.ENTER_FRAME, tweenFunc, false, 0, true);
}
public function pos(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6):void{
var mc = _arg1;
var xFrom = _arg2;
var yFrom = _arg3;
var xTo = _arg4;
var yTo = _arg5;
var v_rate = _arg6;
mc.x = xFrom;
mc.y = yFrom;
tweenFunc = function (_arg1){
var dx:*;
var dy:*;
var vx:*;
var vy:*;
var e = _arg1;
if (Main.self.inPause){
return;
};
dx = (xTo - mc.x);
dy = (yTo - mc.y);
vx = (dx * v_rate);
vy = (dy * v_rate);
mc.x = (mc.x + vx);
mc.y = (mc.y + vy);
if (((dx * dx) + (dy * dy)) < 0.0001){
mc.x = xTo;
mc.y = yTo;
onFinished();
mc.removeEventListener(Event.ENTER_FRAME, tweenFunc);
onFinished = function (){
};
};
};
mc.addEventListener(Event.ENTER_FRAME, tweenFunc, false, 0, true);
}
public function tween(_arg1, _arg2, _arg3, _arg4, _arg5):void{
var mc = _arg1;
var type = _arg2;
var startNum = _arg3;
var stopNum = _arg4;
var v_rate = _arg5;
mc[type] = startNum;
tweenFunc = function (_arg1){
var d:*;
var v:*;
var e = _arg1;
if (Main.self.inPause){
return;
};
d = (stopNum - mc[type]);
v = (d * v_rate);
mc[type] = (mc[type] + v);
if (Math.abs(d) < 0.0001){
mc[type] = stopNum;
onFinished();
mc.removeEventListener(Event.ENTER_FRAME, tweenFunc);
onFinished = function (){
};
};
};
mc.addEventListener(Event.ENTER_FRAME, tweenFunc, false, 0, true);
}
}
}//package
Section 166
//UI_mc (UI_mc)
package {
import flash.display.*;
import flash.events.*;
import game.*;
import flash.media.*;
import camera.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_mc extends MovieClip {
public var zoom_btn:MovieClip;
public var quality_btn:MovieClip;
public var sound_btn:MovieClip;
public var status_p1:MovieClip;
public var status_p2:MovieClip;
public var item_mc:MovieClip;
public var menu_btn:SimpleButton;
public var old_y;
public var inZoom;
public var old_x;
public var chance_p2:MovieClip;
public var chance_p1:MovieClip;
public var music_btn:MovieClip;
public var stageID_txt:TextField;
public function UI_mc(){
addFrameScript(0, frame1, 1, frame2);
}
public function qualityFunc(){
quality_btn.gotoAndStop(2);
Main.self.game_pause();
}
function frame1(){
stop();
Click.onClick(menu_btn, menuFunc);
Click.onClick(quality_btn.btn, qualityFunc);
Click.onClick(zoom_btn.btn, zoom);
Click.onClick(music_btn.btn, musicFunc);
Click.onClick(sound_btn.btn, soundFunc);
inZoom = false;
if (Main.self.gameMode == "cpu"){
status_p1.setScore(Main.self.IQ1);
chance_p1.num_txt.text = Main.self.life1;
item_mc.init(Main.self.itemNum_role1, Main.self.game_mc.role);
} else {
if (Main.self.gameMode == "player"){
gotoAndStop(2);
};
};
setStageID(Main.self.stageID);
}
function frame2(){
status_p1.setScore(Main.self.IQ1);
status_p2.setScore(Main.self.IQ2);
chance_p1.num_txt.text = Main.self.life1;
chance_p2.num_txt.text = Main.self.life2;
}
public function musicFunc(){
if (music_btn.currentFrame == 1){
music_btn.gotoAndStop(2);
SoundC.musicOff(Main.self.bgm_snd);
} else {
music_btn.gotoAndStop(1);
SoundC.musicContinue(Main.self.bgm_snd);
};
}
public function soundFunc(){
if (sound_btn.currentFrame == 1){
sound_btn.gotoAndStop(2);
SoundC.soundOn = false;
} else {
sound_btn.gotoAndStop(1);
SoundC.soundOn = true;
};
}
public function menuFunc(){
var _local1:*;
_local1 = new UI_menu();
Main.self.addChild(_local1);
}
public function zoom(){
if (inZoom){
return;
};
inZoom = true;
if (zoom_btn.currentFrame == 1){
old_x = Game.mc.x;
old_y = Game.mc.y;
Main.self.inZoom = true;
CameraZoom.self.showAll();
CameraZoom.self.onShowAll = function (){
inZoom = false;
};
zoom_btn.gotoAndStop(2);
} else {
if (zoom_btn.currentFrame == 2){
CameraZoom.self.showAll_end();
CameraZoom.self.onShowAll_end = function (){
trace("onShowAll_end");
Main.self.inZoom = false;
inZoom = false;
CameraZoom.self.onShowAll_end = function (){
};
};
zoom_btn.gotoAndStop(1);
};
};
}
public function setStageID(_arg1){
stageID_txt.text = _arg1;
}
}
}//package
Section 167
//UI_menu (UI_menu)
package {
import flash.display.*;
public dynamic class UI_menu extends MovieClip {
public var type;
public function UI_menu(){
addFrameScript(6, frame7, 13, frame14);
}
function frame14(){
stop();
if (type == "return"){
} else {
Main.self.game_mainMenu();
};
parent.removeChild(this);
}
function frame7(){
stop();
Main.self.game_pause();
}
}
}//package
Section 168
//UI_start (UI_start)
package {
import flash.display.*;
public dynamic class UI_start extends MovieClip {
public function UI_start(){
addFrameScript(58, frame59);
}
function frame59(){
stop();
parent.removeChild(this);
}
}
}//package
Section 169
//UI_turn_txt (UI_turn_txt)
package {
import flash.display.*;
public dynamic class UI_turn_txt extends MovieClip {
public var mc:MovieClip;
public function UI_turn_txt(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
parent.removeChild(this);
}
}
}//package
Section 170
//URL (URL)
package {
import flash.net.*;
public class URL {
public static const URL_ADD:String = "http://www.freeworldgroup.com/koalafiles.htm";
public static const URL_MORE:String = "http://www.freeworldgroup.com";
public static const URL_DOWN:String = "http://www.ifungames.com";
public static function getURL(_arg1:String, _arg2:String="_blank"){
var request:URLRequest;
var url = _arg1;
var window = _arg2;
request = new URLRequest(url);
try {
navigateToURL(request, window);
} catch(e:Error) {
};
}
}
}//package
Section 171
//win_mc (win_mc)
package {
import flash.display.*;
public dynamic class win_mc extends MovieClip {
public var mc:MovieClip;
public function win_mc(){
addFrameScript(0, frame1, 10, frame11, 78, frame79);
}
function frame79(){
stop();
parent.removeChild(this);
}
function frame1(){
SoundC.playS("win_snd");
}
function frame11(){
}
}
}//package
Section 172
//win_snd (win_snd)
package {
import flash.media.*;
public dynamic class win_snd extends Sound {
}
}//package
Section 173
//wrong_snd (wrong_snd)
package {
import flash.media.*;
public dynamic class wrong_snd extends Sound {
}
}//package