Section 1
//Bg1 (boxRacers.Bg1)
package boxRacers {
import flash.display.*;
public dynamic class Bg1 extends MovieClip {
public var view:MovieClip;
}
}//package boxRacers
Section 2
//Bg2 (boxRacers.Bg2)
package boxRacers {
import flash.display.*;
public dynamic class Bg2 extends MovieClip {
public var view:MovieClip;
}
}//package boxRacers
Section 3
//Bg3 (boxRacers.Bg3)
package boxRacers {
import flash.display.*;
public dynamic class Bg3 extends MovieClip {
public var view:MovieClip;
}
}//package boxRacers
Section 4
//Bg4 (boxRacers.Bg4)
package boxRacers {
import flash.display.*;
public dynamic class Bg4 extends MovieClip {
public var view:MovieClip;
}
}//package boxRacers
Section 5
//Bg5 (boxRacers.Bg5)
package boxRacers {
import flash.display.*;
public dynamic class Bg5 extends MovieClip {
public var view:MovieClip;
}
}//package boxRacers
Section 6
//Game (boxRacers.Game)
package boxRacers {
import flash.events.*;
import flash.display.*;
import framework.*;
import flash.utils.*;
public class Game extends Sprite {
private var camera;
public var bg:MovieClip;
private var bg_view;
private var bg_body;
public var sceneContainer:MovieClip;
private var scene;
public static var game:Game;
public function Game(){
game = this;
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function added(_arg1:Event):void{
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
}
public function init():void{
bg.addChild(new (getDefinitionByName(("boxRacers.Bg" + Main.levelNum))));
bg_body = (bg.getChildAt(0) as Sprite);
bg_view = (bg_body as MovieClip).view;
}
private function removed(_arg1:Event):void{
game = null;
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
}
}
}//package boxRacers
Section 7
//Select_Char (boxRacers.Select_Char)
package boxRacers {
import flash.events.*;
import flash.display.*;
public class Select_Char extends MovieClip {
public var release:Function;
public var id:int;
public var rollOut:Function;
public var rollOver:Function;
public function Select_Char(){
rollOver = function (){
};
rollOut = function (){
};
release = function (){
};
super();
this.buttonMode = true;
this.mouseChildren = false;
this.stop();
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function added(_arg1:Event):void{
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, MouseEvent.MOUSE_OVER, _onRollOver, "_onRollOver");
EventsManager.addEvent(this, MouseEvent.MOUSE_OUT, _onRollOut, "_onRollOut");
EventsManager.addEvent(this, MouseEvent.MOUSE_UP, _onRelease, "_onRelease");
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
}
private function _onRollOut(_arg1:MouseEvent):void{
this.gotoAndStop(1);
rollOut();
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, MouseEvent.MOUSE_OVER, _onRollOver);
EventsManager.removeEvent(this, MouseEvent.MOUSE_OUT, _onRollOut);
EventsManager.removeEvent(this, MouseEvent.MOUSE_UP, _onRelease);
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
}
private function _onRollOver(_arg1:MouseEvent):void{
this.gotoAndStop(2);
rollOver();
}
private function _onRelease(_arg1:MouseEvent):void{
this.gotoAndStop(1);
release();
}
}
}//package boxRacers
Section 8
//Select_Char1 (boxRacers.Select_Char1)
package boxRacers {
public dynamic class Select_Char1 extends Select_Char {
}
}//package boxRacers
Section 9
//Select_Char2 (boxRacers.Select_Char2)
package boxRacers {
public dynamic class Select_Char2 extends Select_Char {
}
}//package boxRacers
Section 10
//Select_Char3 (boxRacers.Select_Char3)
package boxRacers {
public dynamic class Select_Char3 extends Select_Char {
}
}//package boxRacers
Section 11
//Select_Char4 (boxRacers.Select_Char4)
package boxRacers {
public dynamic class Select_Char4 extends Select_Char {
}
}//package boxRacers
Section 12
//SelectCar (boxRacers.SelectCar)
package boxRacers {
import flash.events.*;
import flash.display.*;
import ui.*;
import framework.*;
import localSave.*;
import flash.utils.*;
import flash.text.*;
import framework.btns.*;
public class SelectCar extends Sprite {
public var btnOk:Btn_Play_Game;
public var valueBars:DragValueBars;
public var select_chars:MovieClip;
public var nameTxt:TextField;
public static const charDataArr:Array = [{name:"PIGZILLA", color:0xFF3300, maxSpeed:60, skill:60, health:60}, {name:"CHIMPBOARDER", color:0xFCFC00, maxSpeed:50, skill:65, health:50}, {name:"HOONEY BOONEY", color:26367, maxSpeed:75, skill:50, health:50}, {name:"GOATERAID", color:65382, maxSpeed:50, skill:50, health:90}];
public static var gameInfo:GameInfo;
public function SelectCar(){
var i:int;
var char:Select_Char;
super();
btnOk.release = selectPlay;
gameInfo = new GameInfo(Main.game_name);
heroId = heroId;
nameTxt.text = Main.playerInfo.playerName;
i = 1;
while (i <= 4) {
char = select_chars[("char" + i)];
char.id = i;
char.release = function ():void{
save();
heroId = this.id;
};
i = (i + 1);
};
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "SelectCar.added");
valueBars.value = 50;
valueBars.saveName = Main.game_name;
}
private function added(_arg1:Event):void{
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "SelectCar.removed");
}
public function selectPlay():void{
if ((((nameTxt.text == "")) || ((charDataArr[(heroId - 1)].name == nameTxt.text)))){
ToolTip.show("You must enter your name!", nameTxt);
ToolTip.hideDelay();
return;
};
save();
(parent as MovieClip).loading_popUp.gotoAndStop(2);
setTimeout(playDelay, 40);
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
save();
}
public function set heroId(_arg1):void{
gameInfo.heroId = _arg1;
select_chars.gotoAndStop(heroId);
nameTxt.text = charDataArr[(_arg1 - 1)].name;
}
public function save():void{
valueBars.save();
if ((((nameTxt.text == "")) || ((charDataArr[(heroId - 1)].name == nameTxt.text)))){
} else {
Main.playerInfo.playerName = nameTxt.text;
};
}
private function playDelay():void{
if (GameI.playMode == GameI.playMode_tournament){
Main.gotoGame();
} else {
trace(("GameI.selectedStageNum=" + GameI.selectedStageNum));
Main.gotoLevel(GameI.selectedStageNum);
};
}
public function get heroId():int{
return (gameInfo.heroId);
}
}
}//package boxRacers
Section 13
//AnimationFade (effect.fadeEffect.AnimationFade)
package effect.fadeEffect {
public class AnimationFade extends BasicFade {
override public function setWH():void{
super.setWH();
__bmpContainer.addChild(bmp);
}
}
}//package effect.fadeEffect
Section 14
//BasicFade (effect.fadeEffect.BasicFade)
package effect.fadeEffect {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class BasicFade extends MovieClip {
public var __bmpContainer:Sprite;
public var bmd:BitmapData;
public var bmp:Bitmap;
public static var hei:int = 0;
public static var EventsManagerClass;
public static var wid:int = 0;
private static var initFlag:Boolean = firstInit();
public function BasicFade(){
__bmpContainer = (this.getChildByName("bmpContainer") as Sprite);
addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function added(_arg1:Event):void{
var event = _arg1;
removeEvent(this, Event.ADDED_TO_STAGE, added);
addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
if ((((wid > 0)) && ((hei > 0)))){
setWH();
} else {
try {
getStageWH();
} catch(e:Error) {
addEvent(this.loaderInfo, Event.INIT, loadInit, "loadInit");
};
};
}
private function loadInit(_arg1:Event):void{
removeEvent(this.loaderInfo, Event.INIT, loadInit);
getStageWH();
}
private function getStageWH():void{
wid = this.loaderInfo.width;
hei = this.loaderInfo.height;
setWH();
}
private function removed(_arg1:Event):void{
removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
bmd.dispose();
}
public function setWH():void{
bmd = new BitmapData(wid, hei, false, 0);
bmd.draw(this.root);
bmp = new Bitmap(bmd);
}
private static function firstInit():Boolean{
trace("BasicFade第一次初始化");
try {
EventsManagerClass = getDefinitionByName("EventsManager");
} catch(e) {
trace(("e=" + e));
};
return (true);
}
public static function addEvent(_arg1, _arg2:String, _arg3:Function, _arg4:String):void{
if (EventsManagerClass){
EventsManagerClass.addEvent(_arg1, _arg2, _arg3, _arg4);
} else {
_arg1.removeEventListener(_arg2, _arg3);
_arg1.addEventListener(_arg2, _arg3, false, 0, true);
};
}
public static function removeEvent(_arg1, _arg2:String, _arg3:Function):void{
if (EventsManagerClass){
EventsManagerClass.removeEvent(_arg1, _arg2, _arg3);
} else {
_arg1.removeEventListener(_arg2, _arg3);
};
}
}
}//package effect.fadeEffect
Section 15
//DuanFade (effect.fadeEffect.DuanFade)
package effect.fadeEffect {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public final class DuanFade {
public static var _root;
public static var nInterval:Number = 20;
public static var nColor:Number = 0;
private static function random(_arg1:int):int{
return (int((Math.random() * _arg1)));
}
public static function start(_arg1, _arg2:Object=null):void{
var _local3:Boolean;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:*;
var _local9:BitmapData;
var _local10:MClip_root;
var _local11:MovieClip;
var _local12:Bitmap;
_root = _arg1;
_local3 = false;
_local4 = _root.loaderInfo.width;
_local5 = _root.loaderInfo.height;
_local6 = 0;
_local7 = 0;
for (_local8 in _arg2) {
DuanFade[_local8] = _arg2[_local8];
};
_local9 = new BitmapData(_local4, _local5, false, nColor);
_local9.draw(_root);
_local10 = (_root.addChild(new MClip_root()) as MClip_root);
_local11 = (_local10.addChild(new MovieClip()) as MovieClip);
_local12 = (_local10.addChild(new Bitmap(_local9)) as Bitmap);
_local10.nT = nInterval;
_local10.bmpRoot = _local9;
_local10.nTime = 0;
switch (random(4)){
case 0:
_local10.nRdm = random(2);
_local10.m_0 = createClip(_local11, 0);
_local10.m_1 = createClip(_local11, 0, {x:10, y:10, rotation:180});
_local10.enterFrame = _local10.enterFrame0;
break;
case 1:
_local10.nRdm = random(3);
_local10.nRdm_2 = random(4);
_local10.m_0 = createClip(_local11, 1, {x:5, y:5});
_local10.enterFrame = _local10.enterFrame1;
break;
case 2:
_local10.nRdm = random(5);
_local10.m_0 = createClip(_local11, 2);
_local10.m_1 = createClip(_local11, 2, {x:10, y:10, rotation:180});
_local10.enterFrame = _local10.enterFrame2;
break;
case 3:
_local10.nRdm = random(2);
_local10.m_0 = createClip(_local11, 2);
_local10.m_1 = createClip(_local11, 2, {x:10, y:10, rotation:180});
_local10.m_2 = createClip(_local11, 2, {x:0, y:10, rotation:-90});
_local10.m_3 = createClip(_local11, 2, {x:10, y:0, rotation:90});
_local10.enterFrame = _local10.enterFrame3;
break;
default:
break;
};
_local10.addEventListener(Event.ENTER_FRAME, _local10.enterFrame, false, 0, true);
_local11.width = _local4;
_local11.height = _local5;
_local11.x = _local6;
_local11.y = _local7;
_local12.mask = _local11;
}
public static function trigonometric(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=NaN):Number{
var _local5:Number;
var _local6:Number;
_local5 = 0;
_local6 = ((Math.PI / _arg2) * _arg1);
if (!isNaN(_arg4)){
_local5 = (_arg4 - _local6);
};
return ((_arg3 * Math.sin((_local6 + _local5))));
}
private static function createClip(_arg1:MovieClip, _arg2:Number=NaN, _arg3:Object=null):Sprite{
var _local4:Sprite;
var _local5:Graphics;
var _local6:*;
((isNaN(_arg2)) && (0));
_local4 = new Sprite();
_arg1.addChild(_local4);
_local5 = _local4.graphics;
_local5.beginFill(0);
switch (_arg2){
case 0:
_local5.lineTo(10, 0);
_local5.lineTo(10, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
break;
case 1:
_local5.moveTo(-5, -5);
_local5.lineTo(-5, 5);
_local5.lineTo(5, 5);
_local5.lineTo(5, -5);
_local5.lineTo(-5, -5);
break;
case 2:
_local5.lineTo(10, 0);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
break;
default:
break;
};
_local5.endFill();
for (_local6 in _arg3) {
_local4[_local6] = _arg3[_local6];
};
return (_local4);
}
}
}//package effect.fadeEffect
import flash.events.*;
import flash.display.*;
class MClip_root extends Sprite {
public var bmpRoot:BitmapData;
public var nRdm:Number;
public var nTime:Number;
public var nTemp:Number;
public var enterFrame:Function;
public var nT:Number;
public var nRdm_2:Number;
public var m_0;
public var m_2;
public var m_3;
public var m_1;
private function MClip_root(){
}
public function enterFrame2(_arg1:Event):void{
this.nTime++;
this.nTemp = (100 - DuanFade.trigonometric(this.nTime, this.nT, 100));
switch (this.nRdm){
case 0:
this.m_0.scaleY = (this.m_1.scaleY = (this.nTemp / 100));
break;
case 1:
this.m_0.scaleX = (this.m_1.scaleY = (this.nTemp / 100));
break;
case 2:
this.m_0.scaleY = (this.m_1.scaleX = (this.nTemp / 100));
break;
case 3:
this.m_0.scaleX = (this.m_1.scaleX = (this.nTemp / 100));
break;
case 4:
this.m_0.scaleX = (this.m_1.scaleX = (this.nTemp / 100));
this.m_0.scaleY = (this.m_1.scaleY = (this.nTemp / 100));
break;
};
if (this.nTime == (this.nT / 2)){
this.finish();
};
this.switchDepth();
}
public function enterFrame1(_arg1:Event):void{
this.nTime++;
this.nTemp = (100 - DuanFade.trigonometric(this.nTime, this.nT, 100));
switch (this.nRdm){
case 0:
this.m_0.scaleX = (150 / 100);
this.m_0.scaleY = (this.nTemp / 100);
break;
case 1:
this.m_0.scaleX = (this.nTemp / 100);
this.m_0.scaleY = (150 / 100);
break;
case 2:
this.m_0.scaleX = (this.m_0.scaleY = (this.nTemp / 100));
break;
};
if (this.nRdm_2 == 3){
this.m_0.rotation = (180 - DuanFade.trigonometric(this.nTime, this.nT, 180));
} else {
if (this.nRdm_2 == 2){
this.m_0.rotation = DuanFade.trigonometric(this.nTime, this.nT, 180);
};
};
if (this.nTime == (this.nT / 2)){
this.finish();
};
this.switchDepth();
}
public function enterFrame0(_arg1:Event):void{
this.nTime++;
this.nTemp = (50 - DuanFade.trigonometric(this.nTime, this.nT, 50));
if (this.nRdm > 0){
this.m_0.scaleY = (this.m_1.scaleY = (this.nTemp / 100));
} else {
this.m_0.scaleX = (this.m_1.scaleX = (this.nTemp / 100));
};
if (this.nTime == (this.nT / 2)){
this.finish();
};
this.switchDepth();
}
public function enterFrame3(_arg1:Event):void{
this.nTime++;
this.nTemp = (100 - DuanFade.trigonometric(this.nTime, this.nT, 100));
if (this.nRdm > 0){
this.m_0.scaleY = (this.m_1.scaleY = (this.m_2.scaleY = (this.m_3.scaleY = (this.nTemp / 100))));
} else {
this.m_0.scaleX = (this.m_1.scaleX = (this.m_2.scaleX = (this.m_3.scaleX = (this.nTemp / 100))));
};
if (this.nTime == (this.nT / 2)){
this.finish();
};
this.switchDepth();
}
public function finish():void{
this.removeEventListener(Event.ENTER_FRAME, enterFrame);
bmpRoot.dispose();
this.parent.removeChild(this);
}
public function switchDepth():void{
if (this.parent){
if (this.parent.getChildIndex(this) < (this.parent.numChildren - 1)){
this.parent.addChild(this);
};
};
}
}
Section 16
//GridFade (effect.fadeEffect.GridFade)
package effect.fadeEffect {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class GridFade extends BasicFade {
private var isHiding:Boolean;
private var gridBmp:Bitmap;
private var d:Number;
private var gridSize:Number;
private var mode:int;
public function GridFade(_arg1:int=1){
mode = _arg1;
}
private function run1(_arg1:Event):void{
if (isHiding){
gridSize = (gridSize + d);
mcToGrid(bmp, gridBmp, wid, hei, gridSize);
if (gridSize >= 90){
isHiding = false;
};
} else {
gridSize = (gridSize - d);
gridBmp.visible = false;
mcToGrid(root, gridBmp, wid, hei, gridSize);
gridBmp.visible = true;
if (gridSize <= 1){
removeEvent(stage, Event.ENTER_FRAME, run1);
this.parent.removeChild(this);
};
};
}
private function run2(_arg1:Event):void{
gridSize = (gridSize + d);
mcToGrid(bmp, gridBmp, wid, hei, gridSize);
gridBmp.alpha = (gridBmp.alpha * 0.98);
if (gridSize >= 90){
removeEvent(stage, Event.ENTER_FRAME, run2);
this.parent.removeChild(this);
};
}
override public function setWH():void{
super.setWH();
gridBmp = new Bitmap();
gridSize = 1;
isHiding = true;
this.addChild(gridBmp);
switch (mode){
case 1:
d = 5;
addEvent(stage, Event.ENTER_FRAME, run1, "run1");
break;
case 2:
d = 1;
addEvent(stage, Event.ENTER_FRAME, run2, "run2");
break;
};
}
private static function mcToGrid(_arg1:DisplayObject, _arg2:Bitmap, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local6:int;
var _local7:int;
var _local8:BitmapData;
if (_arg5 > 1){
} else {
_arg5 = 1;
};
_local6 = Math.round((_arg3 / _arg5));
_local7 = Math.round((_arg4 / _arg5));
_local8 = new BitmapData(_local6, _local7, false);
_local8.draw(_arg1, new Matrix((_local6 / _arg3), 0, 0, (_local7 / _arg4), 0, 0));
_arg2.bitmapData = _local8;
_arg2.width = _arg3;
_arg2.height = _arg4;
}
}
}//package effect.fadeEffect
Section 17
//ScaleTween (effect.ScaleTween)
package effect {
import flash.display.*;
public class ScaleTween {
private var scaleT:Number;
private var minD:Number;
public var onTween:Function;
public var onMov:Function;
private var dspObj:DisplayObject;
private var u:Number;
public function ScaleTween(_arg1, _arg2:Number=0.5, _arg3:Number=0.05){
var _dspObj = _arg1;
var _u = _arg2;
var _minD = _arg3;
super();
dspObj = _dspObj;
u = _u;
minD = _minD;
onMov = function (){
};
onTween = function (){
};
}
public function stop():void{
RunsManager.removeRun(run);
}
public function run():void{
var _local1:Number;
if (dspObj.root == null){
stop();
return;
};
_local1 = (scaleT - dspObj.scaleX);
if (Math.abs(_local1) < minD){
stop();
dspObj.scaleX = (dspObj.scaleY = scaleT);
onMov(dspObj);
onTween(dspObj);
} else {
dspObj.scaleX = (dspObj.scaleY = (dspObj.scaleY + (_local1 * u)));
onMov(dspObj);
};
}
public function movTo(_arg1:Number):void{
scaleT = _arg1;
RunsManager.addRun("ScaleteTween run()", run);
}
}
}//package effect
Section 18
//TweenMenu (effect.TweenMenu)
package effect {
import flash.display.*;
import flash.geom.*;
public class TweenMenu {
private var stArr:Array;
private var maxScale:Number;
private var menus_sp:Sprite;
private var itemArr:Array;
private var left:Number;
private var right:Number;
private var wid0:Number;
private var totalItem:int;
public function TweenMenu(_arg1:Sprite, _arg2:Number=1.2){
var _local3:Rectangle;
var _local4:int;
super();
menus_sp = _arg1;
totalItem = menus_sp.numChildren;
itemArr = new Array(totalItem);
stArr = new Array(totalItem);
maxScale = _arg2;
_local3 = menus_sp.getBounds(menus_sp);
left = _local3.x;
right = (_local3.x + _local3.width);
wid0 = (right - left);
_local4 = 0;
while (_local4 < totalItem) {
stArr[_local4] = new ScaleTween((itemArr[_local4] = menus_sp.getChildAt(_local4)));
_local4++;
};
RunsManager.addRun("TweenMenu.run()", run);
}
public function run():void{
adjust();
}
public function clear():void{
stArr = null;
itemArr = null;
menus_sp = null;
RunsManager.removeRun(run);
}
private function adjust():void{
var _local1:Number;
var _local2:Sprite;
var _local3:Number;
var _local4:int;
var _local5:Sprite;
var _local6:Sprite;
var _local7:Rectangle;
_local1 = 0;
for each (_local2 in itemArr) {
_local1 = (_local1 + _local2.width);
};
_local3 = ((wid0 - _local1) / (totalItem - 1));
adjustItemToX(itemArr[0], left);
_local4 = 1;
while (_local4 < totalItem) {
_local5 = itemArr[_local4];
_local6 = itemArr[(_local4 - 1)];
_local7 = _local6.getBounds(menus_sp);
adjustItemToX(_local5, ((_local7.x + _local7.width) + _local3));
_local4++;
};
}
private function adjustItemToX(_arg1:Sprite, _arg2:Number):void{
_arg1.x = (_arg1.x + (_arg2 - _arg1.getBounds(menus_sp).x));
}
public function makeBig(_arg1:Sprite):void{
var _local2:int;
_local2 = itemArr.indexOf(_arg1);
stArr[_local2].movTo(maxScale);
}
public function makeSmall(_arg1:Sprite):void{
stArr[itemArr.indexOf(_arg1)].movTo(1);
}
}
}//package effect
Section 19
//Btn_Add_Games_To_Your_Site (framework.btns.Btn_Add_Games_To_Your_Site)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Add_Games_To_Your_Site extends SimpleBtn {
public function Btn_Add_Games_To_Your_Site(){
action = BtnActions.ADD_GAMES_TO_YOUR_SITE;
}
}
}//package framework.btns
Section 20
//Btn_Back (framework.btns.Btn_Back)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Back extends SimpleBtn {
public function Btn_Back(){
action = BtnActions.BACK;
}
}
}//package framework.btns
Section 21
//Btn_Best (framework.btns.Btn_Best)
package framework.btns {
import ui.*;
public class Btn_Best extends SimpleBtn {
}
}//package framework.btns
Section 22
//Btn_Copyright (framework.btns.Btn_Copyright)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Copyright extends SimpleBtn {
public function Btn_Copyright(){
action = BtnActions.COPYRIGHT;
}
}
}//package framework.btns
Section 23
//Btn_Crazy (framework.btns.Btn_Crazy)
package framework.btns {
import ui.*;
public class Btn_Crazy extends SimpleBtn {
}
}//package framework.btns
Section 24
//Btn_Credits (framework.btns.Btn_Credits)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Credits extends SimpleBtn {
public function Btn_Credits(){
action = BtnActions.CREDITS;
}
}
}//package framework.btns
Section 25
//Btn_Download_Games (framework.btns.Btn_Download_Games)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Download_Games extends SimpleBtn {
public function Btn_Download_Games(){
action = BtnActions.DOWNLOAD_GAMES;
}
}
}//package framework.btns
Section 26
//Btn_Easy (framework.btns.Btn_Easy)
package framework.btns {
import ui.*;
public class Btn_Easy extends SimpleBtn {
}
}//package framework.btns
Section 27
//Btn_Hard (framework.btns.Btn_Hard)
package framework.btns {
import ui.*;
public class Btn_Hard extends SimpleBtn {
}
}//package framework.btns
Section 28
//Btn_High (framework.btns.Btn_High)
package framework.btns {
import ui.*;
public class Btn_High extends SimpleBtn {
}
}//package framework.btns
Section 29
//Btn_Instructions (framework.btns.Btn_Instructions)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Instructions extends SimpleBtn {
public function Btn_Instructions(){
action = BtnActions.INSTRUCTIONS;
}
}
}//package framework.btns
Section 30
//Btn_Low (framework.btns.Btn_Low)
package framework.btns {
import ui.*;
public class Btn_Low extends SimpleBtn {
}
}//package framework.btns
Section 31
//Btn_Medium (framework.btns.Btn_Medium)
package framework.btns {
import ui.*;
public class Btn_Medium extends SimpleBtn {
}
}//package framework.btns
Section 32
//Btn_Menu (framework.btns.Btn_Menu)
package framework.btns {
import flash.events.*;
import ui.*;
import framework.*;
import framework.pages.*;
public class Btn_Menu extends SimpleBtn {
public function Btn_Menu(){
action = BtnActions.MENU;
addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function added(_arg1:Event):void{
removeEvent(this, Event.ADDED_TO_STAGE, added);
if ((Main.page is Page_Game)){
alert = "Back To Main Menu?";
};
}
}
}//package framework.btns
Section 33
//Btn_More_Online_Games (framework.btns.Btn_More_Online_Games)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_More_Online_Games extends SimpleBtn {
public function Btn_More_Online_Games(){
action = BtnActions.MORE_ONLINE_GAMES;
}
}
}//package framework.btns
Section 34
//Btn_Music (framework.btns.Btn_Music)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Music extends SimpleBtn {
public function Btn_Music(){
action = BtnActions.MUSIC;
}
}
}//package framework.btns
Section 35
//Btn_Next (framework.btns.Btn_Next)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Next extends SimpleBtn {
public function Btn_Next(){
action = BtnActions.NEXT;
}
}
}//package framework.btns
Section 36
//Btn_Next_Level (framework.btns.Btn_Next_Level)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Next_Level extends SimpleBtn {
public function Btn_Next_Level(){
action = BtnActions.NEXT_LEVEL;
}
}
}//package framework.btns
Section 37
//Btn_No (framework.btns.Btn_No)
package framework.btns {
import ui.*;
public class Btn_No extends SimpleBtn {
}
}//package framework.btns
Section 38
//Btn_Normal (framework.btns.Btn_Normal)
package framework.btns {
import ui.*;
public class Btn_Normal extends SimpleBtn {
}
}//package framework.btns
Section 39
//Btn_Pause (framework.btns.Btn_Pause)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Pause extends SimpleBtn {
public function Btn_Pause(){
action = BtnActions.PAUSE;
hotKeys = "P";
}
}
}//package framework.btns
Section 40
//Btn_Play (framework.btns.Btn_Play)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Play extends SimpleBtn {
public function Btn_Play(){
action = BtnActions.PLAY;
}
}
}//package framework.btns
Section 41
//Btn_Play_Game (framework.btns.Btn_Play_Game)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Play_Game extends SimpleBtn {
public function Btn_Play_Game(){
action = BtnActions.PLAY_GAME;
}
}
}//package framework.btns
Section 42
//Btn_Quality (framework.btns.Btn_Quality)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Quality extends SimpleBtn {
public function Btn_Quality(){
action = BtnActions.QUALITY;
}
}
}//package framework.btns
Section 43
//Btn_Replay (framework.btns.Btn_Replay)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Replay extends SimpleBtn {
public function Btn_Replay(){
action = BtnActions.REPLAY;
}
}
}//package framework.btns
Section 44
//Btn_Retry (framework.btns.Btn_Retry)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Retry extends SimpleBtn {
public function Btn_Retry(){
action = BtnActions.RETRY;
}
}
}//package framework.btns
Section 45
//Btn_Single_Race (framework.btns.Btn_Single_Race)
package framework.btns {
import ui.*;
public dynamic class Btn_Single_Race extends SimpleBtn {
}
}//package framework.btns
Section 46
//Btn_Skip (framework.btns.Btn_Skip)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Skip extends SimpleBtn {
public function Btn_Skip(){
action = BtnActions.SKIP;
}
}
}//package framework.btns
Section 47
//Btn_Sound (framework.btns.Btn_Sound)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Sound extends SimpleBtn {
public function Btn_Sound(){
action = BtnActions.SOUND;
}
}
}//package framework.btns
Section 48
//Btn_Submit (framework.btns.Btn_Submit)
package framework.btns {
import ui.*;
public class Btn_Submit extends SimpleBtn {
}
}//package framework.btns
Section 49
//Btn_Submit_Score (framework.btns.Btn_Submit_Score)
package framework.btns {
import ui.*;
import framework.*;
public class Btn_Submit_Score extends SimpleBtn {
public function Btn_Submit_Score(){
action = BtnActions.SUBMIT_SCORE;
}
}
}//package framework.btns
Section 50
//Btn_Time_Trial (framework.btns.Btn_Time_Trial)
package framework.btns {
import ui.*;
public dynamic class Btn_Time_Trial extends SimpleBtn {
}
}//package framework.btns
Section 51
//Btn_Tournamemt (framework.btns.Btn_Tournamemt)
package framework.btns {
import ui.*;
public dynamic class Btn_Tournamemt extends SimpleBtn {
}
}//package framework.btns
Section 52
//Btn_View_Highscores (framework.btns.Btn_View_Highscores)
package framework.btns {
import ui.*;
import flash.net.*;
import flash.utils.*;
public class Btn_View_Highscores extends SimpleBtn {
private var game_name:String;
public function Btn_View_Highscores(){
var _parent:*;
var SubmitScoreClass:*;
super();
try {
_parent = this.parent;
SubmitScoreClass = getDefinitionByName("framework.SubmitScore");
if ((_parent is SubmitScoreClass)){
game_name = SubmitScoreClass.game_name;
};
} catch(e) {
trace(("e=" + e));
};
if (game_name){
} else {
try {
game_name = getDefinitionByName("Main").game_name;
} catch(e) {
trace(("e=" + e));
};
};
if (game_name){
release = function ():void{
navigateToURL(new URLRequest(("http://www.freeworldgroup.com/score/index.asp?game=" + this.game_name)), "_blank");
};
};
}
}
}//package framework.btns
Section 53
//Btn_X (framework.btns.Btn_X)
package framework.btns {
import ui.*;
public class Btn_X extends SimpleBtn {
}
}//package framework.btns
Section 54
//Btn_Yes (framework.btns.Btn_Yes)
package framework.btns {
import ui.*;
public class Btn_Yes extends SimpleBtn {
}
}//package framework.btns
Section 55
//Page_Credits (framework.pages.Page_Credits)
package framework.pages {
import framework.*;
public class Page_Credits extends Page {
}
}//package framework.pages
Section 56
//Page_Game (framework.pages.Page_Game)
package framework.pages {
import framework.*;
public class Page_Game extends Page {
}
}//package framework.pages
Section 57
//Page_Instructions (framework.pages.Page_Instructions)
package framework.pages {
import framework.*;
public class Page_Instructions extends Page {
public function Page_Instructions(){
stop();
}
}
}//package framework.pages
Section 58
//Page_Level_Complete (framework.pages.Page_Level_Complete)
package framework.pages {
import framework.*;
public class Page_Level_Complete extends Page {
}
}//package framework.pages
Section 59
//Page_Lose (framework.pages.Page_Lose)
package framework.pages {
import framework.*;
public class Page_Lose extends Page {
public var scoreTxt:Txt;
public function Page_Lose(){
addFrameScript(0, frame1);
}
function frame1(){
scoreTxt.text = Main.totalScore;
}
}
}//package framework.pages
Section 60
//Page_Menu (framework.pages.Page_Menu)
package framework.pages {
import framework.*;
public class Page_Menu extends Page {
}
}//package framework.pages
Section 61
//Page_Options (framework.pages.Page_Options)
package framework.pages {
import flash.display.*;
import effect.*;
import framework.*;
import framework.btns.*;
public class Page_Options extends Page {
public var btn_mode_1:Btn_Tournamemt;
public var loading_popUp:MovieClip;
public var bg:MovieClip;
public var btnBack:Btn_Back;
private var tm:TweenMenu;
public var btn_diff_1:Btn_Normal;
public var btn_diff_2:Btn_Hard;
public var btn_diff_3:Btn_Crazy;
public var stageSelecter:StageSelecter;
public var btn_diff_0:Btn_Easy;
public var btn_mode_2:Btn_Single_Race;
public var btn_mode_3:Btn_Time_Trial;
public function Page_Options(){
var _local1:int;
super();
_local1 = 0;
while (_local1 < 4) {
addFrameScript(_local1, this[("frame" + (_local1 + 1))]);
_local1++;
};
}
private function frame3():void{
var levelNum:int;
var btn:*;
if (GameI.playMode == GameI.playMode_timeTrial){
btnBack.release = function ():void{
gotoAndStop("selectMode");
};
} else {
btnBack.release = function ():void{
gotoAndStop("selectDiff");
};
};
StageSelecter.onSelectLevel = function (_arg1:int):void{
GameI.selectedStageNum = _arg1;
nextFrame();
};
bg.gotoAndStop(GameI.defaultTrack);
tm = new TweenMenu(stageSelecter);
levelNum = Main.totalLevel;
while ((levelNum = (levelNum - 1)), (levelNum - 1) >= 0) {
btn = (stageSelecter.getChildAt(levelNum) as Btn_Select_Level);
btn.rollOver = function ():void{
tm.makeBig(this);
GameI.defaultTrack = this.levelNum;
bg.gotoAndStop(this.levelNum);
};
btn.rollOut = function ():void{
tm.makeSmall(this);
};
};
}
private function frame1():void{
var btn:*;
stop();
btn_mode_1.press = function ():void{
GameI.playMode = GameI.playMode_tournament;
GameI.gameDiff = "";
Main.levelNum = 1;
gotoAndStop("selectCar");
};
btn_mode_2.press = function ():void{
GameI.playMode = GameI.playMode_singleRace;
gotoAndStop("selectDiff");
};
btn_mode_3.press = function ():void{
GameI.playMode = GameI.playMode_timeTrial;
GameI.gameDiff = "";
gotoAndStop("selectTrack");
};
if (tm){
tm.clear();
tm = null;
};
}
private function frame2():void{
btnBack.release = function ():void{
gotoAndStop("selectMode");
};
btn_diff_0.release = function ():void{
GameI.gameDiff = GameI.diff_easy;
gotoAndStop("selectTrack");
};
btn_diff_1.release = function ():void{
GameI.gameDiff = GameI.diff_normal;
gotoAndStop("selectTrack");
};
btn_diff_2.release = function ():void{
GameI.gameDiff = GameI.diff_hard;
gotoAndStop("selectTrack");
};
btn_diff_3.release = function ():void{
GameI.gameDiff = GameI.diff_crazy;
gotoAndStop("selectTrack");
};
if (tm){
tm.clear();
tm = null;
};
}
private function frame4():void{
if (GameI.playMode == GameI.playMode_tournament){
btnBack.release = function ():void{
gotoAndStop("selectMode");
};
} else {
btnBack.release = function ():void{
gotoAndStop("selectTrack");
};
};
if (tm){
tm.clear();
tm = null;
};
}
}
}//package framework.pages
Section 62
//Page_Win (framework.pages.Page_Win)
package framework.pages {
import framework.*;
public class Page_Win extends Page {
public var scoreTxt:Txt;
public function Page_Win(){
addFrameScript(0, frame1);
}
function frame1(){
scoreTxt.text = Main.totalScore;
}
}
}//package framework.pages
Section 63
//Btn_Select_Level (framework.Btn_Select_Level)
package framework {
import ui.*;
public class Btn_Select_Level extends SimpleBtn {
public var element:Btn_Level_Element;
public var txt:Txt;
public var onSelectLevel:Function;
private var __levelNum:int;
public function Btn_Select_Level(){
super();
txt.autoSize = "center";
press = function ():void{
onSelectLevel(levelNum);
};
}
public function set locked(_arg1:Boolean):void{
bGrey = _arg1;
}
public function get levelNum():int{
return (__levelNum);
}
public function set levelNum(_arg1:int):void{
__levelNum = _arg1;
txt.text = __levelNum;
element.gotoAndStop(__levelNum);
}
}
}//package framework
Section 64
//BtnActions (framework.BtnActions)
package framework {
public class BtnActions {
public static const REMOVE:String = "Remove";
public static const MUSIC:String = "Music";
public static const SKIP:String = "Skip";
public static const SUBMIT_SCORE:String = "Submit Score";
public static const RETRY:String = "Retry";
public static const NEXT_LEVEL:String = "Next Level";
public static const PAUSE:String = "Pause";
public static const MENU:String = "Menu";
public static const PLAY_GAME:String = "Play Game";
public static const INSTRUCTIONS:String = "Instructions";
public static const COPYRIGHT:String = "Copyright 2008 freeworldgroup.com";
public static const DOWNLOAD_GAMES:String = "Download Games";
public static const ADD_GAMES_TO_YOUR_SITE:String = "Add Games to Your Site";
public static const MORE_ONLINE_GAMES:String = "More Online Games";
public static const SOUND:String = "Sound";
public static const NEXT:String = "Next";
public static const BACK:String = "Back";
public static const QUALITY:String = "Quality";
public static const CREDITS:String = "Credits";
public static const PLAY:String = "Play";
public static const REPLAY:String = "Replay";
}
}//package framework
Section 65
//GamePan (framework.GamePan)
package framework {
import flash.events.*;
import flash.display.*;
import boxRacers.*;
public class GamePan extends Sprite {
public var txt_Score:MovieClip;
public var levelNumTxt:Txt;
public var txt_Level:MovieClip;
public var totalScoreTxt:Txt;
public static var gamePan:GamePan;
public function GamePan(){
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
gamePan = this;
}
private function added(_arg1:Event):void{
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
levelNum = Main.levelNum;
currScore = Main.currScore;
totalScore = Main.totalScore;
}
private function removed(_arg1:Event):void{
gamePan = null;
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
}
public function set levelNum(_arg1:int):void{
if (gamePan){
levelNumTxt.text = _arg1;
};
}
public static function set currScore(_arg1:int):void{
var _local2:*;
if (gamePan){
_local2 = gamePan.getChildByName("currtotalScoreTxt");
if (_local2){
_local2.text = _arg1;
};
};
}
public static function set totalScore(_arg1:int):void{
if (gamePan){
gamePan.totalScoreTxt.text = _arg1;
};
}
}
}//package framework
Section 66
//Logo (framework.Logo)
package framework {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class Logo extends Sprite {
public function Logo(){
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "Logo.added");
}
private function added(_arg1:Event):void{
this.buttonMode = true;
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "Logo.removed");
EventsManager.addEvent(this, MouseEvent.MOUSE_UP, release, "Logo.onRelease");
}
private function release(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.freeworldgroup.com"), "_blank");
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
EventsManager.removeEvent(this, MouseEvent.MOUSE_UP, release);
}
}
}//package framework
Section 67
//Page (framework.Page)
package framework {
import flash.display.*;
public class Page extends MovieClip {
}
}//package framework
Section 68
//PausePan (framework.PausePan)
package framework {
import flash.events.*;
import flash.display.*;
import ui.*;
public class PausePan extends Sprite {
public var clickOrPress_txt:Txt;
public var paused_txt:Txt;
public var maskRect:MaskRect;
public function PausePan(){
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "PausePan.added");
__setProp_maskRect_framework_1();
}
private function added(_arg1:Event):void{
RunsManager.pause = true;
this.mouseChildren = false;
stage.focus = null;
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "PausePan.removed");
EventsManager.addEvent(this, MouseEvent.MOUSE_UP, remove, "PausePan.remove");
EventsManager.addEvent(stage, KeyboardEvent.KEY_DOWN, remove, "PausePan.remove");
MaskRect.setPos(maskRect, setPos);
paused_txt.autoSize = "center";
paused_txt.text = "Paused";
clickOrPress_txt.autoSize = "center";
clickOrPress_txt.text = "Click or press any key to continue!";
}
function __setProp_maskRect_framework_1(){
try {
maskRect["componentInspectorSetting"] = true;
} catch(e:Error) {
};
maskRect.align = "center-middle";
try {
maskRect["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function removed(_arg1:Event):void{
stage.focus = null;
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
EventsManager.removeEvent(this, MouseEvent.MOUSE_UP, remove);
EventsManager.removeEvent(stage, KeyboardEvent.KEY_DOWN, remove);
RunsManager.pause = false;
}
private function remove(_arg1:Event):void{
this.parent.removeChild(this);
}
private function setPos(_arg1:int, _arg2:int):void{
this.x = (_arg1 / 2);
this.y = (_arg2 / 2);
}
}
}//package framework
Section 69
//QualitySetting (framework.QualitySetting)
package framework {
import flash.events.*;
import flash.display.*;
import ui.*;
import framework.btns.*;
import flash.geom.*;
public class QualitySetting extends Sprite {
public var bg:MovieClip;
public var btn3:Btn_Best;
public var btn0:Btn_Low;
public var btn2:Btn_High;
public var btn1:Btn_Medium;
public var maskRect:MaskRect;
private static var qualitySetting:QualitySetting;
public function QualitySetting(){
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function added(_arg1:Event):void{
var onSetAction:Function;
var event = _arg1;
qualitySetting = this;
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
EventsManager.addEvent(maskRect, MouseEvent.MOUSE_DOWN, _onPressOutside, "_onPressOutside");
EventsManager.addEvent(bg, MouseEvent.MOUSE_OVER, _onRollOverBg, "_onRollOverBg");
onSetAction = SimpleBtn.onSetAction;
SimpleBtn.onSetAction = function ():void{
};
btn0.action = StageQuality.LOW;
btn1.action = StageQuality.MEDIUM;
btn2.action = StageQuality.HIGH;
btn3.action = StageQuality.BEST;
SimpleBtn.onSetAction = onSetAction;
btn0.release = (btn1.release = (btn2.release = (btn3.release = function ():void{
qualitySetting.update(this.action);
})));
update();
RunsManager.pause = true;
}
private function _onRollOverBg(_arg1:MouseEvent):void{
EventsManager.removeEvent(bg, MouseEvent.MOUSE_OVER, _onRollOverBg);
EventsManager.addEvent(bg, MouseEvent.MOUSE_OUT, _onRollOutBg, "_onRollOutBg");
}
private function removed(_arg1:Event):void{
qualitySetting = null;
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
EventsManager.removeEvent(maskRect, MouseEvent.MOUSE_DOWN, _onPressOutside);
EventsManager.removeEvent(bg, MouseEvent.MOUSE_OVER, _onRollOverBg);
EventsManager.removeEvent(bg, MouseEvent.MOUSE_OUT, _onRollOutBg);
RunsManager.pause = false;
}
private function remove():void{
this.parent.removeChild(this);
}
private function _onPressOutside(_arg1:MouseEvent):void{
remove();
}
public function update(_arg1:String=null):void{
var _local2:int;
var _local3:SimpleBtn;
if (_arg1 == null){
_arg1 = stage.quality;
} else {
_arg1 = _arg1.toLowerCase();
stage.quality = _arg1;
};
_local2 = 0;
while (_local2 < 4) {
_local3 = this[("btn" + _local2)];
_local3.selected = (_local3.action.toLowerCase() == _arg1.toLowerCase());
_local2++;
};
}
private function _onRollOutBg(_arg1:MouseEvent):void{
var _local2:Point;
_local2 = this.localToGlobal(new Point(this.mouseX, this.mouseY));
if (!bg.hitTestPoint(_local2.x, _local2.y, true)){
remove();
};
}
}
}//package framework
Section 70
//StageSelecter (framework.StageSelecter)
package framework {
import flash.display.*;
import localSave.*;
import flash.utils.*;
public class StageSelecter extends Sprite {
public var btn3:Btn_Select_Level;
public var btn2:Btn_Select_Level;
public var btn4:Btn_Select_Level;
public var btn5:Btn_Select_Level;
public var btn1:Btn_Select_Level;
public static var totalLevel:int;
public static var onSelectLevel:Function;
public static var stageSave:StageSave;
public function StageSelecter(){
var _local1:int;
var _local2:Btn_Select_Level;
var _local3:*;
super();
if (stageSave == null){
trace("stageSave未初始化");
return;
};
_local1 = totalLevel;
while (_local1 > 0) {
_local2 = this[("btn" + _local1)];
_local3 = stageSave.getDataItem(_local1);
_local2.levelNum = _local1;
_local2.locked = _local3.locked;
_local2.onSelectLevel = selectLevel;
_local2.errorAction = showCanNotPlay;
_local1--;
};
}
public function showCanNotPlay():void{
if (ToolTipClass){
ToolTipClass.show("Can't play yet!");
ToolTipClass.hideDelay();
} else {
trace("Can't play yet!");
};
}
public function selectLevel(_arg1:int):void{
onSelectLevel(_arg1);
}
private static function get ToolTipClass(){
try {
return ((getDefinitionByName("framework.ToolTip") as Class));
} catch(e) {
trace(("BasicBtn.ToolTipClass(),e=" + e));
trace("请在调用前放一个ToolTip在场景里^_^");
};
return (null);
}
public static function init(_arg1:String, _arg2:int):Boolean{
totalLevel = _arg2;
stageSave = new StageSave(_arg1, totalLevel);
return (true);
}
}
}//package framework
Section 71
//SubmitScore (framework.SubmitScore)
package framework {
import flash.events.*;
import flash.display.*;
import ui.*;
import flash.net.*;
import framework.btns.*;
public class SubmitScore extends MovieClip {
public var maskRect:MaskRect;
public var sending_txt:Txt;
public var score_txt:Txt;
public var btnX:Btn_X;
public var btnSubmit:Btn_Submit;
public var scoreTxt:Txt;
public var name_txt:Txt;
public var nameTxt:Txt;
public static var score:int;
public static var onSubmitComplete:Function = function ():void{
};
public static var game_name:String;
public static var playerName:String;
public function SubmitScore(_arg1:String, _arg2:String, _arg3:int){
var _local4:int;
super();
stop();
playerName = _arg2;
score = _arg3;
game_name = _arg1;
nameTxt.type = "input";
nameTxt.selectable = true;
nameTxt.maxChars = 10;
nameTxt.text = playerName;
scoreTxt.text = score;
trace(((("playerName=" + nameTxt.text) + ",score=") + scoreTxt.text));
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
MaskRect.setPos(maskRect, setPos);
_local4 = 0;
while (_local4 < 3) {
addFrameScript(_local4, this[("frame" + (_local4 + 1))]);
_local4++;
};
__setProp_maskRect_framework_1();
}
private function added(_arg1:Event):void{
var event = _arg1;
btnX.release = function ():void{
this.parent.parent.removeChild(this.parent);
};
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
btnSubmit.release = submit;
}
private function submit(_arg1:Event=null):void{
var _local2:URLVariables;
var _local3:URLRequest;
var _local4:URLLoader;
playerName = nameTxt.text;
if (playerName){
} else {
ToolTip.show("You must enter your name!", nameTxt);
return;
};
if (score > 0){
_local2 = new URLVariables();
_local2.game = game_name;
_local2.score = score;
_local2.name = (playerName = nameTxt.text);
_local3 = new URLRequest("http://www.freeworldgroup.com/score/score.asp");
_local3.data = _local2;
_local3.method = URLRequestMethod.POST;
trace(((("sendToURL: " + _local3.url) + "?") + _local3.data));
sendToURL(_local3);
_local4 = new URLLoader();
EventsManager.addEvent(_local4, Event.COMPLETE, completeHandler, "SubmitScore.completeHandler");
_local4.load(_local3);
gotoAndStop(2);
btnX.bGrey = true;
} else {
trace("score is 0! can't submit!");
};
}
function __setProp_maskRect_framework_1(){
try {
maskRect["componentInspectorSetting"] = true;
} catch(e:Error) {
};
maskRect.align = "center-middle";
try {
maskRect["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function frame3():void{
sending_txt.text = "HighScore Received!";
}
private function frame1():void{
name_txt.autoSize = "right";
name_txt.text = "Name:";
score_txt.autoSize = "right";
score_txt.text = "Score:";
}
private function frame2():void{
sending_txt.autoSize = "center";
sending_txt.text = "Sending....";
}
private function setPos(_arg1:int, _arg2:int):void{
trace("改成private");
this.x = (_arg1 / 2);
this.y = (_arg2 / 2);
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
}
private function completeHandler(_arg1:Event):void{
EventsManager.removeEvent(_arg1.target, Event.COMPLETE, completeHandler);
btnX.bGrey = false;
gotoAndStop(3);
onSubmitComplete(playerName);
}
}
}//package framework
Section 72
//Top4 (framework.Top4)
package framework {
import flash.display.*;
public dynamic class Top4 extends MovieClip {
}
}//package framework
Section 73
//Txt (framework.Txt)
package framework {
import flash.display.*;
import flash.text.*;
public class Txt extends Sprite {
private var __text:String;
public var txt:TextField;
public function Txt(){
__text = "";
autoSize = "left";
}
public function get text(){
if (txt.selectable){
__text = txt.text;
};
return (__text);
}
public function get type():String{
return (txt.type);
}
public function get autoSize():String{
return (txt.autoSize);
}
public function get selectable():Boolean{
return (txt.selectable);
}
public function set text(_arg1):void{
txt.text = (__text = _arg1);
}
public function set type(_arg1:String):void{
txt.type = _arg1;
}
public function set autoSize(_arg1:String):void{
txt.autoSize = _arg1;
}
public function set selectable(_arg1:Boolean):void{
txt.selectable = _arg1;
}
public function set maxChars(_arg1:int):void{
txt.maxChars = _arg1;
}
public function get maxChars():int{
return (txt.maxChars);
}
}
}//package framework
Section 74
//FPS (help.FPS)
package help {
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class FPS extends Sprite {
public var txt:TextField;
private var ms:int;
private var fs:int;
public function FPS(){
reset();
TestBar.addRun(run);
}
private function reset():void{
ms = getTimer();
fs = 0;
}
private function run():void{
if ((getTimer() - ms) >= 1000){
txt.text = (fs + "fps");
reset();
} else {
fs++;
};
}
}
}//package help
Section 75
//MemoryBar (help.MemoryBar)
package help {
import flash.display.*;
import flash.text.*;
import flash.system.*;
public class MemoryBar extends Sprite {
public var bar:MovieClip;
public var txt:TextField;
public function MemoryBar(){
TestBar.addRun(run);
}
private function run():void{
bar.width = (System.totalMemory / 200000);
txt.text = ((System.totalMemory / (0x0400 * 0x0400)) + "MB");
}
}
}//package help
Section 76
//TestBar (help.TestBar)
package help {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.system.*;
public class TestBar extends Sprite {
public var osTxt:TextField;
public var screenResolutionTxt:TextField;
public var btnDebug:SimpleButton;
public var txt:TextField;
public var versionTxt:TextField;
public var playerTypeTxt:TextField;
public var btnPause:SimpleButton;
public var languageTxt:TextField;
private static var runArr:Array = new Array();
public function TestBar(){
Global.testBar = this;
versionTxt.text = Capabilities.version;
osTxt.text = Capabilities.os;
playerTypeTxt.text = Capabilities.playerType;
languageTxt.text = Capabilities.language;
screenResolutionTxt.text = ((Capabilities.screenResolutionX + "*") + Capabilities.screenResolutionY);
btnPause.addEventListener(MouseEvent.MOUSE_UP, setPause, false, 0, true);
btnDebug.addEventListener(MouseEvent.MOUSE_UP, debug, false, 0, true);
this.addEventListener(Event.ENTER_FRAME, run, false, 0, true);
}
public function showMsg(_arg1:String):void{
txt.text = _arg1;
}
public function clearMsg():void{
txt.text = "";
}
public function debug(_arg1:MouseEvent):void{
Global.debug();
}
public function setPause(_arg1:MouseEvent):void{
Global.pause = !(Global.pause);
}
public static function addRun(_arg1:Function):void{
runArr.push(_arg1);
}
public static function run(_arg1:Event):void{
var _local2:Function;
for each (_local2 in runArr) {
_local2();
};
}
}
}//package help
Section 77
//angeryAttack (kill.angeryAttack)
package kill {
import flash.display.*;
import fl.transitions.easing.*;
public class angeryAttack {
public static var angery = 0;
public function angeryAttack(){
init();
}
private static function init(){
angery = 0;
}
public static function addAngery(){
angery++;
if (angery >= main.Random(50, 100)){
imAngery();
init();
};
}
public static function imAngery(){
var _local1:*;
_local1 = main.hero.parent;
main.hero.player_mc.gotoAndStop("angery");
creazy();
}
private static function creazy():void{
var movMc:MovMc;
var mc:*;
var x0:Number;
movMc = new MovMc();
mc = main.hero;
x0 = mc.x;
mc.removeListener();
movMc.onMov = function (_arg1:MovieClip):void{
mc.x = (x0 + _arg1.x);
mc.scaleX = _arg1.scaleX;
mc.filters = _arg1.filters;
};
}
}
}//package kill
Section 78
//baojian (kill.baojian)
package kill {
import flash.display.*;
public dynamic class baojian extends MovieClip {
public var hold:Boolean;
public function baojian(){
hold = false;
this.visible = true;
}
}
}//package kill
Section 79
//big (kill.big)
package kill {
import flash.display.*;
public class big extends enemy {
private var blood:Number;
public var lifeBar:Bar;
public var che_mc:MovieClip;
public var people:MovieClip;
public var hit_mc2:MovieClip;
public var hit_mc:MovieClip;
public var hengkill:MovieClip;
public function big(){
var _local1:Number;
var _local2:*;
super();
_local1 = 0;
if (Score.scoreNum < 30){
_local1 = 0.1;
this.blood = 1;
} else {
if (Score.scoreNum < 50){
this.blood = 2;
} else {
if (Score.scoreNum < 100){
_local1 = 0.3;
this.blood = 2;
} else {
if (Score.scoreNum < 200){
_local1 = 0.5;
this.blood = 3;
} else {
if (Score.scoreNum < 300){
_local1 = 0.7;
this.blood = 3;
} else {
if (Score.scoreNum > 400){
_local1 = 0.9;
this.blood = 2;
} else {
trace(("Score.scoreNum=" + Score.scoreNum));
_local1 = 0;
};
};
};
};
};
};
this.moveSpeed = ((2 + Math.random()) + _local1);
if (isNaN(this.moveSpeed)){
_local2.kk;
};
}
public function reduceBlood(){
this["lifeBar"].visible = true;
this.blood--;
if (this.blood == 2){
this["lifeBar"].value = 70;
};
if (this.blood == 1){
this["lifeBar"].value = 30;
};
if (this.blood == 0){
this["lifeBar"].value = 0;
this["lifeBar"].visible = false;
};
if (this.blood <= 0){
dead();
game.addScore();
return (true);
};
if (this.moveSpeed >= 1){
this.moveSpeed--;
};
return (false);
}
}
}//package kill
Section 80
//borner (kill.borner)
package kill {
import flash.utils.*;
public class borner {
static var intervalId:uint;
public static var currNum:int = 0;
public static var t1:int = 0;
public function borner(){
init();
}
public static function calcu(_arg1){
var temp:*;
var myDelayedFunction:Function;
var con = _arg1;
myDelayedFunction = function (_arg1, _arg2){
};
temp = t1;
t1 = (getTimer() / 1000);
if ((t1 - temp) <= 2){
angeryAttack.imAngery();
Score.addScore();
Main.addScore(10);
};
}
public static function init(){
t1 = (getTimer() / 1000);
currNum = 0;
}
}
}//package kill
Section 81
//enemy (kill.enemy)
package kill {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import fl.transitions.easing.*;
public dynamic class enemy extends MovieClip {
private var isStop;
private var ping_gao;// = 400
public var hold;
public var holdObj;
private var ping_kuan;// = 710
private var wantObj;
private var direct:String;
public var moveSpeed:Number;
public function enemy(){
ping_gao = 400;
ping_kuan = 710;
super();
holdObj = null;
hold = null;
this.gotoAndStop("run");
setPostion();
isStop = false;
this["lifeBar"].visible = false;
}
public function loadBaobei(_arg1:String){
var _local2:*;
var _local3:*;
if (this.parent == null){
trace("没装上");
return (false);
};
if (_arg1 == "jimu25"){
game.lose();
return;
};
_local2 = new (main.baobei[_arg1].constructor);
_local2.names = _arg1;
_local3 = this.parent.getChildIndex(this);
this.parent.addChildAt(_local2, _local3);
main.baobei_arr.push(_local2);
this.holdObj = _local2;
_local2.isHold = true;
_local2.holdEnemy = this;
EventsManager.addEvent(_local2, Event.ENTER_FRAME, move);
return (true);
}
public function rightMove(_arg1:Event){
if (RunsManager.pause == true){
return;
};
this.x = (this.x + moveSpeed);
this.direct = "right";
checkHold();
if (this["people"] == null){
return;
};
if (this.x > (ping_kuan + 200)){
dead();
if (this.holdObj != null){
main.delBaobei(this.holdObj);
trace("拿跑了一个");
};
return;
};
}
private function baobeiDown(){
EventsManager.removeEvent(this.holdObj, Event.ENTER_FRAME, move);
EventsManager.addEvent(this.holdObj, Event.ENTER_FRAME, down);
}
public function clearEnemy(){
this.hold = null;
EventsManager.removeEvent(this, Event.ENTER_FRAME, leftMove);
EventsManager.removeEvent(this, Event.ENTER_FRAME, rightMove);
main.enemy_arr.pop();
this.parent.removeChild(this);
}
private function timerHandler(_arg1:TimerEvent):void{
EventsManager.addEvent(this, Event.ENTER_FRAME, jianbian);
}
public function Run(){
isStop = false;
this["che_mc"]["chelun1"].play();
this["che_mc"]["chelun2"].play();
this["people"].play();
if (this.direct == "left"){
EventsManager.addEvent(this, Event.ENTER_FRAME, leftMove);
return;
};
if (this.direct == "right"){
EventsManager.addEvent(this, Event.ENTER_FRAME, rightMove);
return;
};
}
public function dead(){
var _local1:Timer;
if (this.isStop == true){
main.baobei.flyTo(wantObj, 0, 0, wantObj.originX, wantObj.originY, 0, null, null);
};
this["che_mc"]["chelun1"].stop();
this["che_mc"]["chelun2"].stop();
EventsManager.removeEvent(this, Event.ENTER_FRAME, leftMove);
EventsManager.removeEvent(this, Event.ENTER_FRAME, rightMove);
main.delElem(this);
_local1 = new Timer(1000, 1);
EventsManager.addEvent(_local1, TimerEvent.TIMER, timerHandler);
EventsManager.addEvent(_local1, TimerEvent.TIMER_COMPLETE, completeHandler);
_local1.start();
}
public function leftMove(_arg1:Event){
if (RunsManager.pause == true){
return;
};
this.x = (this.x - moveSpeed);
this.direct = "left";
checkHold();
if (this["people"] == null){
return;
};
if (this.x < -200){
dead();
if (this.holdObj != null){
main.delBaobei(this.holdObj);
trace("拿跑了一个");
};
return;
};
}
private function jianbian(_arg1){
if (RunsManager.pause == true){
return;
};
if (this == null){
return;
};
if (this.parent == null){
return;
};
if (this.holdObj != null){
this.alpha = 1;
if (this.getChildAt(2).alpha <= 0.1){
this.holdObj.isHold = false;
EventsManager.removeEvent(this, Event.ENTER_FRAME, jianbian);
} else {
this.getChildAt(2).alpha = (this.getChildAt(2).alpha - 0.2);
};
} else {
if (this.alpha <= 0.1){
EventsManager.removeEvent(this, Event.ENTER_FRAME, jianbian);
this.parent.removeChild(this);
} else {
this.alpha = (this.alpha - 0.2);
};
};
}
private function setPostion(){
var _local1:*;
var _local2:*;
var _local3:*;
_local2 = main.enemy_arr.length;
_local3 = main.Random(1, 4);
if ((_local3 % 2) == 0){
this.scaleX = -1;
_local1 = main.Random(1, 3);
this.x = (-300 - _local1);
this.y = (365 - _local1);
EventsManager.addEvent(this, Event.ENTER_FRAME, rightMove);
} else {
_local1 = main.Random(1, 3);
this.x = ((ping_kuan + 300) + _local1);
this.y = (365 - _local1);
EventsManager.addEvent(this, Event.ENTER_FRAME, leftMove);
};
}
private function down(_arg1){
_arg1.target.y = (_arg1.target.y + 5);
if (_arg1.target.y > (360 - _arg1.target.offy)){
EventsManager.removeEvent(this.holdObj, Event.ENTER_FRAME, down);
_arg1.target.isHold = false;
_arg1.target.rotation = 0;
_arg1.target.y = (360 - _arg1.target.offy);
};
}
private function tingXia(){
this["che_mc"]["chelun1"].stop();
this["che_mc"]["chelun2"].stop();
this["people"].stop();
isStop = true;
if (this.direct == "left"){
EventsManager.removeEvent(this, Event.ENTER_FRAME, leftMove);
return;
};
if (this.direct == "right"){
EventsManager.removeEvent(this, Event.ENTER_FRAME, rightMove);
return;
};
}
private function move(_arg1){
var _local2:*;
var _local3:Point;
if (RunsManager.pause == true){
return;
};
_local2 = (this.getChildByName("che_mc") as Sprite);
_local3 = new Point(_local2.x, _local2.y);
_arg1.target.x = (_local2.localToGlobal(_local3).x + 21);
_arg1.target.y = (_local2.localToGlobal(_local3).y + 25);
if ((((_arg1.target is Jimu9)) || ((_arg1.target is Jimu13)))){
_arg1.target.rotation = 30;
_arg1.target.x = (_local2.localToGlobal(_local3).x + 5);
_arg1.target.y = (_local2.localToGlobal(_local3).y + 21);
};
if ((_arg1.target is Jimu5)){
_arg1.target.rotation = -30;
};
}
private function completeHandler(_arg1:TimerEvent){
EventsManager.removeEvent(_arg1.target, TimerEvent.TIMER, timerHandler);
EventsManager.removeEvent(_arg1.target, TimerEvent.TIMER_COMPLETE, completeHandler);
}
private function checkHold(){
var _local1:*;
var _local2:*;
var _local3:Point;
if (this.hold != null){
return;
};
if (this["hit_mc"].hitTestObject(main.baobei.jimu25)){
tingXia();
_local1 = main.baobei.takeAwayJimu();
if (_local1 == null){
return;
};
this.hold = _local1;
_local2 = main.baobei[_local1];
wantObj = _local2;
_local3 = new Point((this["che_mc"].x + 40), (this["che_mc"].y - 10));
_local3 = this.localToGlobal(_local3);
main.baobei.flyTo(_local2, 0, 0, _local3.x, _local3.y, 1, this, _local1);
};
}
}
}//package kill
Section 82
//fangzi (kill.fangzi)
package kill {
import flash.events.*;
import flash.display.*;
import flash.filters.*;
public dynamic class fangzi extends MovieClip {
public var jimu3:Jimu5;
public var jimu2:Jimu5;
public var jumu9:Jimu5;
public var jumu1:Jimu1;
private var yspeed:Number;
public var jimu14:Jimu5;
public var jimu13:Jimu5;
public var jimu18:Jimu5;
public var jimu12:Jimu4;
public var jumu10:Jimu5;
public var jumu11:Jimu13;
public var jimu21:Jimu13;
public var jimu22:Jimu13;
public var jimu23:Jimu2;
public var jimu24:Jimu2;
public var jimu20:Jimu5;
public var jimu15:Jimu3;
public var jimu17:Jimu9;
public var jimu25:Jimu14;
public var jimu16:Jimu7;
private var totalNum:int;
private var depth:Array;
public var jimu19:Jimu5;
public var jimu4:Jimu13;
public var jimu5:Jimu10;
public var jimu6:Jimu6;
public var jimu8:Jimu11;
public var jimu7:Jimu12;
public function fangzi(){
depth = new Array();
yspeed = 0;
totalNum = this.numChildren;
initChild();
}
private function initChild(){
var _local1:*;
_local1 = 0;
while (_local1 < totalNum) {
depth[_local1] = getChildByName(this.getChildAt(_local1).name);
depth[_local1].oriDepth = this.getChildIndex(depth[_local1]);
depth[_local1].originX = depth[_local1].x;
depth[_local1].originY = depth[_local1].y;
depth[_local1].moved = false;
depth[_local1].startX = depth[_local1].x;
depth[_local1].startY = depth[_local1].y;
depth[_local1].endX = depth[_local1].x;
depth[_local1].endY = depth[_local1].y;
depth[_local1].flyFlag = false;
_local1++;
};
}
private function flying(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
if (RunsManager.pause == true){
return;
};
_local2 = _arg1.target;
if (!_local2.flyFlag){
if (_local2.y > 210){
_local2.y = (_local2.y - _local2.speedY++);
} else {
_local2.flyFlag = true;
_local3 = Math.atan2((_local2.endY - _local2.y), (_local2.endX - _local2.x));
_local2.speedX = (Math.cos(_local3) * _local2.speed_num);
_local2.speedY = (Math.sin(_local3) * _local2.speed_num);
if (main.hero.holdObj == null){
main.hero.player_mc["che_mc"].visible = false;
};
this.addChild(_local2);
};
} else {
if (Math.max(Math.abs((_local2.endX - _local2.x)), Math.abs((_local2.endY - _local2.y))) < _local2.speed_num){
_local2.x = _local2.endX;
_local2.y = _local2.endY;
if (_local2.moveFlag == 0){
_local2.visible = true;
_local2.moved = false;
_local2.flyFlag = true;
_local2["flash"].visible = false;
this.addChildAt(_local2, _local2.oriDepth);
} else {
if (_local2.moveFlag == 1){
_local2.visible = false;
_local2["flash"].visible = false;
_local2.flyFlag = true;
_local2.x = _local2.originX;
_local2.y = _local2.originY;
this.addChildAt(_local2, _local2.oriDepth);
_local4 = _local2.moveObj.loadBaobei(_local2.names);
if (_local4 == false){
takeOffJimu(_local2.names);
trace("还是没装成功");
return;
};
_local2.moveObj.Run();
};
};
EventsManager.removeEvent(_local2, Event.ENTER_FRAME, flying);
} else {
_local2.x = (_local2.x + _local2.speedX);
_local2.y = (_local2.y + _local2.speedY);
_local2["flash"].visible = true;
};
};
}
public function takeAwayJimu(){
var _local1:*;
_local1 = smallestJimu();
if (_local1 == null){
return (null);
};
return (_local1.name);
}
public function flyTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8){
_arg1.startX = _arg2;
_arg1.startY = _arg3;
_arg1.endX = _arg4;
_arg1.endY = _arg5;
_arg1.flyFlag = false;
_arg1.speedX = 0;
_arg1.speedY = 0;
_arg1.speed_num = 5;
_arg1.moveObj = _arg7;
_arg1.names = _arg8;
_arg1.moveFlag = _arg6;
EventsManager.removeEvent(_arg1, Event.ENTER_FRAME, flying);
EventsManager.addEvent(_arg1, Event.ENTER_FRAME, flying);
}
public function takeOffJimu(_arg1:String){
this[_arg1].visible = true;
this[_arg1].moved = false;
this.addChildAt(this[_arg1], this[_arg1].oriDepth);
}
private function smallestJimu(){
var _local1:*;
var _local2:MovieClip;
_local1 = 0;
_local1 = 0;
while (_local1 < totalNum) {
if (depth[_local1].moved == false){
_local2 = depth[_local1];
break;
};
_local1++;
};
if (_local1 >= totalNum){
return (null);
};
_local1 = 0;
while (_local1 < totalNum) {
if (depth[_local1].moved == false){
if (Number(depth[_local1].name.substring(4)) < Number(_local2.name.substring(4))){
_local2 = depth[_local1];
};
};
_local1++;
};
_local2.moved = true;
return (_local2);
}
}
}//package kill
Section 83
//game (kill.game)
package kill {
import flash.display.*;
import flash.text.*;
public class game extends Sprite {
var score_txt:TextField;
var life_txt:TextField;
private static var _root:MovieClip;
public static var crossAt:Number = 1;
private static var diff = 10;
public function game(_arg1){
_root = _arg1;
}
public static function addScore(){
Score.addScore();
Main.addScore(10);
}
public static function lose(){
trace("you lose");
main.lose();
Main.lose();
}
public static function nextCross(){
if (main.createNum < 2){
main.createNum++;
};
Main.nextLevel();
if (main.delayTime > 14){
main.delayTime = (main.delayTime - 3);
} else {
main.delayTime = 14;
main.createNum = 1;
};
}
public static function updateText(){
}
}
}//package kill
Section 84
//KeyListener (kill.KeyListener)
package kill {
import flash.events.*;
import flash.utils.*;
public class KeyListener {
private var keycode:Number;
private var bHold:Boolean;
private var sKey:String;
private var nKey:Number;
private var bDouble:Boolean;
private var nDelay:Number;
public var owner;
private var nTime:Number;
public function KeyListener(){
this.nTime = 0;
this.nDelay = 400;
this.bHold = false;
this.bDouble = false;
this.sKey = String.fromCharCode(this.nKey).toUpperCase();
}
public function down(_arg1:KeyboardEvent):void{
keycode = _arg1.keyCode;
stepRun(keycode);
}
public function stepRun(_arg1){
if (_arg1 == this.nKey){
if (this.bHold){
if (this.bDouble){
return (4);
};
return (3);
} else {
this.bHold = true;
if ((getTimer() - this.nTime) < this.nDelay){
this.bDouble = true;
return (2);
};
this.nTime = getTimer();
return (1);
};
} else {
if (this.bHold){
this.bHold = false;
if (this.bDouble){
this.nTime = 0;
this.bDouble = false;
return (-2);
};
return (0);
};
};
}
public function setKeyCode(_arg1:Number){
this.nKey = _arg1;
}
public function up(_arg1:KeyboardEvent):void{
keycode = -1;
stepRun(keycode);
}
}
}//package kill
Section 85
//Life (kill.Life)
package kill {
public class Life {
public static var life = 4;
public static function reduceLife(){
if (life > 0){
life--;
};
}
public static function addLife(){
life++;
}
public static function reSet(){
life = 4;
}
}
}//package kill
Section 86
//lightFlash (kill.lightFlash)
package kill {
import flash.events.*;
import flash.filters.*;
public class lightFlash {
private var delay;// = 1
private var filter;
public function lightFlash(_arg1){
delay = 1;
super();
delay = 1;
filter = new GlowFilter(0xFF0000, 0.5, 5, 5, 500, BitmapFilterQuality.HIGH, false, false);
EventsManager.addEvent(_arg1, Event.ENTER_FRAME, light);
}
private function light(_arg1){
if ((delay % 5) == 0){
_arg1.target.filters = [filter];
} else {
_arg1.target.filters = null;
};
delay++;
if (delay >= 15){
EventsManager.removeEvent(_arg1.target, Event.ENTER_FRAME, light);
_arg1.target.filters = null;
};
}
}
}//package kill
Section 87
//main (kill.main)
package kill {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
public class main extends Sprite {
public var delay:Number;
var mygame:game;
var _root:MovieClip;
public static var enemy_arr:Array;
public static var delayNum:Number;
public static var baoBei_Origin:Boolean;
public static var baobei_arr:Array;
public static var baoBeiPos:Point;
public static var createNum;
public static var enemyContainter:Sprite;
public static var baobei:fangzi;
public static var delayTime:Number;
private static var myTimer:Timer;
public static var hero:player;
public function main(){
createNum = 2;
delayTime = 45;
delayNum = 1;
delay = 100;
baobei = null;
baoBeiPos = new Point();
enemy_arr = new Array();
baobei_arr = new Array();
baoBei_Origin = new Boolean();
myTimer = new Timer(delay, 0);
enemyContainter = new Sprite();
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed);
Main.resetScore();
}
public function added(_arg1){
_root = (this.parent as MovieClip);
mygame = new game(_root);
_root.addChild(enemyContainter);
EventsManager.addEvent(myTimer, TimerEvent.TIMER, createEnemy);
init();
}
private function init(){
var _local1:*;
var _local2:*;
createBaojian();
crteateHero();
_local1 = Random(1, 6);
_local2 = new ((getDefinitionByName(("big" + _local1)) as Class));
enemy_arr.push(_local2);
enemyContainter.addChild(_local2);
myTimer.start();
}
private function createBaojian(){
baobei = null;
baobei = new fangzi();
_root.addChild(baobei);
baoBeiPos.x = (baobei.x = 0);
baoBeiPos.y = (baobei.y = 0);
baobei.width = baobei.width;
baobei.height = baobei.height;
baoBei_Origin = true;
}
private function errorHandler(_arg1){
trace(_arg1);
}
private function removed(_arg1:Event){
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
hero.reSetSpeed();
Score.reSet();
Life.reSet();
_root.removeChild(enemyContainter);
_root.removeChild(hero);
_root = null;
EventsManager.removeAll();
}
private function crteateHero(){
hero = new player(stage);
hero.x = (stage.stageWidth / 2);
hero.y = 375;
_root.addChild(hero);
swapDepth();
}
private function swapDepth(){
_root.swapChildren(enemyContainter, baobei);
}
public static function delElem(_arg1){
var _local2:*;
_local2 = 0;
while (_local2 < enemy_arr.length) {
if (enemy_arr[_local2] == _arg1){
enemy_arr.splice(_local2, 1);
break;
};
_local2++;
};
}
public static function lose(){
clearEnemy();
hero.removeListener();
}
public static function delBaobei(_arg1){
var _local2:*;
_local2 = 0;
while (_local2 < baobei_arr.length) {
if (baobei_arr[_local2] == _arg1){
baobei_arr.splice(_local2, 1);
break;
};
_local2++;
};
if (_arg1.parent != null){
_arg1.parent.removeChild(_arg1);
};
}
public static function Random(_arg1:Number, _arg2:Number){
return (Math.round(((Math.random() * (_arg2 - _arg1)) + _arg1)));
}
private static function createEnemy(_arg1:TimerEvent){
var _local2:*;
var _local3:*;
var _local4:*;
if (RunsManager.pause == true){
return;
};
if ((delayNum % delayTime) == 0){
_local2 = 0;
while (_local2 < createNum) {
_local4 = Random(1, 3);
if ((((_local4 == 1)) || ((_local4 == 2)))){
_local3 = new ((getDefinitionByName(("big" + Random(1, 6))) as Class));
} else {
if (_local4 == 3){
_local3 = new ((getDefinitionByName(("small" + Random(1, 6))) as Class));
};
};
enemy_arr.push(_local3);
enemyContainter.addChild(_local3);
delayNum = 1;
_local2++;
};
};
delayNum++;
}
private static function clearEnemy(){
var _local1:*;
if (myTimer != null){
EventsManager.removeEvent(myTimer, TimerEvent.TIMER, createEnemy);
};
_local1 = 0;
while (_local1 < enemy_arr.length) {
enemy_arr[_local1].clearEnemy();
enemy_arr.pop();
_local1++;
};
}
}
}//package kill
Section 88
//MovMc (kill.MovMc)
package kill {
import flash.events.*;
import flash.display.*;
public class MovMc extends MovieClip {
public var onFinished:Function;
private var body:Sprite;
public var onMov:Function;
public function MovMc(){
onMov = function (){
};
onFinished = function (){
main.hero.player_mc.gotoAndStop("stand");
main.hero.addListener();
};
super();
addFrameScript(39, frame40);
body = (this.getChildAt(0) as Sprite);
EventsManager.addEvent(this, Event.ENTER_FRAME, run);
}
public function finished():void{
onFinished();
trace("动画完成");
EventsManager.removeEvent(this, Event.ENTER_FRAME, run);
}
private function run(_arg1:Event):void{
onMov(body);
}
function frame40(){
stop();
this.finished();
}
}
}//package kill
Section 89
//player (kill.player)
package kill {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import fl.transitions.easing.*;
import fl.transitions.*;
public class player extends MovieClip {
private var isHit:Boolean;
private var key:KeyListener;
private var pressFlag;
private var enemy;
public var load_mc:MovieClip;
private var holdIns;
public var player_mc:MovieClip;
private var _root;
public var holdObj;
public static var moveSpeed = 10;
public function player(_arg1){
isHit = false;
this.holdObj = null;
holdIns = null;
_root = _arg1;
addListener();
key = new KeyListener();
player_mc.gotoAndStop("stand");
player_mc["che_mc"].visible = false;
}
private function distance(_arg1:Number, _arg2:Number){
return (Math.abs((_arg1 - _arg2)));
}
private function checkPress(_arg1){
var _local2:Number;
if (pressFlag == 1){
moveLeft();
};
if (pressFlag == 2){
moveRight();
};
if (pressFlag == 3){
_local2 = key.stepRun(65);
tallKill(_local2);
};
if (pressFlag == 4){
_local2 = key.stepRun(83);
hengKill(_local2);
};
if (pressFlag == 0){
player_mc["che_mc"]["chelun1"].stop();
player_mc["che_mc"]["chelun2"].stop();
this.player_mc.gotoAndStop("stand");
};
}
private function hengKill(_arg1:Number){
if ((((_arg1 == 1)) || ((_arg1 == 2)))){
if (this.player_mc.currentLabel != "tallheng"){
this.player_mc.gotoAndStop("tallheng");
} else {
(this.player_mc.getChildAt(0) as MovieClip).play();
};
};
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (RunsManager.pause == true){
return;
};
switch (_arg1.keyCode){
case 37:
pressFlag = 1;
if (this.holdObj != null){
if (this.player_mc.currentLabel != "happy"){
this.player_mc.gotoAndStop("happy");
};
} else {
if (this.player_mc.currentLabel != "run"){
this.player_mc.gotoAndStop("run");
};
};
break;
case 65:
key.setKeyCode(65);
pressFlag = 3;
break;
case 39:
pressFlag = 2;
if (this.holdObj != null){
if (this.player_mc.currentLabel != "happy"){
this.player_mc.gotoAndStop("happy");
};
} else {
if (this.player_mc.currentLabel != "run"){
this.player_mc.gotoAndStop("run");
};
};
break;
case 83:
key.setKeyCode(83);
pressFlag = 4;
break;
};
}
private function dead(){
game.lose();
}
public function addListener(){
EventsManager.addEvent(_root, KeyboardEvent.KEY_DOWN, keyDownHandler);
EventsManager.addEvent(_root, KeyboardEvent.KEY_UP, keyUpHandler);
EventsManager.addEvent(_root, Event.ENTER_FRAME, checkPress);
}
private function moveLeft(){
if (this.scaleX == 1){
this.scaleX = -1;
};
if (this.x > 65){
this.x = (this.x - moveSpeed);
if (this.player_mc["hit_mc"].hitTestObject(main.baobei.jimu25)){
downBaobei();
};
takeBaobei();
};
player_mc["che_mc"]["chelun1"].play();
player_mc["che_mc"]["chelun2"].play();
}
public function checkHit(_arg1:MovieClip, _arg2:Number){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if (_arg1 == null){
trace("jian undefined");
return;
};
if (isHit == false){
_local4 = main.enemy_arr.length;
_local5 = 0;
while (_local5 < _local4) {
enemy = main.enemy_arr[_local5];
if ((((enemy == null)) || ((enemy == undefined)))){
trace("enemy undefined");
return;
};
if (_arg1.hitTestObject(enemy["hit_mc2"])){
isHit = true;
_local6 = enemy.reduceBlood();
_local7 = new lightFlash(enemy);
if (_local6 == true){
borner.currNum++;
if ((borner.currNum % 3) == 0){
borner.calcu(_root);
borner.init();
};
if ((((_arg2 == 1)) || ((_arg2 == 3)))){
enemy.gotoAndStop("upkill");
} else {
if ((((_arg2 == 2)) || ((_arg2 == 4)))){
enemy.gotoAndStop("hengkill");
};
};
};
SoundManage.playSound("hit");
return;
};
_local5++;
};
};
_local3 = (player_mc.getChildAt(2) as MovieClip);
if (_local3.currentFrame == _local3.totalFrames){
isHit = false;
};
}
private function keyUpHandler(_arg1:KeyboardEvent):void{
key.stepRun(-1);
if ((((_arg1.keyCode == 65)) || ((_arg1.keyCode == 83)))){
return;
};
if (_arg1.keyCode == 37){
if (pressFlag == 2){
pressFlag = 2;
return;
};
pressFlag = 0;
} else {
if (_arg1.keyCode == 39){
if (pressFlag == 1){
pressFlag = 1;
return;
};
pressFlag = 0;
};
};
}
public function removeListener(){
EventsManager.removeEvent(_root, KeyboardEvent.KEY_DOWN, keyDownHandler);
EventsManager.removeEvent(_root, KeyboardEvent.KEY_UP, keyUpHandler);
EventsManager.removeEvent(_root, Event.ENTER_FRAME, checkPress);
}
private function tallKill(_arg1:Number){
if ((((_arg1 == 1)) || ((_arg1 == 2)))){
if (this.player_mc.currentLabel != "tallkill"){
this.player_mc.gotoAndStop("tallkill");
} else {
(this.player_mc.getChildAt(0) as MovieClip).play();
};
};
}
private function moveRight(){
if (this.scaleX == -1){
this.scaleX = 1;
};
if (this.x < stage.stageWidth){
this.x = (this.x + moveSpeed);
if (this.player_mc["hit_mc"].hitTestObject(main.baobei.jimu25)){
downBaobei();
};
takeBaobei();
};
player_mc["che_mc"]["chelun1"].play();
player_mc["che_mc"]["chelun2"].play();
}
private function downBaobei(){
var _local1:Point;
var _local2:Point;
var _local3:*;
if (this.holdObj == null){
return;
};
_local1 = new Point(this["load_mc"].x, this["load_mc"].y);
_local1 = this.localToGlobal(_local1);
main.baobei[this.holdObj].visible = true;
main.baobei[this.holdObj].x = _local1.x;
main.baobei[this.holdObj].y = _local1.y;
_local2 = new Point(main.baobei[this.holdObj].originX, main.baobei[this.holdObj].originY);
main.baobei.flyTo(main.baobei[this.holdObj], 0, 0, _local2.x, _local2.y, 0, null, this.holdObj);
main.delBaobei(this.holdIns);
_local3 = (this.getChildByName("load_mc") as Sprite);
_local3.removeChildAt(0);
this.holdObj = null;
}
private function takeBaobei(){
var _local1:*;
var _local2:*;
var _local3:*;
if (this.holdObj != null){
return;
};
_local1 = 0;
while (_local1 < main.baobei_arr.length) {
_local2 = main.baobei_arr[_local1];
if (((player_mc["che_mc"].hitTestObject(_local2)) && (!((_local2.isHold == true))))){
_local2.visible = false;
_local3 = new (_local2.constructor);
this["load_mc"].addChild(_local3);
main.enemyContainter.removeChild(_local2.holdEnemy);
_local3.x = (_local3.parent.x - 48);
_local3.y = (_local3.parent.y + 25);
if ((_local3 is Jimu5)){
_local3.rotation = -30;
};
if ((((_local3 is Jimu9)) || ((_local3 is Jimu13)))){
_local3.rotation = 30;
_local3.x = (_local3.parent.x - 52);
_local3.y = (_local3.parent.y + 21);
};
this.player_mc.gotoAndStop("happy");
_local2.isHold = true;
this.holdIns = _local2;
this.holdObj = _local2.names;
this.player_mc["che_mc"].visible = true;
return;
};
_local1++;
};
}
public function reSetSpeed(){
moveSpeed = 10;
}
}
}//package kill
Section 90
//Score (kill.Score)
package kill {
public class Score {
public static var scoreNum = 0;
public static function addScore(){
scoreNum = (scoreNum + 1);
if ((scoreNum % 10) == 0){
game.nextCross();
};
}
public static function reSet(){
scoreNum = 0;
}
}
}//package kill
Section 91
//small (kill.small)
package kill {
import flash.display.*;
public class small extends enemy {
private var blood;// = 0
public var lifeBar:Bar;
public var che_mc:MovieClip;
public var people:MovieClip;
public var hit_mc2:MovieClip;
public var hit_mc:MovieClip;
public function small(){
var _local1:Number;
blood = 0;
super();
_local1 = 0;
if (Score.scoreNum < 50){
_local1 = 0.1;
this.blood = 1;
} else {
if (Score.scoreNum < 100){
this.blood = 2;
_local1 = 0.3;
} else {
if (Score.scoreNum < 200){
_local1 = 0.5;
this.blood = 3;
} else {
if (Score.scoreNum < 300){
_local1 = 0.7;
this.blood = 3;
} else {
if (Score.scoreNum > 400){
_local1 = 0.9;
this.blood = 2;
} else {
trace(("ssssss" + Score.scoreNum));
_local1 = 0;
};
};
};
};
};
this.moveSpeed = ((1.5 + Math.random()) + _local1);
}
public function reduceBlood(){
this["lifeBar"].visible = true;
this.blood--;
if (this.blood == 2){
this["lifeBar"].value = 70;
};
if (this.blood == 1){
this["lifeBar"].value = 30;
};
if (this.blood == 0){
this["lifeBar"].value = 0;
this["lifeBar"].visible = false;
};
if (this.blood <= 0){
dead();
game.addScore();
return (true);
};
if (this.moveSpeed >= 1){
this.moveSpeed--;
};
return (false);
}
}
}//package kill
Section 92
//YueLiang (kill.YueLiang)
package kill {
import flash.events.*;
import flash.display.*;
public class YueLiang extends MovieClip {
private var yy:Number;
public function YueLiang(){
EventsManager.addEvent(this, Event.ENTER_FRAME, shengQi);
yy = this.y;
}
private function shengQi(_arg1){
if (this.y > -70){
yy = (yy - 0.01);
this.y = yy;
} else {
EventsManager.removeEvent(this, Event.ENTER_FRAME, shengQi);
};
}
}
}//package kill
Section 93
//LoadingTxt (loading.LoadingTxt)
package loading {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class LoadingTxt extends Sprite {
private var txt;
public var onLoadComplete:Function;
public function LoadingTxt(){
onLoadComplete = function ():void{
};
super();
txt = this.getChildAt(0);
txt.autoSize = "center";
RunsManager.addRun("LoadingTxt.run()", run);
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function added(_arg1:Event):void{
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
onLoadComplete = null;
}
private function run():void{
var _local1:int;
_local1 = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100);
txt.text = (_local1 + "%");
if (_local1 == 100){
RunsManager.removeRun(run);
onLoadComplete();
};
}
}
}//package loading
Section 94
//PrevLoader (loading.PrevLoader)
package loading {
import flash.display.*;
import ui.*;
public class PrevLoader extends MovieClip {
public var protection:Boolean;// = true
public var maskRect:MaskRect;
public static var prevLoader:PrevLoader;
public function PrevLoader(){
protection = true;
super();
prevLoader = this;
stage.showDefaultContextMenu = false;
stop();
(root as MovieClip).stop();
MaskRect.setPos(maskRect, setPos);
__setProp_maskRect_loading_1();
}
public function set skip(_arg1:Boolean):void{
if (_arg1){
(root as MovieClip).play();
this.visible = false;
};
}
private function isInUrlFront(_arg1:String):Boolean{
var _local2:String;
_local2 = this.loaderInfo.url;
_local2.toLowerCase();
_arg1.toLowerCase();
return ((_local2.indexOf(_arg1) == 0));
}
public function checkGoNext():void{
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
goNext();
};
}
public function goNext():void{
prevLoader = null;
if (protection){
if (((isIn("freeworldgroup.com")) || (isIn("ifungames.com")))){
this.gotoAndStop(3);
} else {
this.gotoAndStop(2);
};
} else {
this.gotoAndStop(3);
};
}
private function setPos(_arg1:int, _arg2:int):void{
this.x = (_arg1 / 2);
this.y = (_arg2 / 2);
}
function __setProp_maskRect_loading_1(){
try {
maskRect["componentInspectorSetting"] = true;
} catch(e:Error) {
};
maskRect.align = "center-middle";
try {
maskRect["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function isIn(_arg1:String):Boolean{
return (((((((isInUrlFront(_arg1)) || (isInUrlFront(("http://" + _arg1))))) || (isInUrlFront(("http://www." + _arg1))))) || (isInUrlFront(("www." + _arg1)))));
}
public static function goNext():void{
if (prevLoader){
prevLoader.goNext();
};
}
}
}//package loading
Section 95
//BarsValue (localSave.BarsValue)
package localSave {
import ui.*;
public class BarsValue extends LocalSetting {
public var dataArr:Array;
public function BarsValue(_arg1:String, _arg2:DragValueBars){
var _local3:int;
var _local4:DragValueBar;
dataArr = new Array(_arg2.bars.length);
_local3 = 0;
for each (_local4 in _arg2.bars) {
dataArr[_local3] = {value:_local4.value, locked:_local4.locked};
_local3++;
};
super((_arg1 + "BarValues"));
}
}
}//package localSave
Section 96
//GameInfo (localSave.GameInfo)
package localSave {
public class GameInfo extends LocalSetting {
public var heroId:int;// = 1
public function GameInfo(_arg1:String){
heroId = 1;
super((_arg1 + "GameInfo"));
}
}
}//package localSave
Section 97
//LocalSetting (localSave.LocalSetting)
package localSave {
import flash.net.*;
import flash.utils.*;
public class LocalSetting {
private var lso:SharedObject;
public var version:int;
public function LocalSetting(_arg1:String, _arg2:int=1){
var varName:String;
var str = _arg1;
var _version = _arg2;
super();
str = (str + "_as3");
version = _version;
try {
lso = SharedObject.getLocal(str, "/");
} catch(e:Error) {
trace((("和as2共享名称的" + str) + "存储文件时发生错误"));
lso = SharedObject.getLocal(str, "/");
};
if (isEmpty(lso.data)){
trace((str + " 第一次设定"));
lso.data.defaultDataObj = cloneObj(this);
} else {
if (version != lso.data.dataObj.version){
trace((str + "版本改变,重置"));
lso.data.defaultDataObj = cloneObj(this);
} else {
for (varName in lso.data.dataObj) {
this[varName] = lso.data.dataObj[varName];
};
};
};
lso.data.dataObj = this;
}
public function getDefault():Object{
return (lso.data.defaultDataObj);
}
public function setDefault():void{
var _local1:String;
for (_local1 in lso.data.defaultDataObj) {
this[_local1] = cloneObj(lso.data.defaultDataObj[_local1]);
};
}
public static function cloneObj(_arg1:Object){
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
return (_local2.readObject());
}
public static function isEmpty(_arg1:Object):Boolean{
var _local2:String;
if (_arg1 == null){
return (true);
};
_local2 = "";
for (_local2 in _arg1) {
break;
};
return ((_local2 == ""));
}
}
}//package localSave
Section 98
//PlayerInfo (localSave.PlayerInfo)
package localSave {
public class PlayerInfo extends LocalSetting {
public var playerName:String;// = ""
public function PlayerInfo(){
playerName = "";
super("FWGPlayerInfo");
}
}
}//package localSave
Section 99
//StageSave (localSave.StageSave)
package localSave {
public class StageSave extends LocalSetting {
public var dataArr:Array;
public function StageSave(_arg1:String, _arg2:int, _arg3:Class=null){
var _local4:int;
dataArr = new Array(_arg2);
_local4 = dataArr.length;
if (_arg3){
while (--_local4 >= 0) {
dataArr[_local4] = {locked:true, data:new (_arg3)};
};
} else {
while (--_local4 >= 0) {
dataArr[_local4] = {locked:false};
};
};
dataArr[0].locked = false;
super((_arg1 + "StageSave"));
}
public function getDataItem(_arg1:int){
return (dataArr[(_arg1 - 1)]);
}
}
}//package localSave
Section 100
//all_mc_11 (SLAUGHTERRAMPAGE_fla.all_mc_11)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class all_mc_11 extends MovieClip {
public function all_mc_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 101
//bottle_bomb_349 (SLAUGHTERRAMPAGE_fla.bottle_bomb_349)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class bottle_bomb_349 extends MovieClip {
public function bottle_bomb_349(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 102
//boxRacers_222 (SLAUGHTERRAMPAGE_fla.boxRacers_222)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
import boxRacers.*;
public dynamic class boxRacers_222 extends MovieClip {
public var char3:Select_Char3;
public var char1:Select_Char1;
public var char2:Select_Char2;
public var char4:Select_Char4;
}
}//package SLAUGHTERRAMPAGE_fla
Section 103
//chelun_281 (SLAUGHTERRAMPAGE_fla.chelun_281)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class chelun_281 extends MovieClip {
public function chelun_281(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 104
//chuang_336 (SLAUGHTERRAMPAGE_fla.chuang_336)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class chuang_336 extends MovieClip {
public function chuang_336(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 105
//chuang2_335 (SLAUGHTERRAMPAGE_fla.chuang2_335)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class chuang2_335 extends MovieClip {
public function chuang2_335(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 106
//cow_move_296 (SLAUGHTERRAMPAGE_fla.cow_move_296)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class cow_move_296 extends MovieClip {
public var hitArea_mc:MovieClip;
public var load_mc:MovieClip;
}
}//package SLAUGHTERRAMPAGE_fla
Section 107
//fish_bomb_321 (SLAUGHTERRAMPAGE_fla.fish_bomb_321)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class fish_bomb_321 extends MovieClip {
public function fish_bomb_321(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 108
//fp_53 (SLAUGHTERRAMPAGE_fla.fp_53)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class fp_53 extends MovieClip {
public function fp_53(){
addFrameScript(0, frame1, 323, frame324);
}
function frame1(){
if (!Main.isFirstTimeMenuAnimation){
gotoAndPlay("f");
};
}
function frame324(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 109
//frontpage_menu_btns_83 (SLAUGHTERRAMPAGE_fla.frontpage_menu_btns_83)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class frontpage_menu_btns_83 extends MovieClip {
public function frontpage_menu_btns_83(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 110
//giraffe_294 (SLAUGHTERRAMPAGE_fla.giraffe_294)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class giraffe_294 extends MovieClip {
public var load_mc:MovieClip;
}
}//package SLAUGHTERRAMPAGE_fla
Section 111
//gou_361 (SLAUGHTERRAMPAGE_fla.gou_361)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class gou_361 extends MovieClip {
public function gou_361(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 112
//gou2_360 (SLAUGHTERRAMPAGE_fla.gou2_360)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class gou2_360 extends MovieClip {
public function gou2_360(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 113
//guizi_333 (SLAUGHTERRAMPAGE_fla.guizi_333)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class guizi_333 extends MovieClip {
public function guizi_333(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 114
//guizi2_332 (SLAUGHTERRAMPAGE_fla.guizi2_332)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class guizi2_332 extends MovieClip {
public function guizi2_332(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 115
//killer_15 (SLAUGHTERRAMPAGE_fla.killer_15)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
import flash.text.*;
public dynamic class killer_15 extends MovieClip {
public var score_txt:TextField;
public var life_txt:TextField;
public function killer_15(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 116
//lionRun_298 (SLAUGHTERRAMPAGE_fla.lionRun_298)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class lionRun_298 extends MovieClip {
public var load_mc:MovieClip;
}
}//package SLAUGHTERRAMPAGE_fla
Section 117
//loading_3 (SLAUGHTERRAMPAGE_fla.loading_3)
package SLAUGHTERRAMPAGE_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import loading.*;
import flash.geom.*;
import flash.filters.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class loading_3 extends MovieClip {
public var txt:LoadingTxt;
public var loading_text_mc:MovieClip;
public function loading_3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 38, frame39);
}
function frame3(){
this.visible = true;
}
function frame1(){
this.visible = false;
}
function frame2(){
(parent as MovieClip).checkGoNext();
}
function frame39(){
stop();
txt.onLoadComplete = (parent as MovieClip).goNext;
loading_text_mc.txt.text = "Loading...";
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 118
//loading_8 (SLAUGHTERRAMPAGE_fla.loading_8)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
import framework.*;
public dynamic class loading_8 extends MovieClip {
public var txt:Txt;
}
}//package SLAUGHTERRAMPAGE_fla
Section 119
//loading_9 (SLAUGHTERRAMPAGE_fla.loading_9)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class loading_9 extends MovieClip {
public function loading_9(){
addFrameScript(134, frame135);
}
function frame135(){
stop();
(root as MovieClip).play();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 120
//loading_popUp_231 (SLAUGHTERRAMPAGE_fla.loading_popUp_231)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class loading_popUp_231 extends MovieClip {
public function loading_popUp_231(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 121
//MainTimeline (SLAUGHTERRAMPAGE_fla.MainTimeline)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
import flash.utils.*;
import loading.*;
public dynamic class MainTimeline extends MovieClip {
public var prevLoader:PrevLoader;
public var __setPropDict:Dictionary;
public var __id2_:Main;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
if ((((__setPropDict[__id2_] == undefined)) || (!((int(__setPropDict[__id2_]) == 3))))){
__setPropDict[__id2_] = currentFrame;
__setProp___id2___3();
};
}
function frame1(){
if ((((__setPropDict[prevLoader] == undefined)) || (!((int(__setPropDict[prevLoader]) == 1))))){
__setPropDict[prevLoader] = currentFrame;
__setProp_prevLoader__1();
};
RunsManager.init(stage);
MochiAd.showPreGameAd({clip:this, ad_finished:PrevLoader.goNext, id:"19685d3ee5e203a1", res:"700x400", background:6845841, color:788068, outline:12695210, no_bg:false});
}
function frame2(){
try {
MochiAd.unload(this);
} catch(e) {
trace(("mochiad e=" + e));
};
}
function __setProp_prevLoader__1(){
try {
prevLoader["componentInspectorSetting"] = true;
} catch(e:Error) {
};
prevLoader.protection = false;
prevLoader.skip = false;
try {
prevLoader["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id2___3(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_.soundNames = "wave,hit";
__id2_.musicNames = "Main_S";
__id2_.fadeType = "坦克宝贝";
__id2_.__game_name = "toy_massacre";
__id2_.skipToGame = false;
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 122
//mao_352 (SLAUGHTERRAMPAGE_fla.mao_352)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class mao_352 extends MovieClip {
public function mao_352(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 123
//mao2_351 (SLAUGHTERRAMPAGE_fla.mao2_351)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class mao2_351 extends MovieClip {
public function mao2_351(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 124
//matong_346 (SLAUGHTERRAMPAGE_fla.matong_346)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class matong_346 extends MovieClip {
public function matong_346(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 125
//matong2_345 (SLAUGHTERRAMPAGE_fla.matong2_345)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class matong2_345 extends MovieClip {
public function matong2_345(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 126
//mheng_290 (SLAUGHTERRAMPAGE_fla.mheng_290)
package SLAUGHTERRAMPAGE_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class mheng_290 extends MovieClip {
public var jian_mc:MovieClip;
public function mheng_290(){
addFrameScript(6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11);
}
function frame10(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 1);
}
function frame7(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 1);
}
function frame8(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 1);
}
function frame9(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 1);
}
function frame11(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 1);
(this.parent as MovieClip).gotoAndStop(1);
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 127
//muou2_287 (SLAUGHTERRAMPAGE_fla.muou2_287)
package SLAUGHTERRAMPAGE_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class muou2_287 extends MovieClip {
public var jian_mc:MovieClip;
public function muou2_287(){
addFrameScript(2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame3(){
SoundManage.playSound("wave");
}
function frame6(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame7(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame8(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame4(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame5(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame9(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 2);
(this.parent as MovieClip).gotoAndStop("stand");
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 128
//muou3_286 (SLAUGHTERRAMPAGE_fla.muou3_286)
package SLAUGHTERRAMPAGE_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class muou3_286 extends MovieClip {
public var jian_mc:MovieClip;
public function muou3_286(){
addFrameScript(4, frame5, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11);
}
function frame10(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 1);
}
function frame7(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 1);
}
function frame8(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 1);
}
function frame5(){
SoundManage.playSound("wave");
}
function frame9(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 1);
}
function frame11(){
(this.parent.parent as MovieClip).checkHit(jian_mc, 1);
(this.parent as MovieClip).gotoAndStop("stand");
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 129
//mup_289 (SLAUGHTERRAMPAGE_fla.mup_289)
package SLAUGHTERRAMPAGE_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class mup_289 extends MovieClip {
public var jian_mc:MovieClip;
public function mup_289(){
addFrameScript(3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame6(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame7(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame8(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame4(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame5(){
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
function frame9(){
(this.parent as MovieClip).gotoAndStop(2);
(this.parent.parent.parent as MovieClip).checkHit(jian_mc, 2);
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 130
//niu_358 (SLAUGHTERRAMPAGE_fla.niu_358)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class niu_358 extends MovieClip {
public function niu_358(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 131
//niu2_357 (SLAUGHTERRAMPAGE_fla.niu2_357)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class niu2_357 extends MovieClip {
public function niu2_357(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 132
//pg_147 (SLAUGHTERRAMPAGE_fla.pg_147)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class pg_147 extends MovieClip {
public function pg_147(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 133
//pingzi2_348 (SLAUGHTERRAMPAGE_fla.pingzi2_348)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class pingzi2_348 extends MovieClip {
public function pingzi2_348(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 134
//shafa_330 (SLAUGHTERRAMPAGE_fla.shafa_330)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class shafa_330 extends MovieClip {
public function shafa_330(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 135
//shafa3_329 (SLAUGHTERRAMPAGE_fla.shafa3_329)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class shafa3_329 extends MovieClip {
public function shafa3_329(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 136
//shizi1_339 (SLAUGHTERRAMPAGE_fla.shizi1_339)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class shizi1_339 extends MovieClip {
public function shizi1_339(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 137
//shizi2_338 (SLAUGHTERRAMPAGE_fla.shizi2_338)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class shizi2_338 extends MovieClip {
public function shizi2_338(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 138
//shoutuiche_280 (SLAUGHTERRAMPAGE_fla.shoutuiche_280)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class shoutuiche_280 extends MovieClip {
public var chelun2:MovieClip;
public var chelun1:MovieClip;
}
}//package SLAUGHTERRAMPAGE_fla
Section 139
//shoutuiche_316 (SLAUGHTERRAMPAGE_fla.shoutuiche_316)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class shoutuiche_316 extends MovieClip {
public var chelun2:MovieClip;
public var chelun1:MovieClip;
}
}//package SLAUGHTERRAMPAGE_fla
Section 140
//test_44 (SLAUGHTERRAMPAGE_fla.test_44)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class test_44 extends MovieClip {
public var btn3:TestBtn;
public var btn0:TestBtn;
public var btn2:TestBtn;
public var btn1:TestBtn;
public function test_44(){
addFrameScript(0, frame1);
}
function frame1(){
btn0.release = function ():void{
Main.addScore(1000);
};
btn1.release = function ():void{
Main.levelComplete();
};
btn2.release = function ():void{
Main.win();
};
btn3.release = function ():void{
Main.lose();
};
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 141
//Timeline_282 (SLAUGHTERRAMPAGE_fla.Timeline_282)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class Timeline_282 extends MovieClip {
public function Timeline_282(){
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 142
//tttttttt_288 (SLAUGHTERRAMPAGE_fla.tttttttt_288)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class tttttttt_288 extends MovieClip {
public function tttttttt_288(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 143
//wushi_279 (SLAUGHTERRAMPAGE_fla.wushi_279)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class wushi_279 extends MovieClip {
public var che_mc:MovieClip;
public var hit_mc:MovieClip;
public function wushi_279(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 144
//yizi_355 (SLAUGHTERRAMPAGE_fla.yizi_355)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class yizi_355 extends MovieClip {
public function yizi_355(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 145
//yizi2_354 (SLAUGHTERRAMPAGE_fla.yizi2_354)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class yizi2_354 extends MovieClip {
public function yizi2_354(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 146
//yuelangshengqi_19 (SLAUGHTERRAMPAGE_fla.yuelangshengqi_19)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class yuelangshengqi_19 extends MovieClip {
public function yuelangshengqi_19(){
addFrameScript(0, frame1, 80, frame81);
}
function frame81(){
stop();
}
function frame1(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 147
//yugang2_322 (SLAUGHTERRAMPAGE_fla.yugang2_322)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class yugang2_322 extends MovieClip {
public function yugang2_322(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 148
//yw_233 (SLAUGHTERRAMPAGE_fla.yw_233)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class yw_233 extends MovieClip {
public function yw_233(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop((1 + int((Math.random() * 4))));
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 149
//zhu_343 (SLAUGHTERRAMPAGE_fla.zhu_343)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class zhu_343 extends MovieClip {
public function zhu_343(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 150
//zhu2_342 (SLAUGHTERRAMPAGE_fla.zhu2_342)
package SLAUGHTERRAMPAGE_fla {
import flash.display.*;
public dynamic class zhu2_342 extends MovieClip {
public function zhu2_342(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package SLAUGHTERRAMPAGE_fla
Section 151
//Alert (ui.Alert)
package ui {
import flash.display.*;
import framework.*;
import framework.btns.*;
public class Alert extends Sprite {
public var btnNo:Btn_No;
public var txt:Txt;
public var btnYes:Btn_Yes;
public var maskRect:MaskRect;
private static var onCallBack:Function;
private static var currRoot:Sprite;
private static var alert:Alert;
public function Alert(){
MaskRect.setPos(maskRect, setPos);
__setProp_maskRect_ui_1();
}
public function set msg(_arg1:String):void{
txt.text = _arg1;
}
function __setProp_maskRect_ui_1(){
try {
maskRect["componentInspectorSetting"] = true;
} catch(e:Error) {
};
maskRect.align = "center-middle";
try {
maskRect["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function get msg():String{
return (txt.text);
}
private function setPos(_arg1:int, _arg2:int):void{
var wid = _arg1;
var hei = _arg2;
this.x = (wid / 2);
this.y = (hei / 2);
alert = this;
txt.autoSize = "center";
btnYes.release = function ():void{
Alert.callBack(true);
};
btnNo.release = function ():void{
Alert.callBack(false);
};
}
public static function init(_arg1:Sprite):void{
currRoot = _arg1;
}
public static function callBack(_arg1:Boolean):void{
alert.parent.removeChild(alert);
alert = null;
RunsManager.pause = false;
onCallBack(_arg1);
}
public static function show(_arg1:String, _arg2:Function):void{
if (currRoot){
if (alert == null){
currRoot.addChild((alert = new (Alert)));
};
RunsManager.pause = true;
alert.msg = _arg1;
onCallBack = _arg2;
} else {
trace("请在调用show前放一个Alert在场景里^_^;ps:因为你的过错,将自动执行onCallBack(true)");
_arg2(true);
};
}
}
}//package ui
Section 152
//DragValueBar (ui.DragValueBar)
package ui {
import flash.events.*;
import flash.display.*;
public class DragValueBar extends ValueBar {
private var adjusting:Boolean;
public var lock_mc:MovieClip;
public var __bar:MovieClip;
public var onSetValue:Function;
public var delta:MovieClip;
public var bar_bg:MovieClip;
private var __locked:Boolean;
public var restValue:Number;
public function DragValueBar(){
onSetValue = function (_arg1:DragValueBar, _arg2:Number, _arg3:Number):Number{
return (_arg3);
};
super();
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "DragValueBar.added");
bar.mouseEnabled = false;
bar_bg.buttonMode = true;
locked = false;
}
private function added(_arg1:Event):void{
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "DragValueBar.removed");
EventsManager.addEvent(bar_bg, MouseEvent.MOUSE_DOWN, startAdjust, "DragValueBar.startAdjust");
EventsManager.addEvent(lock_mc, MouseEvent.MOUSE_DOWN, setLocked, "DragValueBar.setLocked");
EventsManager.addEvent(stage, MouseEvent.MOUSE_UP, stopAdjust, "DragValueBar.stopAdjust");
}
public function get locked():Boolean{
return (__locked);
}
private function setLocked(_arg1:MouseEvent):void{
locked = !(locked);
}
public function set locked(_arg1:Boolean):void{
__locked = _arg1;
lock_mc.gotoAndStop((__locked) ? 2 : 1);
}
private function stopAdjust(_arg1:MouseEvent):void{
if (adjusting){
adjusting = false;
EventsManager.removeEvent(this, Event.ENTER_FRAME, dragRun);
};
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
EventsManager.removeEvent(bar_bg, MouseEvent.MOUSE_DOWN, startAdjust);
EventsManager.removeEvent(lock_mc, MouseEvent.MOUSE_DOWN, setLocked);
EventsManager.removeEvent(stage, MouseEvent.MOUSE_UP, stopAdjust);
stopAdjust(null);
}
private function startAdjust(_arg1:MouseEvent):void{
if (locked){
return;
};
adjusting = true;
EventsManager.addEvent(this, Event.ENTER_FRAME, dragRun, "DragValueBar.dragRun");
}
private function dragRun(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = value;
_local3 = this.mouseX;
if (_local3 < 0){
_local3 = 0;
} else {
if (_local3 > wid0){
_local3 = wid0;
};
};
if (Math.abs((delta.x - _local3)) < 1){
return;
};
value = onSetValue(this, _local2, (_local3 * (maxValue / wid0)));
}
override public function set value(_arg1:Number):void{
super.value = _arg1;
delta.x = bar.width;
}
}
}//package ui
Section 153
//DragValueBars (ui.DragValueBars)
package ui {
import flash.display.*;
import localSave.*;
public class DragValueBars extends Sprite {
public var totalBar:int;
public var bars0:Array;
private var barsValue;
public var bars:Array;
public function DragValueBars(){
var _local1:int;
var _local2:*;
super();
bars = new Array();
_local1 = this.numChildren;
while (--_local1 >= 0) {
_local2 = this.getChildAt(_local1);
if ((_local2 is DragValueBar)){
bars.push(_local2);
_local2.onSetValue = adjust;
};
};
totalBar = bars.length;
bars0 = bars.slice();
}
public function set totalValue(_arg1:Number):void{
var _local2:Number;
var _local3:DragValueBar;
_local2 = (_arg1 / totalBar);
for each (_local3 in bars) {
_local3.value = _local2;
};
}
public function set saveName(_arg1:String):void{
var _local2:int;
var _local3:DragValueBar;
var _local4:*;
barsValue = new BarsValue(_arg1, this);
_local2 = 0;
for each (_local3 in bars0) {
_local4 = barsValue.dataArr[_local2];
_local3.value = _local4.value;
_local3.locked = _local4.locked;
_local2++;
};
}
public function save():void{
var _local1:int;
var _local2:DragValueBar;
var _local3:*;
_local1 = 0;
for each (_local2 in bars0) {
_local3 = barsValue.dataArr[_local1];
_local3.value = _local2.value;
_local3.locked = _local2.locked;
_local1++;
};
}
public function adjust(_arg1:DragValueBar, _arg2:Number, _arg3:Number):Number{
var _local4:DragValueBar;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = (_arg2 - _arg3);
_local6 = totalBar;
if (_local5 > 0){
for each (_local4 in bars) {
if (((_local4.locked) || ((_local4 == _arg1)))){
_local4.restValue = 0;
_local6--;
} else {
_local4.restValue = (_local4.value - _local4.maxValue);
if (_local4.restValue == 0){
_local6--;
};
};
};
} else {
for each (_local4 in bars) {
if (((_local4.locked) || ((_local4 == _arg1)))){
_local4.restValue = 0;
_local6--;
} else {
_local4.restValue = _local4.value;
if (_local4.restValue == 0){
_local6--;
};
};
};
};
if (_local5 > 0){
bars.sortOn("restValue", (Array.NUMERIC | Array.DESCENDING));
} else {
bars.sortOn("restValue", Array.NUMERIC);
};
_local7 = 0;
for each (_local4 in bars) {
_local7 = (_local7 - _local4.restValue);
};
_local7 = ((Math.abs(_local5) < Math.abs(_local7))) ? _local5 : _local7;
_local5 = _local7;
for each (_local4 in bars) {
if (_local4.restValue == 0){
} else {
_local8 = (_local7 / _local6);
_local9 = ((Math.abs(_local8) < Math.abs(_local4.restValue))) ? _local8 : -(_local4.restValue);
_local7 = (_local7 - _local9);
_local4.value = (_local4.value + _local9);
_local6--;
};
};
return ((_arg2 - _local5));
}
public function traceTotalValue():void{
var _local1:Number;
var _local2:DragValueBar;
_local1 = 0;
for each (_local2 in bars) {
_local1 = (_local1 + _local2.value);
};
trace(("totalValue=" + _local1));
}
public function set value(_arg1:Number):void{
var _local2:DragValueBar;
for each (_local2 in bars) {
_local2.value = _arg1;
};
}
}
}//package ui
Section 154
//LifeBar (ui.LifeBar)
package ui {
import flash.display.*;
public class LifeBar extends MovieClip {
public var maxValue:Number;
private var __value:Number;
public function LifeBar(_arg1:Number=0, _arg2:Number=100){
value = _arg1;
maxValue = _arg2;
}
public function get value():Number{
return (__value);
}
public function set value(_arg1:Number):void{
__value = _arg1;
this.gotoAndStop((Math.round(((__value / maxValue) * (this.totalFrames - 1))) + 1));
}
}
}//package ui
Section 155
//MaskRect (ui.MaskRect)
package ui {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class MaskRect extends Sprite {
public var onSetWH:Function;
private var __align:String;// = "left-top"
public static var wid:int = 0;
public static var hei0:int;
public static var hei:int = 0;
public static var wid0:int;
public function MaskRect(){
onSetWH = function ():void{
};
__align = "left-top";
super();
if ((((wid > 0)) && ((hei > 0)))){
setWH();
} else {
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
};
}
private function added(_arg1:Event):void{
var event = _arg1;
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
try {
getStageWH();
} catch(e:Error) {
EventsManager.addEvent(this.loaderInfo, Event.INIT, loadInit, "loadInit");
};
}
private function getStageWH():void{
var _local1:*;
_local1 = this.getChildAt(0);
wid0 = _local1.width;
hei0 = _local1.height;
wid = this.loaderInfo.width;
hei = this.loaderInfo.height;
setWH();
}
public function set align(_arg1:String):void{
var _local2:*;
var _local3:Rectangle;
__align = _arg1;
if ((((wid > 0)) && ((hei > 0)))){
_local2 = this.getChildAt(0);
_local3 = _local2.getBounds(this);
switch (__align.charAt(0).toLowerCase()){
case "c":
case "m":
_local2.x = (_local2.x + (((wid0 - wid) / 2) - _local3.x));
_local2.y = (_local2.y + (((hei0 - hei) / 2) - _local3.y));
break;
case "r":
case "b":
_local2.x = (_local2.x + ((wid0 - wid) - _local3.x));
_local2.y = (_local2.y + ((hei0 - hei) - _local3.y));
break;
default:
_local2.x = (_local2.x + -(_local3.x));
_local2.y = (_local2.y + -(_local3.y));
break;
};
};
}
private function loadInit(_arg1:Event):void{
EventsManager.removeEvent(this.loaderInfo, Event.INIT, loadInit);
getStageWH();
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
onSetWH = null;
}
private function setWH():void{
var _local1:*;
_local1 = this.getChildAt(0);
_local1.width = wid;
_local1.height = hei;
onSetWH(wid, hei);
if (__align){
align = __align;
};
}
public static function setPos(_arg1:MaskRect, _arg2:Function):void{
if ((((wid > 0)) && ((hei > 0)))){
_arg2(wid, hei);
} else {
_arg1.onSetWH = _arg2;
};
}
}
}//package ui
Section 156
//SimpleBtn (ui.SimpleBtn)
package ui {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
public class SimpleBtn extends MovieClip {
public var release:Function;
private var selectedId:int;
private var __action:String;
private var __toolTip:String;
public var press:Function;
private var downId:int;
public var errorAction:Function;
private var __selected:Boolean;
private var __alert:String;
private var __bGrey:Boolean;
public var rollOut:Function;
private var filters0:Array;
private var __hotKey:String;// = ""
public var rollOver:Function;
private static const greyFilter:ColorMatrixFilter = new ColorMatrixFilter([0.15, 0.295, 0.055, 0, 0, 0.15, 0.295, 0.055, 0, 0, 0.15, 0.295, 0.055, 0, 0, 0, 0, 0, 1, 0]);
private static const someKeyNameArr:Array = [["left", 37], ["up", 38], ["right", 39], ["down", 40], ["tab", 9], ["enter", 13], ["back", 8]];
private static const keyCodeArr:Array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 49, 222, 51, 52, 53, 55, 222, 57, 48, 56, 187, 188, 189, 190, 191, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 186, 186, 188, 187, 190, 191, 50, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 219, 220, 221, 54, 189, 192, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 219, 220, 221, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
private static const overId:int = 2;
private static const upId:int = 1;
public static var AlertClass;
public static var EventsManagerClass;
public static var ToolTipClass;
public static var onSetAction:Function = function (){
};
private static var initFlag:Boolean = firstInit();
public function SimpleBtn(){
rollOver = function ():void{
};
rollOut = function ():void{
};
press = function ():void{
};
release = function ():void{
};
__hotKey = "";
errorAction = function (){
};
super();
this.buttonMode = true;
this.mouseChildren = false;
this.stop();
switch (this.totalFrames){
case 2:
downId = 1;
selectedId = 2;
break;
case 3:
downId = 3;
selectedId = 2;
break;
case 4:
downId = 3;
selectedId = 4;
break;
};
addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function added(_arg1:Event):void{
removeEvent(this, Event.ADDED_TO_STAGE, added);
if (__hotKey){
addEvent(stage, KeyboardEvent.KEY_UP, $onHotKeyDown, "$onHotKeyDown");
};
addEvent(this, MouseEvent.MOUSE_OVER, $onRollOver, "$onRollOver");
addEvent(this, MouseEvent.MOUSE_OUT, $onRollOut, "$onRollOut");
addEvent(this, MouseEvent.MOUSE_DOWN, $onPress, "$onPress");
addEvent(this, MouseEvent.MOUSE_UP, $onRelease, "$onRelease");
addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
}
private function callBackRelease(_arg1:Boolean):void{
if (_arg1){
actionRelease();
};
}
private function $onHotKeyDown(_arg1:KeyboardEvent):void{
if ((((__hotKey == "any")) || ((__hotKey.indexOf(String(_arg1.keyCode)) >= 0)))){
RunsManager.addRun("prevRelease", prevRelease, 1, 1);
};
}
private function actionRelease():void{
if (__bGrey){
errorAction();
} else {
release();
};
}
private function rollOverDelay():void{
if (__bGrey){
return;
};
if (__toolTip){
ToolTipClass.show(__toolTip);
};
if (!__selected){
this.gotoAndStop(overId);
};
rollOver();
}
private function $onRollOver(_arg1:MouseEvent):void{
RunsManager.addRun("rollOverDelay", rollOverDelay, 1, 1, false);
}
private function $onPress(_arg1:MouseEvent):void{
RunsManager.addRun("pressDelay", pressDelay, 1, 1, false);
}
public function set selected(_arg1:Boolean):void{
__selected = _arg1;
if (__selected){
this.gotoAndStop(selectedId);
} else {
this.gotoAndStop(upId);
};
}
private function $onRollOut(_arg1:MouseEvent):void{
RunsManager.addRun("rollOutDelay", rollOutDelay, 1, 1, false);
}
public function get action():String{
return (__action);
}
private function prevRelease():void{
if (((__alert) && (AlertClass))){
AlertClass.show(__alert, callBackRelease);
} else {
actionRelease();
};
}
private function pressDelay():void{
if (__bGrey){
return;
};
if (__toolTip){
ToolTipClass.hide();
};
if (!__selected){
this.gotoAndStop(downId);
};
press();
}
private function $onRelease(_arg1:MouseEvent):void{
RunsManager.addRun("prevReleaseDelay", prevReleaseDelay, 1, 1, false);
}
private function rollOutDelay():void{
if (__bGrey){
return;
};
if (__toolTip){
ToolTipClass.hide();
};
if (!__selected){
this.gotoAndStop(upId);
};
rollOut();
}
private function removed(_arg1:Event):void{
if (__hotKey){
removeEvent(stage, KeyboardEvent.KEY_UP, $onHotKeyDown);
};
removeEvent(this, MouseEvent.MOUSE_OVER, $onRollOver);
removeEvent(this, MouseEvent.MOUSE_OUT, $onRollOut);
removeEvent(this, MouseEvent.MOUSE_DOWN, $onPress);
removeEvent(this, MouseEvent.MOUSE_UP, $onRelease);
removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
rollOver = null;
rollOut = null;
press = null;
release = null;
errorAction = null;
filters0 = null;
if (__toolTip){
ToolTipClass.hide();
};
if (!__selected){
this.gotoAndStop(upId);
};
if (stage.focus == this){
stage.focus = null;
};
}
private function prevReleaseDelay():void{
if (!__selected){
this.gotoAndStop(overId);
};
prevRelease();
}
private function haveStr(_arg1:String, _arg2:String):Boolean{
_arg1.replace(/\ /g, "");
_arg1 = _arg1.toLowerCase();
_arg2 = _arg2.toLowerCase();
return ((_arg1.indexOf(_arg2) >= 0));
}
public function set hotKeys(_arg1:String):void{
var _local2:String;
var _local3:Number;
var _local4:Boolean;
var _local5:Array;
if ((((_arg1 == "")) || ((_arg1 == "可输入字符或键值或键名^_^")))){
__hotKey = "";
return;
};
if (((((haveStr(_arg1, "any")) || (haveStr(_arg1, "all")))) || (haveStr(_arg1, "任意")))){
__hotKey = "any";
return;
};
__hotKey = "";
for each (_local2 in _arg1.split(",")) {
if (_local2 == ""){
} else {
_local3 = Number(_local2);
if (isNaN(_local3)){
_local4 = false;
for each (_local5 in someKeyNameArr) {
if (haveStr(_local2, _local5[0])){
__hotKey = (__hotKey + (_local5[1] + ","));
_local4 = true;
};
};
if (!_local4){
__hotKey = (__hotKey + (keyCodeArr[_local2.charCodeAt(0)] + ","));
};
} else {
if ((((_local3 >= 0)) && ((_local3 <= 9)))){
__hotKey = (__hotKey + ((_local3 + 48) + ","));
} else {
__hotKey = (__hotKey + (_local3 + ","));
};
};
};
};
}
public function set bGrey(_arg1:Boolean):void{
if (__bGrey != _arg1){
__bGrey = _arg1;
if (__bGrey){
filters0 = this.filters.slice();
this.filters = this.filters.concat([greyFilter]);
this.buttonMode = false;
} else {
this.filters = filters0;
this.buttonMode = true;
};
};
}
public function set toolTip(_arg1:String):void{
var _local2:Point;
if (ToolTipClass){
__toolTip = _arg1;
_local2 = this.localToGlobal(new Point(this.mouseX, this.mouseY));
if (this.hitTestPoint(_local2.x, _local2.y, true)){
ToolTipClass.show(__toolTip);
};
};
}
public function set action(_arg1:String):void{
__action = _arg1;
onSetAction(this);
}
public function set alert(_arg1:String):void{
if (AlertClass){
__alert = _arg1;
};
}
private static function firstInit():Boolean{
trace("SimpleBtn第一次初始化");
try {
EventsManagerClass = getDefinitionByName("EventsManager");
} catch(e) {
trace(("e=" + e));
};
try {
ToolTipClass = getDefinitionByName("ui.ToolTip");
} catch(e) {
trace(("e=" + e));
};
try {
AlertClass = getDefinitionByName("ui.Alert");
} catch(e) {
trace(("e=" + e));
};
return (true);
}
public static function addEvent(_arg1, _arg2:String, _arg3:Function, _arg4:String):void{
if (EventsManagerClass){
EventsManagerClass.addEvent(_arg1, _arg2, _arg3, _arg4);
} else {
_arg1.removeEventListener(_arg2, _arg3);
_arg1.addEventListener(_arg2, _arg3, false, 0, true);
};
}
public static function removeEvent(_arg1, _arg2:String, _arg3:Function):void{
if (EventsManagerClass){
EventsManagerClass.removeEvent(_arg1, _arg2, _arg3);
} else {
_arg1.removeEventListener(_arg2, _arg3);
};
}
}
}//package ui
Section 157
//ToolTip (ui.ToolTip)
package ui {
import flash.display.*;
import framework.*;
import flash.geom.*;
public class ToolTip extends Sprite {
public var bg:MovieClip;
public var txt:Txt;
public static var toolTip:ToolTip;
private static var currRoot:Sprite;
private static var hideDelayTimeoutId:int = -1;
public function ToolTip(){
this.mouseChildren = false;
this.mouseEnabled = false;
txt.autoSize = "center";
}
public function set msg(_arg1:String):void{
txt.text = _arg1;
}
public function get msg():String{
return (txt.text);
}
private function show(_arg1:String, _arg2:DisplayObject):void{
var _local3:Rectangle;
var _local4:Point;
msg = _arg1;
txt.autoSize = "center";
bg.width = (txt.width + 20);
if (_arg2){
_local4 = this.parent.globalToLocal(_arg2.localToGlobal(new Point()));
this.x = _local4.x;
this.y = _local4.y;
} else {
this.x = this.parent.mouseX;
this.y = this.parent.mouseY;
};
_local3 = bg.getBounds(root);
if (_local3.x < 0){
this.x = (this.x + (10 - _local3.x));
} else {
if ((_local3.x + _local3.width) > this.loaderInfo.width){
this.x = (this.x - (((10 + _local3.x) + _local3.width) - this.loaderInfo.width));
};
};
if (_local3.y < 0){
this.y = (this.y + (10 - _local3.y));
} else {
if ((_local3.y + _local3.height) > this.loaderInfo.height){
this.y = (this.y - (((10 + _local3.y) + _local3.height) - this.loaderInfo.height));
};
};
this.x = Math.round(this.x);
this.y = Math.round(this.y);
}
public static function init(_arg1:Sprite):void{
currRoot = _arg1;
}
public static function hideDelay(_arg1:int=30):void{
RunsManager.addRun("toolTip hide()", hide, _arg1, 1);
}
public static function hide():void{
if (toolTip){
toolTip.parent.removeChild(toolTip);
toolTip = null;
};
}
public static function show(_arg1:String, _arg2:DisplayObject=null):void{
if (currRoot){
if (toolTip == null){
currRoot.addChild((toolTip = new (ToolTip)));
};
toolTip.show(_arg1, _arg2);
} else {
trace("请在调用show前放一个ToolTip在场景里^_^");
};
}
}
}//package ui
Section 158
//ValueBar (ui.ValueBar)
package ui {
import flash.display.*;
public class ValueBar extends Sprite {
public var bar:Sprite;
public var maxValue:Number;// = 100
private var __value:Number;
public var wid0:Number;
public function ValueBar(){
maxValue = 100;
super();
bar = (getChildByName("__bar") as Sprite);
wid0 = bar.width;
value = 100;
}
public function get value():Number{
return (__value);
}
public function set value(_arg1:Number):void{
__value = _arg1;
bar.width = ((__value / maxValue) * wid0);
}
}
}//package ui
Section 159
//baojian (baojian)
package {
import kill.*;
public dynamic class baojian extends baojian {
}
}//package
Section 160
//Bar (Bar)
package {
import ui.*;
public dynamic class Bar extends LifeBar {
}
}//package
Section 161
//big1 (big1)
package {
import kill.*;
public dynamic class big1 extends big {
}
}//package
Section 162
//big2 (big2)
package {
import kill.*;
public dynamic class big2 extends big {
}
}//package
Section 163
//big3 (big3)
package {
import kill.*;
public dynamic class big3 extends big {
}
}//package
Section 164
//big4 (big4)
package {
import kill.*;
public dynamic class big4 extends big {
}
}//package
Section 165
//big5 (big5)
package {
import kill.*;
public dynamic class big5 extends big {
}
}//package
Section 166
//big6 (big6)
package {
import kill.*;
public dynamic class big6 extends big {
}
}//package
Section 167
//Btn_Level_Element (Btn_Level_Element)
package {
import flash.display.*;
public dynamic class Btn_Level_Element extends MovieClip {
}
}//package
Section 168
//Clock (Clock)
package {
import flash.events.*;
import flash.display.*;
public class Clock extends Sprite {
public var hand1:MovieClip;
public var hand2:MovieClip;
public static const T:int = 86400000;
public function Clock(){
this.addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
}
private function added(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
this.addEventListener(Event.ENTER_FRAME, run, false, 0, true);
}
private function removed(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, removed);
this.removeEventListener(Event.ENTER_FRAME, run);
}
private function run(_arg1:Event):void{
var _local2:Date;
var _local3:int;
_local2 = new Date();
_local3 = (((_local2.hours * (60 * 60)) + (_local2.minutes * 60)) + _local2.seconds);
hand1.rotation = ((0.1 / 12) * _local3);
hand2.rotation = (0.1 * _local3);
}
}
}//package
Section 169
//EventsManager (EventsManager)
package {
import flash.events.*;
import flash.utils.*;
public final class EventsManager {
public static var checkEvents:Boolean = true;
private static var dictObjs:Object = new Object();
public static function removeEvent(_arg1, _arg2:String, _arg3:Function):void{
var _local4:DictObj;
_arg1.removeEventListener(_arg2, _arg3);
if (checkEvents){
_local4 = dictObjs[_arg2];
if (_local4 == null){
return;
};
_local4.removeData(_arg1, _arg3);
if (_local4.total <= 0){
delete dictObjs[_arg2];
};
};
}
public static function addEvent(_arg1, _arg2:String, _arg3:Function, _arg4:String="no info"):void{
var _local5:DictObj;
_arg1.addEventListener(_arg2, _arg3, false, 0, true);
if (checkEvents){
_local5 = dictObjs[_arg2];
if (_local5 == null){
_local5 = (dictObjs[_arg2] = new DictObj());
};
_local5.addData(_arg1, _arg3, _arg4);
};
}
public static function getAllEvents():String{
var _local1:int;
var _local2:String;
var _local3:String;
var _local4:int;
var _local5:String;
var _local6:DictObj;
var _local7:*;
var _local8:DictObjItem;
var _local9:*;
_local1 = 0;
_local2 = "";
for (_local3 in dictObjs) {
_local4 = 0;
_local5 = "";
_local6 = dictObjs[_local3];
for (_local7 in _local6) {
_local5 = (_local5 + ((" " + _local7) + "--"));
_local8 = _local6[_local7];
_local4 = (_local4 + _local8.total);
_local1 = (_local1 + _local8.total);
for (_local9 in _local8) {
_local5 = (_local5 + (_local8[_local9] + " "));
};
_local5 = (_local5 + "\n");
};
_local2 = (_local2 + ((((_local3 + "--") + _local4) + "\n") + _local5));
};
return (((("共有事件个数:" + _local1) + "\n") + _local2));
}
public static function removeAll():void{
var _local1:String;
var _local2:DictObj;
var _local3:*;
var _local4:DictObjItem;
var _local5:*;
if (checkEvents){
for (_local1 in dictObjs) {
_local2 = dictObjs[_local1];
for (_local3 in _local2) {
_local4 = _local2[_local3];
for (_local5 in _local4) {
if (_local5 == RunsManager.run){
} else {
removeEvent(_local3, _local1, _local5);
};
};
};
};
};
}
}
}//package
import flash.utils.*;
class DictObj extends Dictionary {
public var total:int;
private function DictObj(){
total = 0;
}
public function addData(_arg1, _arg2:Function, _arg3:String):void{
var _local4:DictObjItem;
_local4 = this[_arg1];
if (_local4 == null){
_local4 = (this[_arg1] = new DictObjItem());
total++;
};
if (_local4[_arg2]){
return;
};
if (_arg3){
_local4[_arg2] = _arg3;
_local4.total++;
};
}
public function removeData(_arg1, _arg2:Function):void{
var _local3:DictObjItem;
_local3 = this[_arg1];
if (_local3 == null){
return;
};
if (_local3[_arg2]){
delete _local3[_arg2];
if (--_local3.total <= 0){
delete this[_arg1];
total--;
};
};
}
}
class DictObjItem extends Dictionary {
public var total:int;
private function DictObjItem(){
total = 0;
}
}
Section 170
//fangzi (fangzi)
package {
import kill.*;
public dynamic class fangzi extends fangzi {
}
}//package
Section 171
//FPS (FPS)
package {
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class FPS extends Sprite {
public var txt:TextField;
private var ms:int;
private var fs:int;
public function FPS(){
reset();
TestBar.addRun(run);
}
private function reset():void{
ms = getTimer();
fs = 0;
}
private function run():void{
if ((getTimer() - ms) >= 1000){
txt.text = (fs + "fps");
reset();
} else {
fs++;
};
}
}
}//package
Section 172
//GameI (GameI)
package {
public class GameI {
public static const playMode_timeTrial:String = "time trial";
public static const startTrackId:int = 2;
public static const playMode_singleRace:String = "single race";
public static const totalLap:int = 2;
public static const diff_crazy:String = "crazy";
public static const diff_normal:String = "normal";
public static const diff_hard:String = "hard";
public static const playMode_tournament:String = "tournament";
public static const startPowerUpId:int = 190;
public static const diff_easy:String = "easy";
public static var defaultTrack:int = 1;
public static var recordDataArr:Array;
public static var gameDiff:String;
public static var currTime:int;
public static var bestTime:int = 2147483647;
public static var selectedStageNum:int;
public static var shadowFlag:Boolean;
public static var heroOrder:int;
public static var playMode:String;
}
}//package
Section 173
//Global (Global)
package {
import help.*;
public class Global {
public static var testBar:TestBar;
public static var pause:Boolean;
public static function debug():void{
trace("在调试面板中展开变量分析.");
}
}
}//package
Section 174
//hit (hit)
package {
import flash.media.*;
public dynamic class hit extends Sound {
}
}//package
Section 175
//Jimu1 (Jimu1)
package {
import flash.display.*;
public dynamic class Jimu1 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu1(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 24;
}
}
}//package
Section 176
//Jimu10 (Jimu10)
package {
import flash.display.*;
public dynamic class Jimu10 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu10(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 24;
}
}
}//package
Section 177
//Jimu11 (Jimu11)
package {
import flash.display.*;
public dynamic class Jimu11 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu11(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 24;
}
}
}//package
Section 178
//Jimu12 (Jimu12)
package {
import flash.display.*;
public dynamic class Jimu12 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu12(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 33;
}
}
}//package
Section 179
//Jimu13 (Jimu13)
package {
import flash.display.*;
public dynamic class Jimu13 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu13(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 13;
}
}
}//package
Section 180
//Jimu14 (Jimu14)
package {
import flash.display.*;
public dynamic class Jimu14 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu14(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 28;
}
}
}//package
Section 181
//Jimu2 (Jimu2)
package {
import flash.display.*;
public dynamic class Jimu2 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu2(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 33;
}
}
}//package
Section 182
//Jimu3 (Jimu3)
package {
import flash.display.*;
public dynamic class Jimu3 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu3(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 24;
}
}
}//package
Section 183
//Jimu4 (Jimu4)
package {
import flash.display.*;
public dynamic class Jimu4 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu4(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 19;
}
}
}//package
Section 184
//Jimu5 (Jimu5)
package {
import flash.display.*;
public dynamic class Jimu5 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu5(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 24;
}
}
}//package
Section 185
//Jimu6 (Jimu6)
package {
import flash.display.*;
public dynamic class Jimu6 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu6(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 28;
}
}
}//package
Section 186
//Jimu7 (Jimu7)
package {
import flash.display.*;
public dynamic class Jimu7 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu7(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 20;
}
}
}//package
Section 187
//Jimu8 (Jimu8)
package {
import flash.display.*;
public dynamic class Jimu8 extends MovieClip {
public var flash:MovieClip;
public function Jimu8(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
}
}
}//package
Section 188
//Jimu9 (Jimu9)
package {
import flash.display.*;
public dynamic class Jimu9 extends MovieClip {
public var offy;
public var flash:MovieClip;
public function Jimu9(){
addFrameScript(0, frame1);
}
function frame1(){
flash.visible = false;
offy = 13;
}
}
}//package
Section 189
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import ui.*;
import framework.*;
import localSave.*;
import flash.net.*;
import flash.utils.*;
import framework.btns.*;
import effect.fadeEffect.*;
import framework.pages.*;
public class Main extends Sprite {
public var musicNames:String;// = "Main_S"
public var skipToGame:Boolean;// = false
public var soundNames:String;// = ""
public var fadeType:String;
public static const legalChars:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789";
public static var container:Sprite;
private static var __isFirstTimeMenuAnimation:Boolean = true;
private static var __totalScore:int;
public static var page;
public static var hasReadInstructions:Boolean;
public static var totalLevel:int = 5;
private static var __currScore:int;
public static var stageHei:int;
public static var playerInfo:PlayerInfo = new PlayerInfo();
public static var game_name:String = "";
public static var main:Main;
public static var qualitySetting:QualitySetting;
private static var btnSubmitScore:Btn_Submit_Score;
public static var levelNum:int;
public static var stageWid:int;
public function Main(){
skipToGame = false;
musicNames = "Main_S";
soundNames = "";
super();
(root as MovieClip).stop();
main = this;
EventsManager.addEvent(stage, Event.ENTER_FRAME, init, "init");
}
public function set __game_name(_arg1:String):void{
game_name = _arg1;
}
public static function set currScore(_arg1:int):void{
GamePan.currScore = (__currScore = _arg1);
}
public static function resetScore():void{
currScore = 0;
totalScore = 0;
}
public static function get currScore():int{
return (__currScore);
}
private static function init(_arg1:Event):void{
var StageSelecterClass:*;
var event = _arg1;
try {
stageWid = main.loaderInfo.width;
stageHei = main.loaderInfo.height;
if (game_name.length > 0){
if (!checkLegalStr(game_name, legalChars)){
if (game_name.indexOf(" ") >= 0){
game_name = game_name.replace(/\ /g, "_");
trace(("游戏名称的空格自动替换成下划线,游戏名称=" + game_name));
} else {
throw (new Error("游戏名称只能包含字母,数字和下划线"));
};
};
} else {
throw (new Error("未设置游戏名称"));
};
} catch(e) {
trace(("Main.init(),e=" + e));
return;
};
EventsManager.removeEvent(main.stage, Event.ENTER_FRAME, init);
SimpleBtn.onSetAction = function (_arg1:SimpleBtn):void{
initBtn(_arg1);
};
main.addChild((container = new Sprite()));
SoundManage.addMusic(main.musicNames);
SoundManage.addSound(main.soundNames);
SoundManage.playMusic(main.musicNames.split(",")[0], 999999);
ToolTip.init((main.root as Sprite));
Alert.init((main.root as Sprite));
try {
StageSelecterClass = getDefinitionByName("framework.StageSelecter");
StageSelecterClass.init(game_name, totalLevel);
StageSelecterClass.onSelectLevel = gotoLevel;
} catch(e) {
trace(("Main.init(),e=" + e));
trace("此游戏没有选关保存系统");
};
trace(((((("初始化main成功,game_name=" + game_name) + ",stageWid=") + stageWid) + ",stageHei=") + stageHei));
if (main.skipToGame){
gotoGame();
} else {
gotoMenu();
};
}
public static function get isFirstTimeMenuAnimation():Boolean{
if (__isFirstTimeMenuAnimation){
__isFirstTimeMenuAnimation = false;
return (true);
};
return (false);
}
public static function pauseF():void{
if (RunsManager.pause){
return;
};
container.addChild(new PausePan());
}
public static function gotoLose():void{
flipTo(Page_Lose);
}
public static function instPlay():void{
if (hasReadInstructions){
gotoOptions();
} else {
gotoInstructions();
};
}
public static function showSubmitScore():void{
if (totalScore > 0){
container.addChild(new SubmitScore(game_name, playerInfo.playerName, totalScore));
SubmitScore.onSubmitComplete = function (_arg1:String):void{
btnSubmitScore.parent.removeChild(btnSubmitScore);
btnSubmitScore = null;
playerInfo.playerName = _arg1;
SubmitScore.onSubmitComplete = null;
};
} else {
ToolTip.show("Your score is 0 !");
ToolTip.hideDelay();
};
}
public static function levelSave():void{
trace("保存当前关");
}
public static function gotoInstructions():void{
hasReadInstructions = true;
flipTo(Page_Instructions);
}
public static function initBtn(_arg1:SimpleBtn):void{
var btn = _arg1;
switch (btn.action){
case BtnActions.ADD_GAMES_TO_YOUR_SITE:
btn.release = function ():void{
getURL("http://www.freeworldgroup.com/koalafiles.htm");
};
break;
case BtnActions.BACK:
btn.release = (btn.parent as MovieClip).prevFrame;
break;
case BtnActions.COPYRIGHT:
btn.release = linkToFWG;
break;
case BtnActions.CREDITS:
btn.release = gotoCredits;
break;
case BtnActions.DOWNLOAD_GAMES:
btn.release = function ():void{
getURL("http://www.ifungames.com");
};
break;
case BtnActions.INSTRUCTIONS:
btn.release = gotoInstructions;
break;
case BtnActions.MENU:
btn.release = gotoMenu;
break;
case BtnActions.MUSIC:
btn.selected = !(SoundManage.isMusicPlay);
if (SoundManage.isMusicPlay){
btn.toolTip = "Music Off";
} else {
btn.toolTip = "Music On";
};
btn.release = function ():void{
if (SoundManage.isMusicPlay){
SoundManage.stopMusic();
SoundManage.isMusicPlay = false;
this.selected = true;
this.toolTip = "Music On";
} else {
SoundManage.returnMusic();
SoundManage.isMusicPlay = true;
this.selected = false;
this.toolTip = "Music Off";
};
};
break;
case BtnActions.MORE_ONLINE_GAMES:
btn.release = linkToFWG;
break;
case BtnActions.NEXT:
btn.release = (btn.parent as MovieClip).nextFrame;
break;
case BtnActions.NEXT_LEVEL:
btn.release = nextLevel;
break;
case BtnActions.PAUSE:
btn.toolTip = "Pause.[Hot key: P]";
btn.release = pauseF;
break;
case BtnActions.PLAY_GAME:
case BtnActions.PLAY:
case BtnActions.SKIP:
btn.release = instPlay;
break;
case BtnActions.QUALITY:
btn.release = showQuality;
btn.toolTip = "Quality Setting";
break;
case BtnActions.REMOVE:
btn.release = function ():void{
this.parent.parent.removeChild(this.parent);
};
break;
case BtnActions.REPLAY:
btn.release = replay;
break;
case BtnActions.RETRY:
btn.release = retry;
break;
case BtnActions.SOUND:
btn.selected = !(SoundManage.isSoundPlay);
if (SoundManage.isMusicPlay){
btn.toolTip = "Sound Off";
} else {
btn.toolTip = "Sound On";
};
btn.release = function ():void{
if (SoundManage.isSoundPlay){
SoundManage.isSoundPlay = false;
this.selected = true;
this.toolTip = "Sound On";
} else {
SoundManage.isSoundPlay = true;
this.selected = false;
this.toolTip = "Sound Off";
};
};
break;
case BtnActions.SUBMIT_SCORE:
btnSubmitScore = (btn as Btn_Submit_Score);
btn.release = showSubmitScore;
break;
default:
trace((btn.action + "没有预设的动作"));
break;
};
}
public static function lose():void{
gotoLose();
}
public static function retry():void{
gotoOptions();
}
public static function get totalScore():int{
return (__totalScore);
}
public static function gotoCredits():void{
flipTo(Page_Credits);
}
public static function gotoLevelComplete():void{
flipTo(Page_Level_Complete);
}
public static function gotoOptions():void{
gotoGame();
}
public static function showQuality():void{
container.addChild(new QualitySetting());
}
public static function reset():void{
currScore = (totalScore = 0);
levelNum = 1;
}
public static function nextLevel():void{
levelNum = (levelNum + 1);
if (GamePan.gamePan){
GamePan.gamePan.levelNum = levelNum;
};
}
public static function flipTo(_arg1:Class):void{
var pageClass = _arg1;
if (pageClass == Page_Game){
main.stage.quality = StageQuality.MEDIUM;
} else {
main.stage.quality = StageQuality.HIGH;
};
switch (main.fadeType){
case "动画":
main.addChild(new AnimationFade());
break;
case "马赛克":
main.addChild(new GridFade());
break;
default:
DuanFade.start(main.root);
break;
};
try {
while (container.numChildren > 0) {
container.removeChildAt(0);
};
container.addChild((page = new (pageClass)));
} catch(e) {
trace(("Main.flipTo(),e=" + e));
trace(("未找到页面:" + pageClass));
};
}
public static function getURL(_arg1:String):void{
var url = _arg1;
try {
navigateToURL(new URLRequest(url), "_blank");
} catch(e) {
trace(("getURL:e=" + e));
};
}
public static function set totalScore(_arg1:int):void{
GamePan.totalScore = (__totalScore = _arg1);
}
public static function levelComplete():void{
if (levelNum >= totalLevel){
win();
} else {
gotoLevelComplete();
};
}
public static function checkLegalStr(_arg1:String, _arg2:String):Boolean{
var _local3:int;
var _local4:int;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2.indexOf(_arg1.charAt(_local4)) == -1){
return (false);
};
_local4++;
};
return (true);
}
public static function linkToFWG(_arg1:MouseEvent=null):void{
getURL("http://www.freeworldgroup.com");
}
public static function gotoMenu():void{
flipTo(Page_Menu);
reset();
}
public static function replay():void{
reset();
gotoOptions();
}
public static function gotoLevel(_arg1:int):void{
levelNum = _arg1;
gotoGame();
}
public static function win():void{
gotoWin();
}
public static function addScore(_arg1:int):void{
currScore = (currScore + _arg1);
totalScore = (totalScore + _arg1);
}
public static function gotoGame():void{
flipTo(Page_Game);
}
public static function gotoWin():void{
flipTo(Page_Win);
}
}
}//package
Section 190
//Main_S (Main_S)
package {
import flash.media.*;
public dynamic class Main_S extends Sound {
}
}//package
Section 191
//MemoryBar (MemoryBar)
package {
import flash.display.*;
import flash.text.*;
import flash.system.*;
public class MemoryBar extends Sprite {
public var bar:MovieClip;
public var txt:TextField;
public function MemoryBar(){
TestBar.addRun(run);
}
private function run():void{
bar.width = (System.totalMemory / 200000);
txt.text = ((System.totalMemory / (0x0400 * 0x0400)) + "MB");
}
}
}//package
Section 192
//MochiAd (MochiAd)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.3");
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = 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];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}};
options = 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_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
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;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
options.ad_failed();
_local3 = true;
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = 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 showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0){
options.ad_started();
options.ad_finished();
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
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;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
options.ad_failed();
_local4 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
options.ad_failed();
_local4 = true;
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
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 {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 193
//outerScore (outerScore)
package {
import flash.display.*;
public dynamic class outerScore extends MovieClip {
}
}//package
Section 194
//RunsManager (RunsManager)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public final class RunsManager {
private static var runDict:Dictionary = new Dictionary();
public static var tempObj;
public static var pause:Boolean;
private static var addDict:Dictionary = new Dictionary();
private static var removeArr:Array = new Array();
public static function removeAll():void{
runDict = new Dictionary();
addDict = new Dictionary();
removeArr = new Array();
}
public static function removeRun(_arg1:Function):void{
removeArr.push(_arg1);
}
public static function addRun(_arg1:String, _arg2:Function, _arg3:int=1, _arg4:int=2147483647, _arg5:Boolean=true):void{
if (_arg3 >= 1){
} else {
_arg3 = 1;
};
if (_arg4 >= 1){
} else {
_arg4 = int.MAX_VALUE;
};
addDict[_arg2] = new RunObj(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function run(... _args):void{
var _local2:RunObj;
var _local3:Function;
for each (_local2 in addDict) {
tempObj = _local2.runF;
runDict[_local2.runF] = _local2;
};
for each (_local3 in removeArr) {
delete runDict[_local3];
};
addDict = new Dictionary();
removeArr = new Array();
if (pause){
for each (_local2 in runDict) {
if (!_local2.pauseAble){
_local2.run();
if (_local2.times <= 0){
removeRun(_local2.runF);
};
};
};
} else {
for each (_local2 in runDict) {
_local2.run();
if (_local2.times <= 0){
removeRun(_local2.runF);
};
};
};
}
public static function init(_arg1:Stage):void{
EventsManager.addEvent(_arg1, Event.ENTER_FRAME, run, "run");
}
public static function getAllRuns():String{
var _local1:int;
var _local2:String;
var _local3:RunObj;
_local1 = 0;
_local2 = "";
for each (_local3 in runDict) {
_local2 = (_local2 + (_local3.info + "\n"));
_local1++;
};
return (((("共有run个数:" + _local1) + "\n") + _local2));
}
}
}//package
class RunObj {
private var intervalNum:int;
private var interval:int;
public var times:int;
public var info:String;
public var pauseAble:Boolean;
public var runF:Function;
private function RunObj(_arg1:String, _arg2:Function, _arg3:int, _arg4:int, _arg5:Boolean):void{
intervalNum = 0;
info = _arg1;
runF = _arg2;
interval = _arg3;
times = _arg4;
pauseAble = _arg5;
}
public function run():void{
if (++intervalNum >= interval){
intervalNum = 0;
times--;
runF();
};
}
}
Section 195
//small1 (small1)
package {
import kill.*;
public dynamic class small1 extends small {
}
}//package
Section 196
//small2 (small2)
package {
import kill.*;
public dynamic class small2 extends small {
}
}//package
Section 197
//small3 (small3)
package {
import kill.*;
public dynamic class small3 extends small {
}
}//package
Section 198
//small4 (small4)
package {
import kill.*;
public dynamic class small4 extends small {
}
}//package
Section 199
//small5 (small5)
package {
import kill.*;
public dynamic class small5 extends small {
}
}//package
Section 200
//small6 (small6)
package {
import kill.*;
public dynamic class small6 extends small {
}
}//package
Section 201
//Sound_a (Sound_a)
package {
import flash.media.*;
public dynamic class Sound_a extends Sound {
}
}//package
Section 202
//Sound_b (Sound_b)
package {
import flash.media.*;
public dynamic class Sound_b extends Sound {
}
}//package
Section 203
//Sound_c (Sound_c)
package {
import flash.media.*;
public dynamic class Sound_c extends Sound {
}
}//package
Section 204
//Sound_d (Sound_d)
package {
import flash.media.*;
public dynamic class Sound_d extends Sound {
}
}//package
Section 205
//Sound_e (Sound_e)
package {
import flash.media.*;
public dynamic class Sound_e extends Sound {
}
}//package
Section 206
//Sound_Press (Sound_Press)
package {
import flash.media.*;
public dynamic class Sound_Press extends Sound {
}
}//package
Section 207
//Sound_Roll_Over (Sound_Roll_Over)
package {
import flash.media.*;
public dynamic class Sound_Roll_Over extends Sound {
}
}//package
Section 208
//SoundManage (SoundManage)
package {
import flash.media.*;
import flash.utils.*;
public class SoundManage {
private static var initObj:Object = firstInit();
private static var soundList:Object;
public static var isSoundPlay:Boolean = true;
private static var musicList:Object;
public static var isMusicPlay:Boolean = true;
public static function stopMusic(... _args){
stopSound2(musicList, "volume", _args);
}
public static function addMusic(... _args){
addSound2(musicList, _args);
}
private static function adjustVolume(_arg1:Number):Number{
if (isNaN(_arg1)){
return (1);
};
if (_arg1 > 1){
return (1);
};
if (_arg1 < 0){
return (0);
};
return (_arg1);
}
private static function addSound2(_arg1:Object, _arg2:Array):void{
var _local3:int;
var _local4:int;
var _local5:*;
var _local6:String;
var _local7:Class;
var _local8:SndObj;
var _local9:*;
_local3 = _arg2.length;
if (_local3 == 1){
_local6 = _arg2[0];
if (_local6.indexOf(",") >= 0){
_arg2 = _local6.split(",");
};
_local4 = 0;
for each (_local5 in _arg2) {
if (!isNaN(_local5)){
_arg2[_local4] = Number(_local5);
};
_local4++;
};
_local3 = _arg2.length;
};
_local4 = -1;
while (++_local4 < _local3) {
_local5 = _arg2[_local4];
if ((_local5 is String)){
_local7 = (getDefinitionByName(_local5) as Class);
_local8 = (_arg1[_local5] = new SndObj());
_local8.sound = new (_local7);
_local8.name = _local5;
_local9 = _arg2[(_local4 + 1)];
if ((_local9 is Number)){
_local8.vol = adjustVolume(_local9);
_local4++;
} else {
_local8.vol = 1;
};
};
};
}
public static function setSoundVol(... _args){
setSoundVol2(soundList, _args);
}
public static function playMusic(... _args){
if (isMusicPlay){
playSound2(musicList, _args);
};
}
public static function isTrueStopMusic(... _args){
stopSound2(musicList, "stop", _args);
}
public static function returnMusic(){
var _local1:*;
isMusicPlay = true;
for (_local1 in musicList) {
setVolume(musicList[_local1].channel, musicList[_local1].vol);
};
}
private static function playSound2(_arg1:Object, _arg2:Array):void{
var _local3:String;
var _local4:int;
var _local5:Number;
var _local6:SndObj;
if (!sndListPlayAble(_arg1)){
return;
};
_local3 = _arg2[0];
if (_arg1[_local3] == null){
return;
};
_local4 = _arg2[1];
if (isNaN(_local4)){
_local4 = 1;
};
_local5 = _arg2[2];
_local6 = _arg1[_local3];
_arg1[_local3].channel = _local6.sound.play(0, _local4);
if (isNaN(_local5)){
_local5 = _local6.vol;
} else {
_local5 = adjustVolume(_local5);
};
setVolume(_local6.channel, _local5);
}
private static function setVolume(_arg1:SoundChannel, _arg2:Number):void{
var _local3:SoundTransform;
if (_arg1){
_local3 = _arg1.soundTransform;
_local3.volume = _arg2;
_arg1.soundTransform = _local3;
};
}
public static function firstInit():Object{
soundList = new Object();
musicList = new Object();
return (null);
}
private static function stopSound2(_arg1:Object, _arg2:String, _arg3:Array):void{
var _local4:*;
switch (_arg2){
case "stop":
if (_arg3.length > 0){
for (_local4 in _arg3) {
_arg1[_arg3[_local4]].sound.stop();
};
} else {
for (_local4 in _arg1) {
_arg1[_local4].sound.stop();
};
};
break;
default:
if (_arg3.length > 0){
for (_local4 in _arg3) {
setVolume(_arg1[_arg3[_local4]].channel, 0);
};
} else {
for (_local4 in _arg1) {
setVolume(_arg1[_local4].channel, 0);
};
};
break;
};
}
private static function setSoundVol2(_arg1:Object, _arg2:Array):void{
var _local3:int;
var _local4:Number;
var _local5:String;
var _local6:int;
var _local7:*;
var _local8:SndObj;
var _local9:*;
_local3 = _arg2.length;
if (_local3 > 0){
if (_local3 == 1){
_local4 = adjustVolume(_arg2[0]);
for (_local5 in _arg1) {
_arg1[_local5].vol = _local4;
};
} else {
_local6 = -1;
while (++_local6 < _local3) {
_local7 = _arg2[_local6];
if (typeof(_local7) == "string"){
_local8 = _arg1[_local7];
_local9 = _arg2[(_local6 + 1)];
if (typeof(_local9) == "number"){
_local8.vol = adjustVolume(_local9);
_local6++;
} else {
_local8.vol = 1;
};
setVolume(_local8.channel, _local8.vol);
};
};
};
};
}
public static function stopSound(... _args){
stopSound2(soundList, "volume", _args);
}
public static function addSound(... _args){
addSound2(soundList, _args);
}
public static function setMusicVol(... _args){
setSoundVol2(musicList, _args);
}
private static function findObjBySnd(_arg1:Sound):Object{
var _local2:*;
for (_local2 in soundList) {
if (soundList[_local2].sound == _arg1){
return (soundList[_local2]);
};
};
for (_local2 in musicList) {
if (musicList[_local2].music == _arg1){
return (musicList[_local2]);
};
};
return (null);
}
private static function sndListPlayAble(_arg1:Object):Boolean{
var _local2:*;
if (typeof(_arg1) == "string"){
if (musicList[_arg1]){
_local2 = musicList;
} else {
_local2 = soundList;
};
} else {
_local2 = _arg1;
};
if (_local2 == musicList){
return (isMusicPlay);
};
if (_local2 == soundList){
return (isSoundPlay);
};
return (false);
}
public static function clearSoundAndMusic(){
soundList = null;
musicList = null;
}
public static function playSound(... _args){
if (isSoundPlay == true){
playSound2(soundList, _args);
};
}
public static function isTrueStopSound(... _args){
stopSound2(soundList, "stop", _args);
}
public static function moveSound(_arg1:String, _arg2:int, _arg3:Number, _arg4:Number, _arg5:int):void{
var _local6:SndObj;
_local6 = soundList[_arg1];
if (_local6 == null){
_local6 = musicList[_arg1];
};
if (_local6 == null){
return;
};
if (!sndListPlayAble(_arg1)){
return;
};
if (isNaN(_arg4)){
_arg4 = _local6.vol;
};
_local6.startVol = ((_arg3 >= 0)) ? _arg3 : 0;
_local6.endVol = ((_arg4 >= 0)) ? _arg4 : 0;
_local6.currTime = 0;
_local6.totalTime = ((_arg2 > 0)) ? _arg2 : 0;
if (_arg3 < _arg4){
if (soundList[_arg1]){
playSound(_local6.name, _arg5);
} else {
playMusic(_local6.name, _arg5);
};
};
setVolume(_local6.channel, _arg3);
_local6.intervalId = setInterval(_local6.setSound, 30);
}
public static function returnSound(){
var _local1:*;
isSoundPlay = true;
for (_local1 in soundList) {
setVolume(soundList[_local1].channel, soundList[_local1].vol);
};
}
}
}//package
import flash.media.*;
class SndObj {
public var totalTime:Number;
public var channel:SoundChannel;
public var name:String;
public var startVol:Number;
public var vol:Number;
public var endVol:Number;
public var intervalId:int;
public var sound:Sound;
public var currTime:Number;
private function SndObj(){
}
public function setSound():void{
}
}
Section 209
//TestBar (TestBar)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.system.*;
public class TestBar extends Sprite {
public var osTxt:TextField;
public var screenResolutionTxt:TextField;
public var txt:TextField;
public var versionTxt:TextField;
public var playerTypeTxt:TextField;
public var updateFlag:Boolean;// = true
public var btnPause:SimpleButton;
public var languageTxt:TextField;
private static var testBar:TestBar;
private static var EventsManagerClass;
private static var msg:String;
private static var RunsManagerClass;
private static var runArr:Array = new Array();
private static var checkDict:Dictionary = new Dictionary();
public function TestBar(){
updateFlag = true;
super();
try {
EventsManagerClass = getDefinitionByName("EventsManager");
} catch(e) {
trace(("e=" + e));
};
try {
RunsManagerClass = getDefinitionByName("RunsManager");
} catch(e) {
trace(("e=" + e));
};
testBar = this;
msg = "";
versionTxt.text = Capabilities.version;
osTxt.text = Capabilities.os;
playerTypeTxt.text = Capabilities.playerType;
languageTxt.text = Capabilities.language;
screenResolutionTxt.text = ((Capabilities.screenResolutionX + "*") + Capabilities.screenResolutionY);
btnPause.addEventListener(MouseEvent.MOUSE_UP, setPause, false, 0, true);
this.addEventListener(Event.ENTER_FRAME, run, false, 0, true);
}
private function showMsg(_arg1:String):void{
txt.text = _arg1;
}
private function setPause(_arg1:MouseEvent):void{
if (RunsManagerClass){
RunsManagerClass.pause = !(RunsManagerClass.pause);
};
}
private function update():void{
var _local1:*;
var _local2:*;
var _local3:String;
var _local4:*;
if (updateFlag){
msg = (msg + "--------------------------------------------\n");
for (_local1 in checkDict) {
_local2 = checkDict[_local1];
for (_local3 in _local2) {
_local4 = _local1[_local3];
msg = (msg + (((((_local1 + ".") + _local3) + "=") + ((_local4 is Array)) ? _local4.length : _local4) + "\n"));
};
};
msg = (msg + "--------------------------------------------\n");
if (RunsManagerClass){
msg = (msg + (RunsManagerClass.getAllRuns() + "\n"));
};
msg = (msg + "--------------------------------------------\n");
if (EventsManagerClass){
msg = (msg + (EventsManagerClass.getAllEvents() + "\n"));
};
txt.text = msg;
msg = "";
};
}
public static function addMsg(_arg1:String):void{
msg = (msg + (_arg1 + "\n"));
}
public static function addCheck(_arg1, _arg2:String):void{
if (checkDict[_arg1] == null){
checkDict[_arg1] = new Object();
};
checkDict[_arg1][_arg2] = true;
}
public static function addRun(_arg1:Function):void{
runArr.push(_arg1);
}
public static function showMsg(_arg1:String):void{
testBar.showMsg(_arg1);
}
public static function run(_arg1:Event):void{
var _local2:Function;
for each (_local2 in runArr) {
_local2();
};
testBar.update();
}
public static function removeCheck(_arg1, _arg2:String):void{
delete checkDict[_arg1][_arg2];
}
}
}//package
Section 210
//TestBtn (TestBtn)
package {
import ui.*;
public dynamic class TestBtn extends SimpleBtn {
}
}//package
Section 211
//wave (wave)
package {
import flash.media.*;
public dynamic class wave extends Sound {
}
}//package