Section 1
//BmdMaterial (_3d.mtl.BmdMaterial)
package _3d.mtl {
import _3d.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.errors.*;
public class BmdMaterial extends Material {
public var bmdArr:Array;
public var hei:Number;
public var wid:Number;
public var bmd:BitmapData;
private static var tm:Matrix = new Matrix();
private static var sMat:Matrix = new Matrix();
public function BmdMaterial(_arg1, _arg2:Boolean){
var _local3:Matrix;
var _local4:int;
super();
if ((_arg1 is Class)){
_arg1 = new (_arg1);
};
if ((_arg1 is IBitmapDrawable)){
wid = _arg1.width;
hei = _arg1.height;
_local3 = _arg1.transform.matrix;
if (!(((((((((((_local3.a == 1)) && ((_local3.b == 0)))) && ((_local3.c == 0)))) && ((_local3.d == 1)))) && ((_local3.tx == 0)))) && ((_local3.ty == 0)))){
trace(((_arg1 + "被变形:m=") + _local3));
};
if ((((_arg1 is MovieClip)) && ((_arg1.totalFrames > 1)))){
_local4 = _arg1.totalFrames;
bmdArr = new Array(_local4);
while (--_local4 >= 0) {
bmd = (bmdArr[_local4] = new BitmapData(wid, hei, _arg2, 0));
_arg1.gotoAndStop((_local4 + 1));
bmd.draw(_arg1, _local3);
};
trace(this, _arg1, ("bmdArr.length=" + bmdArr.length));
} else {
bmd = new BitmapData(wid, hei, _arg2, 0);
bmd.draw(_arg1, _local3);
};
stopAllMc(_arg1);
} else {
throw (new Error(("shapeObj类型不对:" + _arg1)));
};
}
public function changeBmd(_arg1:int):void{
bmd = bmdArr[_arg1];
}
override public function clear():void{
var _local1:BitmapData;
super.clear();
if (bmdArr){
for each (_local1 in bmdArr) {
_local1.dispose();
};
bmdArr = null;
} else {
bmd.dispose();
};
bmd = null;
}
override public function init(_arg1:Face3D):void{
super.init(_arg1);
_arg1.mtlBmdId = 0;
}
public function drawDelta(_arg1:Sprite, _arg2:BitmapData, _arg3:Vector3D, _arg4:Vector3D, _arg5:Vector3D, _arg6:Boolean=false):void{
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Graphics;
_local7 = _arg3.x;
_local8 = _arg3.y;
_local9 = _arg4.x;
_local10 = _arg4.y;
_local11 = _arg5.x;
_local12 = _arg5.y;
sMat.a = ((_local9 - _local7) / wid);
sMat.b = ((_local10 - _local8) / wid);
sMat.c = ((_local11 - _local7) / hei);
sMat.d = ((_local12 - _local8) / hei);
sMat.tx = _local7;
sMat.ty = _local8;
_local13 = _arg1.graphics;
if (_arg6){
tm.a = (tm.d = -1);
tm.b = (tm.c = (tm.tx = (tm.ty = 0)));
tm.concat(sMat);
_local13.beginBitmapFill(_arg2, tm);
} else {
_local13.beginBitmapFill(_arg2, sMat);
};
_local13.moveTo(_local7, _local8);
_local13.lineTo(_local9, _local10);
_local13.lineTo(_local11, _local12);
_local13.lineTo(_local7, _local8);
_local13.endFill();
}
public static function stopAllMc(_arg1:DisplayObject){
var _local2:DisplayObjectContainer;
var _local3:int;
if ((_arg1 is DisplayObjectContainer)){
_local2 = (_arg1 as DisplayObjectContainer);
_local3 = _local2.numChildren;
while (--_local3 >= 0) {
stopAllMc(_local2.getChildAt(_local3));
};
if ((_arg1 is MovieClip)){
(_arg1 as MovieClip).stop();
};
};
}
}
}//package _3d.mtl
Section 2
//DeltaBmdMaterial (_3d.mtl.DeltaBmdMaterial)
package _3d.mtl {
import _3d.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.errors.*;
public class DeltaBmdMaterial extends BmdMaterial {
public function DeltaBmdMaterial(_arg1, _arg2:Boolean=false){
super(_arg1, _arg2);
}
override public function draw(_arg1:Face3D, _arg2:Scene3D, _arg3:Array):void{
var _local4:Sprite;
_local4 = _arg2.getCurrContainer();
drawDelta(_local4, (bmdArr) ? bmdArr[_arg1.mtlBmdId] : bmd, _arg3[0].screenV, _arg3[1].screenV, _arg3[2].screenV);
setHighlight(_local4, _arg1.highlight);
}
}
}//package _3d.mtl
Section 3
//FaceSpAndRectBmdMaterial (_3d.mtl.FaceSpAndRectBmdMaterial)
package _3d.mtl {
import _3d.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class FaceSpAndRectBmdMaterial extends RectBmdMaterial {
private var faceSpClassArr:Array;
private var kxyArr:Array;
private static var sMat:Matrix = new Matrix();
public function FaceSpAndRectBmdMaterial(_arg1:Sprite, _arg2:Boolean=false){
var _local3:int;
var _local4:*;
var _local5:int;
var _local6:*;
var _local7:Class;
if ((_arg1.getChildAt(0) is TestMovieClip)){
_local3 = 1;
} else {
_local3 = 0;
};
_local4 = _arg1.getChildAt(_local3);
super(_local4, _arg2);
_local5 = _arg1.numChildren;
faceSpClassArr = new Array();
kxyArr = new Array();
while (--_local5 > _local3) {
_local6 = _arg1.getChildAt(_local5);
if ((_local6 is TestMovieClip)){
} else {
stopAllMc(_local6);
_local7 = _local6.constructor;
if ((((_local7 == MovieClip)) || ((_local7 == Sprite)))){
trace("请给元件加上类链接");
};
faceSpClassArr.push(_local7);
kxyArr.push([(_local6.x / _local4.width), (_local6.y / _local4.height)]);
};
};
}
override public function draw(_arg1:Face3D, _arg2:Scene3D, _arg3:Array):void{
var _local4:Array;
var _local5:Vector3D;
var _local6:Vector3D;
var _local7:Vector3D;
var _local8:Number;
var _local9:Number;
super.draw(_arg1, _arg2, _arg3);
for each (_local4 in _arg1.mtlFaceSpArr) {
_local5 = _local4[1].screenV;
_local6 = _local4[2].screenV;
_local7 = _local4[3].screenV;
_local8 = _local5.x;
_local9 = _local5.y;
sMat.a = (_local6.x - _local8);
sMat.b = (_local6.y - _local9);
sMat.c = (_local7.x - _local8);
sMat.d = (_local7.y - _local9);
sMat.tx = _local8;
sMat.ty = _local9;
_local4[0].transform.matrix = sMat;
_arg2.container.addChild(_local4[0]);
};
}
override public function init(_arg1:Face3D):void{
var _local2:int;
var _local3:Class;
var _local4:Vector3D;
var _local5:Vector3D;
var _local6:Vector3D;
var _local7:Vector3D;
var _local8:Vector3D;
var _local9:Vector3D;
var _local10:Vector3D;
var _local11:Vector3D;
super.init(_arg1);
_local2 = 0;
_arg1.mtlFaceSpArr = new Array();
for each (_local3 in faceSpClassArr) {
_local4 = _arg1.vertexArr[0];
_local5 = _arg1.vertexArr[1];
_local6 = _arg1.vertexArr[3];
_local7 = new Vector3D((_local5.x - _local4.x), (_local5.y - _local4.y), (_local5.z - _local4.z), true);
_local8 = new Vector3D((_local6.x - _local4.x), (_local6.y - _local4.y), (_local6.z - _local4.z), true);
_local7.mult(kxyArr[_local2][0]);
_local8.mult(kxyArr[_local2][1]);
_local9 = new Vector3D(((_local4.x + _local7.x) + _local8.x), ((_local4.y + _local7.y) + _local8.y), ((_local4.z + _local7.z) + _local8.z), true);
_local7.normalize(1);
_local8.normalize(1);
_local10 = new Vector3D((_local9.x + _local7.x), (_local9.y + _local7.y), (_local9.z + _local7.z), true);
_local11 = new Vector3D((_local9.x + _local8.x), (_local9.y + _local8.y), (_local9.z + _local8.z), true);
_arg1.mtlFaceSpArr.push([new (_local3), _local9, _local10, _local11]);
_local2++;
};
}
}
}//package _3d.mtl
Section 4
//Material (_3d.mtl.Material)
package _3d.mtl {
import _3d.*;
import flash.display.*;
import flash.geom.*;
public class Material {
public static var useHighlight:Boolean = true;
public function init(_arg1:Face3D):void{
}
public function draw(_arg1:Face3D, _arg2:Scene3D, _arg3:Array):void{
}
public function clear():void{
}
public static function setHighlight(_arg1:Sprite, _arg2:Number):void{
var _local3:ColorTransform;
if (useHighlight){
_local3 = _arg1.transform.colorTransform;
_local3.redMultiplier = (_local3.greenMultiplier = (_local3.blueMultiplier = _arg2));
_arg1.transform.colorTransform = _local3;
};
}
}
}//package _3d.mtl
Section 5
//RectBmdMaterial (_3d.mtl.RectBmdMaterial)
package _3d.mtl {
import _3d.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.errors.*;
public class RectBmdMaterial extends BmdMaterial {
public function RectBmdMaterial(_arg1, _arg2:Boolean=false){
super(_arg1, _arg2);
}
override public function draw(_arg1:Face3D, _arg2:Scene3D, _arg3:Array):void{
var _local4:Vector3D;
var _local5:Vector3D;
var _local6:Sprite;
var _local7:BitmapData;
_local4 = _arg3[1].screenV;
_local5 = _arg3[3].screenV;
_local6 = _arg2.getCurrContainer();
_local7 = (bmdArr) ? bmdArr[_arg1.mtlBmdId] : bmd;
drawDelta(_local6, _local7, _arg3[0].screenV, _local4, _local5);
drawDelta(_local6, _local7, _arg3[2].screenV, _local5, _local4, true);
setHighlight(_local6, _arg1.highlight);
}
}
}//package _3d.mtl
Section 6
//Box (_3d.Box)
package _3d {
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Box extends Mesh3D {
public var hei:Number;
public var len:Number;
public var wid2:Number;
public var hei2:Number;
public var len2:Number;
public var wid:Number;
public function Box(_arg1:Number, _arg2:Number, _arg3:Number, ... _args){
var _local5:Array;
var _local6:Array;
super();
len = _arg1;
wid = _arg2;
hei = _arg3;
len2 = (_arg1 / 2);
wid2 = (_arg2 / 2);
hei2 = (_arg3 / 2);
_local5 = new Array();
_local6 = new Array();
addVertexs([-(len2), -(hei2), -(wid2)], [len2, -(hei2), -(wid2)], [len2, -(hei2), wid2], [-(len2), -(hei2), wid2], [-(len2), hei2, -(wid2)], [len2, hei2, -(wid2)], [len2, hei2, wid2], [-(len2), hei2, wid2]);
while ((((_args is Array)) && ((_args[0] is Array)))) {
var _local4:Array = _args[0];
};
if (_args.length == 1){
addFaces(_args[0], [7, 6, 5, 4], [5, 6, 2, 1], [6, 7, 3, 2], [4, 5, 1, 0], [7, 4, 0, 3], [0, 1, 2, 3]);
} else {
addFaces([_args[0], 7, 6, 5, 4], [_args[1], 5, 6, 2, 1], [_args[2], 6, 7, 3, 2], [_args[3], 4, 5, 1, 0], [_args[4], 7, 4, 0, 3], [_args[5], 0, 1, 2, 3]);
};
}
public function set align(_arg1:String):void{
switch (_arg1.charAt(0)){
case "t":
offsetAllVertex(0, -(hei2), 0);
break;
case "b":
offsetAllVertex(0, hei2, 0);
break;
};
switch (_arg1.charAt(1)){
case "l":
offsetAllVertex(-(len2), 0, 0);
break;
case "r":
offsetAllVertex(len2, 0, 0);
break;
};
switch (_arg1.charAt(2)){
case "f":
offsetAllVertex(0, 0, -(wid2));
break;
case "b":
offsetAllVertex(0, 0, wid2);
break;
};
}
public function rotateFace(_arg1:int, _arg2:int=1):void{
faceArr[_arg1].rotate(_arg2);
}
private function offsetAllVertex(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Vector3D;
var _local5:Face3D;
var _local6:Array;
var _local7:int;
for each (_local4 in vertexArr) {
_local4.x = (_local4.x + _arg1);
_local4.y = (_local4.y + _arg2);
_local4.z = (_local4.z + _arg3);
};
for each (_local5 in faceArr) {
if (_local5.mtlFaceSpArr){
for each (_local6 in _local5.mtlFaceSpArr) {
_local7 = 1;
while (_local7 < 4) {
_local4 = _local6[_local7];
_local6[_local7].x = (_local4.x + _arg1);
_local4.y = (_local4.y + _arg2);
_local4.z = (_local4.z + _arg3);
_local7++;
};
};
};
};
}
public function reverseFace(_arg1:int, _arg2:int=1):void{
faceArr[_arg1].reverse(_arg2);
}
}
}//package _3d
Section 7
//Camera3D (_3d.Camera3D)
package _3d {
public class Camera3D extends Obj3D {
private var zoom:Number;
private var focus:Number;
public var b:Number;
public var l:Number;
private var zoom_focus:Number;
public var t:Number;
public var r:Number;
public function Camera3D(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
zoom = _arg1;
focus = _arg2;
zoom_focus = (zoom * focus);
l = _arg3;
t = _arg4;
r = _arg5;
b = _arg6;
inMatrix = new Matrix3D();
cameraMatrix = null;
outMatrix = null;
}
public function getPersp(_arg1:Vector3D):Number{
return ((zoom_focus / (focus + _arg1.z)));
}
public function transformVertexToScreen(_arg1:Vector3D, _arg2:Vector3D):void{
var _local3:Number;
_local3 = (zoom_focus / (focus + _arg1.z));
_arg2.x = (_arg1.x * _local3);
_arg2.y = (-(_arg1.y) * _local3);
_arg2.z = _arg1.z;
}
override public function project(_arg1:Camera3D, _arg2:Array):void{
trace((this + "不支持project"));
}
}
}//package _3d
Section 8
//Cube (_3d.Cube)
package _3d {
public class Cube extends Box {
public var d2:Number;
public var d:Number;
public function Cube(_arg1:Number, ... _args){
d = _arg1;
d2 = (_arg1 / 2);
super(_arg1, _arg1, _arg1, _args);
}
}
}//package _3d
Section 9
//Face3D (_3d.Face3D)
package _3d {
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Face3D {
public var p0:Vector3D;
public var mtlFaceSpArr:Array;
public var temp;
public var mtlBmdId:int;
public var vertexArr:Array;
public var material;
public var mv:Vector3D;
public var screenZ:Number;
public var onSetVisible:Function;
public var visible:Boolean;// = true
public var highlight:Number;// = 1
public var invertValue:int;// = 1
private var prevVisible:Boolean;// = true
private static var tv:Vector3D = new Vector3D();
private static var tp:Vector3D = new Vector3D();
public function Face3D(_arg1:Array, _arg2:Material){
var _local3:Vector3D;
var _local4:Vector3D;
var _local5:Vector3D;
visible = true;
invertValue = 1;
highlight = 1;
prevVisible = true;
super();
vertexArr = _arg1;
_local3 = vertexArr[0];
_local4 = vertexArr[1];
_local5 = vertexArr[2];
mv = Vector3D.subtract_(_local3, _local4).cross(Vector3D.subtract_(_local4, _local5));
mv.normalize();
p0 = new Vector3D((((_local3.x + _local4.x) + _local5.x) / 3), (((_local3.y + _local4.y) + _local5.y) / 3), (((_local3.z + _local4.z) + _local5.z) / 3));
changeMaterial(_arg2);
}
public function changeMaterial(_arg1:Material):void{
material = _arg1;
if (material){
material.init(this);
};
}
public function clear():void{
setVisible(false);
vertexArr = null;
material = null;
mtlFaceSpArr = null;
onSetVisible = null;
}
public function project(_arg1:Matrix3D):void{
var _local2:Vector3D;
screenZ = 0;
for each (_local2 in vertexArr) {
screenZ = (screenZ + _local2.screenV.z);
};
screenZ = (screenZ / vertexArr.length);
_arg1.transformVertexTo(p0, tp);
tp.normalize();
_arg1.transformVectorTo(mv, tv);
highlight = -(tp.dot(tv));
if (highlight < 0.8){
highlight = 0.8;
} else {
if (highlight > 1){
highlight = 1;
};
};
}
public function rotate(_arg1:int):void{
var _local2:Array;
var _local3:int;
var _local4:int;
_local2 = vertexArr.slice();
_local3 = vertexArr.length;
_local4 = 0;
while (_local4 < _local3) {
vertexArr[_local4] = _local2[((_arg1 + _local4) % _local3)];
_local4++;
};
}
public function reverse(_arg1:int):void{
var _local2:Vector3D;
invertValue = (invertValue * -1);
if (_arg1 == 1){
_local2 = vertexArr[0];
vertexArr[0] = vertexArr[3];
vertexArr[3] = _local2;
_local2 = vertexArr[1];
vertexArr[1] = vertexArr[2];
vertexArr[2] = _local2;
} else {
_local2 = vertexArr[0];
vertexArr[0] = vertexArr[1];
vertexArr[1] = _local2;
_local2 = vertexArr[3];
vertexArr[3] = vertexArr[2];
vertexArr[2] = _local2;
};
}
public function setVisible(_arg1:Boolean):void{
if (onSetVisible != null){
if (prevVisible != _arg1){
onSetVisible(_arg1);
prevVisible = _arg1;
};
};
}
public function render(_arg1:Scene3D):void{
if (screenZ > 0){
material.draw(this, _arg1, vertexArr);
};
}
}
}//package _3d
Section 10
//Matrix3D (_3d.Matrix3D)
package _3d {
public class Matrix3D {
public var _12:Number;
public var _11:Number;
public var _13:Number;
public var _14:Number;
public var _32:Number;
public var _41:Number;
public var _42:Number;
public var _21:Number;
public var _22:Number;
public var _23:Number;
public var _24:Number;
public var _43:Number;
public var _44:Number;
public var _34:Number;
public var _31:Number;
public var _33:Number;
public function Matrix3D(_arg1:Number=1, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0, _arg9:Number=0, _arg10:Number=0, _arg11:Number=1, _arg12:Number=0, _arg13:Number=0, _arg14:Number=0, _arg15:Number=0, _arg16:Number=1){
_11 = _arg1;
_12 = _arg2;
_13 = _arg3;
_14 = _arg4;
_21 = _arg5;
_22 = _arg6;
_23 = _arg7;
_24 = _arg8;
_31 = _arg9;
_32 = _arg10;
_33 = _arg11;
_34 = _arg12;
_41 = _arg13;
_42 = _arg14;
_43 = _arg15;
_44 = _arg16;
}
public function transformVertexTo(_arg1:Vector3D, _arg2:Vector3D):void{
_arg2.x = ((((_arg1.x * _11) + (_arg1.y * _21)) + (_arg1.z * _31)) + _41);
_arg2.y = ((((_arg1.x * _12) + (_arg1.y * _22)) + (_arg1.z * _32)) + _42);
_arg2.z = ((((_arg1.x * _13) + (_arg1.y * _23)) + (_arg1.z * _33)) + _43);
}
public function transformVector(_arg1:Vector3D):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.x;
_local3 = _arg1.y;
_local4 = _arg1.z;
_arg1.x = (((_local2 * _11) + (_local3 * _21)) + (_local4 * _31));
_arg1.y = (((_local2 * _12) + (_local3 * _22)) + (_local4 * _32));
_arg1.z = (((_local2 * _13) + (_local3 * _23)) + (_local4 * _33));
}
public function transformVectorTo(_arg1:Vector3D, _arg2:Vector3D):void{
_arg2.x = (((_arg1.x * _11) + (_arg1.y * _21)) + (_arg1.z * _31));
_arg2.y = (((_arg1.x * _12) + (_arg1.y * _22)) + (_arg1.z * _32));
_arg2.z = (((_arg1.x * _13) + (_arg1.y * _23)) + (_arg1.z * _33));
}
public function toString():String{
return (((((((((((((((((((((((((((((((((((("(" + _11) + ",") + _12) + ",") + _13) + ",") + _14) + "),\r") + "(") + _21) + ",") + _22) + ",") + _23) + ",") + _24) + "),\r") + "(") + _31) + ",") + _32) + ",") + _33) + ",") + _34) + "),\r") + "(") + _41) + ",") + _42) + ",") + _43) + ",") + _44) + ")\r"));
}
public function transformVertex(_arg1:Vector3D):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.x;
_local3 = _arg1.y;
_local4 = _arg1.z;
_arg1.x = ((((_local2 * _11) + (_local3 * _21)) + (_local4 * _31)) + _41);
_arg1.y = ((((_local2 * _12) + (_local3 * _22)) + (_local4 * _32)) + _42);
_arg1.z = ((((_local2 * _13) + (_local3 * _23)) + (_local4 * _33)) + _43);
}
public static function productSet(_arg1:Matrix3D, _arg2:Matrix3D, _arg3:Matrix3D):void{
_arg3._11 = ((((_arg1._11 * _arg2._11) + (_arg1._12 * _arg2._21)) + (_arg1._13 * _arg2._31)) + (_arg1._14 * _arg2._41));
_arg3._12 = ((((_arg1._11 * _arg2._12) + (_arg1._12 * _arg2._22)) + (_arg1._13 * _arg2._32)) + (_arg1._14 * _arg2._42));
_arg3._13 = ((((_arg1._11 * _arg2._13) + (_arg1._12 * _arg2._23)) + (_arg1._13 * _arg2._33)) + (_arg1._14 * _arg2._43));
_arg3._14 = ((((_arg1._11 * _arg2._14) + (_arg1._12 * _arg2._24)) + (_arg1._13 * _arg2._34)) + (_arg1._14 * _arg2._44));
_arg3._21 = ((((_arg1._21 * _arg2._11) + (_arg1._22 * _arg2._21)) + (_arg1._23 * _arg2._31)) + (_arg1._24 * _arg2._41));
_arg3._22 = ((((_arg1._21 * _arg2._12) + (_arg1._22 * _arg2._22)) + (_arg1._23 * _arg2._32)) + (_arg1._24 * _arg2._42));
_arg3._23 = ((((_arg1._21 * _arg2._13) + (_arg1._22 * _arg2._23)) + (_arg1._23 * _arg2._33)) + (_arg1._24 * _arg2._43));
_arg3._24 = ((((_arg1._21 * _arg2._14) + (_arg1._22 * _arg2._24)) + (_arg1._23 * _arg2._34)) + (_arg1._24 * _arg2._44));
_arg3._31 = ((((_arg1._31 * _arg2._11) + (_arg1._32 * _arg2._21)) + (_arg1._33 * _arg2._31)) + (_arg1._34 * _arg2._41));
_arg3._32 = ((((_arg1._31 * _arg2._12) + (_arg1._32 * _arg2._22)) + (_arg1._33 * _arg2._32)) + (_arg1._34 * _arg2._42));
_arg3._33 = ((((_arg1._31 * _arg2._13) + (_arg1._32 * _arg2._23)) + (_arg1._33 * _arg2._33)) + (_arg1._34 * _arg2._43));
_arg3._34 = ((((_arg1._31 * _arg2._14) + (_arg1._32 * _arg2._24)) + (_arg1._33 * _arg2._34)) + (_arg1._34 * _arg2._44));
_arg3._41 = ((((_arg1._41 * _arg2._11) + (_arg1._42 * _arg2._21)) + (_arg1._43 * _arg2._31)) + (_arg1._44 * _arg2._41));
_arg3._42 = ((((_arg1._41 * _arg2._12) + (_arg1._42 * _arg2._22)) + (_arg1._43 * _arg2._32)) + (_arg1._44 * _arg2._42));
_arg3._43 = ((((_arg1._41 * _arg2._13) + (_arg1._42 * _arg2._23)) + (_arg1._43 * _arg2._33)) + (_arg1._44 * _arg2._43));
_arg3._44 = ((((_arg1._41 * _arg2._14) + (_arg1._42 * _arg2._24)) + (_arg1._43 * _arg2._34)) + (_arg1._44 * _arg2._44));
}
public static function product(_arg1:Matrix3D, _arg2:Matrix3D):Matrix3D{
return (new Matrix3D(((((_arg1._11 * _arg2._11) + (_arg1._12 * _arg2._21)) + (_arg1._13 * _arg2._31)) + (_arg1._14 * _arg2._41)), ((((_arg1._11 * _arg2._12) + (_arg1._12 * _arg2._22)) + (_arg1._13 * _arg2._32)) + (_arg1._14 * _arg2._42)), ((((_arg1._11 * _arg2._13) + (_arg1._12 * _arg2._23)) + (_arg1._13 * _arg2._33)) + (_arg1._14 * _arg2._43)), ((((_arg1._11 * _arg2._14) + (_arg1._12 * _arg2._24)) + (_arg1._13 * _arg2._34)) + (_arg1._14 * _arg2._44)), ((((_arg1._21 * _arg2._11) + (_arg1._22 * _arg2._21)) + (_arg1._23 * _arg2._31)) + (_arg1._24 * _arg2._41)), ((((_arg1._21 * _arg2._12) + (_arg1._22 * _arg2._22)) + (_arg1._23 * _arg2._32)) + (_arg1._24 * _arg2._42)), ((((_arg1._21 * _arg2._13) + (_arg1._22 * _arg2._23)) + (_arg1._23 * _arg2._33)) + (_arg1._24 * _arg2._43)), ((((_arg1._21 * _arg2._14) + (_arg1._22 * _arg2._24)) + (_arg1._23 * _arg2._34)) + (_arg1._24 * _arg2._44)), ((((_arg1._31 * _arg2._11) + (_arg1._32 * _arg2._21)) + (_arg1._33 * _arg2._31)) + (_arg1._34 * _arg2._41)), ((((_arg1._31 * _arg2._12) + (_arg1._32 * _arg2._22)) + (_arg1._33 * _arg2._32)) + (_arg1._34 * _arg2._42)), ((((_arg1._31 * _arg2._13) + (_arg1._32 * _arg2._23)) + (_arg1._33 * _arg2._33)) + (_arg1._34 * _arg2._43)), ((((_arg1._31 * _arg2._14) + (_arg1._32 * _arg2._24)) + (_arg1._33 * _arg2._34)) + (_arg1._34 * _arg2._44)), ((((_arg1._41 * _arg2._11) + (_arg1._42 * _arg2._21)) + (_arg1._43 * _arg2._31)) + (_arg1._44 * _arg2._41)), ((((_arg1._41 * _arg2._12) + (_arg1._42 * _arg2._22)) + (_arg1._43 * _arg2._32)) + (_arg1._44 * _arg2._42)), ((((_arg1._41 * _arg2._13) + (_arg1._42 * _arg2._23)) + (_arg1._43 * _arg2._33)) + (_arg1._44 * _arg2._43)), ((((_arg1._41 * _arg2._14) + (_arg1._42 * _arg2._24)) + (_arg1._43 * _arg2._34)) + (_arg1._44 * _arg2._44))));
}
}
}//package _3d
Section 11
//Mesh3D (_3d.Mesh3D)
package _3d {
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Mesh3D extends Obj3D {
public var vertexArr:Array;
public var faceArr:Array;
public function Mesh3D(_arg1:Vector3D=null){
super(_arg1);
vertexArr = new Array();
faceArr = new Array();
}
override public function project(_arg1:Camera3D, _arg2:Array):void{
var _local3:Vector3D;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Face3D;
var _local9:Vector3D;
var _local10:Vector3D;
var _local11:Vector3D;
var _local12:Vector3D;
var _local13:Array;
var _local14:int;
updateM();
_local4 = _arg1.l;
_local5 = _arg1.t;
_local6 = _arg1.r;
_local7 = _arg1.b;
for each (_local3 in vertexArr) {
_local9 = _local3.screenV;
cameraMatrix.transformVertexTo(_local3, _local3.cameraV);
_arg1.transformVertexToScreen(_local3.cameraV, _local9);
_local9.isCameraVisible = (((((((((_local9.y > _local5)) && ((_local9.y < _local7)))) && ((_local9.x > _local4)))) && ((_local9.x < _local6)))) && ((_local9.z > 0)));
};
for each (_local8 in faceArr) {
if (_local8.visible){
_local10 = _local8.vertexArr[0].screenV;
_local11 = _local8.vertexArr[1].screenV;
_local12 = _local8.vertexArr[2].screenV;
if (((!(((((_local10.isCameraVisible) || (_local11.isCameraVisible))) || (_local12.isCameraVisible)))) || ((((((_local12.x - _local10.x) * (_local11.y - _local10.y)) - ((_local12.y - _local10.y) * (_local11.x - _local10.x))) * _local8.invertValue) > 0)))){
_local8.setVisible(false);
} else {
_local8.setVisible(true);
_local8.project(cameraMatrix);
if (_local8.mtlFaceSpArr){
for each (_local13 in _local8.mtlFaceSpArr) {
_local14 = 1;
while (_local14 < 4) {
_local3 = _local13[_local14];
cameraMatrix.transformVertexTo(_local3, _local3.cameraV);
_arg1.transformVertexToScreen(_local3.cameraV, _local3.screenV);
_local14++;
};
};
};
_arg2.push(_local8);
};
};
};
}
override public function clear():void{
var _local1:Face3D;
super.clear();
for each (_local1 in faceArr) {
_local1.clear();
};
vertexArr = null;
faceArr = null;
}
public function addVertexs(... _args):void{
var _local2:Array;
for each (_local2 in argsToArr(_args)) {
vertexArr.push(new Vector3D(_local2[0], _local2[1], _local2[2], true));
};
}
public function addFaces(... _args):void{
var _local2:Array;
var _local3:int;
var _local4:Material;
var _local5:Array;
if ((_args[0] is Material)){
_local4 = _args.shift();
for each (_local2 in argsToArr(_args)) {
_local5 = new Array();
for each (_local3 in _local2) {
_local5.push(vertexArr[_local3]);
};
faceArr.push(new Face3D(_local5, _local4));
};
} else {
for each (_local2 in argsToArr(_args)) {
_local4 = _local2.shift();
_local5 = new Array();
for each (_local3 in _local2) {
_local5.push(vertexArr[_local3]);
};
faceArr.push(new Face3D(_local5, _local4));
};
};
}
private static function argsToArr(_arg1:Array):Array{
var _local2:Array;
var _local3:*;
_local2 = new Array();
for each (_local3 in _arg1) {
if ((_local3[0] is Array)){
_local2 = _local2.concat(_local3);
} else {
_local2.push(_local3);
};
};
return (_local2);
}
public static function dumpVertexArr(_arg1:Array, _arg2:Array):void{
trace("搜索faceArr,把vertexArr中没用到的顶点去掉");
}
}
}//package _3d
Section 12
//Obj3D (_3d.Obj3D)
package _3d {
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Obj3D {
public var vx:Vector3D;
public var vy:Vector3D;
public var vz:Vector3D;
public var cameraMatrix:Matrix3D;
public var inMatrix:Matrix3D;
public var parent;
public var outMatrix:Matrix3D;
public var visible:Boolean;// = true
public var o:Vector3D;
private static var tp:Vector3D = new Vector3D();
public static var scene:Scene3D;
public function Obj3D(_arg1:Vector3D=null){
visible = true;
super();
if (_arg1 == null){
o = new Vector3D();
} else {
o = _arg1.clone();
};
vx = new Vector3D(1, 0, 0);
vy = new Vector3D(0, 1, 0);
vz = new Vector3D(0, 0, 1);
cameraMatrix = new Matrix3D();
outMatrix = new Matrix3D();
}
public function rotatez(_arg1:Number):void{
vx.revolutionv(vz, _arg1);
vy.revolutionv(vz, _arg1);
}
public function revolutiony(_arg1:Number):void{
o.revolutiony(_arg1);
vx.revolutiony(_arg1);
vy.revolutiony(_arg1);
vz.revolutiony(_arg1);
}
public function revolutionz(_arg1:Number):void{
o.revolutionz(_arg1);
vx.revolutionz(_arg1);
vy.revolutionz(_arg1);
vz.revolutionz(_arg1);
}
public function revolutionx(_arg1:Number):void{
o.revolutionx(_arg1);
vx.revolutionx(_arg1);
vy.revolutionx(_arg1);
vz.revolutionx(_arg1);
}
public function project(_arg1:Camera3D, _arg2:Array):void{
trace((this + "请override来使用"));
}
public function clear():void{
o = null;
vx = null;
vy = null;
vz = null;
cameraMatrix = null;
outMatrix = null;
inMatrix = null;
}
public function pointToTarget(_arg1, _arg2:Vector3D=null):void{
pointToXYZ(_arg1.x, _arg1.y, _arg1.z, _arg2);
}
public function updateOutM():void{
outMatrix._11 = vx.x;
outMatrix._12 = vx.y;
outMatrix._13 = vx.z;
outMatrix._14 = 0;
outMatrix._21 = vy.x;
outMatrix._22 = vy.y;
outMatrix._23 = vy.z;
outMatrix._24 = 0;
outMatrix._31 = vz.x;
outMatrix._32 = vz.y;
outMatrix._33 = vz.z;
outMatrix._34 = 0;
outMatrix._41 = o.x;
outMatrix._42 = o.y;
outMatrix._43 = o.z;
outMatrix._44 = 1;
}
public function updateM():void{
updateOutM();
Matrix3D.productSet(outMatrix, parent.cameraMatrix, cameraMatrix);
}
public function pointToXYZ(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Vector3D):void{
tp.x = (_arg1 - o.x);
tp.y = (_arg2 - o.y);
tp.z = (_arg3 - o.z);
follow(tp, _arg4);
}
public function follow(_arg1:Vector3D, _arg2:Vector3D):void{
vz.x = _arg1.x;
vz.y = _arg1.y;
vz.z = _arg1.z;
vy.x = _arg2.x;
vy.y = _arg2.y;
vy.z = _arg2.z;
vz.normalize();
vy.normalize();
Vector3D.crossSet(vy, vz, vx);
}
public function revolutionv(_arg1:Vector3D, _arg2:Number):void{
o.revolutionv(_arg1, _arg2);
vx.revolutionv(_arg1, _arg2);
vy.revolutionv(_arg1, _arg2);
vz.revolutionv(_arg1, _arg2);
}
public function rotatex(_arg1:Number):void{
vy.revolutionv(vx, _arg1);
vz.revolutionv(vx, _arg1);
}
public function rotatey(_arg1:Number):void{
vx.revolutionv(vy, _arg1);
vz.revolutionv(vy, _arg1);
}
public function updateInM():void{
inMatrix._11 = vx.x;
inMatrix._12 = vy.x;
inMatrix._13 = vz.x;
inMatrix._14 = 0;
inMatrix._21 = vx.y;
inMatrix._22 = vy.y;
inMatrix._23 = vz.y;
inMatrix._24 = 0;
inMatrix._31 = vx.z;
inMatrix._32 = vy.z;
inMatrix._33 = vz.z;
inMatrix._34 = 0;
inMatrix._41 = -(vx.dot(o));
inMatrix._42 = -(vy.dot(o));
inMatrix._43 = -(vz.dot(o));
inMatrix._44 = 1;
}
}
}//package _3d
Section 13
//Obj3DContainer (_3d.Obj3DContainer)
package _3d {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Obj3DContainer extends Obj3D {
public var objects:Dictionary;
public function Obj3DContainer(){
objects = new Dictionary();
}
override public function project(_arg1:Camera3D, _arg2:Array):void{
var _local3:*;
updateM();
for (_local3 in objects) {
if (_local3.visible){
_local3.project(_arg1, _arg2);
};
};
}
override public function clear():void{
var _local1:*;
super.clear();
for (_local1 in objects) {
_local1.clear();
};
objects = null;
}
public function removeChild(_arg1:Obj3D):void{
if (objects[_arg1]){
_arg1.clear();
delete objects[_arg1];
} else {
trace("删除子系统失败");
};
}
public function addChild(_arg1:Obj3D):void{
_arg1.parent = this;
objects[_arg1] = true;
}
}
}//package _3d
Section 14
//Scene3D (_3d.Scene3D)
package _3d {
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Scene3D extends Obj3DContainer {
private var containerContainer:Sprite;
public var container:Sprite;
private var totalContainer:int;
private var containerArr:Array;
private var currContainerIndex:int;
public function Scene3D(_arg1:Sprite){
containerContainer = _arg1;
scene = this;
totalContainer = 0;
containerArr = new Array();
}
public function resetAllHighlight():void{
var _local1:Sprite;
for each (_local1 in containerArr) {
Material.setHighlight(_local1, 1);
};
}
override public function updateM():void{
}
public function getCurrContainer():Sprite{
var _local1:Sprite;
if (++currContainerIndex >= totalContainer){
containerArr.push(new Sprite());
totalContainer++;
};
_local1 = (container.addChild(containerArr[currContainerIndex]) as Sprite);
_local1.graphics.clear();
return (_local1);
}
override public function clear():void{
super.clear();
scene = null;
container = null;
containerContainer = null;
containerArr = null;
}
public function renderCamera(_arg1:Camera3D):void{
var _local2:Array;
var _local3:*;
_arg1.updateInM();
Matrix3D.productSet(outMatrix, _arg1.inMatrix, cameraMatrix);
_local2 = new Array();
project(_arg1, _local2);
_local2.sortOn("screenZ", (Array.NUMERIC | Array.DESCENDING));
if (container){
containerContainer.removeChild(container);
};
container = new Sprite();
currContainerIndex = -1;
for each (_local3 in _local2) {
_local3.render(this);
};
containerContainer.addChild(container);
}
}
}//package _3d
Section 15
//Sprite3D (_3d.Sprite3D)
package _3d {
import flash.display.*;
public class Sprite3D extends Obj3D {
public var cameraSetVisible:Boolean;
public var onCtrlAnimation:Function;
public var sp:Sprite;
private var animationIsStop:Boolean;
public var animationAutoStop:Boolean;// = false
public var screenZ:Number;
private static const P0:Vector3D = new Vector3D();
private static var tp:Vector3D = new Vector3D();
public function Sprite3D(_arg1:Sprite){
animationAutoStop = false;
super();
sp = _arg1;
o.screenV = new Vector3D();
}
public function render(_arg1:Scene3D):void{
if (sp.scaleX > 0){
sp.x = o.screenV.x;
sp.y = o.screenV.y;
if (((animationAutoStop) && (animationIsStop))){
startAnimation();
};
_arg1.container.addChild(sp);
};
}
override public function project(_arg1:Camera3D, _arg2:Array):void{
var _local3:Vector3D;
updateM();
_local3 = o.screenV;
cameraMatrix.transformVertexTo(P0, tp);
_arg1.transformVertexToScreen(tp, _local3);
if ((((((((((_local3.x < _arg1.l)) || ((_local3.x > _arg1.r)))) || ((_local3.y < _arg1.t)))) || ((_local3.y > _arg1.b)))) || ((_local3.z < 0)))){
cameraSetVisible = false;
if (((animationAutoStop) && (!(animationIsStop)))){
stopAnimation();
};
return;
};
sp.scaleX = (sp.scaleY = _arg1.getPersp(tp));
if (sp.scaleX > 2){
cameraSetVisible = false;
if (((animationAutoStop) && (!(animationIsStop)))){
stopAnimation();
};
return;
};
cameraSetVisible = true;
_arg2.push(this);
screenZ = _local3.z;
}
public function stopAnimation():void{
animationIsStop = true;
onCtrlAnimation(false);
}
public function startAnimation():void{
animationIsStop = false;
onCtrlAnimation(true);
}
public function overturn(_arg1:int=-1):void{
sp.getChildAt(0).scaleX = _arg1;
}
override public function clear():void{
super.clear();
if ((sp is MovieClip)){
(sp as MovieClip).stop();
};
sp = null;
onCtrlAnimation = null;
}
}
}//package _3d
Section 16
//Vector3D (_3d.Vector3D)
package _3d {
public class Vector3D {
public var isCameraVisible:Boolean;
public var cameraV:Vector3D;
public var screenV:Vector3D;
public var x:Number;
public var y:Number;
public var z:Number;
public static var tm:Matrix3D = new Matrix3D();
public function Vector3D(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Boolean=false){
x = _arg1;
y = _arg2;
z = _arg3;
if (_arg4){
cameraV = new Vector3D();
screenV = new Vector3D();
};
}
public function cross(_arg1:Vector3D):Vector3D{
return (new Vector3D(((y * _arg1.z) - (z * _arg1.y)), ((z * _arg1.x) - (x * _arg1.z)), ((x * _arg1.y) - (y * _arg1.x))));
}
public function dot(_arg1:Vector3D):Number{
return ((((x * _arg1.x) + (y * _arg1.y)) + (z * _arg1.z)));
}
public function simple(_arg1:Number):void{
x = (Math.round((x / _arg1)) * _arg1);
y = (Math.round((y / _arg1)) * _arg1);
z = (Math.round((z / _arg1)) * _arg1);
}
public function revolutionv(_arg1:Vector3D, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local3 = Math.cos(-(_arg2));
_local4 = Math.sin(-(_arg2));
_local5 = (1 - _local3);
_local6 = (_arg1.x * _local4);
_local7 = (_arg1.y * _local4);
_local8 = (_arg1.z * _local4);
_local9 = ((_local5 * _arg1.x) * _arg1.x);
_local10 = ((_local5 * _arg1.x) * _arg1.y);
_local11 = ((_local5 * _arg1.x) * _arg1.z);
_local12 = ((_local5 * _arg1.y) * _arg1.y);
_local13 = ((_local5 * _arg1.y) * _arg1.z);
_local14 = ((_local5 * _arg1.z) * _arg1.z);
tm._11 = (_local3 + _local9);
tm._12 = (_local10 - _local8);
tm._13 = (_local11 + _local7);
tm._14 = 0;
tm._21 = (_local10 + _local8);
tm._22 = (_local3 + _local12);
tm._23 = (_local13 - _local6);
tm._24 = 0;
tm._31 = (_local11 - _local7);
tm._32 = (_local13 + _local6);
tm._33 = (_local3 + _local14);
tm._34 = 0;
tm._41 = 0;
tm._42 = 0;
tm._43 = 0;
tm._44 = 1;
tm.transformVertex(this);
}
public function revolutiony(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = Math.cos(_arg1);
_local3 = Math.sin(_arg1);
_local4 = z;
_local5 = x;
z = ((_local4 * _local2) - (_local5 * _local3));
x = ((_local4 * _local3) + (_local5 * _local2));
}
public function revolutionz(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = Math.cos(_arg1);
_local3 = Math.sin(_arg1);
_local4 = x;
_local5 = y;
x = ((_local4 * _local2) - (_local5 * _local3));
y = ((_local4 * _local3) + (_local5 * _local2));
}
public function subtract(_arg1:Vector3D):void{
x = (x - _arg1.x);
y = (y - _arg1.y);
z = (z - _arg1.z);
}
public function revolutionx(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = Math.cos(_arg1);
_local3 = Math.sin(_arg1);
_local4 = y;
_local5 = z;
y = ((_local4 * _local2) - (_local5 * _local3));
z = ((_local4 * _local3) + (_local5 * _local2));
}
public function normalize(_arg1:Number=1):void{
var _local2:Number;
var _local3:Number;
_local2 = (((x * x) + (y * y)) + (z * z));
if (_local2 == 0){
return;
};
_local3 = (_arg1 / Math.sqrt(_local2));
x = (x * _local3);
y = (y * _local3);
z = (z * _local3);
}
public function clone():Vector3D{
return (new Vector3D(x, y, z));
}
public function add(_arg1:Vector3D):void{
x = (x + _arg1.x);
y = (y + _arg1.y);
z = (z + _arg1.z);
}
public function get length():Number{
return (Math.sqrt((((x * x) + (y * y)) + (z * z))));
}
public function toString():String{
return ((((((("(" + x) + ",") + y) + ",") + z) + ")"));
}
public function mult(_arg1:Number):void{
x = (x * _arg1);
y = (y * _arg1);
z = (z * _arg1);
}
public static function crossSet(_arg1:Vector3D, _arg2:Vector3D, _arg3:Vector3D):void{
_arg3.x = ((_arg1.y * _arg2.z) - (_arg1.z * _arg2.y));
_arg3.y = ((_arg1.z * _arg2.x) - (_arg1.x * _arg2.z));
_arg3.z = ((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x));
}
public static function revolutionxTo(_arg1:Vector3D, _arg2:Number, _arg3:Vector3D):void{
var _local4:Number;
var _local5:Number;
_local4 = Math.cos(_arg2);
_local5 = Math.sin(_arg2);
_arg3.y = ((_arg1.y * _local4) - (_arg1.z * _local5));
_arg3.z = ((_arg1.y * _local5) + (_arg1.z * _local4));
}
public static function subtract_(_arg1:Vector3D, _arg2:Vector3D):Vector3D{
return (new Vector3D((_arg1.x - _arg2.x), (_arg1.y - _arg2.y), (_arg1.z - _arg2.z)));
}
public static function revolutionzTo(_arg1:Vector3D, _arg2:Number, _arg3:Vector3D):void{
var _local4:Number;
var _local5:Number;
_local4 = Math.cos(_arg2);
_local5 = Math.sin(_arg2);
_arg3.x = ((_arg1.x * _local4) - (_arg1.y * _local5));
_arg3.y = ((_arg1.x * _local5) + (_arg1.y * _local4));
}
public static function getVByK(_arg1:Vector3D, _arg2:Vector3D, _arg3:Number, _arg4:Vector3D):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:*;
if (_arg3 == 0){
_arg4.x = _arg1.x;
_arg4.y = _arg1.y;
_arg4.z = _arg1.z;
} else {
if (_arg3 == 1){
_arg4.x = _arg2.x;
_arg4.y = _arg2.y;
_arg4.z = _arg2.z;
} else {
if ((((_arg3 > 0)) && ((_arg3 < 1)))){
_local5 = Math.tan((toAngle(_arg1, _arg2) * _arg3));
if (_local5 == 0){
_arg4.x = _arg1.x;
_arg4.y = _arg1.y;
_arg4.z = _arg1.z;
return;
};
_local6 = _arg1.x;
_local7 = _arg1.y;
_local8 = _arg1.z;
_local9 = _arg2.x;
_local10 = _arg2.y;
_local11 = _arg2.z;
_local12 = (((((((_local6 * _local10) - (_local7 * _local9)) + (_local7 * _local11)) - (_local8 * _local10)) + (_local8 * _local9)) - (_local6 * _local11)) / _local5);
_arg4.x = ((_local6 * _local12) - ((_local7 * ((_local6 * _local10) - (_local9 * _local7))) + (_local8 * ((_local6 * _local11) - (_local8 * _local9)))));
_arg4.y = ((_local7 * _local12) - ((_local8 * ((_local7 * _local11) - (_local10 * _local8))) + (_local6 * ((_local7 * _local9) - (_local6 * _local10)))));
_arg4.z = ((_local8 * _local12) - ((_local6 * ((_local8 * _local9) - (_local11 * _local6))) + (_local7 * ((_local8 * _local10) - (_local7 * _local11)))));
_arg4.normalize();
} else {
trace(("k不正常,k=" + _arg3));
_local13.kk;
};
};
};
}
public static function distance(_arg1:Vector3D, _arg2:Vector3D):Number{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
_local5 = (_arg1.z - _arg2.z);
return (Math.sqrt((((_local3 * _local3) + (_local4 * _local4)) + (_local5 * _local5))));
}
public static function dot_(_arg1:Vector3D, _arg2:Vector3D):Number{
return ((((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)) + (_arg1.z * _arg2.z)));
}
public static function toAngle(_arg1:Vector3D, _arg2:Vector3D):Number{
return (Math.atan2(((((((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x)) + (_arg1.y * _arg2.z)) - (_arg1.z * _arg2.y)) + (_arg1.z * _arg2.x)) - (_arg1.x * _arg2.z)), (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)) + (_arg1.z * _arg2.z))));
}
public static function normalize_(_arg1:Vector3D, _arg2:Number=1):Vector3D{
_arg1 = _arg1.clone();
_arg1.normalize(_arg2);
return (_arg1);
}
public static function revolutionyTo(_arg1:Vector3D, _arg2:Number, _arg3:Vector3D):void{
var _local4:Number;
var _local5:Number;
_local4 = Math.cos(_arg2);
_local5 = Math.sin(_arg2);
_arg3.z = ((_arg1.z * _local4) - (_arg1.x * _local5));
_arg3.x = ((_arg1.z * _local5) + (_arg1.x * _local4));
}
public static function add_(_arg1:Vector3D, _arg2:Vector3D):Vector3D{
return (new Vector3D((_arg1.x + _arg2.x), (_arg1.y + _arg2.y), (_arg1.z + _arg2.z)));
}
public static function cross_(_arg1:Vector3D, _arg2:Vector3D):Vector3D{
return (_arg1.cross(_arg2));
}
}
}//package _3d
Section 17
//Block (_game.Block)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Block extends HitObj {
public var box:Box;
public function Block(_arg1:Number, _arg2:Number, _arg3:Material, _arg4:Material, _arg5:Material, _arg6:Material, _arg7:Material, _arg8:Material, _arg9:Number, _arg10:Number, _arg11:Number, _arg12:String){
super(_arg1, _arg2);
this.addChild((box = new Box(_arg9, _arg10, _arg11, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)));
box.align = _arg12;
}
public function adjustPos(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int, _arg5:Object):void{
if (_arg4 > 0){
_arg5.hitX = _arg1;
_arg5.hitY = (mapY - box.hei);
} else {
if (_arg4 < 0){
_arg5.hitX = _arg1;
_arg5.hitY = (mapY + 1);
} else {
if (_arg3 > 0){
_arg5.hitX = (mapX - (box.len * 0.6));
_arg5.hitY = _arg2;
} else {
_arg5.hitX = (mapX + (box.len * 0.6));
_arg5.hitY = _arg2;
};
};
};
}
override public function clear():void{
super.clear();
box = null;
}
}
}//package _game
Section 18
//BlockBtn (_game.BlockBtn)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class BlockBtn extends StandBlock {
public var isUsed:Boolean;
public var prisoner:Prisoner;
public function BlockBtn(_arg1:Number, _arg2:Number){
var _local3:Object;
_local3 = Game.mtlList.btn;
super(_arg1, _arg2, _local3.top, _local3.side, _local3.side, _local3.side, _local3.side, _local3.side);
}
override public function move():void{
isUsed = true;
Game.tfkMap[mapIntY][((mapIntX - 1) / Game.pfDD)] = 1;
prisoner.goOut();
prisoner.onRunAway = light.turnOff;
}
override public function clear():void{
super.clear();
prisoner = null;
}
}
}//package _game
Section 19
//BlockFall (_game.BlockFall)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class BlockFall extends StandBlock {
private var bottomY:Number;
private var speedY:Number;
public function BlockFall(_arg1:Number, _arg2:Number){
var _local3:Object;
_local3 = Game.mtlList.fall;
super(_arg1, _arg2, _local3.top, _local3.side, _local3.side, _local3.side, _local3.side, _local3.side);
}
override public function move():void{
var _local1:int;
_local1 = 0;
while (_local1 < Game.pfDD) {
Game.map[mapIntY][((mapIntX + _local1) - 1)] = null;
_local1++;
};
speedY = 0;
bottomY = (mapY - Game.pfDh);
super.move();
}
override public function moveRun():void{
if (Game.isLookingAround){
return;
};
speedY = (speedY + Game.g);
mapY = (mapY + speedY);
if (mapY < bottomY){
stopMove();
Game.removeHitObj(this);
} else {
super.moveRun();
};
}
}
}//package _game
Section 20
//BlockLift (_game.BlockLift)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class BlockLift extends StandBlock {
public var dir:int;
private var useTimes:int;
private var arrow:ImgLiftArrow;
public var range0:int;
public var range:int;
private var speed:Number;// = 0.125
private var movId:int;
private var totalMovId:int;
public function BlockLift(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int, _arg5:int, _arg6:Object){
var _local7:Object;
speed = (1 / 8);
range0 = _arg4;
_local7 = Game.mtlList.lift;
if (((_arg6) && (!((range0 == _arg6.range))))){
_arg3 = _arg6.dir;
_arg4 = _arg6.range;
if (_arg3 == 0){
_arg2 = (_arg2 - (_arg4 * Game.pfDh));
} else {
_arg1 = (_arg1 - ((_arg4 * Game.brickWid) * Game.pfDD));
};
};
super(_arg1, _arg2, _local7.top, _local7.side, _local7.side, _local7.front, _local7.side, _local7.side);
dir = _arg3;
range = _arg4;
useTimes = ((_arg5 > 0)) ? _arg5 : int.MAX_VALUE;
arrow = (box.faceArr[3].mtlFaceSpArr[0][0] as ImgLiftArrow);
adjustArrowRotation();
}
override public function move():void{
arrow.turnOn();
if ((range * speed) < 0){
speed = (speed * -1);
};
movId = 0;
totalMovId = (range / speed);
updateMap(null);
super.move();
}
override public function clear():void{
super.clear();
arrow = null;
}
private function adjustArrowRotation():void{
if (dir == 0){
if (range > 0){
arrow._rotation = -90;
} else {
arrow._rotation = 90;
};
} else {
if (range > 0){
arrow._rotation = 0;
} else {
arrow._rotation = 180;
};
};
}
override public function moveRun():void{
if (Game.isLookingAround){
return;
};
if (dir == 0){
mapY = (mapY + (speed * Game.pfDh));
} else {
mapX = (mapX + ((speed * Game.brickWid) * Game.pfDD));
};
super.moveRun();
if (++movId >= totalMovId){
range = (range * -1);
updateMap(this);
stopMove();
light.turnOff();
arrow.turnOff();
if (--useTimes <= 0){
updateMap(null);
Game.tfkMap[mapIntY][((mapIntX - 1) / Game.pfDD)] = 1;
Game.tfkMap[(mapIntY - 1)][((mapIntX - 1) / Game.pfDD)] = 1;
Game.hero.jumpRate = 1.2;
HeroPan.heroPan.btnSaveAndRead.bGrey = true;
} else {
adjustArrowRotation();
};
};
}
}
}//package _game
Section 21
//Boss (_game.Boss)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import ui.*;
import framework.*;
import flash.utils.*;
public class Boss extends Char {
private var lifeBar:LifeBar;
private var delayTime:int;// = 0
public function Boss(_arg1:Number, _arg2:Number){
delayTime = 0;
super(_arg1, _arg2);
allFaceGotoAndStop(0);
Game.addRun(prevRun);
}
private function hurt(_arg1:Number):void{
if ((lifeValue = (lifeValue - _arg1)) <= 0){
lifeBar.value = (lifeValue = 0);
Main.win();
} else {
lifeBar.value = lifeValue;
};
}
override public function init0(_arg1:Number, _arg2:Material):void{
var _local3:*;
super.init0(75, Game.mtlList.bossMtl);
_local3 = leg.sp.getChildAt(0);
_local3.scaleX = (_local3.scaleY = (75 / 30));
}
override public function clear():void{
super.clear();
Game.removeRun(prevRun);
Game.removeRun(run);
lifeBar = null;
}
private function prevRun():void{
var _local1:BossLifeBar;
if (!visible){
return;
};
if (Game.hero.mapIntY < (Game.pfH * 2)){
return;
};
_local1 = new BossLifeBar();
_local1.x = GamePan.gamePan.totalScoreTxt.x;
_local1.y = GamePan.gamePan.totalScoreTxt.y;
if (GameI.playMode == GameI.PLAYMODE_TIME){
_local1.y = (_local1.y + 23);
};
HeroPan.heroPan.addChild(_local1);
lifeBar = _local1.lifeBar;
lifeBar.value = (lifeValue = 100);
Game.removeRun(prevRun);
Game.addRun(run);
}
private function run():void{
var _local1:Hero;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
if (isMoving){
if (((!(isFalling)) && ((Math.random() < 0.1)))){
jump(15);
};
if (--delayTime <= 0){
delayTime = (int((Math.random() * 20)) + 10);
wantToMoveDir = 0;
};
} else {
if (--delayTime <= 0){
delayTime = (int((Math.random() * 20)) + 10);
wantToMoveDir = ((int((Math.random() * 2)) - 0.5) * 2);
move(wantToMoveDir);
};
};
moveRun();
_local1 = Game.hero;
_local2 = (o.x - _local1.o.x);
_local3 = (o.y - _local1.o.y);
_local4 = (o.z - _local1.o.z);
if (((_local2 * _local2) + (_local4 * _local4)) < 2500){
if (_local1.usingKnives){
_local5 = new Sprite3D(new SpBlood());
scene.addChild(_local5);
_local5.o.x = (_local1.o.x + (_local2 * 0.3));
_local5.o.y = (_local1.o.y + (_local3 * 0.3));
_local5.o.z = (_local1.o.z + (_local4 * 0.3));
hurt(0.1);
} else {
if (_local3 < -100){
if ((((_local3 > -130)) && ((_local1.speedY < 0)))){
Game.addExpEffect(_local1.mapX, _local1.mapY, new SpExp2());
_local1.speedY = 20;
hurt((0.2 * _local1.attackValue));
};
} else {
_local1.addLife((-2000 / _local1.defenceValue));
};
};
};
}
}
}//package _game
Section 22
//BossFace0 (_game.BossFace0)
package _game {
import flash.display.*;
public dynamic class BossFace0 extends MovieClip {
}
}//package _game
Section 23
//BossFace1 (_game.BossFace1)
package _game {
import flash.display.*;
public dynamic class BossFace1 extends MovieClip {
}
}//package _game
Section 24
//BossFaceContainer (_game.BossFaceContainer)
package _game {
public class BossFaceContainer extends FaceContainer {
public function BossFaceContainer():void{
super("_game.BossFace");
}
}
}//package _game
Section 25
//BossLifeBar (_game.BossLifeBar)
package _game {
import flash.display.*;
import ui.*;
public dynamic class BossLifeBar extends MovieClip {
public var lifeBar:LifeBar;
}
}//package _game
Section 26
//Char (_game.Char)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Char extends HitObj {
private var isGoUpOrDownFinished:Boolean;
public var leg:Sprite3D;
public var isMoving:Boolean;
public var cube:Cube;
public var faceSpArr:Array;
public var currHittingDir:int;
public var cornerX:Number;
private var isGoingUp:Boolean;
public var vx0:Vector3D;
private var isGoingDown:Boolean;
public var currHittingThing;
public var cubeContainer:Obj3DContainer;
public var vy0:Vector3D;
public var wantToMoveDir:int;
public var lifeValue:int;
public var sad:SquareAnimationData;
public var cubeVx:Vector3D;
public var cubeVy:Vector3D;
public var hitThingObj:Object;
public var currStandingThing;
public var speedY:Number;
public var moveDir:int;
public var isFalling:Boolean;
public static const d:Number = 30;
public static const d2:Number = 15;
public function Char(_arg1:Number, _arg2:Number){
vx0 = new Vector3D(1, 0, 0);
vy0 = new Vector3D(0, 1, 0);
super(_arg1, _arg2);
init0(d, Game.mtlList.charMtl);
}
public function moveRun():void{
var _local1:Boolean;
var _local2:*;
_local1 = ((isMoving) || (isFalling));
if (isFalling){
speedY = (speedY + Game.g);
mapY = (mapY + speedY);
if (speedY > 0){
Game.hitThingByPos(mapX, (mapY + (d * 1.2)), 0, 1, hitThingObj);
if (!Game.isWalkAble(hitThingObj.hitObj)){
mapY = (hitThingObj.hitY - (d * 1.2));
speedY = 0;
};
} else {
if (speedY < -18){
speedY = -18;
};
Game.hitThingByPos(mapX, (mapY - 5), 0, -1, hitThingObj);
if (!Game.isWalkAble(hitThingObj.hitObj)){
mapY = hitThingObj.hitY;
isFalling = false;
if (currStandingThing != hitThingObj.hitObj){
standOnThing(hitThingObj.hitObj);
};
};
};
} else {
_local2 = Game.getThingByPos(mapX, (mapY - 10));
if (Game.isWalkAble(_local2)){
fall();
} else {
if (currStandingThing != _local2){
standOnThing(_local2);
};
};
};
if (isMoving){
if (isGoUpOrDownFinished){
if (sad.rollRun(movRun)){
if (wantToMoveDir != 0){
moveDir = wantToMoveDir;
rollMove();
} else {
isGoUpOrDownFinished = false;
leg.visible = true;
sad.initGoUp();
isGoingUp = true;
};
};
} else {
if (sad.goUpDownRun(goUpDownRun)){
isGoUpOrDownFinished = true;
if (isGoingDown){
leg.visible = false;
rollMove();
isGoingDown = false;
} else {
if (isGoingUp){
isMoving = false;
isGoUpOrDownFinished = false;
isGoingUp = false;
};
};
};
};
};
if (_local1){
updatePos();
};
}
public function stopAllAnimation():void{
var _local1:int;
_local1 = 0;
while (_local1 < 6) {
cube.faceArr[_local1].onSetVisible(false);
_local1++;
};
}
public function allFaceGotoAndStop(_arg1:int):void{
var _local2:int;
_local2 = 0;
while (_local2 < 6) {
faceGotoAndStop(_local2, _arg1);
_local2++;
};
}
public function init0(_arg1:Number, _arg2:Material):void{
var _local3:int;
var _local4:Face3D;
var _local5:*;
this.addChild((leg = new Sprite3D(new SpHeroLeg())));
cubeContainer = new Obj3DContainer();
this.addChild(cubeContainer);
cubeContainer.addChild((cube = new Cube(_arg1, _arg2)));
faceSpArr = new Array(6);
_local3 = 0;
while (_local3 < 6) {
_local4 = cube.faceArr[_local3];
faceSpArr[_local3] = _local4.mtlFaceSpArr[0][0];
_local5 = (faceSpArr[_local3] as FaceContainer);
if (_local5){
_local4.onSetVisible = _local5.ctrlAnimation;
} else {
trace((_local5 + "不是FaceContainer"));
};
_local3++;
};
cubeContainer.o.y = (_arg1 / 2);
cubeVx = cubeContainer.vx;
cubeVy = cubeContainer.vy;
sad = new SquareAnimationData(_arg1);
sad.initGoDown();
sad.goUpDownRun(goUpDownRun);
hitThingObj = new Object();
}
public function jump(_arg1:Number):void{
fall(_arg1);
}
public function rotateCube(_arg1:Number, _arg2:Number):void{
cubeContainer.o.y = _arg2;
Vector3D.revolutionzTo(vx0, -(_arg1), cubeVx);
Vector3D.revolutionzTo(vy0, -(_arg1), cubeVy);
}
public function addLife(_arg1):void{
lifeValue = (lifeValue + _arg1);
if (lifeValue > 100){
lifeValue = 100;
} else {
if (lifeValue <= 0){
lifeValue = 0;
die();
};
};
}
override public function clear():void{
var _local1:int;
_local1 = 0;
while (_local1 < 6) {
cube.faceArr[_local1].onSetVisible(false);
_local1++;
};
super.clear();
sad = null;
cube = null;
leg = null;
currStandingThing = null;
currHittingThing = null;
hitThingObj = null;
faceSpArr = null;
}
public function goUpDownRun(_arg1:Number):void{
cubeContainer.o.y = _arg1;
}
public function fall(_arg1:Number=0):void{
if (isFalling){
return;
};
currStandingThing = null;
isFalling = true;
speedY = _arg1;
}
public function die():void{
leg.visible = false;
vy.normalize(0.2);
lifeValue = 0;
Game.clearMap(this);
}
public function hitSideThing(_arg1, _arg2:int):void{
currHittingThing = _arg1;
currHittingDir = _arg2;
}
public function standOnThing(_arg1):void{
currStandingThing = _arg1;
}
public function __move(_arg1:Number):void{
mapX = (cornerX + _arg1);
}
private function movRun(_arg1:Number, _arg2:Number, _arg3:Number):void{
__move(_arg2);
if (moveDir > 0){
Game.hitThingByPos((mapX + d2), mapY, 1, 0, hitThingObj);
if (!Game.isWalkAble(hitThingObj.hitObj)){
mapX = (hitThingObj.hitX - d2);
};
} else {
Game.hitThingByPos((mapX - d2), mapY, -1, 0, hitThingObj);
if (!Game.isWalkAble(hitThingObj.hitObj)){
mapX = (hitThingObj.hitX + d2);
};
};
if (currHittingThing != hitThingObj.hitObj){
hitSideThing(hitThingObj.hitObj, moveDir);
};
rotateCube(_arg1, _arg3);
}
public function move(_arg1:int):void{
if (isMoving){
wantToMoveDir = _arg1;
return;
};
isMoving = true;
moveDir = _arg1;
if (isGoUpOrDownFinished){
rollMove();
} else {
leg.overturn(moveDir);
sad.initGoDown();
isGoingDown = true;
};
}
public function rollMove():void{
cornerX = (mapX + (moveDir * d2));
vx0.x = Math.round(cubeVx.x);
vx0.y = Math.round(cubeVx.y);
vx0.z = Math.round(cubeVx.z);
vy0.x = Math.round(cubeVy.x);
vy0.y = Math.round(cubeVy.y);
vy0.z = Math.round(cubeVy.z);
sad.initRoll(moveDir);
}
public function faceGotoAndStop(_arg1:int, _arg2:int):void{
faceSpArr[_arg1].update(_arg2);
cube.faceArr[_arg1].mtlBmdId = _arg2;
}
}
}//package _game
Section 27
//CharFace0 (_game.CharFace0)
package _game {
import flash.display.*;
public dynamic class CharFace0 extends MovieClip {
}
}//package _game
Section 28
//CharFace1 (_game.CharFace1)
package _game {
import flash.display.*;
public dynamic class CharFace1 extends MovieClip {
}
}//package _game
Section 29
//CharFace10 (_game.CharFace10)
package _game {
import flash.display.*;
public dynamic class CharFace10 extends MovieClip {
}
}//package _game
Section 30
//CharFace11 (_game.CharFace11)
package _game {
import flash.display.*;
public dynamic class CharFace11 extends MovieClip {
}
}//package _game
Section 31
//CharFace12 (_game.CharFace12)
package _game {
import flash.display.*;
public dynamic class CharFace12 extends MovieClip {
}
}//package _game
Section 32
//CharFace13 (_game.CharFace13)
package _game {
import flash.display.*;
public dynamic class CharFace13 extends MovieClip {
}
}//package _game
Section 33
//CharFace14 (_game.CharFace14)
package _game {
import flash.display.*;
public dynamic class CharFace14 extends MovieClip {
}
}//package _game
Section 34
//CharFace2 (_game.CharFace2)
package _game {
import flash.display.*;
public dynamic class CharFace2 extends MovieClip {
}
}//package _game
Section 35
//CharFace3 (_game.CharFace3)
package _game {
import flash.display.*;
public dynamic class CharFace3 extends MovieClip {
}
}//package _game
Section 36
//CharFace4 (_game.CharFace4)
package _game {
import flash.display.*;
public dynamic class CharFace4 extends MovieClip {
}
}//package _game
Section 37
//CharFace5 (_game.CharFace5)
package _game {
import flash.display.*;
public dynamic class CharFace5 extends MovieClip {
}
}//package _game
Section 38
//CharFace6 (_game.CharFace6)
package _game {
import flash.display.*;
public dynamic class CharFace6 extends MovieClip {
}
}//package _game
Section 39
//CharFace7 (_game.CharFace7)
package _game {
import flash.display.*;
public dynamic class CharFace7 extends MovieClip {
}
}//package _game
Section 40
//CharFace8 (_game.CharFace8)
package _game {
import flash.display.*;
public dynamic class CharFace8 extends MovieClip {
}
}//package _game
Section 41
//CharFace9 (_game.CharFace9)
package _game {
import flash.display.*;
public dynamic class CharFace9 extends MovieClip {
}
}//package _game
Section 42
//CharFaceContainer (_game.CharFaceContainer)
package _game {
public class CharFaceContainer extends FaceContainer {
public function CharFaceContainer():void{
super("_game.CharFace");
}
}
}//package _game
Section 43
//Door (_game.Door)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Door extends Block {
private var dad:DoorAnimationData;
public var isOpen:Boolean;
public var color:int;
public var openDir:int;
private var boxVx:Vector3D;
private var boxVz:Vector3D;
private static const vz0:Vector3D = new Vector3D(0, 0, 1);
private static const vx0:Vector3D = new Vector3D(1, 0, 0);
public function Door(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Boolean, _arg5:int=1){
var doorMtl:Object;
var _mapX = _arg1;
var _mapY = _arg2;
var _color = _arg3;
var _isOpen = _arg4;
var _openDir = _arg5;
color = _color;
isOpen = _isOpen;
doorMtl = Game.mtlList.door;
super(_mapX, _mapY, doorMtl[("top" + color)], doorMtl[("front" + color)], doorMtl[("left" + color)], doorMtl[("left" + color)], doorMtl[("front" + color)], doorMtl[("top" + color)], 10, Game.doorWid, Game.doorHei, "b f");
box.o.z = (box.wid2 + Game.doorOffsetZ);
box.reverseFace(4, 2);
boxVx = box.vx;
boxVz = box.vz;
dad = new DoorAnimationData();
dad.onOpen = (dad.onClose = dadOpenClose);
dad.onOpenFinished = function ():void{
};
dad.onCloseFinished = function ():void{
};
if (isOpen){
openDir = _openDir;
dad.open(_openDir, false);
};
}
private function run():void{
box.rotatey(0.01);
}
private function close():void{
dad.close();
isOpen = false;
}
private function dadOpenClose(_arg1:Number):void{
Vector3D.revolutionyTo(vx0, -(_arg1), boxVx);
Vector3D.revolutionyTo(vz0, -(_arg1), boxVz);
}
public function open(_arg1):void{
openDir = _arg1;
dad.open(_arg1);
isOpen = true;
}
override public function adjustPos(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int, _arg5:Object):void{
if (_arg3 > 0){
_arg5.hitX = (mapX - (box.len * 0.6));
_arg5.hitY = _arg2;
} else {
_arg5.hitX = (mapX + (box.len * 0.6));
_arg5.hitY = _arg2;
};
}
override public function clear():void{
super.clear();
dad.clear();
dad = null;
}
}
}//package _game
Section 44
//DoorAnimation (_game.DoorAnimation)
package _game {
import flash.display.*;
public dynamic class DoorAnimation extends MovieClip {
}
}//package _game
Section 45
//DoorAnimationData (_game.DoorAnimationData)
package _game {
import flash.display.*;
public class DoorAnimationData {
public var onOpen:Function;
public var onCloseFinished:Function;
private var dir:int;
public var onClose:Function;
public var onOpenFinished:Function;
private var arrId:int;
private static var initFlag:Boolean = firstInit();
private static var rotateArr:Array;
private function closeRun():void{
if (Game.unMoveAble){
return;
};
onClose(rotateArr[arrId]);
if (--arrId < 0){
RunsManager.removeRun(closeRun);
onCloseFinished();
};
}
private function openRun():void{
if (Game.unMoveAble){
return;
};
onOpen((dir * rotateArr[arrId]));
if (++arrId >= rotateArr.length){
RunsManager.removeRun(openRun);
onOpenFinished();
};
}
public function open(_arg1:int, _arg2:Boolean=true):void{
dir = _arg1;
if (_arg2){
arrId = 0;
RunsManager.addRun("sad.open", openRun);
} else {
arrId = (rotateArr.length - 1);
openRun();
};
}
public function clear():void{
RunsManager.removeRun(openRun);
RunsManager.removeRun(closeRun);
onOpen = null;
onOpenFinished = null;
onClose = null;
onCloseFinished = null;
}
public function close(_arg1:Boolean=true):void{
if (_arg1){
arrId = (rotateArr.length - 1);
RunsManager.addRun("sad.close", closeRun);
} else {
arrId = 0;
closeRun();
};
}
private static function firstInit():Boolean{
var _local1:DoorAnimation;
var _local2:Sprite;
var _local3:int;
_local1 = new DoorAnimation();
rotateArr = new Array();
_local3 = _local1.totalFrames;
_local2 = (_local1.getChildAt(0) as Sprite);
while (_local3 >= 1) {
_local1.gotoAndStop(_local3);
rotateArr.unshift([(_local2.rotation * (Math.PI / 180))]);
_local3--;
};
return (true);
}
}
}//package _game
Section 46
//Enemy (_game.Enemy)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Enemy extends Char {
public var mapIntX0:int;
public var mapIntY0:int;
public var faceId:int;
private var delayTime:int;// = 0
public function Enemy(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Object){
delayTime = 0;
super(_arg1, _arg2);
mapIntX0 = mapIntX;
mapIntY0 = mapIntY;
faceId = _arg3;
allFaceGotoAndStop(faceId);
if (_arg4){
mapX = _arg4.mapX;
mapY = _arg4.mapY;
lifeValue = _arg4.lifeValue;
updatePos();
if (lifeValue > 0){
Game.addRun(run);
} else {
die();
};
} else {
lifeValue = 100;
Game.addRun(run);
};
}
private function isWalkAble(_arg1:int):Boolean{
return ((((Game.getThingByPos((mapX + (_arg1 * d)), mapY) == null)) && ((Game.getThingByPos((mapX + ((_arg1 * 2) * d)), (mapY - 5)) == "wall"))));
}
override public function clear():void{
super.clear();
Game.removeRun(run);
}
override public function die():void{
super.die();
Game.removeRun(run);
}
private function run():void{
if (!visible){
return;
};
Game.charMap[mapIntY][mapIntX] = null;
if (isMoving){
if (!isWalkAble(moveDir)){
wantToMoveDir = 0;
};
} else {
if (--delayTime <= 0){
delayTime = (int((Math.random() * 20)) + 10);
if (moveDir){
moveDir = 0;
} else {
if (isWalkAble(-1)){
wantToMoveDir = -1;
} else {
if (isWalkAble(1)){
wantToMoveDir = 1;
} else {
wantToMoveDir = 0;
};
};
if (wantToMoveDir){
move(wantToMoveDir);
};
};
};
};
moveRun();
Game.charMap[mapIntY][mapIntX] = this;
}
}
}//package _game
Section 47
//EnemyPieces (_game.EnemyPieces)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class EnemyPieces extends Obj3DContainer {
private var pieceObj2:PieceObj;
private var delayTime:int;
private var pieceObj1:PieceObj;
public function EnemyPieces(_arg1:Enemy){
var _local2:int;
var _local3:Box;
var _local4:Face3D;
var _local5:PieceObj;
super();
delayTime = 30;
o.x = _arg1.o.x;
o.y = _arg1.o.y;
o.z = _arg1.o.z;
o.y = (o.y + 15);
vx.x = _arg1.vx.x;
vx.y = _arg1.vx.y;
vx.z = _arg1.vx.z;
vy.x = _arg1.vy.x;
vy.y = _arg1.vy.y;
vy.z = _arg1.vy.z;
vz.x = _arg1.vz.x;
vz.y = _arg1.vz.y;
vz.z = _arg1.vz.z;
addChild(new Sprite3D(new SpBlood()));
_local2 = -1;
while (_local2 <= 1) {
_local3 = new Box(30, 15, 30, Game.mtlList.charMtl);
addChild(_local3);
_local4 = _local3.faceArr[((5 - _local2) / 2)].mtlFaceSpArr[0][0].update(_arg1.faceId);
for each (_local4 in _local3.faceArr) {
_local4.mtlBmdId = _arg1.faceId;
};
_local3.o.z = (_local2 * 7.5);
_local5 = (this[("pieceObj" + ((_local2 + 3) / 2))] = new PieceObj(_local3));
_local2 = (_local2 + 2);
};
RunsManager.addRun("run", run);
}
override public function clear():void{
super.clear();
RunsManager.removeRun(run);
}
private function run():void{
pieceObj1.move();
pieceObj2.move();
if (--delayTime <= 0){
parent.removeChild(this);
};
}
}
}//package _game
import _3d.*;
class PieceObj {
public var vRota:Vector3D;
public var v:Vector3D;
public var box:Box;
private function PieceObj(_arg1:Box){
box = _arg1;
vRota = new Vector3D((Math.random() * 0.1), (Math.random() * 0.1), Math.random());
v = new Vector3D((Math.random() * 10), ((Math.random() * 5) + 10), -(Math.random()));
}
public function move():void{
box.o.add(v);
box.rotatex(vRota.x);
box.rotatey(vRota.y);
box.rotatez(vRota.z);
v.y = (v.y + Game.g);
}
}
Section 48
//FaceContainer (_game.FaceContainer)
package _game {
import flash.display.*;
import flash.utils.*;
public class FaceContainer extends Sprite {
private var id:int;// = -2
private var className:String;
public function FaceContainer(_arg1:String):void{
id = -2;
super();
className = _arg1;
}
public function ctrlAnimation(_arg1:Boolean):void{
if (_arg1){
Common.playAll(this, false);
} else {
Common.stopAll(this, false);
};
}
public function update(_arg1:int):void{
if (id == _arg1){
return;
};
id = _arg1;
Common.stopAll(this, false);
Common.removeChildren(this);
if (id >= 0){
this.addChild(new ((getDefinitionByName((className + id)) as Class)));
};
}
}
}//package _game
Section 49
//FaceIcon0 (_game.FaceIcon0)
package _game {
import flash.display.*;
public dynamic class FaceIcon0 extends Sprite {
}
}//package _game
Section 50
//FaceIcon1 (_game.FaceIcon1)
package _game {
import flash.display.*;
public dynamic class FaceIcon1 extends Sprite {
}
}//package _game
Section 51
//FaceIcon10 (_game.FaceIcon10)
package _game {
import flash.display.*;
public dynamic class FaceIcon10 extends Sprite {
}
}//package _game
Section 52
//FaceIcon11 (_game.FaceIcon11)
package _game {
import flash.display.*;
public dynamic class FaceIcon11 extends Sprite {
}
}//package _game
Section 53
//FaceIcon12 (_game.FaceIcon12)
package _game {
import flash.display.*;
public dynamic class FaceIcon12 extends Sprite {
}
}//package _game
Section 54
//FaceIcon2 (_game.FaceIcon2)
package _game {
import flash.display.*;
public dynamic class FaceIcon2 extends Sprite {
}
}//package _game
Section 55
//FaceIcon3 (_game.FaceIcon3)
package _game {
import flash.display.*;
public dynamic class FaceIcon3 extends Sprite {
}
}//package _game
Section 56
//FaceIcon4 (_game.FaceIcon4)
package _game {
import flash.display.*;
public dynamic class FaceIcon4 extends Sprite {
}
}//package _game
Section 57
//FaceIcon5 (_game.FaceIcon5)
package _game {
import flash.display.*;
public dynamic class FaceIcon5 extends Sprite {
}
}//package _game
Section 58
//FaceIcon6 (_game.FaceIcon6)
package _game {
import flash.display.*;
public dynamic class FaceIcon6 extends Sprite {
}
}//package _game
Section 59
//FaceIcon7 (_game.FaceIcon7)
package _game {
import flash.display.*;
public dynamic class FaceIcon7 extends Sprite {
}
}//package _game
Section 60
//FaceIcon8 (_game.FaceIcon8)
package _game {
import flash.display.*;
public dynamic class FaceIcon8 extends Sprite {
}
}//package _game
Section 61
//FaceIcon9 (_game.FaceIcon9)
package _game {
import flash.display.*;
public dynamic class FaceIcon9 extends Sprite {
}
}//package _game
Section 62
//FacesBox (_game.FacesBox)
package _game {
public class FacesBox extends ItemsBox {
public var item12:FacesBoxItem;
public var item2:FacesBoxItem;
public var item5:FacesBoxItem;
public var item6:FacesBoxItem;
public var item7:FacesBoxItem;
public var item3:FacesBoxItem;
public var item10:FacesBoxItem;
public var item4:FacesBoxItem;
public var item11:FacesBoxItem;
public var item1:FacesBoxItem;
public var item8:FacesBoxItem;
public var item0:FacesBoxItem;
public var item9:FacesBoxItem;
override public function get itemNumArr():Array{
return (Game.hero.faceNumArr);
}
}
}//package _game
Section 63
//FacesBoxItem (_game.FacesBoxItem)
package _game {
import flash.display.*;
import ui.*;
public class FacesBoxItem extends Item {
public var _iconContainer:MovieClip;
public var txt:Txt;
public function FacesBoxItem(){
super("_game.FaceIcon");
txt.autoSize = "center";
}
override public function set num(_arg1:int):void{
super.num = _arg1;
if (_arg1 == 0){
txt.text = "";
} else {
txt.text = _arg1;
};
}
}
}//package _game
Section 64
//FaceSelecter (_game.FaceSelecter)
package _game {
import flash.display.*;
import flash.events.*;
public class FaceSelecter extends Sprite {
public var _6Face:FaceSelecter6Face;
public var popUp:FaceSelecterPopUp;
public function FaceSelecter(){
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");
Game.arrowKeyDown = changeFaces;
Game.hero.cubeContainer.vx.x = 1;
Game.hero.cubeContainer.vx.y = 0;
Game.hero.cubeContainer.vx.z = 0;
Game.hero.cubeContainer.vy.x = 0;
Game.hero.cubeContainer.vy.y = 1;
Game.hero.cubeContainer.vy.z = 0;
Game.hero.cubeContainer.vz.x = 0;
Game.hero.cubeContainer.vz.y = 0;
Game.hero.cubeContainer.vz.z = 1;
Game.render();
RunsManager.pause = true;
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
RunsManager.pause = false;
Game.arrowKeyDown = Game.defaultArrowKeyDown;
}
private function hidePopUp(_arg1:MouseEvent):void{
popUp.hide();
}
private function changeFaces(_arg1:int):void{
switch (_arg1){
case -1:
Game.hero.cube.revolutiony((Math.PI / 2));
break;
case 0:
Game.hero.cube.revolutionx((Math.PI / 2));
break;
case 1:
Game.hero.cube.revolutiony((-(Math.PI) / 2));
break;
case 2:
Game.hero.cube.revolutionx((-(Math.PI) / 2));
break;
};
Game.render();
}
}
}//package _game
Section 65
//FaceSelecter6Face (_game.FaceSelecter6Face)
package _game {
import flash.display.*;
public class FaceSelecter6Face extends Sprite {
public var selectedItem:FaceSelecterItem;
public var item2:FaceSelecterItem;
public var item5:FaceSelecterItem;
public var item0:FaceSelecterItem;
public var item3:FaceSelecterItem;
public var item4:FaceSelecterItem;
public var item1:FaceSelecterItem;
public var rect1:MovieClip;
public var rect2:MovieClip;
public function FaceSelecter6Face(){
var _local1:Array;
var _local2:int;
var _local3:FaceSelecterItem;
super();
rect1.x = (rect2.x = -1000);
_local1 = Game.hero.faceIdArr;
_local2 = 0;
while (_local2 < 6) {
_local3 = this[("item" + _local2)];
_local3.select = select;
_local3.update(_local1[_local2]);
_local2++;
};
}
public function select(_arg1:FaceSelecterItem):void{
var _local2:FaceSelecterPopUp;
selectedItem = _arg1;
rect2.x = _arg1.x;
rect2.y = _arg1.y;
_local2 = (this.parent as FaceSelecter).popUp;
_local2.show(_arg1.id);
_local2.x = (this.x + _arg1.x);
_local2.y = (this.y + _arg1.y);
}
public function updateFace(_arg1:int):void{
selectedItem.update(_arg1);
Game.hero.faceGotoAndStop(int(selectedItem.name.charAt(4)), _arg1);
}
}
}//package _game
Section 66
//FaceSelecterItem (_game.FaceSelecterItem)
package _game {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class FaceSelecterItem extends Sprite {
public var select:Function;
public var id:int;
public var eye:CharFaceContainer;
public var bg:MovieClip;
public function FaceSelecterItem(){
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
this.buttonMode = true;
}
private function added(_arg1:Event):void{
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
EventsManager.addEvent(this, MouseEvent.MOUSE_OVER, $onRollOver, "$onRollOver");
EventsManager.addEvent(this, MouseEvent.MOUSE_OUT, $onRollOut, "$onRollOut");
EventsManager.addEvent(this, MouseEvent.MOUSE_UP, $onRelease, "$onRelease");
}
private function $onRollOut(_arg1:MouseEvent):void{
(this.parent as Object).rect1.x = -1000;
}
private function $onRollOver(_arg1:MouseEvent):void{
var _local2:*;
_local2 = (this.parent as Object).rect1;
_local2.x = this.x;
_local2.y = this.y;
}
private function removed(_arg1:Event):void{
Common.stopAll(this, false);
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
EventsManager.removeEvent(this, MouseEvent.MOUSE_OVER, $onRollOver);
EventsManager.removeEvent(this, MouseEvent.MOUSE_OUT, $onRollOut);
EventsManager.removeEvent(this, MouseEvent.MOUSE_UP, $onRelease);
select = null;
}
private function $onRelease(_arg1:MouseEvent):void{
select(this);
}
public function update(_arg1:int):void{
eye.update(_arg1);
id = _arg1;
if (id >= 0){
bg.gotoAndStop((_arg1 + 1));
bg.visible = true;
} else {
bg.visible = false;
bg.stop();
};
}
}
}//package _game
Section 67
//FaceSelecterPopUp (_game.FaceSelecterPopUp)
package _game {
import flash.display.*;
public class FaceSelecterPopUp extends Sprite {
public var item12:FaceSelecterItem;
public var item2:FaceSelecterItem;
public var item5:FaceSelecterItem;
public var item6:FaceSelecterItem;
public var item7:FaceSelecterItem;
public var item3:FaceSelecterItem;
public var item10:FaceSelecterItem;
public var item4:FaceSelecterItem;
public var item9:FaceSelecterItem;
public var item1:FaceSelecterItem;
public var item8:FaceSelecterItem;
public var item0:FaceSelecterItem;
public var item11:FaceSelecterItem;
public var rect1:MovieClip;
public var rect2:MovieClip;
public function FaceSelecterPopUp(){
var _local1:Array;
var _local2:int;
var _local3:FaceSelecterItem;
super();
hide();
rect1.x = (rect2.x = -1000);
_local1 = Game.hero.faceNumArr;
_local2 = 0;
while (_local2 < PickUpThing.TOTAL_FACE) {
_local3 = this[("item" + _local2)];
_local3.select = select;
if (_local1[_local2] > 0){
_local3.update(_local2);
_local3.mouseEnabled = true;
} else {
_local3.update(-1);
_local3.mouseEnabled = false;
};
_local2++;
};
}
public function select(_arg1:FaceSelecterItem):void{
rect2.x = _arg1.x;
rect2.y = _arg1.y;
(this.parent as FaceSelecter)._6Face.updateFace(_arg1.id);
}
public function hide():void{
this.visible = false;
}
public function show(_arg1:int):void{
this.visible = true;
select(this[("item" + _arg1)]);
}
}
}//package _game
Section 68
//FlowerArea (_game.FlowerArea)
package _game {
import flash.display.*;
public dynamic class FlowerArea extends MovieClip {
}
}//package _game
Section 69
//FlyMachine (_game.FlyMachine)
package _game {
public class FlyMachine extends HeroTool {
public function FlyMachine(){
super(new SpFlyMachine());
Game.hero.usingFlyMachine = true;
}
override public function run():void{
super.run();
if (delayTime <= 0){
Game.hero.usingFlyMachine = false;
};
}
}
}//package _game
Section 70
//Game (_game.Game)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
import framework.pages.*;
public class Game extends Sprite {
public var bg:MovieClip;
public var sceneContainer:MovieClip;
public static const offsetA:Number = ((-(brickWid) * 0.5) / pfR);
public static const pfH:int = (map0.length / 2);
public static const tfkHei:Number = (pfH * pfDh);
public static const pfDh:Number = (pfDh1 + pfDh2);
public static const pfR:Number = ((pfR1 + pfR2) / 2);
public static const pfW:int = map0[0].length;
public static const doorWid:Number = 40;
public static const map0:Array = [[1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [1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, 1, 0, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]];
public static const pfDh1:Number = 100;
public static const pfDh2:Number = 20;
public static const g:Number = -2;
public static const doorHei:Number = 85;
public static const pfR1:Number = 150;
public static const pfR2:Number = 220;
public static const doorOffsetZ:Number = 5;
private static const cameraBottom:Number = 250;
private static const hideAngle:Number = 120;
public static const brickWid:Number = (((2 * Math.PI) * pfR) / pfW);
public static const mtlList:Object = {tfk:{outside:new RectBmdMaterial(new ImgTowerOut()), inside:new RectBmdMaterial(new ImgTowerIn()), smallInside:new RectBmdMaterial(new ImgTowerOut()), pf:new RectBmdMaterial(new ImgTowerPf()), pfSide:new RectBmdMaterial(new ImgTowerPfSide()), top:new DeltaBmdMaterial(new ImgTowerTop()), prison:new FaceSpAndRectBmdMaterial(new ImgTowerPrison(), true), prisonBg:new RectBmdMaterial(new ImgTowerPrisonBg(), true), hole:new RectBmdMaterial(new ImgTowerPfHole(), true)}, charMtl:new FaceSpAndRectBmdMaterial(new ImgCharFace()), bossMtl:new FaceSpAndRectBmdMaterial(new ImgBossFace()), door:{front0:new RectBmdMaterial(new ImgDoorFront0()), left0:new RectBmdMaterial(new ImgDoorLeft0()), top0:new RectBmdMaterial(new ImgDoorTop0()), front1:new RectBmdMaterial(new ImgDoorFront1()), left1:new RectBmdMaterial(new ImgDoorLeft1()), top1:new RectBmdMaterial(new ImgDoorTop1()), front2:new RectBmdMaterial(new ImgDoorFront2()), left2:new RectBmdMaterial(new ImgDoorLeft2()), top2:new RectBmdMaterial(new ImgDoorTop2())}, lift:{top:new FaceSpAndRectBmdMaterial(new ImgLiftTop()), front:new FaceSpAndRectBmdMaterial(new ImgLiftFront()), side:new RectBmdMaterial(new ImgLiftSide())}, btn:{top:new FaceSpAndRectBmdMaterial(new ImgBtnTop()), side:new RectBmdMaterial(new ImgBtnSide())}, fall:{top:new FaceSpAndRectBmdMaterial(new ImgFallTop()), side:new RectBmdMaterial(new ImgFallSide())}};
private static const cameraTop:Number = (tfkHei + 200);
public static const pfDD:int = 3;
private static var camera:Camera3D;
public static var charMap:Array;
private static var tp1:Vector3D = new Vector3D();
private static var tp2:Vector3D = new Vector3D();
private static var tfk:TowerFramework;
private static var hitObjDict:Dictionary;
private static var mapIntXYObj:Object = {mapIntX:0, mapIntY:0};
public static var map:Array;
public static var arrowKeyDown:Function = defaultArrowKeyDown;
public static var tfkMap:Array;
public static var isHeroWaiting:Boolean;
public static var boss:Boss;
public static var isLookingAround:Boolean;
private static var scene:Scene3D;
private static var digHoleArr:Array;
public static var spaceKeyDown:Function = defaultSpaceKeyDown;
private static var unWalkableThings:Dictionary;
public static var mainSpace:Obj3DContainer;
public static var $data:Object;
public static var runArr:Array;
private static var game:Game;
public static var hero:Hero;
public function Game(){
game = this;
Material.useHighlight = true;
isLookingAround = false;
isHeroWaiting = false;
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
unWalkableThings = new Dictionary();
unWalkableThings[BlockBtn] = true;
unWalkableThings[BlockFall] = true;
unWalkableThings[BlockLift] = true;
unWalkableThings[Door] = true;
}
private function added(_arg1:Event):void{
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
init();
}
public function init():void{
var x:int;
var y:int;
var i:int;
var heroMapX:Number;
var heroMapY:Number;
var flowerArea:FlowerArea;
var tfkSegW:int;
var prisonerArr:Array;
var doorData:*;
var pickUpThingData:*;
var standBlockData:*;
var prisonerData:*;
var enemyData:*;
var tfkMtl:Object;
var prisoner:Prisoner;
var mapTop:Array;
var L:int;
var flowerSp:*;
var flower:Sprite3D;
var mapX:Number;
var mapY:Number;
var tileType:int;
var tileValue:int;
var mapValue:*;
var blockBtn:BlockBtn;
var yy:int;
if (!isGamePageBefore){
SoundManage.playMusic("Main_s2", 999999);
};
scene = new Scene3D(sceneContainer);
camera = new Camera3D(2.4, 300, -220, -160, 220, 150);
hitObjDict = new Dictionary();
runArr = new Array();
mainSpace = new Obj3DContainer();
mainSpace.inMatrix = new Matrix3D();
scene.addChild(mainSpace);
flowerArea = new FlowerArea();
i = flowerArea.numChildren;
while ((i = (i - 1)), (i - 1) >= 0) {
flowerSp = flowerArea.getChildAt(i);
if ((flowerSp is Sprite)){
flower = new Sprite3D(flowerSp);
flower.o.x = flowerSp.x;
flower.o.y = pfDh;
flower.o.z = -(flowerSp.y);
mainSpace.addChild(flower);
};
};
tfkSegW = (pfW / pfDD);
tfkMap = new Array((pfH * 2));
y = 0;
while (y < (pfH * 2)) {
tfkMap[y] = new Array(tfkSegW);
x = 0;
while (x < tfkSegW) {
switch (map0[y][(x * pfDD)]){
case 1:
tfkMap[y][x] = 1;
break;
default:
tfkMap[y][x] = 0;
break;
};
x = (x + 1);
};
y = (y + 1);
};
charMap = new Array((pfH * 2));
map = new Array((pfH * 2));
prisonerArr = new Array();
y = 0;
while (y < pfH) {
map[(y * 2)] = new Array(pfW);
map[((y * 2) + 1)] = new Array(pfW);
charMap[(y * 2)] = new Array(pfW);
charMap[((y * 2) + 1)] = new Array(pfW);
y = (y + 1);
};
y = 0;
while (y < pfH) {
x = 0;
while (x < pfW) {
mapX = (x * brickWid);
mapY = (pfDh * y);
tileType = (map0[(y * 2)][x] & 0xFF);
tileValue = ((map0[(y * 2)][x] >> 8) & 0xFF);
mapValue = null;
switch (tileType){
case 10:
case 11:
case 12:
if ($data){
pickUpThingData = $data.pickUpThingData[((("$" + (y * 2)) + "_") + x)];
};
if (((!($data)) || (pickUpThingData))){
var _local2 = new PickUpThing(mapX, mapY, PickUpThing.TYPE_POWERUP, (tileType - 10));
mapValue = _local2;
addHitObj(_local2);
};
pickUpThingData = null;
break;
case 20:
case 21:
case 22:
if ($data){
pickUpThingData = $data.pickUpThingData[((("$" + (y * 2)) + "_") + x)];
};
if (((!($data)) || (pickUpThingData))){
_local2 = new PickUpThing(mapX, mapY, PickUpThing.TYPE_KEY, (tileType - 20));
mapValue = _local2;
addHitObj(_local2);
};
pickUpThingData = null;
break;
case 30:
case 31:
case 32:
if (((x - 1) % pfDD) == 0){
tfkMap[(y * 2)][((x - 1) / pfDD)] = 2;
if ($data){
doorData = $data.doorData[((("$" + (y * 2)) + "_") + x)];
};
_local2 = new Door(mapX, mapY, (tileType - 30), !((doorData == null)), (doorData) ? doorData : 0);
mapValue = _local2;
addHitObj(_local2);
if (doorData){
mapValue = null;
};
doorData = null;
} else {
trace("门的位置不正确: ", ((x - 1) / pfDD), (y * 2));
};
break;
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
case 58:
case 59:
case 60:
case 61:
case 62:
if ($data){
pickUpThingData = $data.pickUpThingData[((("$" + (y * 2)) + "_") + x)];
};
if (((!($data)) || (pickUpThingData))){
_local2 = new PickUpThing(mapX, mapY, PickUpThing.TYPE_FACE, (tileType - 50));
mapValue = _local2;
addHitObj(_local2);
};
pickUpThingData = null;
break;
case 70:
case 71:
case 72:
case 73:
case 74:
case 75:
case 76:
if ($data){
pickUpThingData = $data.pickUpThingData[((("$" + (y * 2)) + "_") + x)];
};
if (((!($data)) || (pickUpThingData))){
_local2 = new PickUpThing(mapX, mapY, PickUpThing.TYPE_LETTER, (tileType - 70));
mapValue = _local2;
addHitObj(_local2);
};
pickUpThingData = null;
break;
case 99:
heroMapX = mapX;
heroMapY = mapY;
mapValue = null;
break;
case 100:
case 101:
case 102:
case 103:
case 104:
case 105:
case 106:
case 107:
case 108:
case 109:
if ($data){
enemyData = $data.enemyData[((("$" + (y * 2)) + "_") + x)];
};
if (((!($data)) || (enemyData))){
_local2 = new Enemy(mapX, mapY, (tileType - 100), enemyData);
mapValue = _local2;
addHitObj(_local2);
};
if (((mapValue) && ((mapValue.lifeValue > 0)))){
charMap[mapValue.mapIntY][mapValue.mapIntX] = mapValue;
};
enemyData = null;
mapValue = null;
break;
case 150:
if (((x - 1) % pfDD) == 0){
if ($data){
prisonerData = $data.prisonerData[((("$" + (y * 2)) + "_") + x)];
};
if (((!($data)) || (prisonerData))){
tfkMap[(y * 2)][((x - 1) / pfDD)] = 3;
addHitObj((charMap[(y * 2)][x] = new Prisoner(mapX, mapY, tileValue)));
blockBtn = map[((y * 2) - 1)][((x + pfDD) % pfW)];
if (blockBtn == null){
trace("没有与之配对的开关");
} else {
blockBtn.prisoner = charMap[(y * 2)][x];
prisonerArr.push(blockBtn.prisoner);
};
} else {
tfkMap[(y * 2)][((x - 1) / pfDD)] = 4;
};
prisonerData = null;
mapValue = null;
} else {
trace("Prisoner的位置不正确: ", ((x - 1) / pfDD), (y * 2));
};
break;
case 151:
addHitObj(new ShanCaiYe(mapX, mapY, ((tileValue >> 4) & 15), (tileValue & 15)));
mapValue = null;
break;
default:
mapValue = null;
break;
};
map[(y * 2)][x] = mapValue;
mapValue = null;
mapY = ((pfDh * (y + 1)) - 1);
mapX = (mapX + brickWid);
tileType = (map0[((y * 2) + 1)][x] & 0xFF);
tileValue = ((map0[((y * 2) + 1)][x] >> 8) & 0xFF);
if ((x % pfDD) == 0){
mapValue = null;
if ((((tileType >= 40)) && ((tileType <= 42)))){
if ($data){
standBlockData = $data.standBlockData[((("$" + ((y * 2) + 1)) + "_") + (x + 1))];
};
if (((!($data)) || (!((standBlockData == null))))){
switch (tileType){
case 40:
_local2 = new BlockLift(mapX, mapY, ((tileValue >> 7) & 1), ((tileValue & 31) - 10), ((tileValue >> 5) & 3), standBlockData);
mapValue = _local2;
addHitObj(_local2);
if (standBlockData){
i = 0;
while (i < pfDD) {
map[mapValue.mapIntY][((mapValue.mapIntX + i) - 1)] = mapValue;
i = (i + 1);
};
mapValue = null;
};
break;
case 41:
_local2 = new BlockBtn(mapX, mapY);
mapValue = _local2;
addHitObj(_local2);
if (standBlockData){
tfkMap[((y * 2) + 1)][(x / pfDD)] = 5;
mapValue.isUsed = true;
};
break;
case 42:
_local2 = new BlockFall(mapX, mapY);
mapValue = _local2;
addHitObj(_local2);
break;
default:
mapValue = null;
break;
};
};
standBlockData = null;
};
i = 0;
while (i < pfDD) {
if (map[((y * 2) + 1)][(x + i)] == null){
map[((y * 2) + 1)][(x + i)] = mapValue;
};
i = (i + 1);
};
};
x = (x + 1);
};
y = (y + 1);
};
tfkMtl = mtlList.tfk;
mainSpace.addChild((tfk = new TowerFramework(tfkMtl.outside, tfkMtl.inside, tfkMtl.smallInside, tfkMtl.pf, tfkMtl.pfSide, tfkMtl.top, tfkMtl.prison, tfkMtl.prisonBg, pfR1, pfR2, pfDh1, pfDh2, tfkMap, offsetA, doorWid, doorHei, doorOffsetZ)));
for each (prisoner in prisonerArr) {
prisoner.sticks = tfk.prisonSticksObj[((("$" + (prisoner.mapIntY - 1)) + "_") + ((prisoner.mapIntX - 1) / pfDD))];
};
i = 0;
while (i < 6) {
yy = ((pfH * 2) + i);
mapTop = (map[yy] = new Array(pfW));
x = 0;
while (x < pfW) {
mapTop[x] = null;
x = (x + 1);
};
mapTop = (charMap[yy] = new Array(pfW));
x = 0;
while (x < pfW) {
mapTop[x] = null;
x = (x + 1);
};
mapTop = (tfkMap[yy] = new Array(tfkSegW));
x = 0;
while (x < tfkSegW) {
mapTop[x] = 0;
x = (x + 1);
};
i = (i + 1);
};
addHitObj((boss = new Boss((13 * brickWid), (pfH * pfDh))));
KeyManager.onKeyDown = function (_arg1:int):void{
switch (_arg1){
case 38:
if (((!(unMoveAble)) && (!(RunsManager.pause)))){
hero.jump(25);
};
case 37:
case 39:
case 40:
arrowKeyDown((_arg1 - 38));
break;
case 32:
if (RunsManager.pause){
return;
};
spaceKeyDown();
break;
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
case 48:
if (RunsManager.pause){
return;
};
Game.hero.useTool(((_arg1 == 48)) ? 9 : (_arg1 - 49));
break;
};
};
digHoleArr = ($data) ? $data.digHoleArr.slice() : new Array();
L = (digHoleArr.length / 2);
i = 0;
while (i < L) {
digHole(digHoleArr[(i * 2)], digHoleArr[((i * 2) + 1)]);
i = (i + 1);
};
addHitObj((hero = new Hero(heroMapX, heroMapY, ($data) ? $data.heroData : null)));
RunsManager.addRun("game.run", run);
if ($data){
Main.currScore = (Main.totalScore = 0);
Main.addScore($data.score);
if ($data.restTime){
GameI.totalTime = $data.restTime;
GameI.playMode = GameI.PLAYMODE_TIME;
} else {
GameI.playMode = GameI.PLAYMODE_NORMAL;
};
};
$data = null;
}
private function removed(_arg1:Event):void{
if (Main.currPageClass != Page_Game){
SoundManage.stopMusic("Main_s2");
SoundManage.playMusic("Main_s1", 999999);
};
game = null;
camera.clear();
scene.clear();
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
RunsManager.removeRun(run);
map = null;
tfkMap = null;
charMap = null;
scene = null;
camera = null;
mainSpace = null;
tfk = null;
hitObjDict = null;
hero = null;
boss = null;
}
private function run():void{
var _local1:Vector3D;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Boolean;
var _local9:Boolean;
var _local10:*;
var _local11:Vector3D;
var _local12:Vector3D;
var _local13:*;
var _local14:Number;
_local1 = camera.o;
if (isLookingAround){
if (KeyManager.isDown(37)){
mainSpace.revolutiony(-0.05);
} else {
if (KeyManager.isDown(39)){
mainSpace.revolutiony(0.05);
};
};
if (KeyManager.isDown(38)){
_local1.y = (_local1.y + 20);
} else {
if (KeyManager.isDown(40)){
_local1.y = (_local1.y - 20);
};
};
} else {
if (unMoveAble){
hero.wantToMoveDir = 0;
} else {
if (KeyManager.isDown(37)){
hero.move(-1);
} else {
if (KeyManager.isDown(39)){
hero.move(1);
} else {
hero.wantToMoveDir = 0;
};
};
if (hero.usingFlyMachine){
if (KeyManager.isDown(38)){
hero.flyUp();
};
};
for (_local13 in runArr) {
var _local17 = runArr;
_local17[_local13]();
};
};
if (hero == null){
return;
};
_local11 = hero.o;
_local12 = hero.vz;
_local1.x = (_local11.x - (_local12.x * 300));
_local1.y = (_local11.y + 80);
_local1.z = (_local11.z - (_local12.z * 300));
tp1.x = (_local11.x - _local1.x);
tp1.y = (_local11.y - _local1.y);
tp1.z = (_local11.z - _local1.z);
Vector3D.crossSet(tp1, hero.vx, tp2);
camera.follow(tp1, tp2);
};
if (_local1.y > cameraTop){
_local1.y = cameraTop;
} else {
if (_local1.y < cameraBottom){
_local1.y = cameraBottom;
};
};
_local2 = camera.vz.x;
_local3 = camera.vz.z;
_local4 = mainSpace.vz.x;
_local5 = mainSpace.vz.z;
bg.y = Math.round((_local1.y / 6.4));
_local6 = (camera.o.y + 300);
_local7 = (camera.o.y - 300);
mainSpace.updateInM();
mainSpace.inMatrix.transformVertexTo(camera.o, tp1);
tp1.y = (tp2.y = 0);
_local8 = boss.visible;
_local9 = (((boss.mapY < _local6)) && ((boss.mapY > _local7)));
if (_local8 != _local9){
boss.visible = _local9;
if (!_local9){
boss.stopAllAnimation();
};
};
for (_local10 in hitObjDict) {
_local8 = _local10.visible;
_local9 = (((_local10.mapY < _local6)) && ((_local10.mapY > _local7)));
if (_local9){
tp2.x = _local10.o.x;
tp2.z = _local10.o.z;
if (!boss.visible){
_local14 = Vector3D.toAngle(tp1, tp2);
_local9 = (((_local14 < 2.1)) && ((_local14 > -2.1)));
};
};
if (_local8 != _local9){
_local10.visible = _local9;
if (((_local10.hasOwnProperty("stopAllAnimation")) && (!(_local9)))){
_local10.stopAllAnimation();
};
};
};
render();
}
public static function removeHitObj(_arg1:HitObj, _arg2:Boolean=false):void{
if (_arg2){
clearMap(_arg1);
};
delete hitObjDict[_arg1];
mainSpace.removeChild(_arg1);
}
public static function isWalkAble(_arg1):Boolean{
return (!(((_arg1) && ((((_arg1 == "wall")) || (unWalkableThings[_arg1.constructor]))))));
}
public static function hitThingByPos(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int, _arg5:Object):void{
var _local6:int;
var _local7:int;
var _local8:*;
getMapIntXYTo(_arg1, _arg2, mapIntXYObj);
_local6 = mapIntXYObj.mapIntX;
_local7 = mapIntXYObj.mapIntY;
if (tfkMap[_local7][int((_local6 / pfDD))] == 0){
_local8 = map[_local7][_local6];
if (((((_local8) && ((Math.abs((_local8.mapY - _arg2)) > 25)))) && (!((_local8 is Door))))){
_local8 = null;
};
if (_local8 == null){
_local8 = charMap[_local7][_local6];
if (((_local8) && ((Math.abs((_local8.mapY - _arg2)) > 25)))){
_local8 = null;
};
};
if ((_local8 is Block)){
_local8.adjustPos(_arg1, _arg2, _arg3, _arg4, _arg5);
} else {
_arg5.hitX = _arg1;
_arg5.hitY = _arg2;
};
_arg5.hitObj = _local8;
} else {
if (_arg4 > 0){
_arg5.hitX = _arg1;
_arg5.hitY = (((int((_local7 / 2)) + 1) * pfDh) - ((_local7 % 2) * pfDh2));
} else {
if (_arg4 < 0){
_arg5.hitX = _arg1;
_arg5.hitY = ((int((_local7 / 2)) + 1) * pfDh);
} else {
if (_arg3 > 0){
_arg5.hitX = ((_local6 - 0.6) * brickWid);
_arg5.hitY = _arg2;
} else {
_arg5.hitX = ((_local6 + 0.6) * brickWid);
_arg5.hitY = _arg2;
};
};
};
_arg5.hitObj = "wall";
};
}
public static function addRun(_arg1:Function, _arg2:Boolean=false):void{
if (_arg2){
runArr.push(_arg1);
} else {
runArr.unshift(_arg1);
};
}
public static function getThingByPos(_arg1:Number, _arg2:Number){
var _local3:int;
var _local4:int;
var _local5:*;
getMapIntXYTo(_arg1, _arg2, mapIntXYObj);
_local3 = mapIntXYObj.mapIntX;
_local4 = mapIntXYObj.mapIntY;
if (tfkMap[_local4][int((_local3 / pfDD))] == 0){
_local5 = map[_local4][_local3];
if (((_local5) && ((Math.abs((_local5.mapY - _arg2)) > 25)))){
_local5 = null;
};
if (_local5 == null){
_local5 = charMap[_local4][_local3];
if (((_local5) && ((Math.abs((_local5.mapY - _arg2)) > 25)))){
_local5 = null;
};
};
return (_local5);
};
return ("wall");
}
public static function defaultArrowKeyDown(_arg1:int):void{
trace("arrowKeyDown");
}
public static function get isGamePageBefore():Boolean{
return ((Main.prevPageClass == Page_Game));
}
public static function lookAround():void{
isLookingAround = true;
}
public static function addHitObj(_arg1:HitObj):void{
hitObjDict[_arg1] = true;
mainSpace.addChild(_arg1);
}
public static function addExpEffect(_arg1:Number, _arg2:Number, _arg3:MovieClip):void{
var hitObj:HitObj;
var mapX = _arg1;
var mapY = _arg2;
var spExp = _arg3;
hitObj = (spExp.hitObj = new HitObj(mapX, mapY));
spExp.expEnd = function ():void{
scene.removeChild(this.hitObj);
};
hitObj.addChild(new Sprite3D(spExp));
scene.addChild(hitObj);
}
public static function removeRun(_arg1:Function):void{
var _local2:int;
_local2 = runArr.indexOf(_arg1);
if (_local2 >= 0){
runArr.splice(_local2, 1);
};
}
public static function readData(_arg1:Object):void{
$data = _arg1;
Main.gotoGame();
}
public static function digHole(_arg1:int=-1, _arg2:int=-1):Boolean{
trace(((("digHole" + _arg1) + ",") + _arg2));
_arg1 = ((_arg1 >= 0)) ? _arg1 : int((hero.mapIntX / pfDD));
_arg2 = ((_arg2 >= 0)) ? _arg2 : (hero.mapIntY - 1);
if (tfk.makeHole(_arg1, _arg2)){
tfkMap[_arg2][_arg1] = 0;
digHoleArr.push(_arg1, _arg2);
return (true);
};
return (false);
}
public static function get unMoveAble():Boolean{
return (((isLookingAround) || (isHeroWaiting)));
}
public static function defaultSpaceKeyDown():void{
trace("空格快捷键");
}
public static function render():void{
tfk.setAllVisible(camera, hideAngle);
scene.renderCamera(camera);
}
public static function getMapIntXYTo(_arg1:Number, _arg2:Number, _arg3):void{
var _local4:int;
var _local5:Number;
var _local6:int;
_local4 = int((_arg2 / pfDh));
_local5 = (_arg2 - (_local4 * pfDh));
_local4 = (_local4 * 2);
if (_local5 >= 0){
if (_local5 > pfDh1){
_local4 = (_local4 + 2);
} else {
_local4++;
};
};
_local4--;
while (_arg1 < 0) {
_arg1 = (_arg1 + (pfW * brickWid));
};
while (_arg1 > (pfW * brickWid)) {
_arg1 = (_arg1 - (pfW * brickWid));
};
_local6 = (Math.round((_arg1 / brickWid)) % pfW);
if (_local6 >= pfW){
_local6 = 0;
};
_arg3.mapIntX = _local6;
_arg3.mapIntY = _local4;
}
public static function clearMap(_arg1:HitObj):void{
if ((_arg1 is Enemy)){
charMap[_arg1.mapIntY][_arg1.mapIntX] = null;
} else {
map[_arg1.mapIntY][_arg1.mapIntX] = null;
};
}
private static function copyValuesTo(_arg1, _arg2, _arg3:Array):void{
var _local4:String;
for each (_local4 in _arg3) {
_arg2[_local4] = Common.deepCopy(_arg1[_local4]);
};
}
public static function stopLookAround():void{
isLookingAround = false;
mainSpace.o.x = (mainSpace.o.y = mainSpace.o.z);
mainSpace.vx.x = 1;
mainSpace.vx.y = (mainSpace.vx.z = 0);
mainSpace.vy.y = 1;
mainSpace.vy.x = (mainSpace.vy.z = 0);
mainSpace.vz.z = 1;
mainSpace.vz.x = (mainSpace.vz.y = 0);
}
public static function get currData():Object{
var _local1:Object;
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local1 = new Object();
_local2 = new Object();
_local3 = new Object();
_local4 = new Object();
_local5 = new Object();
_local6 = new Object();
for (_local7 in hitObjDict) {
_local8 = ((("$" + _local7.mapIntY) + "_") + _local7.mapIntX);
switch (_local7.constructor){
case Door:
if (_local7.isOpen){
_local1[_local8] = _local7.openDir;
};
break;
case PickUpThing:
_local2[_local8] = true;
break;
case Enemy:
_local5[((("$" + _local7.mapIntY0) + "_") + _local7.mapIntX0)] = {mapX:_local7.mapX, mapY:_local7.mapY, lifeValue:_local7.lifeValue};
break;
case Prisoner:
if (!_local7.isFree){
_local4[_local8] = true;
};
break;
default:
if ((_local7 is StandBlock)){
switch (_local7.constructor){
case BlockBtn:
_local3[_local8] = _local7.isUsed;
break;
case BlockFall:
_local3[_local8] = true;
break;
case BlockLift:
if (_local7.range != _local7.range0){
if (_local7.dir == 0){
_local8 = ((("$" + (_local7.mapIntY + (_local7.range * 2))) + "_") + _local7.mapIntX);
} else {
_local8 = ((("$" + _local7.mapIntY) + "_") + (_local7.mapIntX + (_local7.range * pfDD)));
};
};
_local3[_local8] = {dir:_local7.dir, range:_local7.range, mapX:_local7.mapX, mapY:_local7.mapY};
break;
};
};
break;
};
};
copyValuesTo(hero, _local6, ["mapX", "mapY", "attackValue", "defenceValue", "lifeValue", "keyNumArr", "faceIdArr", "faceNumArr", "toolArr", "letterArr", "canSuperJump"]);
return ({doorData:_local1, pickUpThingData:_local2, standBlockData:_local3, prisonerData:_local4, enemyData:_local5, heroData:_local6, digHoleArr:digHoleArr.slice(), score:Main.totalScore, restTime:((HeroPan.numClock == null)) ? 0 : HeroPan.numClock.time});
}
}
}//package _game
Section 71
//GameLoadingPage0 (_game.GameLoadingPage0)
package _game {
import flash.display.*;
public dynamic class GameLoadingPage0 extends MovieClip {
}
}//package _game
Section 72
//GameLoadingPage1 (_game.GameLoadingPage1)
package _game {
import flash.display.*;
public dynamic class GameLoadingPage1 extends MovieClip {
}
}//package _game
Section 73
//GameLoadingPage2 (_game.GameLoadingPage2)
package _game {
import flash.display.*;
public dynamic class GameLoadingPage2 extends MovieClip {
}
}//package _game
Section 74
//GameLoadingPage3 (_game.GameLoadingPage3)
package _game {
import flash.display.*;
public dynamic class GameLoadingPage3 extends MovieClip {
}
}//package _game
Section 75
//GameLoadingPage4 (_game.GameLoadingPage4)
package _game {
import flash.display.*;
public dynamic class GameLoadingPage4 extends MovieClip {
}
}//package _game
Section 76
//Hero (_game.Hero)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class Hero extends Char {
public var defenceValue:int;
public var faceIdArr:Array;
public var usingFlyMachine:Boolean;
public var attackValue:int;
public var usingKnives:Boolean;
public var keyNumArr:Array;
public var canSuperJump:Boolean;
public var letterArr:Array;
public var jumpRate:Number;// = 1.42
public var toolArr:Array;
public var faceNumArr:Array;
private var invincibleTime:int;
public function Hero(_arg1:Number, _arg2:Number, _arg3:Object){
var _local4:int;
var _local5:int;
jumpRate = 1.42;
if (_arg3){
_arg1 = _arg3.mapX;
_arg2 = _arg3.mapY;
};
super(_arg1, _arg2);
keyNumArr = (_arg3) ? _arg3.keyNumArr.slice() : [0, 0, 0];
faceNumArr = new Array(PickUpThing.TOTAL_FACE);
_local4 = 1;
while (_local4 < PickUpThing.TOTAL_FACE) {
faceNumArr[_local4] = (_arg3) ? _arg3.faceNumArr[_local4] : 0;
_local4++;
};
faceNumArr[0] = (_arg3) ? _arg3.faceNumArr[0] : 1;
toolArr = (_arg3) ? _arg3.toolArr.slice() : new Array();
faceIdArr = (_arg3) ? _arg3.faceIdArr.slice() : [0, 0, 0, 0, 0, 0];
_local5 = 0;
while (_local5 < 6) {
faceGotoAndStop(_local5, faceIdArr[_local5]);
_local5++;
};
letterArr = (_arg3) ? _arg3.letterArr.slice() : [false, false, false, false, false, false, false];
invincibleTime = 0;
attackValue = (_arg3) ? _arg3.attackValue : 50;
defenceValue = (_arg3) ? _arg3.defenceValue : 50;
lifeValue = (_arg3) ? _arg3.lifeValue : 100;
canSuperJump = (_arg3) ? _arg3.canSuperJump : false;
addAttack(0);
addDefence(0);
addLife(0);
Game.addRun(run);
}
public function receiveTool(_arg1:int):void{
Main.addScore(200);
if (_arg1 == PickUpThing.TOOL_SUPER_SHOES){
canSuperJump = true;
HeroPan.heroPan.superJumpIcon.visible = true;
} else {
toolArr.push(_arg1);
HeroPan.addTool(_arg1);
};
SoundManage.playSound("SndPickUp");
HeroPan.showStatus((("You have been given the " + PickUpThing.toolArr[_arg1]) + " power-up!"));
}
override public function jump(_arg1:Number):void{
if (canSuperJump){
fall((_arg1 * jumpRate));
} else {
fall(_arg1);
};
}
public function addLetter(_arg1:int):void{
letterArr[_arg1] = true;
HeroPan.addLetter(_arg1);
}
override public function rotateCube(_arg1:Number, _arg2:Number):void{
if (!usingFlyMachine){
super.rotateCube(_arg1, _arg2);
};
}
override public function addLife(_arg1):void{
if (_arg1 < 0){
if (invincibleTime > 0){
return;
};
invincibleTime = 60;
Game.addExpEffect(mapX, mapY, new SpExp());
isFalling = false;
fall(20);
};
super.addLife(_arg1);
HeroPan.life = lifeValue;
}
private function openDoor(_arg1:Door):void{
_arg1.open(currHittingDir);
Game.clearMap(_arg1);
currHittingThing = null;
HeroPan.showStatus("The door is open!");
SoundManage.playSound("SndOpenDoor");
trace("使用钥匙成功");
Game.spaceKeyDown = Game.defaultSpaceKeyDown;
}
public function addAttack(_arg1:int):void{
HeroPan.attack = (attackValue = (attackValue + _arg1));
}
override public function clear():void{
super.clear();
GameI.faceNumArr = faceNumArr.slice();
GameI.letterArr = letterArr.slice();
if (HeroPan.numClock){
GameI.timeBonus = int((HeroPan.numClock.time * 10));
} else {
GameI.timeBonus = 0;
};
Game.removeRun(run);
keyNumArr = null;
faceNumArr = null;
toolArr = null;
faceIdArr = null;
letterArr = null;
}
public function useKey(_arg1:int):Boolean{
if (keyNumArr[_arg1] > 0){
updateKey(_arg1, -1);
openDoor(currHittingThing);
return (true);
};
HeroPan.showStatus((("You need a " + PickUpThing.colorArr[_arg1]) + " key to open door!"));
trace("使用钥匙失败");
return (false);
}
override public function goUpDownRun(_arg1:Number):void{
var _local2:Number;
if (usingFlyMachine){
_local2 = cubeContainer.o.y;
mapY = (mapY + (_local2 - _arg1));
};
super.goUpDownRun(_arg1);
}
public function flyUp():void{
speedY = (speedY + (2 * -(Game.g)));
if (speedY > 18){
speedY = 18;
};
}
public function addDefence(_arg1):void{
HeroPan.defence = (defenceValue = (defenceValue + _arg1));
}
override public function die():void{
Main.lose();
Game.removeRun(run);
}
override public function hitSideThing(_arg1, _arg2:int):void{
var _local3:int;
super.hitSideThing(_arg1, _arg2);
if ((currHittingThing is Door)){
if (keyNumArr[currHittingThing.color] > 0){
Game.spaceKeyDown = HeroPan.useCurrKey;
HeroPan.showKeyTips(currHittingThing.color, true);
} else {
_local3 = toolArr.indexOf(PickUpThing.TOOL_SUPER_KEY);
if (_local3 >= 0){
Game.spaceKeyDown = HeroPan.useCurrTool;
HeroPan.showSuperKeyTips(_local3);
} else {
Game.spaceKeyDown = Game.defaultSpaceKeyDown;
HeroPan.showKeyTips(currHittingThing.color, false);
};
};
} else {
Game.spaceKeyDown = Game.defaultSpaceKeyDown;
};
}
private function run():void{
var _local1:Number;
var _local2:*;
moveRun();
if (invincibleTime > 0){
invincibleTime--;
cube.visible = ((invincibleTime % 4) < 2);
};
_local1 = -(d2);
while (_local1 <= d2) {
_local2 = Game.getThingByPos((mapX + _local1), mapY);
if ((_local2 is Enemy)){
if (((usingKnives) || ((((speedY < 0)) && ((_local2.mapY < (mapY - 5))))))){
speedY = 10;
Main.addScore(100);
if (usingKnives){
scene.addChild(new EnemyPieces(_local2));
Game.clearMap(_local2);
Game.removeHitObj(_local2);
} else {
updateFaceNum(_local2.faceId, 1);
HeroPan.showStatus("You have just received a new face!");
Game.addExpEffect(mapX, mapY, new SpExp2());
_local2.die();
};
SoundManage.playSound("SndKill");
} else {
if (invincibleTime <= 0){
SoundManage.playSound("SndHurt");
};
addLife((-1000 / defenceValue));
};
break;
} else {
if ((_local2 is PickUpThing)){
pickUp(_local2);
break;
};
};
_local1 = (_local1 + d2);
};
}
override public function standOnThing(_arg1):void{
super.standOnThing(_arg1);
if ((currStandingThing is StandBlock)){
(currStandingThing as StandBlock).startCheck();
};
}
public function pickUp(_arg1:PickUpThing):void{
switch (_arg1.type){
case PickUpThing.TYPE_POWERUP:
switch (_arg1.id){
case 0:
addAttack(10);
HeroPan.showStatus("Attack bonus!");
break;
case 1:
addDefence(10);
HeroPan.showStatus("Defence bonus!");
break;
case 2:
addLife(50);
HeroPan.showStatus("Life bonus!");
break;
};
break;
case PickUpThing.TYPE_KEY:
updateKey(_arg1.id, 1);
HeroPan.showStatus((("You've just found a " + PickUpThing.colorArr[_arg1.id]) + " key!"));
break;
case PickUpThing.TYPE_FACE:
updateFaceNum(_arg1.id, 1);
HeroPan.showStatus("You have just received a new face!");
break;
case PickUpThing.TYPE_LETTER:
addLetter(_arg1.id);
HeroPan.showStatus((("You've picked up letter \"" + PickUpThing.letterArr[_arg1.id]) + "\" !"));
break;
};
SoundManage.playSound("SndPickUp");
Main.addScore(100);
Game.removeHitObj(_arg1, true);
}
override public function __move(_arg1:Number):void{
mapX = (mapX + (moveDir * 5));
if (usingFlyMachine){
speedY = (speedY + -(Game.g));
};
}
public function get info():String{
return (((((((((((((((("\n" + mapIntX) + ",") + mapIntY) + "\ncurrHittingThing:") + currHittingThing) + "\ncurrStandingThing:") + currStandingThing) + "\nisMoving:") + isMoving) + "\nisFalling:") + isFalling) + "\nmapX:") + mapX) + "\nmapY:") + mapY));
}
public function updateKey(_arg1:int, _arg2:int):void{
keyNumArr[_arg1] = (keyNumArr[_arg1] + _arg2);
HeroPan.setKeyNum(_arg1, keyNumArr[_arg1]);
}
public function useTool(_arg1:int):void{
switch (toolArr[_arg1]){
case PickUpThing.TOOL_FLY_MACHINE:
this.addChild(new FlyMachine());
break;
case PickUpThing.TOOL_SUPER_KEY:
if ((currHittingThing is Door)){
openDoor(currHittingThing);
} else {
HeroPan.showStatus("Can not use super key now!");
return;
};
break;
case PickUpThing.TOOL_PICKAX:
if (Game.digHole()){
} else {
HeroPan.showStatus("Can not dig hole here!");
return;
};
break;
case PickUpThing.TOOL_KNIFE:
this.addChild(new Knives());
break;
default:
trace("找不到要用的tool");
return;
};
toolArr.splice(_arg1, 1);
HeroPan.removeTool(_arg1);
}
public function updateFaceNum(_arg1:int, _arg2:int):void{
var _local3:int;
faceNumArr[_arg1] = (faceNumArr[_arg1] + _arg2);
HeroPan.setFaceNum(_arg1, faceNumArr[_arg1]);
if (faceNumArr[_arg1] <= 0){
_local3 = 0;
while (_local3 < 6) {
if (faceIdArr[_local3] == _arg1){
faceGotoAndStop(_local3, 0);
};
_local3++;
};
};
}
override public function faceGotoAndStop(_arg1:int, _arg2:int):void{
super.faceGotoAndStop(_arg1, _arg2);
faceIdArr[_arg1] = _arg2;
Game.render();
}
}
}//package _game
Section 77
//HeroPan (_game.HeroPan)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import ui.*;
import flash.utils.*;
import framework.btns.*;
public class HeroPan extends Sprite {
public var defenceTxt:Txt;
public var toolsBox:ToolsBox;
public var attackTxt:Txt;
public var typewriter:Typewriter;
public var facesBox:FacesBox;
public var keyBtn1:KeyBtn;
public var keyBtn0:KeyBtn;
public var btnDefence:Btn_Defence;
public var btnUseHighlight:Btn_Highlight;
public var superJumpIcon:MovieClip;
public var key1Txt:Txt;
public var keyBtn2:KeyBtn;
public var btnLife:Btn_Life;
public var container:MovieClip;
public var lifeBar:LifeBar;
public var key2Txt:Txt;
public var btnLookAround:Btn_Look_Around;
public var popUp:PopUp;
public var btnAttack:Btn_Attack;
public var btnSaveAndRead:Btn_Save_And_Read;
public var btnChangeFaces:Btn_Change_Faces;
public var youWinTxt:YouWinTxt;
public var key0Txt:Txt;
private static var showInstructions:Boolean = true;
public static var heroPan:HeroPan;
private static var currBtn:SimpleBtn;
private static var __life:Number;
private static var currToolId:int;
private static var faceSelecter:FaceSelecter;
private static var __attack:Number;
public static var numClock:NumClock;
private static var __defence:Number;
private static var lookAroundPan:LookAroundPan;
public function HeroPan(){
heroPan = this;
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function removed(_arg1:Event):void{
heroPan = null;
faceSelecter = null;
currBtn = null;
lookAroundPan = null;
numClock = null;
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
}
private function added(_arg1:Event):void{
var color:int;
var event = _arg1;
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
color = 0;
while (color < 3) {
this[("keyBtn" + color)].release = function (){
useKey(this);
};
setKeyNum(color, Game.hero.keyNumArr[color]);
color = (color + 1);
};
superJumpIcon.visible = Game.hero.canSuperJump;
youWinTxt.init(Game.hero.letterArr);
btnChangeFaces.release = changeFaces;
btnChangeFaces.toolTip = "Change Faces.";
btnSaveAndRead.release = saveAndRead;
btnSaveAndRead.toolTip = "Save And Load.";
btnUseHighlight.release = useHighlight;
btnUseHighlight.toolTip = "Don't Use Highlight.";
(btnUseHighlight.getChildAt(0) as MovieClip).gotoAndStop(1);
btnLookAround.release = lookAround;
btnLookAround.toolTip = "Look Around.";
btnLife.toolTip = "Life";
btnAttack.toolTip = "Attack power";
btnDefence.toolTip = "Defence power";
life = __life;
attack = __attack;
defence = __defence;
if (GameI.playMode == GameI.PLAYMODE_TIME){
numClock = new NumClock();
this.addChild(numClock);
numClock.totalTime = GameI.totalTime;
numClock.count();
numClock.canCount = function ():Boolean{
return (!(Game.unMoveAble));
};
numClock.onTimeUp = HeroPan.addTimeUpEffect;
};
if (showInstructions){
Game.isHeroWaiting = true;
showInstructions = false;
showPopUpMsg(btnChangeFaces.x, btnChangeFaces.y, "instructions", null, true);
};
}
public static function setKeyNum(_arg1:int, _arg2:int):void{
heroPan[(("key" + _arg1) + "Txt")].text = _arg2;
}
private static function getColorByBtn(_arg1):int{
var _local2:String;
_local2 = _arg1.name;
return (int(_local2.charAt((_local2.length - 1))));
}
public static function showKeyTips(_arg1:int, _arg2:Boolean):void{
var _local3:*;
var _local4:Number;
var _local5:Number;
_local3 = heroPan[(("key" + _arg1) + "Txt")];
_local4 = (_local3.x - 20);
_local5 = (_local3.y - 10);
currBtn = heroPan[("keyBtn" + _arg1)];
if (_arg2){
showPopUpMsg(_local4, _local5, "can_use_key", _arg1);
} else {
showPopUpMsg(_local4, _local5, "no_key", _arg1);
};
}
public static function showToolTips(_arg1:int):void{
var _local2:*;
_local2 = heroPan.toolsBox.getItemById(_arg1);
showPopUpMsg(((heroPan.toolsBox.x + _local2.x) + 8), ((heroPan.toolsBox.y + _local2.y) + 5), "tool_tips", _local2.id, true, true);
}
public static function showStatus(_arg1:String):void{
heroPan.typewriter.show(_arg1);
}
public static function lookAround():void{
if (Game.isLookingAround){
heroPan.removeChild(lookAroundPan);
lookAroundPan = null;
} else {
heroPan.addChild((lookAroundPan = new LookAroundPan()));
};
}
public static function useCurrKey():void{
if (Game.hero.useKey(getColorByBtn(currBtn))){
trace("使用钥匙成功");
};
}
private static function useKey(_arg1:SimpleBtn):void{
if ((Game.hero.currHittingThing is Door)){
if (currBtn == _arg1){
useCurrKey();
} else {
showStatus("You're useing the wrong key!");
};
} else {
showStatus("You can not use this key now!");
};
}
public static function addTool(_arg1:int):void{
heroPan.toolsBox.updateFromHero();
}
private static function showUseToolTips(_arg1:int, _arg2:String):void{
var _local3:*;
var _local4:Number;
var _local5:Number;
currToolId = _arg1;
_local3 = heroPan.toolsBox.getItemById(_arg1);
_local4 = ((heroPan.toolsBox.x + _local3.x) + 8);
_local5 = ((heroPan.toolsBox.y + _local3.y) + 1);
showPopUpMsg(_local4, _local5, _arg2);
}
public static function get popUp():PopUp{
return (heroPan.popUp);
}
private static function saveAndRead():void{
if (Game.isHeroWaiting){
return;
};
heroPan.addChild(new SaveAndReadBox(Game.currData, Game.readData, "Quit current game and continue?"));
}
public static function set defence(_arg1:Number):void{
__defence = _arg1;
if (heroPan){
heroPan.defenceTxt.text = __defence;
};
}
public static function hidePopUp():void{
popUp.hide();
}
private static function useHighlight():void{
if (Material.useHighlight){
heroPan.btnUseHighlight.toolTip = "Use Highlight.";
(heroPan.btnUseHighlight.getChildAt(0) as MovieClip).gotoAndStop(2);
Obj3D.scene.resetAllHighlight();
Material.useHighlight = false;
} else {
heroPan.btnUseHighlight.toolTip = "Don't Use Highlight.";
(heroPan.btnUseHighlight.getChildAt(0) as MovieClip).gotoAndStop(1);
Material.useHighlight = true;
};
}
public static function setFaceNum(_arg1:int, _arg2:int):void{
heroPan.facesBox.update(_arg1, _arg2);
}
public static function set attack(_arg1:Number):void{
__attack = _arg1;
if (heroPan){
heroPan.attackTxt.text = __attack;
};
}
public static function useCurrTool():void{
Game.hero.useTool(currToolId);
}
private static function changeFaces():void{
faceSelecter = new FaceSelecter();
heroPan.addChild(faceSelecter);
}
public static function addLetter(_arg1:int):void{
heroPan.youWinTxt.addLetter(_arg1);
}
public static function showPopUpMsg(_arg1:Number, _arg2:Number, _arg3:String, _arg4=undefined, _arg5:Boolean=false, _arg6:Boolean=false):void{
popUp.show(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
private static function addTimeUpEffect():void{
RunsManager.pause = true;
heroPan.addChild(new TimeUpEffect());
}
public static function showSuperKeyTips(_arg1:int):void{
showUseToolTips(_arg1, "super_key");
}
public static function removeTool(_arg1:int):void{
heroPan.toolsBox.updateFromHero();
}
public static function set life(_arg1:Number):void{
__life = _arg1;
if (heroPan){
heroPan.lifeBar.value = __life;
};
}
}
}//package _game
Section 78
//HeroTool (_game.HeroTool)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class HeroTool extends Sprite3D {
public var delayTime:int;
public function HeroTool(_arg1:Sprite){
super(_arg1);
o.y = Game.hero.cubeContainer.o.y;
delayTime = (10 * 30);
Game.addRun(run);
}
public function run():void{
o.y = Game.hero.cubeContainer.o.y;
if (delayTime < 60){
sp.alpha = (((delayTime % 10) <= 5)) ? 0.2 : 1;
};
if (--delayTime <= 0){
parent.removeChild(this);
};
}
override public function clear():void{
super.clear();
Game.removeRun(run);
}
}
}//package _game
Section 79
//HitObj (_game.HitObj)
package _game {
import _3d.*;
public class HitObj extends Obj3DContainer {
public var mapIntX:int;
public var mapY:Number;
public var mapIntY:int;
public var mapX:Number;
public function HitObj(_arg1:Number, _arg2:Number){
mapX = _arg1;
mapY = _arg2;
updatePos();
}
public function updatePos():void{
while (mapX < 0) {
mapX = (mapX + (Game.pfW * Game.brickWid));
};
while (mapX > (Game.pfW * Game.brickWid)) {
mapX = (mapX - (Game.pfW * Game.brickWid));
};
mapToGame(mapX, mapY, o);
vz.x = -(o.x);
vz.z = -(o.z);
vz.y = 0;
vz.normalize(1);
Vector3D.crossSet(vy, vz, vx);
Game.getMapIntXYTo(mapX, mapY, this);
}
public static function mapToGame(_arg1:Number, _arg2:Number, _arg3:Vector3D){
var _local4:Number;
_arg3.y = _arg2;
_local4 = (_arg1 / Game.pfR);
_arg3.x = (Game.pfR * Math.cos(_local4));
_arg3.z = (Game.pfR * Math.sin(_local4));
}
}
}//package _game
Section 80
//ImgBossFace (_game.ImgBossFace)
package _game {
import flash.display.*;
public dynamic class ImgBossFace extends MovieClip {
}
}//package _game
Section 81
//ImgBtnSide (_game.ImgBtnSide)
package _game {
import flash.display.*;
public dynamic class ImgBtnSide extends Sprite {
}
}//package _game
Section 82
//ImgBtnTop (_game.ImgBtnTop)
package _game {
import flash.display.*;
public dynamic class ImgBtnTop extends Sprite {
}
}//package _game
Section 83
//ImgBtnTopLight (_game.ImgBtnTopLight)
package _game {
public class ImgBtnTopLight extends OnAndOffThing {
public function ImgBtnTopLight(){
super(ImgBtnTopLightOn, ImgBtnTopLightOff);
}
}
}//package _game
Section 84
//ImgBtnTopLightOff (_game.ImgBtnTopLightOff)
package _game {
import flash.display.*;
public dynamic class ImgBtnTopLightOff extends Sprite {
}
}//package _game
Section 85
//ImgBtnTopLightOn (_game.ImgBtnTopLightOn)
package _game {
import flash.display.*;
public dynamic class ImgBtnTopLightOn extends MovieClip {
}
}//package _game
Section 86
//ImgCharFace (_game.ImgCharFace)
package _game {
import flash.display.*;
public dynamic class ImgCharFace extends Sprite {
}
}//package _game
Section 87
//ImgCharFace2 (_game.ImgCharFace2)
package _game {
import flash.display.*;
public dynamic class ImgCharFace2 extends MovieClip {
}
}//package _game
Section 88
//ImgDoorFront0 (_game.ImgDoorFront0)
package _game {
import flash.display.*;
public dynamic class ImgDoorFront0 extends Sprite {
}
}//package _game
Section 89
//ImgDoorFront1 (_game.ImgDoorFront1)
package _game {
import flash.display.*;
public dynamic class ImgDoorFront1 extends Sprite {
}
}//package _game
Section 90
//ImgDoorFront2 (_game.ImgDoorFront2)
package _game {
import flash.display.*;
public dynamic class ImgDoorFront2 extends Sprite {
}
}//package _game
Section 91
//ImgDoorLeft0 (_game.ImgDoorLeft0)
package _game {
import flash.display.*;
public dynamic class ImgDoorLeft0 extends Sprite {
}
}//package _game
Section 92
//ImgDoorLeft1 (_game.ImgDoorLeft1)
package _game {
import flash.display.*;
public dynamic class ImgDoorLeft1 extends Sprite {
}
}//package _game
Section 93
//ImgDoorLeft2 (_game.ImgDoorLeft2)
package _game {
import flash.display.*;
public dynamic class ImgDoorLeft2 extends Sprite {
}
}//package _game
Section 94
//ImgDoorTop0 (_game.ImgDoorTop0)
package _game {
import flash.display.*;
public dynamic class ImgDoorTop0 extends Sprite {
}
}//package _game
Section 95
//ImgDoorTop1 (_game.ImgDoorTop1)
package _game {
import flash.display.*;
public dynamic class ImgDoorTop1 extends Sprite {
}
}//package _game
Section 96
//ImgDoorTop2 (_game.ImgDoorTop2)
package _game {
import flash.display.*;
public dynamic class ImgDoorTop2 extends Sprite {
}
}//package _game
Section 97
//ImgFallSide (_game.ImgFallSide)
package _game {
import flash.display.*;
public dynamic class ImgFallSide extends Sprite {
}
}//package _game
Section 98
//ImgFallTop (_game.ImgFallTop)
package _game {
import flash.display.*;
public dynamic class ImgFallTop extends Sprite {
}
}//package _game
Section 99
//ImgLiftArrow (_game.ImgLiftArrow)
package _game {
public class ImgLiftArrow extends OnAndOffThing {
private var __rotation:Number;
public function ImgLiftArrow(){
super(ImgLiftArrowOn, ImgLiftArrowOff);
}
override public function turnOn():void{
super.turnOn();
child.rotation = __rotation;
}
public function set _rotation(_arg1:Number):void{
child.rotation = (__rotation = _arg1);
}
override public function turnOff():void{
super.turnOff();
child.rotation = __rotation;
}
}
}//package _game
Section 100
//ImgLiftArrowOff (_game.ImgLiftArrowOff)
package _game {
import flash.display.*;
public dynamic class ImgLiftArrowOff extends MovieClip {
}
}//package _game
Section 101
//ImgLiftArrowOn (_game.ImgLiftArrowOn)
package _game {
import flash.display.*;
public dynamic class ImgLiftArrowOn extends MovieClip {
}
}//package _game
Section 102
//ImgLiftFront (_game.ImgLiftFront)
package _game {
import flash.display.*;
public dynamic class ImgLiftFront extends Sprite {
}
}//package _game
Section 103
//ImgLiftSide (_game.ImgLiftSide)
package _game {
import flash.display.*;
public dynamic class ImgLiftSide extends Sprite {
}
}//package _game
Section 104
//ImgLiftTop (_game.ImgLiftTop)
package _game {
import flash.display.*;
public dynamic class ImgLiftTop extends Sprite {
}
}//package _game
Section 105
//ImgTowerIn (_game.ImgTowerIn)
package _game {
import flash.display.*;
public dynamic class ImgTowerIn extends MovieClip {
}
}//package _game
Section 106
//ImgTowerOut (_game.ImgTowerOut)
package _game {
import flash.display.*;
public dynamic class ImgTowerOut extends MovieClip {
}
}//package _game
Section 107
//ImgTowerPf (_game.ImgTowerPf)
package _game {
import flash.display.*;
public dynamic class ImgTowerPf extends MovieClip {
}
}//package _game
Section 108
//ImgTowerPfHole (_game.ImgTowerPfHole)
package _game {
import flash.display.*;
public dynamic class ImgTowerPfHole extends MovieClip {
}
}//package _game
Section 109
//ImgTowerPfSide (_game.ImgTowerPfSide)
package _game {
import flash.display.*;
public dynamic class ImgTowerPfSide extends MovieClip {
}
}//package _game
Section 110
//ImgTowerPrison (_game.ImgTowerPrison)
package _game {
import flash.display.*;
public dynamic class ImgTowerPrison extends Sprite {
}
}//package _game
Section 111
//ImgTowerPrisonBg (_game.ImgTowerPrisonBg)
package _game {
import flash.display.*;
public dynamic class ImgTowerPrisonBg extends MovieClip {
}
}//package _game
Section 112
//ImgTowerPrisonStick (_game.ImgTowerPrisonStick)
package _game {
import flash.display.*;
public dynamic class ImgTowerPrisonStick extends MovieClip {
public function ImgTowerPrisonStick(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package _game
Section 113
//ImgTowerTop (_game.ImgTowerTop)
package _game {
import flash.display.*;
public dynamic class ImgTowerTop extends MovieClip {
}
}//package _game
Section 114
//InstBtnMask (_game.InstBtnMask)
package _game {
import flash.display.*;
public dynamic class InstBtnMask extends MovieClip {
}
}//package _game
Section 115
//Item (_game.Item)
package _game {
import flash.display.*;
import flash.utils.*;
public class Item extends Sprite {
private var iconContainer:Sprite;
private var __id:int;
private var className:String;
private var IconClass:Class;
public function Item(_arg1:String){
className = _arg1;
iconContainer = (this.getChildByName("_iconContainer") as Sprite);
}
public function get id():int{
return (__id);
}
public function set num(_arg1:int):void{
var _local2:*;
if (_arg1 == 0){
Common.removeChildren(iconContainer);
} else {
if (iconContainer.numChildren == 0){
_local2 = new IconClass();
iconContainer.addChild(_local2);
Common.stopAll(_local2);
};
};
}
public function set id(_arg1:int):void{
__id = _arg1;
IconClass = (getDefinitionByName((className + id)) as Class);
}
}
}//package _game
Section 116
//ItemsBox (_game.ItemsBox)
package _game {
import flash.display.*;
import flash.events.*;
public class ItemsBox extends Sprite {
public function ItemsBox(){
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function added(_arg1:Event):void{
var _local2:int;
var _local3:Item;
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
_local2 = itemNumArr.length;
while (--_local2 >= 0) {
_local3 = this[("item" + _local2)];
_local3.id = _local2;
_local3.num = itemNumArr[_local2];
};
}
public function update(_arg1:int, _arg2:int):void{
(this[("item" + _arg1)] as Item).num = _arg2;
}
public function get itemNumArr():Array{
return (null);
}
}
}//package _game
Section 117
//KeyBtn (_game.KeyBtn)
package _game {
import ui.*;
public dynamic class KeyBtn extends SimpleBtn {
}
}//package _game
Section 118
//KeyIcon0 (_game.KeyIcon0)
package _game {
import flash.display.*;
public dynamic class KeyIcon0 extends MovieClip {
}
}//package _game
Section 119
//KeyIcon1 (_game.KeyIcon1)
package _game {
import flash.display.*;
public dynamic class KeyIcon1 extends MovieClip {
}
}//package _game
Section 120
//KeyIcon2 (_game.KeyIcon2)
package _game {
import flash.display.*;
public dynamic class KeyIcon2 extends MovieClip {
}
}//package _game
Section 121
//Knives (_game.Knives)
package _game {
public class Knives extends HeroTool {
public function Knives(){
super(new SpKnives());
Game.hero.usingKnives = true;
}
override public function run():void{
sp.getChildAt(0).rotation = (sp.getChildAt(0).rotation + 14);
super.run();
if (delayTime <= 0){
Game.hero.usingKnives = false;
};
}
}
}//package _game
Section 122
//LetterIcon0 (_game.LetterIcon0)
package _game {
import flash.display.*;
public dynamic class LetterIcon0 extends MovieClip {
}
}//package _game
Section 123
//LetterIcon1 (_game.LetterIcon1)
package _game {
import flash.display.*;
public dynamic class LetterIcon1 extends MovieClip {
}
}//package _game
Section 124
//LetterIcon2 (_game.LetterIcon2)
package _game {
import flash.display.*;
public dynamic class LetterIcon2 extends MovieClip {
}
}//package _game
Section 125
//LetterIcon3 (_game.LetterIcon3)
package _game {
import flash.display.*;
public dynamic class LetterIcon3 extends MovieClip {
}
}//package _game
Section 126
//LetterIcon4 (_game.LetterIcon4)
package _game {
import flash.display.*;
public dynamic class LetterIcon4 extends MovieClip {
}
}//package _game
Section 127
//LetterIcon5 (_game.LetterIcon5)
package _game {
import flash.display.*;
public dynamic class LetterIcon5 extends MovieClip {
}
}//package _game
Section 128
//LetterIcon6 (_game.LetterIcon6)
package _game {
import flash.display.*;
public dynamic class LetterIcon6 extends MovieClip {
}
}//package _game
Section 129
//LookAroundPan (_game.LookAroundPan)
package _game {
import flash.display.*;
import flash.events.*;
public class LookAroundPan extends Sprite {
public function LookAroundPan(){
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");
EventsManager.addEvent(this, MouseEvent.CLICK, remove, "remove");
Game.lookAround();
HeroPan.heroPan.btnLookAround.toolTip = "Stop Looking Around.";
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
EventsManager.removeEvent(this, MouseEvent.CLICK, remove);
Game.stopLookAround();
HeroPan.heroPan.btnLookAround.toolTip = "Look Around.";
}
private function remove(_arg1:MouseEvent):void{
this.parent.removeChild(this);
}
}
}//package _game
Section 130
//OnAndOffThing (_game.OnAndOffThing)
package _game {
import flash.display.*;
public class OnAndOffThing extends Sprite {
public var child:Sprite;
public var OffClass:Class;
public var OnClass:Class;
public function OnAndOffThing(_arg1:Class, _arg2:Class){
OnClass = _arg1;
OffClass = _arg2;
turnOff();
}
public function turnOn():void{
Common.stopAll(this, false);
Common.removeChildren(this);
this.addChild((child = new OnClass()));
}
public function turnOff():void{
Common.stopAll(this, false);
Common.removeChildren(this);
this.addChild((child = new OffClass()));
}
}
}//package _game
Section 131
//PickUpThing (_game.PickUpThing)
package _game {
import _3d.*;
import flash.display.*;
public class PickUpThing extends HitObj {
public var sp3D:Sprite3D;
public var id:int;
public var type:String;
public static const TYPE_KEY:String = "Key";
public static const TYPE_FACE:String = "Face";
public static const TYPE_POWERUP:String = "PowerUp";
public static const TYPE_LETTER:String = "Letter";
public static const colorArr:Array = ["Red", "Green", "Blue"];
public static const TOOL_FLY_MACHINE:int = 1;
public static const TOTAL_FACE:int = 13;
public static const letterArr:Array = ["Y", "O", "U", "W", "I", "N", "!"];
public static const TOOL_KNIFE:int = 5;
public static const TOOL_PICKAX:int = 3;
public static const toolArr:Array = ["map", "copter", "super key", "digger", "bouncy bouncy", "stabby stabby"];
public static const TOOL_SUPER_KEY:int = 2;
public static const TOOL_SUPER_SHOES:int = 4;
public function PickUpThing(_arg1:Number, _arg2:Number, _arg3:String, _arg4:int){
var _local5:Sprite;
super(_arg1, _arg2);
type = _arg3;
id = _arg4;
_local5 = new SpPickUpThing(type, id);
sp3D = new Sprite3D(_local5);
sp3D.animationAutoStop = true;
sp3D.onCtrlAnimation = (sp3D.sp as SpPickUpThing).ctrlAnimation;
this.addChild(sp3D);
}
public function stopAllAnimation():void{
sp3D.onCtrlAnimation(false);
}
override public function clear():void{
sp3D.onCtrlAnimation(false);
super.clear();
sp3D = null;
}
}
}//package _game
Section 132
//PopUp (_game.PopUp)
package _game {
import flash.display.*;
import flash.events.*;
public class PopUp extends MovieClip {
private var waitForOk:Boolean;
public var isShowing:Boolean;
public var onHideFinished:Function;
private var value;
private var msg:String;
public function PopUp(){
addFrameScript(0, frame1, 2, frame3, 34, frame35, 54, frame55, 55, frame56, 60, frame61);
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 initShow():void{
var _local1:PopUpBody;
_local1 = (this.getChildAt(0) as PopUpBody);
if (this.x > 220){
this.scaleX = -1;
} else {
this.scaleX = 1;
};
_local1.show(msg, value);
}
function frame3(){
initShow();
isShowing = true;
}
public function hide():void{
if (isShowing){
gotoAndPlay("hide");
} else {
gotoAndStop(1);
};
}
function frame1(){
stop();
isShowing = false;
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
this.stop();
onHideFinished = null;
}
function frame35(){
if (!isShowing){
initShow();
};
}
function frame55(){
if (waitForOk){
stop();
};
}
function frame56(){
isShowing = false;
}
public function hideFinished():void{
msg = "";
if (onHideFinished != null){
onHideFinished();
};
}
function frame61(){
hideFinished();
}
public function show(_arg1:Number, _arg2:Number, _arg3:String, _arg4, _arg5:Boolean=false, _arg6:Boolean=false):void{
if ((((msg == _arg3)) && ((value == _arg4)))){
return;
};
waitForOk = _arg5;
this.x = _arg1;
this.y = _arg2;
msg = _arg3;
value = _arg4;
if (_arg6){
gotoAndStop("f");
} else {
gotoAndPlay(2);
};
}
}
}//package _game
Section 133
//PopUp_txt_btnCtrls_mc (_game.PopUp_txt_btnCtrls_mc)
package _game {
import flash.display.*;
import flash.events.*;
import ui.*;
public class PopUp_txt_btnCtrls_mc extends MovieClip {
public var __currBtn:SimpleBtn;
public function PopUp_txt_btnCtrls_mc(){
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
public 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");
Game.spaceKeyDown = function ():void{
__currBtn.release();
};
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
__currBtn = null;
}
public function set currBtn(_arg1:SimpleBtn):void{
if (__currBtn){
__currBtn.selected = false;
};
__currBtn = _arg1;
__currBtn.selected = true;
}
public function hidePopUp():void{
Game.spaceKeyDown = Game.defaultSpaceKeyDown;
Game.arrowKeyDown = Game.defaultArrowKeyDown;
HeroPan.hidePopUp();
HeroPan.popUp.onHideFinished = function ():void{
Game.isHeroWaiting = false;
HeroPan.popUp.onHideFinished = null;
};
}
}
}//package _game
Section 134
//PopUp_txt_can_use_key_mc (_game.PopUp_txt_can_use_key_mc)
package _game {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class PopUp_txt_can_use_key_mc extends MovieClip {
public function PopUp_txt_can_use_key_mc(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(((parent.parent as MovieClip).value + 2));
}
}
}//package _game
Section 135
//PopUp_txt_instructions_mc (_game.PopUp_txt_instructions_mc)
package _game {
import flash.display.*;
import flash.events.*;
import framework.btns.*;
public class PopUp_txt_instructions_mc extends PopUp_txt_btnCtrls_mc {
public var btnOk:Btn_OK;
public var btnNext:Btn_Next;
private var instBtnMask:InstBtnMask;
public var btnX:Btn_X;
public function PopUp_txt_instructions_mc(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
override public function added(_arg1:Event):void{
super.added(null);
}
public function init3():void{
adjustPosTo(HeroPan.heroPan.btnUseHighlight);
}
public function init4():void{
adjustPosTo(HeroPan.heroPan.btnLookAround);
}
public function init6():void{
var _local1:PopUpBody;
adjustPosTo(HeroPan.heroPan.facesBox);
_local1 = (HeroPan.popUp.getChildAt(0) as PopUpBody);
_local1.scaleX = 1;
currBtn = btnOk;
btnOk.release = hidePopUp;
}
public function init2():void{
adjustPosTo(HeroPan.heroPan.btnSaveAndRead);
}
public function init5():void{
var _local1:PopUpBody;
adjustPosTo(HeroPan.heroPan.toolsBox);
HeroPan.popUp.x = (HeroPan.popUp.x + 50);
_local1 = (HeroPan.popUp.getChildAt(0) as PopUpBody);
_local1.scaleX = -1;
}
public function init1():void{
HeroPan.heroPan.container.addChild((instBtnMask = new InstBtnMask()));
stop();
Game.arrowKeyDown = changeBtn;
currBtn = btnNext;
btnX.release = hidePopUp;
}
function frame3(){
init3();
}
function frame6(){
init6();
}
function frame1(){
init1();
}
function frame5(){
init5();
}
function frame4(){
init4();
}
function frame2(){
init2();
}
private function adjustPosTo(_arg1:Sprite):void{
(this.parent.parent.parent as PopUp).x = _arg1.x;
(this.parent.parent.parent as PopUp).y = _arg1.y;
}
override public function hidePopUp():void{
instBtnMask.parent.removeChild(instBtnMask);
instBtnMask = null;
super.hidePopUp();
}
private function changeBtn(_arg1:int):void{
if (__currBtn == btnNext){
currBtn = btnX;
} else {
if (__currBtn == btnX){
currBtn = btnNext;
};
};
}
}
}//package _game
Section 136
//PopUp_txt_no_key_mc (_game.PopUp_txt_no_key_mc)
package _game {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class PopUp_txt_no_key_mc extends MovieClip {
public function PopUp_txt_no_key_mc(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(((parent.parent as MovieClip).value + 2));
}
}
}//package _game
Section 137
//PopUp_txt_shan_cai_ye_mc (_game.PopUp_txt_shan_cai_ye_mc)
package _game {
import flash.display.*;
import flash.events.*;
import ui.*;
import flash.utils.*;
import framework.btns.*;
public class PopUp_txt_shan_cai_ye_mc extends PopUp_txt_btnCtrls_mc {
public var btnYes:Btn_Yes;
public var btnNo:Btn_No;
public var exchangeFaceContainer:MovieClip;
private var exchangeFaceId:int;
public var btnOk:Btn_OK;
private var faceId:int;
public var faceContainer:MovieClip;
public function PopUp_txt_shan_cai_ye_mc(){
addFrameScript(1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
override public function added(_arg1:Event):void{
var _local2:*;
super.added(null);
_local2 = (this.parent.parent as PopUpBody).value;
faceId = _local2.faceId;
exchangeFaceId = _local2.exchangeFaceId;
}
public function init3():void{
currBtn = btnOk;
btnOk.release = hidePopUp;
Game.arrowKeyDown = Game.defaultArrowKeyDown;
}
public function init2():void{
stop();
currBtn = btnYes;
btnYes.release = function ():void{
Game.hero.updateFaceNum(faceId, -1);
Game.hero.updateFaceNum(exchangeFaceId, 1);
SoundManage.playSound("SndPickUp");
gotoAndStop(3);
};
btnNo.release = function ():void{
gotoAndStop(4);
};
Game.arrowKeyDown = changeBtn;
}
function frame3(){
init3();
}
function frame4(){
init3();
}
function frame5(){
init3();
initFace();
}
function frame2(){
init2();
initFace();
}
public function initFace():void{
faceContainer.addChild(new (getDefinitionByName(("_game.FaceIcon" + faceId))));
if (exchangeFaceContainer){
exchangeFaceContainer.addChild(new (getDefinitionByName(("_game.FaceIcon" + exchangeFaceId))));
};
}
private function changeBtn(_arg1:int):void{
if (__currBtn == btnYes){
currBtn = btnNo;
} else {
if (__currBtn == btnNo){
currBtn = btnYes;
};
};
}
}
}//package _game
Section 138
//PopUp_txt_super_key_mc (_game.PopUp_txt_super_key_mc)
package _game {
import flash.display.*;
public dynamic class PopUp_txt_super_key_mc extends MovieClip {
}
}//package _game
Section 139
//PopUp_txt_thank_you_mc (_game.PopUp_txt_thank_you_mc)
package _game {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class PopUp_txt_thank_you_mc extends MovieClip {
public function PopUp_txt_thank_you_mc(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(((parent.parent as MovieClip).value + 2));
}
}
}//package _game
Section 140
//PopUp_txt_tool_tips_mc (_game.PopUp_txt_tool_tips_mc)
package _game {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class PopUp_txt_tool_tips_mc extends MovieClip {
public function PopUp_txt_tool_tips_mc(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(((parent.parent as MovieClip).value + 2));
}
}
}//package _game
Section 141
//PopUpBody (_game.PopUpBody)
package _game {
import flash.display.*;
import flash.utils.*;
public class PopUpBody extends MovieClip {
public var value;
public var body:MovieClip;
public function show(_arg1:String, _arg2):void{
value = _arg2;
body.addChild(new (getDefinitionByName((("_game.PopUp_txt_" + _arg1) + "_mc"))));
body.scaleX = this.parent.scaleX;
}
}
}//package _game
Section 142
//PowerUpIcon0 (_game.PowerUpIcon0)
package _game {
import flash.display.*;
public dynamic class PowerUpIcon0 extends MovieClip {
}
}//package _game
Section 143
//PowerUpIcon1 (_game.PowerUpIcon1)
package _game {
import flash.display.*;
public dynamic class PowerUpIcon1 extends MovieClip {
}
}//package _game
Section 144
//PowerUpIcon2 (_game.PowerUpIcon2)
package _game {
import flash.display.*;
public dynamic class PowerUpIcon2 extends MovieClip {
}
}//package _game
Section 145
//Prisoner (_game.Prisoner)
package _game {
import flash.display.*;
import flash.geom.*;
public class Prisoner extends Char {
public var toolType:int;
private var mapIntX0:int;
public var onRunAway:Function;
public var isFree:Boolean;
public var sticks:Array;
private var delayTime:int;
public function Prisoner(_arg1:Number, _arg2:Number, _arg3:int){
super(_arg1, _arg2);
toolType = _arg3;
allFaceGotoAndStop(PickUpThing.TOTAL_FACE);
}
override public function clear():void{
super.clear();
sticks = null;
onRunAway = null;
RunsManager.removeRun(run);
RunsManager.removeRun(runAwayDelay);
RunsManager.removeRun(runAwayRun);
}
public function goOut():void{
var _local1:MovieClip;
isFree = true;
delayTime = 10;
mapIntX0 = ((mapIntX - 1) / Game.pfDD);
Game.tfkMap[mapIntY][mapIntX0] = 0;
wantToMoveDir = 1;
move(1);
for each (_local1 in sticks) {
_local1.gotoAndPlay(2);
};
sticks = null;
RunsManager.addRun("runDelay", runDelay, 15, 1);
}
private function run():void{
var _local1:Point;
if (!isMoving){
_local1 = leg.sp.localToGlobal(new Point());
HeroPan.showPopUpMsg((_local1.x + 20), (_local1.y - 50), "thank_you", toolType);
RunsManager.removeRun(run);
RunsManager.addRun("runAwayDelay", runAwayDelay, 60, 1);
return;
};
moveRun();
if (--delayTime <= 0){
wantToMoveDir = 0;
};
}
private function runAwayRun():void{
moveRun();
if (--delayTime <= 0){
wantToMoveDir = 0;
RunsManager.removeRun(runAwayRun);
Game.removeHitObj(this);
};
}
private function runDelay():void{
RunsManager.addRun("run", run);
}
private function runAwayDelay():void{
Game.tfkMap[mapIntY][mapIntX0] = 1;
Game.isHeroWaiting = false;
Game.hero.receiveTool(toolType);
delayTime = 40;
wantToMoveDir = 1;
move(1);
onRunAway();
RunsManager.addRun("runAwayRun", runAwayRun);
}
}
}//package _game
Section 146
//SaveAndReadBox (_game.SaveAndReadBox)
package _game {
import flash.display.*;
import flash.events.*;
import ui.*;
import localSave.*;
import flash.utils.*;
public class SaveAndReadBox extends Sprite {
public var saving_mc:MovieClip;
public var item2:SaveAndReadBoxItem;
public var item5:SaveAndReadBoxItem;
public var item0:SaveAndReadBoxItem;
public var item3:SaveAndReadBoxItem;
public var item4:SaveAndReadBoxItem;
private var checkReadId:int;
public var item1:SaveAndReadBoxItem;
private var alertMsg:String;
private var checkSaveId:int;
private static var total:int;
public static var onReadData:Function;
public static var userSave:UserSave;
private static var currData:Object;
public function SaveAndReadBox(_arg1:Object, _arg2:Function, _arg3:String=""){
currData = _arg1;
onReadData = _arg2;
alertMsg = _arg3;
EventsManager.addEvent(this, Event.ADDED_TO_STAGE, added, "added");
}
private function saveDelay():void{
userSave.save(checkSaveId, currData);
this.parent.removeChild(this);
}
private function checkSave_handle(_arg1:Boolean):void{
if (_arg1){
save();
};
}
private function added(_arg1:Event):void{
var _local2:int;
var _local3:SaveAndReadBoxItem;
EventsManager.removeEvent(this, Event.ADDED_TO_STAGE, added);
EventsManager.addEvent(this, Event.REMOVED_FROM_STAGE, removed, "removed");
RunsManager.pause = true;
_local2 = 0;
while (_local2 < total) {
_local3 = this[("item" + _local2)];
_local3.id = _local2;
_local3.save = checkSave;
_local3.read = checkRead;
_local3.update(userSave.read(_local2), (currData == null));
_local2++;
};
saving_mc.visible = false;
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
RunsManager.pause = false;
currData = null;
onReadData = null;
}
private function save():void{
saving_mc.visible = true;
RunsManager.addRun("saveDelay", saveDelay, 1, 1, false);
}
private function checkSave(_arg1:int):void{
checkSaveId = _arg1;
if (userSave.read(_arg1).data){
Alert.show("Overwrite?", checkSave_handle);
} else {
save();
};
}
private function checkRead(_arg1:int):void{
checkReadId = _arg1;
if (alertMsg){
Alert.show(alertMsg, checkRead_handle);
} else {
checkRead_handle(true);
};
}
private function read(_arg1:int):void{
onReadData(userSave.read(_arg1).data);
this.parent.removeChild(this);
}
private function checkRead_handle(_arg1:Boolean):void{
if (_arg1){
read(checkReadId);
};
}
public static function firstInit(_arg1:String, _arg2:int):void{
if (userSave == null){
total = _arg2;
userSave = new UserSave(_arg1, total);
};
}
}
}//package _game
Section 147
//SaveAndReadBoxItem (_game.SaveAndReadBoxItem)
package _game {
import flash.display.*;
import flash.events.*;
import ui.*;
import flash.utils.*;
import framework.btns.*;
import flash.text.*;
public class SaveAndReadBoxItem extends Sprite {
public var btnRead:Btn_Read;
public var id:int;
public var timeTxt:Txt;
public var save:Function;
public var read:Function;
public var infoTxt:Txt;
public var btnSave:Btn_Save;
public function SaveAndReadBoxItem(){
btnSave.release = $save;
btnRead.release = $read;
}
private function $save():void{
save(id);
}
private function $read():void{
read(id);
}
public function update(_arg1:Object, _arg2:Boolean=false):void{
timeTxt.text = _arg1.time;
infoTxt.text = _arg1.info;
if (_arg1.time){
btnRead.bGrey = false;
} else {
btnRead.bGrey = true;
};
btnSave.bGrey = _arg2;
}
}
}//package _game
Section 148
//ShanCaiYe (_game.ShanCaiYe)
package _game {
import _3d.*;
import flash.geom.*;
public class ShanCaiYe extends Char {
private var arrow:Sprite3D;
private var faceId:int;
private var exchangeFaceId:int;
private var tipsFlag:Boolean;
public function ShanCaiYe(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int){
super(_arg1, _arg2);
faceId = _arg3;
exchangeFaceId = _arg4;
if ((((faceId == 0)) || ((exchangeFaceId == 0)))){
throw (new Error("不要使用默认的脸作为交换脸"));
};
allFaceGotoAndStop((PickUpThing.TOTAL_FACE + 1));
Game.addRun(run);
}
private function showArrow():void{
arrow = new Sprite3D(new SpArrow());
arrow.o.y = 60;
this.addChild(arrow);
}
override public function clear():void{
super.clear();
arrow = null;
Game.removeRun(run);
}
private function exchangeFaces():void{
var _local1:Point;
tipsFlag = false;
hideArrow();
Game.isHeroWaiting = true;
_local1 = leg.sp.localToGlobal(new Point());
HeroPan.showPopUpMsg(_local1.x, (_local1.y - 50), "shan_cai_ye", {faceId:faceId, exchangeFaceId:exchangeFaceId}, true);
}
private function run():void{
if (!visible){
return;
};
if (tipsFlag){
if (((!((Game.hero.mapY == mapY))) || ((Math.abs((Game.hero.mapIntX - mapIntX)) > 2)))){
hideArrow();
tipsFlag = false;
Game.spaceKeyDown = Game.defaultSpaceKeyDown;
};
} else {
if ((((Game.hero.mapY == mapY)) && ((Math.abs((Game.hero.mapIntX - mapIntX)) <= 2)))){
showArrow();
tipsFlag = true;
HeroPan.showStatus("The face man, swap faces with him.(space bar)");
Game.spaceKeyDown = exchangeFaces;
};
};
}
private function hideArrow():void{
this.removeChild(arrow);
arrow = null;
}
}
}//package _game
Section 149
//SpArrow (_game.SpArrow)
package _game {
import flash.display.*;
public dynamic class SpArrow extends MovieClip {
}
}//package _game
Section 150
//SpBlood (_game.SpBlood)
package _game {
import flash.display.*;
public dynamic class SpBlood extends MovieClip {
public function SpBlood(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package _game
Section 151
//SpExp (_game.SpExp)
package _game {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SpExp extends MovieClip {
public function SpExp(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
(this as MovieClip).expEnd();
}
}
}//package _game
Section 152
//SpExp2 (_game.SpExp2)
package _game {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SpExp2 extends MovieClip {
public function SpExp2(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
(this as MovieClip).expEnd();
}
}
}//package _game
Section 153
//SpFlyMachine (_game.SpFlyMachine)
package _game {
import flash.display.*;
public dynamic class SpFlyMachine extends MovieClip {
}
}//package _game
Section 154
//SpHeroLeg (_game.SpHeroLeg)
package _game {
import flash.display.*;
public dynamic class SpHeroLeg extends Sprite {
}
}//package _game
Section 155
//SpKnives (_game.SpKnives)
package _game {
import flash.display.*;
public dynamic class SpKnives extends MovieClip {
}
}//package _game
Section 156
//SpPickUpThing (_game.SpPickUpThing)
package _game {
import flash.display.*;
public class SpPickUpThing extends MovieClip {
public var icon:SpPickUpThingIcon;
public function SpPickUpThing(_arg1:String="", _arg2:int=-1){
if (_arg1){
icon.update(_arg1, _arg2);
};
}
public function ctrlAnimation(_arg1:Boolean):void{
if (_arg1){
this.play();
Common.playAll(icon, false);
} else {
this.stop();
Common.stopAll(icon, false);
};
}
}
}//package _game
Section 157
//SpPickUpThingIcon (_game.SpPickUpThingIcon)
package _game {
import flash.display.*;
import flash.utils.*;
public class SpPickUpThingIcon extends Sprite {
public function update(_arg1:String, _arg2:int):void{
this.addChild(new ((getDefinitionByName(((("_game." + _arg1) + "Icon") + _arg2)) as Class)));
}
}
}//package _game
Section 158
//SquareAnimation (_game.SquareAnimation)
package _game {
import flash.display.*;
public dynamic class SquareAnimation extends Sprite {
public var rotate:MovieClip;
public var move:MovieClip;
}
}//package _game
Section 159
//SquareAnimationData (_game.SquareAnimationData)
package _game {
import flash.display.*;
public class SquareAnimationData {
public var goUpDownRun:Function;
private var movArrId:int;
private var k:Number;
private var dir:int;
private var rotateArrId:int;
private static var moveArr:Array;
private static var initFlag:Boolean = firstInit();
private static var rotateArr:Array;
private static var bodyWid:Number;
public function SquareAnimationData(_arg1:Number){
k = (_arg1 / bodyWid);
}
public function goUpRun(_arg1:Function):Boolean{
_arg1((moveArr[movArrId] * k));
return ((++movArrId >= moveArr.length));
}
public function initGoDown():void{
movArrId = (moveArr.length - 1);
goUpDownRun = goDownRun;
}
public function rollRun(_arg1:Function):Boolean{
var _local2:Array;
_local2 = rotateArr[rotateArrId];
_arg1((dir * _local2[0]), ((dir * k) * _local2[1]), (k * _local2[2]));
return ((++rotateArrId >= rotateArr.length));
}
public function initRoll(_arg1:Number=1):void{
dir = _arg1;
rotateArrId = 1;
}
public function initGoUp():void{
movArrId = 0;
goUpDownRun = goUpRun;
}
public function goDownRun(_arg1:Function):Boolean{
_arg1((moveArr[movArrId] * k));
return ((--movArrId < 0));
}
private static function firstInit():Boolean{
var _local1:SquareAnimation;
var _local2:Sprite;
var _local3:int;
_local1 = new SquareAnimation();
rotateArr = new Array();
_local3 = _local1.rotate.totalFrames;
_local2 = (_local1.rotate.getChildAt(0) as Sprite);
while (_local3 >= 1) {
_local1.rotate.gotoAndStop(_local3);
rotateArr.unshift([(_local2.rotation * (Math.PI / 180)), _local2.x, -(_local2.y)]);
_local3--;
};
moveArr = new Array();
_local3 = _local1.move.totalFrames;
_local2 = (_local1.move.getChildAt(0) as Sprite);
while (_local3 >= 1) {
_local1.move.gotoAndStop(_local3);
moveArr.unshift(-(_local2.y));
_local3--;
};
bodyWid = _local2.width;
return (true);
}
}
}//package _game
Section 160
//StandBlock (_game.StandBlock)
package _game {
import _3d.*;
import _3d.mtl.*;
public class StandBlock extends Block {
public var light:ImgBtnTopLight;
private var heroDx:Number;
public function StandBlock(_arg1:Number, _arg2:Number, _arg3:Material, _arg4:Material, _arg5:Material, _arg6:Material, _arg7:Material, _arg8:Material){
var _local9:Face3D;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, ((Game.brickWid * Game.pfDD) - 20), ((Game.pfR2 - Game.pfR1) - 10), Game.pfDh2, "t");
_local9 = box.faceArr[0];
light = (_local9.mtlFaceSpArr[0][0] as ImgBtnTopLight);
}
public function moveRun():void{
updatePos();
Game.hero.mapX = (mapX + heroDx);
Game.hero.mapY = (mapY + 1);
Game.hero.updatePos();
}
public function updateMap(_arg1):void{
var _local2:int;
_local2 = 0;
while (_local2 < Game.pfDD) {
Game.map[mapIntY][((mapIntX + _local2) - 1)] = _arg1;
_local2++;
};
}
public function move():void{
heroDx = (Game.hero.mapX - mapX);
RunsManager.addRun("standBlock.movRun", moveRun);
SoundManage.playSound("SndStandBlock");
}
override public function clear():void{
super.clear();
Common.stopAll(light);
light = null;
RunsManager.removeRun(moveRun);
RunsManager.removeRun(checkRun);
}
public function startCheck():void{
RunsManager.addRun("block lift.checkRun", checkRun);
}
private function checkRun():void{
if (Game.hero.currStandingThing == this){
if ((((Math.abs((mapX - Game.hero.mapX)) < (Game.brickWid * 0.5))) || (Game.isHeroWaiting))){
if (!Game.isHeroWaiting){
light.turnOn();
};
Game.isHeroWaiting = true;
if (Game.hero.isMoving){
Game.hero.moveRun();
} else {
RunsManager.removeRun(checkRun);
move();
};
};
} else {
RunsManager.removeRun(checkRun);
};
}
public function stopMove():void{
Game.isHeroWaiting = false;
RunsManager.removeRun(moveRun);
}
}
}//package _game
Section 161
//TimeBonus (_game.TimeBonus)
package _game {
import flash.display.*;
import ui.*;
public dynamic class TimeBonus extends MovieClip {
public var txt:Txt;
public function TimeBonus(){
addFrameScript(0, frame1);
}
function frame1(){
txt.text = GameI.timeBonus;
}
}
}//package _game
Section 162
//TimeUpEffect (_game.TimeUpEffect)
package _game {
import flash.display.*;
public dynamic class TimeUpEffect extends MovieClip {
public function TimeUpEffect(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
Main.gotoLose();
RunsManager.pause = false;
}
}
}//package _game
Section 163
//ToolIcon1 (_game.ToolIcon1)
package _game {
import flash.display.*;
public dynamic class ToolIcon1 extends Sprite {
}
}//package _game
Section 164
//ToolIcon2 (_game.ToolIcon2)
package _game {
import flash.display.*;
public dynamic class ToolIcon2 extends Sprite {
}
}//package _game
Section 165
//ToolIcon3 (_game.ToolIcon3)
package _game {
import flash.display.*;
public dynamic class ToolIcon3 extends Sprite {
}
}//package _game
Section 166
//ToolIcon4 (_game.ToolIcon4)
package _game {
import flash.display.*;
public dynamic class ToolIcon4 extends Sprite {
}
}//package _game
Section 167
//ToolIcon5 (_game.ToolIcon5)
package _game {
import flash.display.*;
public dynamic class ToolIcon5 extends Sprite {
}
}//package _game
Section 168
//ToolsBox (_game.ToolsBox)
package _game {
import flash.display.*;
public class ToolsBox extends Sprite {
public var total:int;
public function ToolsBox(){
total = 0;
updateFromHero();
}
public function getItemById(_arg1:int):ToolsBoxItem{
return ((this.getChildAt((_arg1 + 1)) as ToolsBoxItem));
}
private function addItem(_arg1:int):void{
var _local2:ToolsBoxItem;
_local2 = new ToolsBoxItem(_arg1);
this.addChild(_local2);
_local2.x = (18 * total);
_local2.txt.autoSize = "center";
_local2.txt.text = ((total == 9)) ? 0 : (total + 1);
total++;
}
public function hideTips():void{
HeroPan.hidePopUp();
}
public function updateFromHero():void{
var _local1:int;
var _local2:int;
_local1 = this.numChildren;
while (--_local1 > 0) {
this.removeChildAt(_local1);
};
_local1 = 0;
total = 0;
trace(("Game.hero.toolArr=" + Game.hero.toolArr));
for each (_local2 in Game.hero.toolArr) {
addItem(_local2);
++_local1;
if (_local1 >= 10){
return;
};
};
}
public function useTool(_arg1:ToolsBoxItem):void{
Game.hero.useTool((this.getChildIndex(_arg1) - 1));
}
public function showTips(_arg1:ToolsBoxItem):void{
HeroPan.showToolTips((this.getChildIndex(_arg1) - 1));
}
}
}//package _game
Section 169
//ToolsBoxItem (_game.ToolsBoxItem)
package _game {
import flash.display.*;
import ui.*;
public class ToolsBoxItem extends Item {
public var _iconContainer:MovieClip;
public var btn:KeyBtn;
public var txt:Txt;
public function ToolsBoxItem(_arg1:int){
super("_game.ToolIcon");
id = _arg1;
num = 1;
btn.release = useTool;
btn.rollOver = showTips;
btn.rollOut = hideTips;
}
private function hideTips():void{
(this.parent as ToolsBox).hideTips();
}
private function useTool():void{
var _local1:ToolsBox;
_local1 = (this.parent as ToolsBox);
_local1.useTool(this);
_local1.hideTips();
}
private function showTips():void{
(this.parent as ToolsBox).showTips(this);
}
}
}//package _game
Section 170
//TowerFramework (_game.TowerFramework)
package _game {
import _3d.*;
import flash.display.*;
import flash.events.*;
import _3d.mtl.*;
import flash.utils.*;
public class TowerFramework extends Mesh3D {
private var pfObj;
public var prisonSticksObj;
private static var tp1:Vector3D = new Vector3D();
private static var tp2:Vector3D = new Vector3D();
public function TowerFramework(_arg1:RectBmdMaterial, _arg2:RectBmdMaterial, _arg3:RectBmdMaterial, _arg4:RectBmdMaterial, _arg5:RectBmdMaterial, _arg6:DeltaBmdMaterial, _arg7:FaceSpAndRectBmdMaterial, _arg8:RectBmdMaterial, _arg9:Number, _arg10:Number, _arg11:Number, _arg12:Number, _arg13:Array, _arg14:Number, _arg15:Number, _arg16:Number, _arg17){
var _local18:Number;
var _local19:Number;
var _local20:Array;
var _local21:int;
var _local22:Array;
var _local23:int;
var _local24:int;
var _local25:int;
var _local26:Object;
var _local27:Number;
var _local28:Face3D;
var _local29:String;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:int;
var _local39:Material;
var _local40:int;
var _local41:int;
var _local42:int;
var _local43:int;
var _local44:int;
var _local45:Array;
super();
_local18 = _arg13[0].length;
_local19 = _arg13.length;
_local20 = new Array();
_local21 = ((_local18 * (_local19 + 1)) * 2);
_local22 = new Array((_local21 + 1));
_local26 = new Object();
pfObj = new Object();
_local24 = 0;
while (_local24 < _local18) {
_local30 = ((((Math.PI * 2) * _local24) / _local18) + _arg14);
_local31 = Math.cos(_local30);
_local32 = Math.sin(_local30);
_local33 = (_arg9 * _local31);
_local34 = (_arg9 * _local32);
_local35 = (_arg10 * _local31);
_local36 = (_arg10 * _local32);
_local23 = ((_local24 * (_local19 + 1)) * 2);
_local22[_local23] = [_local33, 0, _local34];
_local22[(_local23 + 1)] = [_local35, 0, _local36];
_local37 = 0;
_local38 = ((_local24 + 1) % _local18);
_local25 = 1;
while (_local25 <= _local19) {
if ((_local25 % 2) == 0){
_local37 = (_local37 + _arg12);
} else {
_local37 = (_local37 + _arg11);
};
_local23 = (((_local24 * (_local19 + 1)) + _local25) * 2);
_local22[_local23] = [_local33, _local37, _local34];
_local22[(_local23 + 1)] = [_local35, _local37, _local36];
if ((_local25 % 2) == 1){
_local40 = _local23;
_local41 = (_local40 + 2);
_local42 = (((_local38 * (_local19 + 1)) + _local25) * 2);
_local43 = (_local42 + 2);
if (_local25 > 1){
if (_arg13[_local25][_local24] == 1){
_local20.push([_arg5, (_local41 + 1), (_local43 + 1), (_local42 + 1), (_local40 + 1)]);
if (_local25 < (_local19 - 1)){
if ((((_arg13[(_local25 + 1)][_local24] == 0)) || ((_arg13[(_local25 + 1)][_local24] == 2)))){
if (_arg13[(_local25 - 1)][_local24] == 0){
pfObj[((("$" + _local25) + "_") + _local24)] = {faceId:_local20.length, insideFaceData:[_arg3, _local41, _local43, _local42, _local40], outsideFaceData:[_arg5, (_local41 + 1), (_local43 + 1), (_local42 + 1), (_local40 + 1)], leftFaceData:[_arg5, _local41, (_local41 + 1), (_local40 + 1), _local40], rightFaceData:[_arg5, (_local43 + 1), _local43, _local42, (_local42 + 1)]};
};
_local20.push([_arg4, _local41, _local43, (_local43 + 1), (_local41 + 1)]);
};
} else {
_local20.push([_arg6, (_local43 + 1), (_local41 + 1), _local21]);
};
if (_arg13[_local25][_local38] != 1){
_local20.push([_arg5, (_local43 + 1), _local43, _local42, (_local42 + 1)]);
};
if (_arg13[_local25][(((_local24 + _local18) - 1) % _local18)] != 1){
_local20.push([_arg5, _local41, (_local41 + 1), (_local40 + 1), _local40]);
};
} else {
_local20.push([_arg3, _local41, _local43, _local42, _local40]);
if (_local25 == (_local19 - 1)){
_local20.push([_arg6, _local43, _local41, _local21]);
};
};
};
if (_local25 < (_local19 - 1)){
_local20.push([(((((_local24 % 3) == 0)) && (!((_arg13[(_local25 + 1)][_local24] == 2))))) ? _arg2 : _arg1, (_local41 + 2), (_local43 + 2), _local43, _local41]);
switch (_arg13[(_local25 + 1)][_local24]){
case 1:
_local20.push([_arg1, (_local41 + 3), (_local43 + 3), (_local43 + 1), (_local41 + 1)]);
if (_arg13[(_local25 + 1)][_local38] != 1){
_local20.push([_arg1, (_local43 + 3), (_local43 + 2), _local43, (_local43 + 1)]);
};
if (_arg13[(_local25 + 1)][(((_local24 + _local18) - 1) % _local18)] != 1){
_local20.push([_arg1, (_local41 + 2), (_local41 + 3), (_local41 + 1), _local41]);
};
break;
case 2:
addDoorFramework(_local22, _local20, _arg3, ((((Math.PI * 2) * (_local24 + 0.5)) / _local18) + _arg14), 0.06, (_arg9 - _arg17), (_arg10 - _arg17), (_local37 + _arg12), _arg11, (((_arg10 - _arg9) - _arg15) / 2), (_arg11 - _arg16));
break;
case 3:
case 4:
_local20.push([_arg1, (_local41 + 3), (_local43 + 3), (_local43 + 1), (_local41 + 1)]);
_local20.push([_arg1, (_local43 + 3), (_local41 + 3), (_local41 + 1), (_local43 + 1)]);
if (_arg13[(_local25 + 1)][_local24] == 3){
_local26[((("$" + _local25) + "_") + _local24)] = _local20.length;
};
_local20.push([((_arg13[(_local25 + 1)][_local24])==3) ? _arg7 : _arg8, (_local43 + 3), (_local43 + 2), _local43, (_local43 + 1)]);
if (_arg13[(_local25 + 1)][(((_local24 + _local18) - 1) % _local18)] != 1){
_local20.push([_arg1, (_local41 + 2), (_local41 + 3), (_local41 + 1), _local41]);
};
_local20.push([_arg1, (_local41 + 3), (_local41 + 2), _local41, (_local41 + 1)]);
_local20.push([_arg4, _local41, _local43, (_local43 + 1), (_local41 + 1)]);
break;
case 5:
break;
};
};
};
_local25++;
};
_local24++;
};
_local25 = 0;
while (_local25 < _local19) {
_local24 = 0;
while (_local24 < _local18) {
switch (_arg13[_local25][_local24]){
case 2:
_arg13[_local25][_local24] = 0;
break;
case 3:
case 4:
case 5:
_arg13[_local25][_local24] = 1;
break;
};
_local24++;
};
_local25++;
};
_local22[_local21] = [0, _local37, 0];
addVertexs(_local22);
addFaces(_local20);
_local20 = this.faceArr;
_local27 = (Game.tfkHei / 4);
for each (_local28 in _local20) {
_local44 = int(((_local28.p0.y - 1) / _local27));
if ((((Math.random() < 0.1)) && ((_local28.material.bmdArr.length > 4)))){
if (_local44 == 1){
_local44 = ((Math.random() < 0.5)) ? 4 : 6;
} else {
if (_local44 == 3){
_local44 = ((Math.random() < 0.5)) ? 5 : 7;
};
};
};
_local28.mtlBmdId = _local44;
checkFaceAddTemp(_local28);
};
trace("--------");
prisonSticksObj = new Object();
for (_local29 in _local26) {
_local45 = _local20[_local26[_local29]].mtlFaceSpArr;
prisonSticksObj[_local29] = [_local45[0][0], _local45[1][0], _local45[2][0]];
};
}
public function setAllVisible(_arg1:Camera3D, _arg2:Number):void{
var _local3:Number;
var _local4:Face3D;
var _local5:Number;
var _local6:Number;
Game.mainSpace.inMatrix.transformVertexTo(_arg1.o, tp1);
tp1.y = 0;
_local3 = _arg1.o.y;
for each (_local4 in faceArr) {
_local5 = (_local4.p0.y - _local3);
if ((((_local5 > -250)) && ((_local5 < 120)))){
tp2.x = _local4.p0.x;
tp2.z = _local4.p0.z;
_local6 = Vector3D.toAngle(tp1, tp2);
_local4.visible = (((((_local6 < 2.3)) && ((_local6 > -2.3)))) || (Game.boss.visible));
} else {
_local4.visible = false;
};
};
}
private function createArr(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local9 = Math.cos(_arg2);
_local10 = Math.sin(_arg2);
_local11 = (_arg3 * _local9);
_local12 = (_arg3 * _local10);
_local13 = ((_arg3 + _arg7) * _local9);
_local14 = ((_arg3 + _arg7) * _local10);
_local15 = ((_arg4 - _arg7) * _local9);
_local16 = ((_arg4 - _arg7) * _local10);
_local17 = (_arg4 * _local9);
_local18 = (_arg4 * _local10);
_local19 = (_arg5 + _arg6);
_local20 = (_local19 - _arg8);
_arg1.push([_local11, _arg5, _local12], [_local13, _arg5, _local14], [_local15, _arg5, _local16], [_local17, _arg5, _local18], [_local11, _local20, _local12], [_local13, _local20, _local14], [_local15, _local20, _local16], [_local17, _local20, _local18], [_local11, _local19, _local12], [_local17, _local19, _local18]);
}
public function makeHole(_arg1:int, _arg2:int):Boolean{
var _local3:*;
var _local4:Face3D;
var _local5:*;
_local3 = pfObj[((("$" + _arg2) + "_") + _arg1)];
if (_local3){
_local4 = faceArr[_local3.faceId];
_local5 = _local4.mtlBmdId;
_local4.changeMaterial(Game.mtlList.tfk.hole);
_local4.mtlBmdId = _local5;
createFaceByFaceData(_local3.insideFaceData, _local5);
createFaceByFaceData(_local3.outsideFaceData, _local5).invertValue = -1;
createFaceByFaceData(_local3.leftFaceData, _local5).invertValue = -1;
createFaceByFaceData(_local3.rightFaceData, _local5).invertValue = -1;
pfObj[((("$" + _arg2) + "_") + _arg1)] = null;
return (true);
};
return (false);
}
private function addDoorFramework(_arg1:Array, _arg2:Array, _arg3:Material, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number, _arg11:Number):void{
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:int;
var _local19:int;
var _local20:int;
var _local21:int;
var _local22:int;
var _local23:int;
var _local24:int;
var _local25:int;
var _local26:int;
var _local27:int;
var _local28:int;
var _local29:int;
var _local30:int;
var _local31:int;
_local12 = _arg1.length;
_local13 = (_local12 + 1);
_local14 = (_local12 + 2);
_local15 = (_local12 + 3);
_local16 = (_local12 + 4);
_local17 = (_local12 + 5);
_local18 = (_local12 + 6);
_local19 = (_local12 + 7);
_local20 = (_local12 + 8);
_local21 = (_local12 + 9);
_local22 = (_local12 + 10);
_local23 = (_local12 + 11);
_local24 = (_local12 + 12);
_local25 = (_local12 + 13);
_local26 = (_local12 + 14);
_local27 = (_local12 + 15);
_local28 = (_local12 + 16);
_local29 = (_local12 + 17);
_local30 = (_local12 + 18);
_local31 = (_local12 + 19);
createArr(_arg1, (_arg4 - _arg5), _arg6, _arg7, _arg8, _arg9, _arg10, _arg11);
createArr(_arg1, (_arg4 + _arg5), _arg6, _arg7, _arg8, _arg9, _arg10, _arg11);
_arg2.push([_arg3, _local16, _local17, _local13, _local12], [_arg3, _local18, _local19, _local15, _local14], [_arg3, _local20, _local21, _local19, _local16], [_arg3, _local27, _local26, _local22, _local23], [_arg3, _local29, _local28, _local24, _local25], [_arg3, _local31, _local30, _local26, _local29], [_arg3, _local21, _local31, _local25, _local15], [_arg3, _local17, _local27, _local23, _local13], [_arg3, _local28, _local18, _local14, _local24]);
}
private function checkFaceAddTemp(_arg1:Face3D):void{
_arg1.temp = (Math.round((_arg1.mv.y * 100)) == 0);
}
private function createFaceByFaceData(_arg1:Array, _arg2:int):Face3D{
var _local3:Face3D;
_local3 = new Face3D([vertexArr[_arg1[1]], vertexArr[_arg1[2]], vertexArr[_arg1[3]], vertexArr[_arg1[4]]], _arg1[0]);
_local3.mtlBmdId = _arg2;
faceArr.push(_local3);
checkFaceAddTemp(_local3);
return (_local3);
}
}
}//package _game
Section 171
//YouWinTxt (_game.YouWinTxt)
package _game {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class YouWinTxt extends Sprite {
private var effectId:int;
public var letter0:LetterIcon0;
public var letter2:LetterIcon2;
public var letter3:LetterIcon3;
public var letter4:LetterIcon4;
public var letter5:LetterIcon5;
public var letter6:LetterIcon6;
public var letter1:LetterIcon1;
public function init(_arg1:Array):void{
var _local2:int;
_local2 = this.numChildren;
while (--_local2 >= 0) {
this[("letter" + _local2)].visible = _arg1[_local2];
};
}
public function addLetter(_arg1:int):void{
var _local2:int;
this[("letter" + _arg1)].visible = true;
_local2 = this.numChildren;
while (--_local2 >= 0) {
if (!this[("letter" + _local2)].visible){
return;
};
};
trace("全部字母收集完毕!");
effectId = -1;
RunsManager.addRun("effectRun", effectRun, 3, 40);
}
private function effectRun():void{
try {
this[("letter" + effectId)].visible = true;
} catch(e) {
};
if (++effectId >= 7){
effectId = -1;
return;
};
this[("letter" + effectId)].visible = false;
}
}
}//package _game
Section 172
//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 173
//BasicFade (effect.fadeEffect.BasicFade)
package effect.fadeEffect {
import flash.display.*;
import flash.events.*;
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 174
//DuanFade (effect.fadeEffect.DuanFade)
package effect.fadeEffect {
import flash.display.*;
import flash.events.*;
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;
};
EventsManager.addEvent(_local10, Event.ENTER_FRAME, _local10.enterFrame, "enterFrame");
_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.display.*;
import flash.events.*;
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{
EventsManager.removeEvent(this, 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 175
//GridFade (effect.fadeEffect.GridFade)
package effect.fadeEffect {
import flash.display.*;
import flash.events.*;
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 176
//Btn__Normal_Game (framework.btns.Btn__Normal_Game)
package framework.btns {
import ui.*;
public dynamic class Btn__Normal_Game extends SimpleBtn {
}
}//package framework.btns
Section 177
//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 178
//Btn_Attack (framework.btns.Btn_Attack)
package framework.btns {
import ui.*;
public dynamic class Btn_Attack extends SimpleBtn {
}
}//package framework.btns
Section 179
//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 180
//Btn_Best (framework.btns.Btn_Best)
package framework.btns {
import ui.*;
public class Btn_Best extends SimpleBtn {
}
}//package framework.btns
Section 181
//Btn_Change_Faces (framework.btns.Btn_Change_Faces)
package framework.btns {
import ui.*;
public dynamic class Btn_Change_Faces extends SimpleBtn {
}
}//package framework.btns
Section 182
//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 183
//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 184
//Btn_Defence (framework.btns.Btn_Defence)
package framework.btns {
import ui.*;
public dynamic class Btn_Defence extends SimpleBtn {
}
}//package framework.btns
Section 185
//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 186
//Btn_High (framework.btns.Btn_High)
package framework.btns {
import ui.*;
public class Btn_High extends SimpleBtn {
}
}//package framework.btns
Section 187
//Btn_Highlight (framework.btns.Btn_Highlight)
package framework.btns {
import ui.*;
public dynamic class Btn_Highlight extends SimpleBtn {
}
}//package framework.btns
Section 188
//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 189
//Btn_Life (framework.btns.Btn_Life)
package framework.btns {
import ui.*;
public dynamic class Btn_Life extends SimpleBtn {
}
}//package framework.btns
Section 190
//Btn_Load_Game (framework.btns.Btn_Load_Game)
package framework.btns {
import ui.*;
public dynamic class Btn_Load_Game extends SimpleBtn {
}
}//package framework.btns
Section 191
//Btn_Look_Around (framework.btns.Btn_Look_Around)
package framework.btns {
import ui.*;
public dynamic class Btn_Look_Around extends SimpleBtn {
}
}//package framework.btns
Section 192
//Btn_Low (framework.btns.Btn_Low)
package framework.btns {
import ui.*;
public class Btn_Low extends SimpleBtn {
}
}//package framework.btns
Section 193
//Btn_Medium (framework.btns.Btn_Medium)
package framework.btns {
import ui.*;
public class Btn_Medium extends SimpleBtn {
}
}//package framework.btns
Section 194
//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 195
//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 196
//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 197
//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 198
//Btn_No (framework.btns.Btn_No)
package framework.btns {
import ui.*;
public class Btn_No extends SimpleBtn {
}
}//package framework.btns
Section 199
//Btn_OK (framework.btns.Btn_OK)
package framework.btns {
import ui.*;
public class Btn_OK extends SimpleBtn {
}
}//package framework.btns
Section 200
//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 201
//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 202
//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 203
//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 204
//Btn_Read (framework.btns.Btn_Read)
package framework.btns {
import ui.*;
public dynamic class Btn_Read extends SimpleBtn {
}
}//package framework.btns
Section 205
//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 206
//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 207
//Btn_Save (framework.btns.Btn_Save)
package framework.btns {
import ui.*;
public dynamic class Btn_Save extends SimpleBtn {
}
}//package framework.btns
Section 208
//Btn_Save_And_Read (framework.btns.Btn_Save_And_Read)
package framework.btns {
import ui.*;
public dynamic class Btn_Save_And_Read extends SimpleBtn {
}
}//package framework.btns
Section 209
//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 210
//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 211
//Btn_Submit (framework.btns.Btn_Submit)
package framework.btns {
import ui.*;
public class Btn_Submit extends SimpleBtn {
}
}//package framework.btns
Section 212
//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 213
//Btn_Time_Mode (framework.btns.Btn_Time_Mode)
package framework.btns {
import ui.*;
public dynamic class Btn_Time_Mode extends SimpleBtn {
}
}//package framework.btns
Section 214
//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 215
//Btn_X (framework.btns.Btn_X)
package framework.btns {
import ui.*;
public class Btn_X extends SimpleBtn {
public function Btn_X(){
super();
release = function ():void{
this.parent.parent.removeChild(this.parent);
};
}
}
}//package framework.btns
Section 216
//Btn_Yes (framework.btns.Btn_Yes)
package framework.btns {
import ui.*;
public class Btn_Yes extends SimpleBtn {
}
}//package framework.btns
Section 217
//Page_Credits (framework.pages.Page_Credits)
package framework.pages {
import framework.*;
public class Page_Credits extends Page {
}
}//package framework.pages
Section 218
//Page_Game (framework.pages.Page_Game)
package framework.pages {
import _game.*;
import framework.*;
public class Page_Game extends Page {
public function Page_Game(){
addFrameScript(15, frame16);
if (!Game.isGamePageBefore){
SoundManage.moveSound("Main_s1", 10);
};
}
function frame16(){
stop();
}
}
}//package framework.pages
Section 219
//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 220
//Page_Level_Complete (framework.pages.Page_Level_Complete)
package framework.pages {
import framework.*;
public class Page_Level_Complete extends Page {
}
}//package framework.pages
Section 221
//Page_Lose (framework.pages.Page_Lose)
package framework.pages {
import ui.*;
import framework.*;
public class Page_Lose extends Page {
public var scoreTxt:Txt;
public function Page_Lose(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
scoreTxt.text = Main.totalScore;
}
}
}//package framework.pages
Section 222
//Page_Menu (framework.pages.Page_Menu)
package framework.pages {
import framework.*;
public class Page_Menu extends Page {
public function Page_Menu(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package framework.pages
Section 223
//Page_Options (framework.pages.Page_Options)
package framework.pages {
import framework.*;
import framework.btns.*;
public class Page_Options extends Page {
public var btnNormalGame:Btn__Normal_Game;
public var btnTimeMode:Btn_Time_Mode;
public function Page_Options(){
super();
btnNormalGame.release = function ():void{
GameI.playMode = GameI.PLAYMODE_NORMAL;
Main.gotoGame();
};
btnTimeMode.release = function ():void{
GameI.playMode = GameI.PLAYMODE_TIME;
GameI.totalTime = (10 * 60);
Main.gotoGame();
};
}
}
}//package framework.pages
Section 224
//Page_Win (framework.pages.Page_Win)
package framework.pages {
import _game.*;
import ui.*;
import framework.*;
public class Page_Win extends Page {
public var facesBonus:int;
public var levelScoreTxt:Txt;
public var facesBonusTxt:Txt;
public var youWinScoreTxt:Txt;
public var totalScoreTxt:Txt;
public var youWinBonus:int;
public function Page_Win(){
addFrameScript(55, frame56);
}
function frame56(){
stop();
levelScoreTxt.text = Main.totalScore;
if (GameI.totalTime > 0){
Main.addScore(GameI.timeBonus);
this.addChild(new TimeBonus());
};
trace(("GameI.letterArr=" + GameI.letterArr));
trace(("GameI.faceNumArr=" + GameI.faceNumArr));
youWinBonus = ((GameI.letterArr.indexOf(false) >= 0)) ? 0 : 1000;
youWinScoreTxt.text = youWinBonus;
facesBonus = ((GameI.faceNumArr.indexOf(0) >= 0)) ? 0 : 2000;
facesBonusTxt.text = facesBonus;
Main.addScore((youWinBonus + facesBonus));
totalScoreTxt.text = Main.totalScore;
}
}
}//package framework.pages
Section 225
//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 226
//GamePan (framework.GamePan)
package framework {
import flash.display.*;
import flash.events.*;
import ui.*;
public class GamePan extends Sprite {
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{
}
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 227
//Logo (framework.Logo)
package framework {
import flash.display.*;
import flash.events.*;
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 228
//Page (framework.Page)
package framework {
import flash.display.*;
public class Page extends MovieClip {
}
}//package framework
Section 229
//PausePan (framework.PausePan)
package framework {
import flash.display.*;
import flash.events.*;
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_UP, 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_UP, 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 230
//QualitySetting (framework.QualitySetting)
package framework {
import flash.display.*;
import flash.events.*;
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 231
//SubmitScore (framework.SubmitScore)
package framework {
import flash.display.*;
import flash.events.*;
import ui.*;
import flash.net.*;
import framework.btns.*;
import flash.text.*;
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:TextField;
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.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{
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{
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 232
//Top4 (framework.Top4)
package framework {
import flash.display.*;
public dynamic class Top4 extends MovieClip {
}
}//package framework
Section 233
//LoadingTxt (loading.LoadingTxt)
package loading {
import flash.display.*;
import flash.events.*;
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";
this.addEventListener(Event.ENTER_FRAME, run);
this.addEventListener(Event.ADDED_TO_STAGE, added);
}
private function added(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
private function removed(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
onLoadComplete = null;
}
private function run(_arg1:Event):void{
var _local2:int;
_local2 = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100);
txt.text = (_local2 + "%");
if (_local2 == 100){
this.removeEventListener(Event.ENTER_FRAME, run);
onLoadComplete();
};
}
}
}//package loading
Section 234
//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){
Common.stopAll(this);
(root as MovieClip).play();
trace("skip");
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{
if (((root as MovieClip)._mochiad is MovieClip)){
} else {
goNext2();
};
}
public function goNext2():void{
if (protection){
if (((isIn("freeworldgroup.com")) || (isIn("ifungames.com")))){
this.gotoAndStop(3);
} else {
this.gotoAndStop(2);
};
} else {
this.gotoAndStop(3);
};
prevLoader = null;
}
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();
};
}
public static function goNext2():void{
prevLoader.goNext2();
}
}
}//package loading
Section 235
//LocalSetting (localSave.LocalSetting)
package localSave {
import flash.net.*;
import flash.utils.*;
public class LocalSetting {
private var lso:SharedObject;
public var version:Number;
public function LocalSetting(_arg1:String, _arg2:Number=1){
var varName:String;
var str = _arg1;
var _version = _arg2;
super();
str = (str + "_as3");
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];
};
};
};
version = _version;
lso.data.dataObj = this;
}
public function flush(){
lso.flush();
}
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 236
//PlayerInfo (localSave.PlayerInfo)
package localSave {
public class PlayerInfo extends LocalSetting {
public var playerName:String;// = ""
public function PlayerInfo(){
playerName = "";
super("FWGPlayerInfo");
}
}
}//package localSave
Section 237
//UserSave (localSave.UserSave)
package localSave {
public class UserSave extends LocalSetting {
public var isEmpty:Boolean;// = true
public var dataArr:Array;
public function UserSave(_arg1:String, _arg2:int){
var _local3:int;
isEmpty = true;
dataArr = new Array(_arg2);
_local3 = 0;
while (_local3 < _arg2) {
dataArr[_local3] = {time:"", data:null, info:""};
_local3++;
};
super((_arg1 + "UserSave"), 2.5);
}
public function read(_arg1:int){
return (dataArr[_arg1]);
}
public function save(_arg1:int, _arg2):void{
var _local3:Date;
var _local4:Object;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
isEmpty = false;
_local3 = new Date();
_local4 = dataArr[_arg1];
_local5 = _local3.date;
_local6 = (_local3.month + 1);
_local7 = _local3.fullYear;
_local8 = _local3.hours;
_local9 = _local3.minutes;
_local10 = _local3.seconds;
_local4.time = ((((((((((((_local5 < 10)) ? ("0" + _local5) : _local5 + "/") + ((_local6 < 10)) ? ("0" + _local6) : _local6) + "/") + _local7) + " ") + ((_local8 < 10)) ? ("0" + _local8) : _local8) + ":") + ((_local9 < 10)) ? ("0" + _local9) : _local9) + ":") + ((_local10 < 10)) ? ("0" + _local10) : _local10);
_local4.data = _arg2;
_local4.info = ((((((("L:" + _arg2.heroData.lifeValue) + " A:") + _arg2.heroData.attackValue) + " D:") + _arg2.heroData.defenceValue) + " Score:") + _arg2.score);
flush();
}
}
}//package localSave
Section 238
//_game_286 (superd0707_fla._game_286)
package superd0707_fla {
import flash.display.*;
public dynamic class _game_286 extends MovieClip {
public function _game_286(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
this.parent.removeChild(this);
}
}
}//package superd0707_fla
Section 239
//all_mc_12 (superd0707_fla.all_mc_12)
package superd0707_fla {
import flash.display.*;
public dynamic class all_mc_12 extends MovieClip {
public function all_mc_12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package superd0707_fla
Section 240
//ckaa_157 (superd0707_fla.ckaa_157)
package superd0707_fla {
import flash.display.*;
public dynamic class ckaa_157 extends MovieClip {
public function ckaa_157(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package superd0707_fla
Section 241
//FRONTPAGE_77 (superd0707_fla.FRONTPAGE_77)
package superd0707_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import _game.*;
import flash.net.*;
import flash.utils.*;
import framework.btns.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class FRONTPAGE_77 extends MovieClip {
public var btnLoadGame:Btn_Load_Game;
public var btnSkip:Btn_Skip;
public function FRONTPAGE_77(){
addFrameScript(0, frame1, 129, frame130, 154, frame155, 155, frame156);
}
function frame155(){
this.y = 224;
if (SaveAndReadBox.userSave.isEmpty){
stop();
} else {
nextFrame();
};
}
function frame156(){
btnLoadGame.release = function ():void{
this.parent.parent.addChild(new SaveAndReadBox(null, onReadData));
};
}
public function onReadData(_arg1):void{
Game.$data = _arg1;
Main.gotoGame();
}
function frame1(){
SaveAndReadBox.firstInit(Main.game_name, 6);
if (Main.isFirstTimeMenuAnimation){
btnSkip.release = function ():void{
gotoAndStop("f");
};
} else {
gotoAndStop("f");
};
}
function frame130(){
(this.parent as MovieClip).gotoAndPlay(2);
}
}
}//package superd0707_fla
Section 242
//loading_10 (superd0707_fla.loading_10)
package superd0707_fla {
import flash.display.*;
public dynamic class loading_10 extends MovieClip {
public function loading_10(){
addFrameScript(134, frame135);
}
function frame135(){
stop();
(root as MovieClip).play();
}
}
}//package superd0707_fla
Section 243
//loading_3 (superd0707_fla.loading_3)
package superd0707_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import loading.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
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 superd0707_fla
Section 244
//loading_8 (superd0707_fla.loading_8)
package superd0707_fla {
import flash.display.*;
import ui.*;
public dynamic class loading_8 extends MovieClip {
public var txt:Txt;
}
}//package superd0707_fla
Section 245
//MainTimeline (superd0707_fla.MainTimeline)
package superd0707_fla {
import flash.display.*;
import flash.utils.*;
import loading.*;
public dynamic class MainTimeline extends MovieClip {
public var prevLoader:PrevLoader;
public var __id10_:Main;
public var __setPropDict:Dictionary;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
if ((((__setPropDict[__id10_] == undefined)) || (!((int(__setPropDict[__id10_]) == 3))))){
__setPropDict[__id10_] = currentFrame;
__setProp___id10___3();
};
}
function frame1(){
if ((((__setPropDict[prevLoader] == undefined)) || (!((int(__setPropDict[prevLoader]) == 1))))){
__setPropDict[prevLoader] = currentFrame;
__setProp_prevLoader__1();
};
RunsManager.init(this.stage);
KeyManager.init(this.stage);
MochiAd.showPreGameAd({clip:this, ad_finished:PrevLoader.goNext2, id:"18702e812da8f03f", res:"440x320", background:6845841, color:788068, outline:12695210, no_bg:false});
}
function __setProp___id10___3(){
try {
__id10_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id10_.soundNames = "SndHurt,SndKill,SndOpenDoor,SndPickUp,SndStandBlock";
__id10_.musicNames = "Main_s1,Main_s2";
__id10_.fadeType = "坦克宝贝";
__id10_.__game_name = "super_d";
__id10_.skipToGame = false;
try {
__id10_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
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) {
};
}
}
}//package superd0707_fla
Section 246
//wz3_212 (superd0707_fla.wz3_212)
package superd0707_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import _game.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class wz3_212 extends MovieClip {
public var sput1:SpPickUpThing;
public var sput3:SpPickUpThing;
public var sput6:SpPickUpThing;
public var sput0:SpPickUpThing;
public var greyFilter:ColorMatrixFilter;
public var sput5:SpPickUpThing;
public var sput2:SpPickUpThing;
public var sput4:SpPickUpThing;
public function wz3_212(){
addFrameScript(0, frame1, 3, frame4, 6, frame7, 11, frame12, 14, frame15, 18, frame19, 22, frame23, 30, frame31);
}
public function setSput(_arg1:int):void{
var _local2:*;
_local2 = this[("sput" + _arg1)];
_local2.icon.update(PickUpThing.TYPE_LETTER, _arg1);
if (!GameI.letterArr[_arg1]){
_local2.filters = [greyFilter];
};
}
function frame12(){
setSput(3);
}
function frame15(){
setSput(4);
}
function frame7(){
setSput(2);
}
function frame1(){
greyFilter = 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]);
setSput(0);
}
function frame19(){
setSput(5);
}
function frame4(){
setSput(1);
}
function frame23(){
setSput(6);
}
function frame31(){
stop();
}
}
}//package superd0707_fla
Section 247
//Alert (ui.Alert)
package ui {
import flash.display.*;
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 248
//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 249
//MaskRect (ui.MaskRect)
package ui {
import flash.display.*;
import flash.events.*;
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 {
this.addEventListener(Event.ADDED_TO_STAGE, added);
};
}
private function added(_arg1:Event):void{
var event = _arg1;
this.removeEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
try {
getStageWH();
} catch(e:Error) {
this.loaderInfo.addEventListener(Event.INIT, 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{
this.loaderInfo.removeEventListener(Event.INIT, loadInit);
getStageWH();
}
private function removed(_arg1:Event):void{
this.removeEventListener(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 250
//NumClock (ui.NumClock)
package ui {
import flash.display.*;
import flash.events.*;
public class NumClock extends Sprite {
public var onTimeUp:Function;
public var canCount:Function;
private var __totalTime:int;
public var txt:Txt;
private var __time:Number;
public function NumClock(){
canCount = function ():Boolean{
return (true);
};
super();
txt.text = "00:00:00";
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 count(_arg1:Boolean=true):void{
if (_arg1){
time = totalTime;
RunsManager.addRun("NumClock countRun()", countDownRun);
} else {
time = 0;
RunsManager.addRun("NumClock countRun()", countUpRun);
};
}
public function stopCount():void{
RunsManager.removeRun(countDownRun);
RunsManager.removeRun(countUpRun);
}
public function get totalTime():int{
return (__totalTime);
}
public function countUpRun():void{
if (canCount()){
time = (time + (1 / 30));
};
}
private function timeUp():void{
stopCount();
onTimeUp();
}
public function set totalTime(_arg1:int):void{
time = (__totalTime = _arg1);
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
stopCount();
}
public function set time(_arg1:Number):void{
txt.text = numToTime((__time = _arg1));
}
public function countDownRun():void{
var _local1:Number;
if (canCount()){
_local1 = (time - (1 / 30));
if (_local1 <= 0){
_local1 = 0;
timeUp();
};
time = _local1;
};
}
public function get time():Number{
return (__time);
}
public static function numToTime(_arg1:Number):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:*;
_local2 = ((int((_arg1 * 100)) % 100) * 0.6);
_arg1 = int(_arg1);
_local3 = (_arg1 % 60);
_local4 = ((_arg1 - _local3) / 60);
_local5 = "";
if (_local4 < 10){
_local5 = (_local5 + "0");
};
_local5 = (_local5 + (_local4 + ":"));
if (_local3 < 10){
_local5 = (_local5 + "0");
};
_local5 = (_local5 + (_local3 + ":"));
if (_local2 < 10){
_local5 = (_local5 + "0");
};
_local5 = (_local5 + _local2);
return (_local5);
}
}
}//package ui
Section 251
//SimpleBtn (ui.SimpleBtn)
package ui {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.geom.*;
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, false);
};
}
private function actionRelease():void{
if (__bGrey){
errorAction();
} else {
release();
};
}
private function rollOverDelay():void{
if (__toolTip){
ToolTipClass.show(__toolTip);
};
rollOver();
}
private function $onRollOver(_arg1:MouseEvent):void{
if (__bGrey){
return;
};
if (!__selected){
this.gotoAndStop(overId);
};
RunsManager.addRun("rollOverDelay", rollOverDelay, 1, 1, false);
}
private function $onPress(_arg1:MouseEvent):void{
if (__bGrey){
return;
};
if (!__selected){
this.gotoAndStop(downId);
};
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{
if (__bGrey){
return;
};
if (!__selected){
this.gotoAndStop(upId);
};
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 (__toolTip){
ToolTipClass.hide();
};
press();
}
private function $onRelease(_arg1:MouseEvent):void{
if (((!(__selected)) && (!(__bGrey)))){
this.gotoAndStop(overId);
};
RunsManager.addRun("prevReleaseDelay", prevReleaseDelay, 1, 1, false);
}
private function rollOutDelay():void{
if (__toolTip){
ToolTipClass.hide();
};
if (rollOut != null){
rollOut();
} else {
trace("按钮被去掉时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);
RunsManager.removeRun(rollOverDelay);
RunsManager.removeRun(rollOutDelay);
RunsManager.removeRun(pressDelay);
RunsManager.removeRun(prevReleaseDelay);
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{
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 get selected():Boolean{
return (__selected);
}
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 252
//ToolTip (ui.ToolTip)
package ui {
import flash.display.*;
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);
hideDelay();
} else {
trace("请在调用show前放一个ToolTip在场景里^_^");
};
}
}
}//package ui
Section 253
//Txt (ui.Txt)
package ui {
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 ui
Section 254
//Typewriter (ui.Typewriter)
package ui {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Typewriter extends Sprite {
public var totalDelayTime:int;
private var fix:Boolean;
public var txt:Txt;
private var currentId:int;
private var msg:String;
private var delayTime:int;
public function Typewriter(_arg1:int=90){
totalDelayTime = _arg1;
txt.text = "";
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 hide():void{
msg = "";
txt.text = "";
RunsManager.removeRun(typeRun);
}
private function removed(_arg1:Event):void{
EventsManager.removeEvent(this, Event.REMOVED_FROM_STAGE, removed);
RunsManager.removeRun(typeRun);
}
private function typeRun():void{
if (msg == ""){
txt.text = "";
RunsManager.removeRun(typeRun);
return;
};
if (currentId >= msg.length){
if (--delayTime <= 0){
delayTime = totalDelayTime;
if (!fix){
hide();
} else {
txt.text = msg;
RunsManager.removeRun(typeRun);
};
return;
};
txt.text = (msg + (((int((getTimer() / 500)) % 2) == 0)) ? "_" : "");
} else {
currentId++;
txt.text = (msg.substr(0, currentId) + (((int((getTimer() / 500)) % 2) == 0)) ? "_" : "");
};
}
public function show(_arg1:String, _arg2:Boolean=false):void{
if (msg == _arg1){
return;
};
fix = _arg2;
delayTime = totalDelayTime;
msg = _arg1;
currentId = 0;
txt.text = "";
RunsManager.removeRun(typeRun);
RunsManager.addRun("typeRun", typeRun);
}
}
}//package ui
Section 255
//Common (Common)
package {
import flash.display.*;
import flash.utils.*;
public final class Common {
public static function deepCopy(_arg1:Object){
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
return (_local2.readObject());
}
public static function removeChildren(_arg1:DisplayObjectContainer):void{
while (_arg1.numChildren > 0) {
_arg1.removeChildAt(0);
};
}
public static function playAll(_arg1:DisplayObject, _arg2:Boolean=true){
var _local3:DisplayObjectContainer;
var _local4:int;
if ((_arg1 is DisplayObjectContainer)){
_local3 = (_arg1 as DisplayObjectContainer);
_local4 = _local3.numChildren;
while (--_local4 >= 0) {
playAll(_local3.getChildAt(_local4), true);
};
if (((_arg2) && ((_arg1 is MovieClip)))){
(_arg1 as MovieClip).play();
};
};
}
public static function stopAll(_arg1:DisplayObject, _arg2:Boolean=true){
var _local3:DisplayObjectContainer;
var _local4:int;
if ((_arg1 is DisplayObjectContainer)){
_local3 = (_arg1 as DisplayObjectContainer);
_local4 = _local3.numChildren;
while (--_local4 >= 0) {
stopAll(_local3.getChildAt(_local4), true);
};
if (((_arg2) && ((_arg1 is MovieClip)))){
(_arg1 as MovieClip).stop();
};
};
}
}
}//package
Section 256
//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):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) {
removeEvent(_local3, _local1, _local5);
};
};
};
} else {
trace("要想使用EventsManager.removeAll(),请把EventsManager.checkEvents设置为true");
};
}
}
}//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]){
trace(((("重复添加:obj=" + _arg1) + ",listenerInfo=") + _arg3));
return;
};
if (_arg3){
_local4[_arg2] = _arg3;
_local4.total++;
} else {
trace(("不要使用布尔值为false的info:" + _arg3));
};
}
public function removeData(_arg1, _arg2:Function):void{
var _local3:DictObjItem;
_local3 = this[_arg1];
if (_local3 == null){
trace((("找不到要删的:obj=" + _arg1) + "(多出现于\"为了安全起见而在没有的情况下还是删一删比较保险\"的情况)"));
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 257
//GameI (GameI)
package {
public final class GameI {
public static const PLAYMODE_NORMAL:String = "normal";
public static const PLAYMODE_TIME:String = "time";
public static var totalTime:Number;
public static var timeBonus:int;
public static var playMode:String;
public static var faceNumArr:Array;
public static var letterArr:Array;
public static var youWinScore:int;
}
}//package
Section 258
//KeyManager (KeyManager)
package {
import flash.events.*;
public final class KeyManager {
public static var onKeyDown:Function = function (_arg1:int){
};
public static var keyArr:Array;
public static var prevKeyArr:Array;
public static var onKeyUp:Function = function (_arg1:int){
};
private static function keyDown(_arg1:KeyboardEvent):void{
if (!keyArr[_arg1.keyCode]){
keyArr[_arg1.keyCode] = true;
onKeyDown(_arg1.keyCode);
};
}
public static function isDown(_arg1:int):Boolean{
if (keyArr){
return (keyArr[_arg1]);
};
return (false);
}
public static function init(_arg1):void{
var _local2:int;
EventsManager.addEvent(_arg1, KeyboardEvent.KEY_DOWN, keyDown, "KeyManager.keyDown");
EventsManager.addEvent(_arg1, KeyboardEvent.KEY_UP, keyUp, "KeyManager.keyUp");
prevKeyArr = new Array(0x0100);
keyArr = new Array(0x0100);
_local2 = 0;
while (_local2 < 0x0100) {
prevKeyArr[_local2] = false;
keyArr[_local2] = false;
_local2++;
};
}
private static function keyUp(_arg1:KeyboardEvent):void{
keyArr[_arg1.keyCode] = false;
onKeyUp(_arg1.keyCode);
}
}
}//package
Section 259
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
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 StageSelecterClass;
public static var hasReadInstructions:Boolean;
public static var currPageClass:Class;
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 prevPageClass:Class;
public static var game_name:String = "";
public static var main:Main;
public static var qualitySetting:QualitySetting;
public static var levelNum:int;
private static var btnSubmitScore:Btn_Submit_Score;
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 get currScore():int{
return (__currScore);
}
public static function linkToFWG(_arg1:MouseEvent=null):void{
getURL("http://www.freeworldgroup.com");
}
public static function set currScore(_arg1:int):void{
GamePan.currScore = (__currScore = _arg1);
}
private static function init(_arg1:Event):void{
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 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 !");
};
}
public static function pauseF():void{
if (RunsManager.pause){
return;
};
container.addChild(new PausePan());
}
public static function levelSave():void{
trace("保存当前关");
if (StageSelecterClass){
StageSelecterClass.stageSave.unLock((levelNum + 1));
};
}
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.playCurrMusic();
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 gotoCredits():void{
flipTo(Page_Credits);
}
public static function gotoLevelComplete():void{
flipTo(Page_Level_Complete);
}
public static function gotoOptions():void{
flipTo(Page_Options);
}
public static function get totalScore():int{
return (__totalScore);
}
public static function showQuality():void{
container.addChild(new QualitySetting());
}
public static function retry():void{
gotoOptions();
}
public static function reset():void{
currScore = (totalScore = 0);
levelNum = 1;
}
public static function nextLevel():void{
levelNum++;
gotoGame();
}
public static function flipTo(_arg1:Class):void{
prevPageClass = currPageClass;
currPageClass = _arg1;
SoundManage.isTrueStopSound();
switch (main.fadeType){
case "动画":
main.addChild(new AnimationFade());
break;
case "马赛克":
main.addChild(new GridFade());
break;
default:
DuanFade.start(main.root);
break;
};
while (container.numChildren > 0) {
container.removeChildAt(0);
};
container.addChild((page = new (_arg1)));
}
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 levelComplete():void{
if (levelNum >= totalLevel){
win();
} else {
levelSave();
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 gotoLevel(_arg1:int):void{
levelNum = _arg1;
gotoGame();
}
public static function set totalScore(_arg1:int):void{
GamePan.totalScore = (__totalScore = _arg1);
}
public static function replay():void{
reset();
gotoOptions();
}
public static function gotoMenu():void{
flipTo(Page_Menu);
reset();
}
public static function win():void{
gotoWin();
}
public static function addScore(_arg1:int):void{
currScore = (currScore + _arg1);
totalScore = (totalScore + _arg1);
}
public static function gotoGame():void{
currScore = 0;
flipTo(Page_Game);
}
public static function gotoWin():void{
flipTo(Page_Win);
}
}
}//package
Section 260
//Main_s1 (Main_s1)
package {
import flash.media.*;
public dynamic class Main_s1 extends Sound {
}
}//package
Section 261
//Main_s2 (Main_s2)
package {
import flash.media.*;
public dynamic class Main_s2 extends Sound {
}
}//package
Section 262
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, 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");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
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_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
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");
}, ad_skipped:function ():void{
}};
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.adSkipped = options.ad_skipped;
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);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
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 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
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 _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 _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 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 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;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
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?cacheBust=") + new Date().getTime()));
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 runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
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 sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, 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");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
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);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
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.adSkipped = options.ad_skipped;
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;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
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);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
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 showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
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 263
//RunsManager (RunsManager)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public final class RunsManager {
public static const WANT_TO_REMOVE:String = "want to remove";
private static var addArr:Array = new Array();
public static var frameId:int = 0;
public static var pause:Boolean;
private static var runArr:Array = new Array();
public static function removeAll():void{
runArr = new Array();
addArr = new Array();
}
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;
};
addArr.push(new RunObj(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public static function run(... _args):void{
var _local2:*;
var _local3:*;
frameId++;
runArr = runArr.concat(addArr);
addArr = new Array();
for (_local3 in runArr) {
if (runArr[_local3] == WANT_TO_REMOVE){
runArr.splice(_local3, 1);
};
};
if (pause){
for each (_local2 in runArr) {
if (_local2 == WANT_TO_REMOVE){
} else {
if (!_local2.pauseAble){
_local2.run();
if (_local2.times <= 0){
removeRun(_local2.runF);
};
};
};
};
} else {
for each (_local2 in runArr) {
if (_local2 == WANT_TO_REMOVE){
} else {
_local2.run();
if (_local2.times <= 0){
removeRun(_local2.runF);
};
};
};
};
}
public static function removeRun(_arg1:Function):void{
var _local2:int;
var _local3:*;
_local2 = 0;
for each (_local3 in runArr) {
if (_local3.runF == _arg1){
runArr.splice(_local2, 1);
return;
};
_local2++;
};
}
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:*;
_local1 = 0;
_local2 = "";
for each (_local3 in runArr) {
if (_local3 == WANT_TO_REMOVE){
} else {
_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 264
//SndHurt (SndHurt)
package {
import flash.media.*;
public dynamic class SndHurt extends Sound {
}
}//package
Section 265
//SndKill (SndKill)
package {
import flash.media.*;
public dynamic class SndKill extends Sound {
}
}//package
Section 266
//SndOpenDoor (SndOpenDoor)
package {
import flash.media.*;
public dynamic class SndOpenDoor extends Sound {
}
}//package
Section 267
//SndPickUp (SndPickUp)
package {
import flash.media.*;
public dynamic class SndPickUp extends Sound {
}
}//package
Section 268
//SndStandBlock (SndStandBlock)
package {
import flash.media.*;
public dynamic class SndStandBlock extends Sound {
}
}//package
Section 269
//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;
private static var currMusicName:String;
public static function setChannelVolume(_arg1:SoundChannel, _arg2:Number):void{
var _local3:SoundTransform;
if (_arg1){
_local3 = _arg1.soundTransform;
_local3.volume = _arg2;
_arg1.soundTransform = _local3;
};
}
public static function stopMusic(... _args){
stopSound2(musicList, "stop", _args);
}
public static function addMusic(... _args){
addSound2(musicList, _args);
}
public static function moveSound(_arg1:String, _arg2:int, _arg3:Number=1, _arg4:Number=0, _arg5:int=1):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);
};
};
setChannelVolume(_local6.channel, _arg3);
_local6.intervalId = setInterval(_local6.setSound, 30);
}
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){
currMusicName = _args[0];
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) {
setChannelVolume(musicList[_local1].channel, musicList[_local1].vol);
};
}
public static function getChannelVolume(_arg1:SoundChannel):Number{
return (_arg1.soundTransform.volume);
}
public static function returnSound(){
var _local1:*;
isSoundPlay = true;
for (_local1 in soundList) {
setChannelVolume(soundList[_local1].channel, soundList[_local1].vol);
};
}
public static function isTrueStopSound(... _args){
stopSound2(soundList, "stop", _args);
}
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) {
if (_arg1[_arg3[_local4]].channel){
_arg1[_arg3[_local4]].channel.stop();
};
};
} else {
for (_local4 in _arg1) {
if (_arg1[_local4].channel){
_arg1[_local4].channel.stop();
};
};
};
break;
default:
if (_arg3.length > 0){
for (_local4 in _arg3) {
setChannelVolume(_arg1[_arg3[_local4]].channel, 0);
};
} else {
for (_local4 in _arg1) {
setChannelVolume(_arg1[_local4].channel, 0);
};
};
break;
};
}
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){
trace(("找不到声音:" + _local3));
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);
};
setChannelVolume(_local6.channel, _local5);
}
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;
};
setChannelVolume(_local8.channel, _local8.vol);
};
};
};
};
}
public static function stopSound(... _args){
stopSound2(soundList, "stop", _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 playCurrMusic():void{
isMusicPlay = true;
playMusic(currMusicName, 999999);
}
}
}//package
import flash.media.*;
import flash.utils.*;
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{
if (SoundManage.getChannelVolume(channel) <= 0){
if (startVol > endVol){
clearInterval(intervalId);
channel.stop();
return;
};
};
if (++currTime >= totalTime){
clearInterval(intervalId);
};
SoundManage.setChannelVolume(channel, (startVol + ((endVol - startVol) * (currTime / totalTime))));
}
}
Section 270
//TestMovieClip (TestMovieClip)
package {
import flash.display.*;
public class TestMovieClip extends MovieClip {
public var oldFrame:int;
public static var totalPlayingMc:int;
public static var totalTmc:int = 0;
public static var tmcArr:Array;
public function TestMovieClip(){
if (totalTmc == 0){
tmcArr = new Array();
RunsManager.addRun("checkRun", checkRun, 1, 0, false);
};
totalTmc++;
tmcArr.push(this);
}
public static function checkRun():void{
var depth:int;
var tmc:TestMovieClip;
var currentFrame:int;
totalPlayingMc = 0;
depth = 0;
for each (tmc in tmcArr) {
if ((tmc.parent is MovieClip)){
currentFrame = (tmc.parent as MovieClip).currentFrame;
if (tmc.oldFrame != currentFrame){
totalPlayingMc++;
tmc.oldFrame = currentFrame;
depth = (depth - 1);
if ((depth - 1) >= 0){
try {
trace("--");
trace(tmc.parent);
trace(tmc.parent.parent);
trace(tmc.parent.parent.parent);
trace(tmc.parent.parent.parent.parent);
depth = (depth + 1);
} catch(e) {
};
};
};
};
};
}
}
}//package