Section 1
//MoveObject (com.gq.moveobject.MoveObject)
package com.gq.moveobject {
import flash.display.*;
import com.gq.system.*;
public class MoveObject {
protected var flashing:Boolean;
public var states:String;
public var finalSpeedX:Number;// = 0
public var finalSpeedY:Number;// = 0
public var finalSpeedZ:Number;// = 0
public var myMcName:String;
public var invincible:Boolean;
public var myX:Number;
public var myY:Number;
public var myZ:Number;
public var myXRect:uint;
protected var whichFrameReady:int;
public var positionIn:Array;
protected var shadow_FI:Array;
public var myCamp:String;// = ""
protected var currentChooseColor:uint;// = 1
public var restoreSpeed:Number;// = 0.2
public var nowCollisionObj:MovieClip;
public var totalLife:Number;// = 1
protected var dead:Boolean;
public var g:Number;// = 1
public var nowLandHeight:String;
public var damageArr:Array;
protected var myFrameSound:Array;
public var upThingsArr:Array;
protected var body_FI:Array;
protected var lash_FI:Array;
protected var whichFrameReturn:int;
public var myCurrentPositionX:int;
public var deleteMe:Boolean;
protected var cannon_height:Number;
public var restoreLife:Number;
public var pushSpeedX:Number;// = 0
public var pushSpeedY:Number;// = 0
public var pushSpeedZ:Number;// = 0
public var invinciTime:uint;// = 70
public var invinciCount:uint;
protected var jumpSpeed:Number;// = -15
public var myCurrentPositionY:int;
public var myHandObj:MoveObject;
protected var nowMoveSpeed:Number;// = 7
public var can_beat:Boolean;
public var myLife:Number;// = 500
public var notAdd:Boolean;
protected var myOldX:Number;
protected var myOldY:Number;
protected var injureRate:Number;// = 1
protected var current_cd:uint;
public var shoot_count:uint;
public var can_shoot:Boolean;
public var speedX:Number;// = 0
public var speedY:Number;// = 0
public var speedZ:Number;// = 0
public var myCanHandObj:MoveObject;
protected var deadCount:uint;
public var myMaster:MoveObject;
public var myHiter:Array;
public var createId:uint;
public var type:String;// = ""
protected var mouth_FI:Array;
protected var myCurrentFrame:int;
public var myDir:int;// = 1
public var myRotation:Number;
public var myReady:Boolean;// = true
protected var bulletType:uint;
public var currentEyeType:uint;// = 1
public var positionOut:Array;
public var distScaleOut:Number;// = 0.8
public var distX:Number;
public var distY:Number;
public var myParent:Sprite;
public var _this:MovieClip;
public var hiter:MoveObject;
protected var can_collision:Boolean;
public var can_action:Boolean;// = true
public var action_index:uint;
protected var walkPath:Array;
protected var eye_FI:Array;
public var myActionFinished:Boolean;// = true
public var distScaleIn:Number;// = 1
public var myYRect:uint;
public var distPostionZ:Number;// = 0
public var bloodBar:MovieClip;
public var collisionObjArr:Array;
public var myClipName:String;// = ""
public var noSpeedMode:Boolean;
public var myID:uint;
public var speedAll:Number;
protected var whichFrameFinished:int;
public var land:Boolean;
public var blockedX:Boolean;
public var blockedY:Boolean;
protected var myShootEffectName:String;// = ""
protected var face_FI:Array;
protected var myFrameEvent:Array;
protected var cd_time:uint;
public var data_index:uint;
public function MoveObject():void{
myHiter = new Array();
damageArr = [10, 1, 1];
upThingsArr = new Array();
collisionObjArr = new Array();
super();
face_FI = [1, 1, 23, [23], null];
shadow_FI = [1, 1, 22, [22], null];
body_FI = [1, 1, 19, [19], null];
lash_FI = [1, 1, 18, [18], null];
mouth_FI = [1, 1, 19, [19], null];
eye_FI = [1, 1, 4, [4], null];
initData();
}
protected function hitTestObj():void{
}
public function addMc():void{
if (((!((_this == null))) && (!((myParent == null))))){
myParent.addChild(_this);
notAdd = false;
};
}
protected function eye_over():void{
_this.eyelash.visible = true;
changePic("eyelash", (currentEyeType + ((currentChooseColor - 1) * 4)));
states = "";
_this.mc.gotoAndStop("empty");
}
public function HurtMe(_arg1:int, _arg2:uint, _arg3:Number):void{
myLife = (myLife - _arg1);
}
protected function eye_Func():void{
_this.eyelash.visible = false;
}
protected function hitTestZ():void{
}
public function pauseMe():void{
if (_this.mc != null){
_this.mc.stop();
};
}
protected function hitTestX():void{
}
public function changeFrameAction(_arg1:MovieClip, _arg2:String):void{
myCurrentFrame = 1;
GameTools.gotoFrame(_arg1, _arg2);
whichFrameReady = this[(_arg2 + "_FI")][0];
whichFrameFinished = this[(_arg2 + "_FI")][1];
whichFrameReturn = this[(_arg2 + "_FI")][2];
myFrameEvent = this[(_arg2 + "_FI")][3];
myFrameSound = this[(_arg2 + "_FI")][4];
if ((whichFrameReady + whichFrameFinished) > 2){
myReady = false;
myActionFinished = false;
};
}
protected function getFloor():void{
}
protected function hitTestMap():void{
getFloor();
hitTestX();
hitTestZ();
}
protected function switchStates():void{
try {
var _local2 = this;
_local2[(states + "_Func")]();
} catch(e) {
};
}
protected function shadow_over():void{
changePic("shadow", currentChooseColor);
_this.mc.gotoAndStop("empty");
}
public function resumeMe():void{
if (_this.mc != null){
_this.mc.play();
};
}
protected function initMyData():void{
myLife = totalLife;
controlMc();
nowLandHeight = ((myZ)==0) ? "Up" : "Down";
}
public function selectMode():void{
if (GameData.currentClickObj){
GameTools.addFilters(GameData.currentClickObj, []);
};
_this.startDrag();
GameData.currentClickObj = _this;
GameTools.addFilters(_this, GameData.redFilters);
_this.parent.addChild(_this);
}
protected function judgeMyPostion():Boolean{
var _value:Boolean;
try {
_value = GameData[("mapArr" + nowLandHeight)][myXRect][myYRect];
} catch(e) {
trace("地图出错");
_value = false;
};
return (_value);
}
protected function hitTestWho(_arg1:String):void{
var _local3:MovieClip;
var _local2:uint;
while (_local2 < GameData[_arg1].numChildren) {
_local3 = (GameData[_arg1].getChildAt(_local2) as MovieClip);
_local2++;
};
}
public function initData():void{
states = "stand";
}
protected function restoreState():void{
if (myFrameEvent != null){
if (myCurrentFrame == Number(myFrameEvent[0])){
try {
var _local2 = this;
_local2[(states + "_over")]();
} catch(e) {
};
};
};
if (myCurrentFrame == whichFrameReady){
myReady = true;
};
if (myCurrentFrame >= whichFrameFinished){
myActionFinished = true;
};
if (myCurrentFrame >= whichFrameReturn){
myCurrentFrame = 0;
};
myCurrentFrame++;
}
protected function stayInSky():void{
if (type != "fly"){
speedZ = (speedZ + g);
};
if (speedZ > 20){
speedZ = 20;
};
}
public function updataEvent():void{
}
protected function shadow_Func():void{
}
protected function getMyPosition(_arg1:Number, _arg2:Number):void{
myCurrentPositionX = Math.floor((_arg1 / GameData.rectWidth));
myCurrentPositionY = Math.floor((_arg2 / GameData.rectHeight));
}
public function scaleDown():void{
if (Math.abs(_this.scaleX) > 0.2){
_this.scaleX = (_this.scaleX - (0.1 * GameTools.getTab(_this.scaleX)));
_this.scaleY = Math.abs(_this.scaleX);
distScaleOut = _this.scaleX;
};
}
public function init(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String=""):void{
myX = _arg1;
myY = _arg2;
myZ = _arg3;
}
public function initSpeed(_arg1:Boolean=false):void{
speedX = 0;
speedY = 0;
if (_arg1){
speedZ = 0;
};
}
public function removeMe():void{
if (bloodBar != null){
bloodBar.removeMe();
};
GameTools.unPushArr(GameData.actionArr, this);
GameTools.unPushArr(GameData.objectArr, this);
GameTools.unPushArr(GameData.objInScreenArr, this);
if (((!((_this == null))) && (!((_this.parent == null))))){
_this.parent.removeChild(_this);
_this = null;
};
defaultData();
}
public function removeMc():void{
if (_this != null){
myParent = (_this.parent as Sprite);
myParent.removeChild(_this);
notAdd = true;
};
}
protected function mouth_over():void{
changePic("mouth", currentChooseColor);
_this.mc.gotoAndStop("empty");
}
protected function body_over():void{
changePic("body", currentChooseColor);
_this.mc.gotoAndStop("empty");
}
protected function mouth_Func():void{
_this.mc.mc.mc.gotoAndStop(currentChooseColor);
}
protected function body_Func():void{
}
protected function lash_over():void{
changePic("eyelash", (currentEyeType + ((currentChooseColor - 1) * 4)));
_this.mc.gotoAndStop("empty");
}
protected function testWhere(_arg1:Array, _arg2:MoveObject, _arg3:MovieClip, _arg4:Array, _arg5:uint=1):Boolean{
var _local6:Boolean;
var _local8:MoveObject;
var _local7:uint;
while (_local7 < _arg1.length) {
_local8 = (_arg1[_local7] as MoveObject);
if ((((((GameTools.getDistance(_local8.myX, _local8.myZ, _arg2.myX, _arg2.myZ) < 200)) && ((Math.abs((_local8.myY - _arg2.myY)) < 20)))) && ((_local8.myLife > 0)))){
if (GameTools.hitTest(_local8._this, _arg3, _arg5)){
_local8.HurtMe(damageArr[0], damageArr[1], damageArr[2]);
trace("打中");
};
};
_local7++;
};
return (_local6);
}
protected function changeData():void{
myX = (myX + speedX);
myY = (myY + speedY);
}
protected function addHitEffect(_arg1:uint, _arg2:MoveObject):void{
}
protected function face_Func():void{
}
protected function lash_Func():void{
_this.mc.mc.mc.gotoAndStop(currentChooseColor);
}
protected function defaultData():void{
myCanHandObj = null;
hiter = null;
myMaster = null;
}
public function scaleUp():void{
if (Math.abs(_this.scaleX) < 3){
_this.scaleX = (_this.scaleX + (0.1 * GameTools.getTab(_this.scaleX)));
_this.scaleY = Math.abs(_this.scaleX);
distScaleOut = _this.scaleX;
};
}
protected function Fall():void{
}
protected function face_over():void{
changePic("face", currentChooseColor);
_this.mc.gotoAndStop("empty");
}
protected function flashMe():void{
if (_this != null){
_this.alpha = (deadCount % 2);
};
if (++deadCount == 30){
deleteMe = true;
};
}
protected function getBlocked():void{
}
public function createMe(_arg1:Sprite, _arg2:String, _arg3:int, _arg4:String, _arg5:Array):void{
myMcName = _arg2;
var _local6:Class = GameTools.getMeBySwf(_arg4, _arg2);
var _local7:MovieClip = new (_local6);
_arg1.addChild(_local7);
_this = _local7;
_this["myHost"] = this;
data_index = (uint(_arg2.substring((_arg2.indexOf("_") + 1), _arg2.length)) - 1);
distX = (_this.width / 2);
distY = _this.height;
walkPath = _arg5;
initMyData();
}
protected function addMyPart(_arg1:uint, _arg2:String):void{
var _local3:uint;
while (_local3 < _arg1) {
GameSys.addEffects(GameData.personContainer, "ClipEffect", _arg2, myX, myY, myZ);
_local3++;
};
}
public function changePic(_arg1:String, _arg2:uint):void{
}
public function changeStates(_arg1:String, _arg2:Boolean=true):void{
states = _arg1;
changeFrameAction(_this.mc, _arg1);
}
public function controlMc():void{
if (_this != null){
_this.x = myX;
_this.y = (myY + myZ);
_this.scaleX = myDir;
};
}
protected function controlMe():void{
}
}
}//package com.gq.moveobject
Section 2
//Objects (com.gq.moveobject.Objects)
package com.gq.moveobject {
import flash.display.*;
import com.gq.system.*;
public class Objects extends MovieClip {
private var speedX:Number;// = 0
private var speedY:Number;// = 0
private var landLine:Number;
public function Objects(_arg1:uint):void{
var which = _arg1;
super();
try {
gotoAndStop(which);
initMyData();
} catch(e) {
};
}
public function updataEvent():void{
moveAction();
changeData();
}
protected function initMyData():void{
speedY = 20;
GameTools.pushArr(GameData.can_clickArr, this);
GameTools.pushArr(GameData.actionArr, this);
x = ((Math.random() * (GameData.screenWidth - 50)) + 25);
y = 0;
buttonMode = true;
landLine = 450;
}
private function moveAction():void{
if ((y + speedY) >= landLine){
speedY = (speedY * -0.3);
if (Math.abs(speedY) < 1){
speedY = 0;
y = landLine;
GameTools.unPushArr(GameData.actionArr, this);
};
} else {
speedY = (speedY + 1);
};
}
private function changeData():void{
x = (x + speedX);
y = (y + speedY);
}
public function removeMe():void{
parent.removeChild(this);
GameTools.unPushArr(GameData.actionArr, this);
GameTools.unPushArr(GameData.can_clickArr, this);
}
}
}//package com.gq.moveobject
Section 3
//ShowGirl (com.gq.moveobject.ShowGirl)
package com.gq.moveobject {
import flash.display.*;
import flash.events.*;
import com.gq.system.*;
public class ShowGirl extends MoveObject {
public var currentMode:String;// = ""
public function ShowGirl():void{
}
public function change_lash(_arg1:uint):void{
currentChooseColor = _arg1;
changeStates("lash");
}
private function mouseDownHd(_arg1:MouseEvent):void{
if ((((currentMode == "")) && ((GameData.can_clickArr.indexOf(this) == -1)))){
changeMode(_arg1.target.name);
};
}
override protected function initMyData():void{
var _local2:MovieClip;
positionIn = GameDesignClass.waitPositionArr[0];
positionOut = GameDesignClass.waitPositionArr[1];
GameData.showGirl = this;
controlMc();
var _local1:uint;
while (_local1 < _this.numChildren) {
_local2 = (_this.getChildAt(_local1) as MovieClip);
if ((((((((((((((((_local2.name == "shirt")) || ((_local2.name == "sweater")))) || ((_local2.name == "coat")))) || ((_local2.name == "skirt")))) || ((_local2.name == "trousers")))) || ((_local2.name == "shooes")))) || ((_local2.name == "hat")))) || ((_local2.name == "headdress")))){
_local2.buttonMode = true;
};
if ((((((((((_local2.name == "hair")) || ((_local2.name == "shirt")))) || ((_local2.name == "body")))) || ((_local2.name == "eyelash")))) || ((_local2.name == "mc")))){
_local2.gotoAndStop(1);
} else {
_local2.visible = false;
};
_local1++;
};
_this.mc.gotoAndStop("empty");
_this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHd);
_this.stop();
}
public function change_lashstyle(_arg1:uint):void{
changeStates("eye");
}
public function change_headdress(_arg1:uint):void{
changePic("headdress", _arg1);
}
public function change_eye(_arg1:uint):void{
changeStates("eye");
currentChooseColor = _arg1;
changePic("eye", currentChooseColor);
}
public function change_hat(_arg1:uint):void{
changePic("hat", _arg1);
}
public function change_shadow(_arg1:uint):void{
changeStates("shadow");
currentChooseColor = _arg1;
}
public function change_hair(_arg1:uint):void{
if ((_this.hair.currentFrame % 8) != (_arg1 % 8)){
GameData.map.myBtns.head.gotoAndStop((((_arg1 - 1) % 8) + 1));
GameData.map.myBtns.hat.gotoAndStop((((_arg1 - 1) % 8) + 1));
_this.headdress.visible = false;
_this.hat.visible = false;
};
_this.hair.gotoAndStop(_arg1);
}
private function changeMode(_arg1:String):void{
if ((((((((((((((((((((_arg1 == "sweater")) || ((_arg1 == "coat")))) || ((_arg1 == "skirt")))) || ((_arg1 == "shooes")))) || ((_arg1 == "trousers")))) || ((_arg1 == "hat")))) || ((_arg1 == "headdress")))) || ((_arg1 == "bag")))) || ((_arg1 == "muffler")))) || ((_arg1 == "glove")))){
_this[_arg1].visible = false;
} else {
if (_arg1 == "shirt"){
_this.shirt.gotoAndStop(1);
};
};
if (_arg1 == "bag"){
GameData.map.myBtns[("bag_" + uint(_this.bag.currentFrame))].visible = true;
};
}
override public function updataEvent():void{
switchStates();
restoreState();
if (currentMode == "out"){
moveOut();
} else {
if (currentMode == "in"){
moveIn();
};
};
}
private function moveIn():void{
var _local1:Number = (positionIn[0] - _this.x);
var _local2:Number = (positionIn[1] - _this.y);
if ((((Math.abs(_local1) < 5)) && ((Math.abs(_local2) < 5)))){
currentMode = "";
_this.scaleX = (_this.scaleY = distScaleIn);
GameData.moveObjectContainer.visible = false;
} else {
_this.x = (_this.x + (_local1 / 10));
_this.y = (_this.y + (_local2 / 10));
_this.scaleX = (_this.scaleY = (_this.scaleY + ((distScaleIn - _this.scaleX) / 10)));
GameData.Scen.addChild(_this);
GameData.moveObjectContainer.alpha = (GameData.moveObjectContainer.alpha - 0.05);
};
}
public function change_bag(_arg1:uint):void{
changePic("bag", _arg1);
}
override public function changePic(_arg1:String, _arg2:uint):void{
if (!_this[_arg1].visible){
_this[_arg1].visible = true;
};
_this[_arg1].gotoAndStop(_arg2);
}
public function change_face(_arg1:uint):void{
changeStates("face");
currentChooseColor = _arg1;
}
private function moveOut():void{
var _local2:Number;
var _local1:Number = (positionOut[0] - _this.x);
_local2 = (positionOut[1] - _this.y);
if ((((Math.abs(_local1) < 5)) && ((Math.abs(_local2) < 5)))){
currentMode = "";
_this.scaleX = distScaleOut;
_this.scaleY = Math.abs(distScaleOut);
GameData.moveObjectContainer.alpha = 1;
GameData.gameUI.board.alpha = 1;
GameData.moveObjectContainer.addChild(_this);
} else {
GameData.moveObjectContainer.alpha = (GameData.moveObjectContainer.alpha + 0.05);
_this.x = (_this.x + (_local1 / 10));
_this.y = (_this.y + (_local2 / 10));
_this.scaleX = (_this.scaleX + ((distScaleOut - _this.scaleX) / 10));
_this.scaleY = Math.abs(_this.scaleX);
GameData.moveObjectContainer.visible = true;
};
}
public function change_body(_arg1:uint):void{
changeStates("body");
currentChooseColor = _arg1;
}
public function change_mouth(_arg1:uint):void{
changeStates("mouth");
currentChooseColor = _arg1;
}
}
}//package com.gq.moveobject
Section 4
//Ctrl (com.gq.system.Ctrl)
package com.gq.system {
import flash.display.*;
import flash.events.*;
public class Ctrl {
public var isPhoto:Boolean;
private var ESC:uint;// = 27
public var impossible:Boolean;
private static var Scen:DisplayObjectContainer;
public function Ctrl(_arg1:DisplayObjectContainer):void{
Scen = _arg1;
Scen.stage.addEventListener(MouseEvent.MOUSE_DOWN, clickHd);
Scen.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHd);
}
public function loseFocus(_arg1:Event=null):void{
GameData.controlWho.leftPress = false;
GameData.controlWho.downPress = false;
GameData.controlWho.rightPress = false;
GameData.controlWho.upPress = false;
GameData.controlWho.attackPress = false;
GameData.controlWho.jumpPress = false;
}
private function clickHd(_arg1:MouseEvent):void{
var i:uint;
var evt = _arg1;
if (((!(GameData.isPausing)) && (GameData.can_click))){
i = 0;
while (i < GameData.can_clickArr.length) {
if (GameData.can_clickArr[i].hitTestPoint(Scen.mouseX, Scen.mouseY, true)){
try {
if (GameData.currentClickObj != null){
GameTools.addFilters(GameData.currentClickObj, []);
};
GameData.currentClickObj = GameData.can_clickArr[i];
GameData.currentClickObj.parent.addChild(GameData.currentClickObj);
GameTools.addFilters(GameData.currentClickObj, GameData.redFilters);
GameData.currentClickObj.startDrag();
break;
} catch(e) {
};
};
i = (i + 1);
};
};
}
public function removeMe():void{
Scen.stage.removeEventListener(Event.DEACTIVATE, loseFocus);
Scen.stage.removeEventListener(KeyboardEvent.KEY_DOWN, KeyDownHD);
Scen.stage.removeEventListener(KeyboardEvent.KEY_UP, KeyUpHD);
Scen.stage.removeEventListener(MouseEvent.MOUSE_DOWN, clickHd);
Scen.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHd);
GameData.controlClass = null;
}
private function KeyUpHD(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case GameData.A:
GameData.controlWho.leftPress = false;
GameData.controlWho.leftDone = false;
break;
case GameData.S:
GameData.controlWho.downPress = false;
GameData.controlWho.downDone = false;
break;
case GameData.D:
GameData.controlWho.rightPress = false;
GameData.controlWho.rightDone = false;
break;
case GameData.W:
GameData.controlWho.upPress = false;
GameData.controlWho.upDone = false;
break;
case GameData.J:
GameData.controlWho.attackPress = false;
GameData.controlWho.attackDone = false;
break;
case GameData.K:
GameData.controlWho.jumpPress = false;
GameData.controlWho.jumpDone = false;
break;
case GameData.L:
GameData.controlWho.specialPress = false;
GameData.controlWho.specilaDone = false;
break;
};
}
private function mouseUpHd(_arg1:MouseEvent):void{
if (!GameData.isPausing){
if (GameData.currentClickObj){
GameData.currentClickObj.stopDrag();
};
};
}
private function KeyDownHD(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case GameData.A:
GameData.controlWho.leftPress = true;
break;
case GameData.S:
GameData.controlWho.downPress = true;
break;
case GameData.D:
GameData.controlWho.rightPress = true;
break;
case GameData.W:
GameData.controlWho.upPress = true;
break;
case GameData.J:
GameData.controlWho.attackPress = true;
break;
case GameData.K:
GameData.controlWho.jumpPress = true;
break;
case GameData.L:
GameData.controlWho.specialPress = true;
break;
case ESC:
if (!impossible){
GameTools.Pause();
};
break;
case 80:
if (!impossible){
GameTools.Pause();
};
break;
case 33:
GameData.Scen.stage.frameRate++;
break;
case 34:
GameData.Scen.stage.frameRate--;
break;
case 81:
GameSys.missionComplete();
break;
case 32:
if (GameData.hitTestSprite.parent == null){
GameData.bgContainer.addChild(GameData.hitTestSprite);
} else {
GameData.bgContainer.removeChild(GameData.hitTestSprite);
};
break;
};
}
}
}//package com.gq.system
Section 5
//DrawBMP (com.gq.system.DrawBMP)
package com.gq.system {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.net.*;
public class DrawBMP extends MovieClip {
public static function DrawReady(_arg1, _arg2, _arg3:Array){
var i:*;
var stage = _arg1;
var BMP = _arg2;
var VisiblePicArr = _arg3;
var ScissorReady:* = function (_arg1){
var XY:*;
var Mc = _arg1;
XY = function (_arg1){
Mc.x = stage.mouseX;
Mc.y = stage.mouseY;
};
Mc.addEventListener(Event.ENTER_FRAME, XY);
};
var doDrawRect:* = function (_arg1, _arg2, _arg3, _arg4){
var _local5:MovieClip = new MovieClip();
_local5.graphics.beginFill(0xFFCC00, 0.2);
_local5.graphics.lineStyle(1, 0x666666);
_local5.graphics.drawRect(_arg1, _arg2, _arg3, _arg4);
return (_local5);
};
var DrawBmpReady:* = function (){
var RectArrayPic:MovieClip;
var ScissorPic:MovieClip;
var RectUrl:MovieClip;
var MenuPic:MovieClip;
var ObjDraw:*;
var MouseDown:Boolean;
var X:Number;
var Y:Number;
var W:Number;
var H:Number;
var XMax:Number;
var YMax:Number;
var Ready:*;
var MouseDownReady:* = function (){
ObjDraw.addEventListener(MouseEvent.MOUSE_DOWN, Ready);
ObjDraw.addEventListener(MouseEvent.MOUSE_UP, Ready);
RectUrl = null;
};
var DelEvent:* = function (){
ObjDraw.removeEventListener(MouseEvent.MOUSE_DOWN, Ready);
ObjDraw.removeEventListener(MouseEvent.MOUSE_UP, Ready);
};
Ready = function (_arg1){
var Rect:MovieClip;
var Move:*;
var event = _arg1;
trace((" Y " + ObjDraw.mouseY));
if (((!((X == ObjDraw.mouseX))) && (!((Y == ObjDraw.mouseY))))){
Move = function (_arg1){
if (MouseDown){
if (Rect){
RectArrayPic.removeChild(Rect);
};
W = (ObjDraw.mouseX - X);
if ((((ObjDraw.mouseX < X)) && ((ObjDraw.mouseY < Y)))){
H = ((W * 100) / 75);
} else {
if ((((ObjDraw.mouseX > X)) && ((ObjDraw.mouseY > Y)))){
H = ((W * 100) / 75);
} else {
H = ((-(W) * 100) / 75);
};
};
Rect = doDrawRect(X, Y, W, H);
stage.addChild(Rect);
RectUrl = Rect;
RectArrayPic.addChild(RectUrl);
} else {
DelEvent();
RectDrag(Rect);
ObjDraw.removeEventListener(MouseEvent.MOUSE_MOVE, Move);
};
};
if ((((event.type == "mouseDown")) && (!(RectUrl)))){
X = ObjDraw.mouseX;
Y = ObjDraw.mouseY;
MouseDown = true;
ObjDraw.addEventListener(MouseEvent.MOUSE_MOVE, Move);
} else {
if (Y){
MouseDown = false;
ObjDraw.removeEventListener(MouseEvent.MOUSE_MOVE, Move);
DelEvent();
if (RectUrl){
};
};
};
};
};
var RectDrag:* = function (_arg1){
var Ready2:*;
var Mc = _arg1;
Ready2 = function (_arg1){
if (_arg1.type == "mouseDown"){
Mc.startDrag();
} else {
Mc.stopDrag();
};
};
Mc.Name = "Rect";
Mc.addEventListener(MouseEvent.MOUSE_DOWN, Ready2);
BMP.mask = Mc;
CutMenuIDReady();
trace(((((((("X:" + X) + " Y:") + Y) + " W:") + W) + " H:") + H));
};
var CutMenuIDReady:* = function (){
var Mc:MovieClip;
var ExitOK:*;
var SaveOK:*;
ExitOK = function (_arg1){
var _local2:*;
RectArrayPic.removeChild(RectUrl);
RectArrayPic.removeChild(Mc);
RectArrayPic.removeChild(ScissorPic);
for (_local2 in VisiblePicArr) {
VisiblePicArr[_local2].visible = true;
};
BMP.mask = null;
GameData.isPausing = false;
};
var PicReady:* = function (){
};
SaveOK = function (_arg1){
ExitOK(null);
var _local2:BitmapData = new BitmapData(700, 500);
Mc.visible = false;
_local2.draw(stage);
Mc.visible = true;
var _local3:Object = new Object();
_local3.X = X;
_local3.Y = Y;
_local3.W = W;
_local3.H = H;
if (_local3.W < 0){
_local3.X = (X - Math.abs(W));
_local3.W = X;
};
if (_local3.H < 0){
_local3.Y = (Y - Math.abs(H));
_local3.H = Y;
};
var _local4:Rectangle = new Rectangle(_local3.X, _local3.Y, int((_local3.X + _local3.W)), int((_local3.Y + _local3.H)));
var _local5:Point = new Point(0, 0);
var _local6:BitmapData = new BitmapData(RectUrl.width, RectUrl.height, true, 0);
_local6.copyPixels(_local2, _local4, _local5);
var _local7:Bitmap = new Bitmap(_local6);
var _local8:FileReference = new FileReference();
var _local9:JPEGEncoder = new JPEGEncoder(100);
_local8.save(_local9.encode(_local6), ("Princess barbie" + ".jpg"));
};
Mc = new CutMenuID();
RectArrayPic.addChild(Mc);
Mc.x = stage.mouseX;
Mc.y = stage.mouseY;
if (Mc.x > (XMax - 50)){
Mc.x = (XMax - 50);
};
if (Mc.y > (YMax - 50)){
Mc.y = (YMax - 50);
};
Mc.Exit.addEventListener(MouseEvent.CLICK, ExitOK);
Mc.Save.addEventListener(MouseEvent.CLICK, SaveOK);
};
RectArrayPic = new MovieClip();
stage.addChild(RectArrayPic);
ScissorPic = new ScissorID();
RectArrayPic.addChild(ScissorPic);
ScissorReady(ScissorPic);
ObjDraw = stage;
MouseDownReady();
X = 0;
Y = 0;
W = 0;
H = 0;
var XMin:Number = 0;
XMax = 700;
var YMin:Number = 0;
YMax = 500;
};
for (i in VisiblePicArr) {
VisiblePicArr[i].visible = false;
};
DrawBmpReady();
}
}
}//package com.gq.system
Section 6
//FPSShow (com.gq.system.FPSShow)
package com.gq.system {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class FPSShow extends Sprite {
private var txt:TextField;
private var count:int;// = 0
public function FPSShow(){
init();
}
private function timerHandler(_arg1:TimerEvent):void{
txt.text = "FPS:";
txt.text = ("FPS:" + count);
count = 0;
}
private function init():void{
txt = new TextField();
txt.textColor = 0xFF0000;
txt.background = true;
txt.backgroundColor = 11259375;
txt.autoSize = TextFieldAutoSize.CENTER;
txt.selectable = false;
txt.x = 20;
addChild(txt);
var _local1:Timer = new Timer(1000);
_local1.addEventListener("timer", timerHandler);
this.addEventListener("enterFrame", countHandler);
_local1.start();
}
private function countHandler(_arg1:Event):void{
count++;
}
}
}//package com.gq.system
Section 7
//GameData (com.gq.system.GameData)
package com.gq.system {
import flash.display.*;
import flash.geom.*;
import com.gq.moveobject.*;
import flash.media.*;
import flash.text.*;
import com.gq.ui.*;
import flash.net.*;
import flash.filters.*;
public class GameData {
public static const DIFFICULTY_EASY:uint = 1;
public static const GAME_MODULUS = 0.65;
public static const BIAS_VALUE:int = 14;
public static const DIFFICULTY_HARD:uint = 3;
public static const VERSON:String = "1.143";
public static const LINE_VALUE:int = 10;
public static const DIFFICULTY_NORMAL:uint = 2;
public static var current_life:uint = (GAME_TESTING) ? 5000 : 500;
;
public static var gameUI:GameUI;
public static var current_goal:Number = 0;
public static var controlClass:Ctrl;
public static var music:Sound = new Sound();
public static var GAME_DIFFICULTY:uint = 2;
public static var nowTraceX:Number;
public static var nowTraceY:Number;
public static var rectHeight:uint = 20;
public static var redFilters:Array = [new GlowFilter(6711039, 1, 30, 30)];
public static var time_left:int;
public static var KString:String = "K";
public static var A:uint = 65;
public static var D:uint = 68;
public static var rectWidth:uint = 20;
public static var J:uint = 74;
public static var actionArr:Array;
public static var widthLength:uint = 35;
public static var clickObj:Array;
public static var S:uint = 83;
public static var level_index:uint = 1;
public static var resourceWidth:int;
public static var K:uint = 75;
public static var SString:String = "S";
public static var bottomObjectContainer:Sprite;
public static var Loader2:Loader = new Loader();
public static var Loader3:Loader = new Loader();
public static var Loader4:Loader = new Loader();
public static var Loader6:Loader = new Loader();
public static var L:uint = 76;
public static var W:uint = 87;
public static var can_click:Boolean;
public static var Loader5:Loader = new Loader();
public static var rightCount:uint;
public static var Loader8:Loader = new Loader();
public static var gameHitBg:Sprite;
public static var blueTrans:ColorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 100, 0);
public static var Loader7:Loader = new Loader();
public static var hitTestBmd:BitmapData;
public static var Loader1:Loader = new Loader();
public static var idIndex:uint;
public static var topSprite:Sprite;
public static var sound2Channel:SoundChannel = new SoundChannel();
public static var current_score:Number = 0;
public static var resourceBmd:BitmapData;
public static var redTrans:ColorTransform = new ColorTransform(1, 0.85, 0.85, 1, 0, 0, 0, 0);
public static var objectArr:Array;
public static var GAME_TESTING:Boolean = false;
public static var isPausing:Boolean;
public static var personContainer:Sprite;
public static var gameContainer:Sprite;
public static var myShareObject:SharedObject;
public static var screenHeight:int = 500;
public static var currentPushTower:uint = 1;
public static var screenWidth:int = 700;
public static var FPS:FPSShow;
public static var resourceHeight:int;
public static var soundTrans:SoundTransform = new SoundTransform();
public static var sndLoader:Loader = null;
public static var currentIndex:uint;
public static var leftMapLimit:Number = 0;
public static var lifeNum:uint = 10;
public static var heightLength:uint = 25;
public static var total_time:uint = 99;
public static var soundChannel:SoundChannel = new SoundChannel();
public static var game_level:uint = 1;
public static var creater:MonsterCreater;
public static var sound1:Sound = new Sound();
public static var sound2:Sound = new Sound();
public static var sound3:Sound = new Sound();
public static var greyTrans:ColorTransform = new ColorTransform(0.4, 0.4, 0.4, 1, 0, 0, 0, 0);
public static var JString:String = "J";
public static var total_level_num:uint;
public static var currentClickObj;
public static var effectArr:Array;
public static var Scen:DisplayObjectContainer;
public static var sound:Sound = new Sound();
public static var can_pass:Boolean;
public static var controlWho;
public static var currentMap:Map;
public static var musicChannel:SoundChannel = new SoundChannel();
public static var nowUseClass:Class;
public static var bitmap:Bitmap;
public static var nowDifficulty:Number;
public static var pause_page:MovieClip;
public static var objInScreenArr:Array;
public static var removeArr:Array;
public static var okHeightArr:Array = ["000", "010", "040", "050", "080", "101", "110", "120", "130", "165", "180", "200", "220", "235", "250", "280", "300", "350", "500"];
public static var showGirl:ShowGirl;
public static var can_clickArr:Array;
public static var WString:String = "W";
public static var leftCount:uint;
public static var map:Map;
public static var sound3Channel:SoundChannel = new SoundChannel();
public static var mapArr:Array = new Array(widthLength);
public static var screenBmd:BitmapData;
public static var mapSpeedY:Number;
public static var mapSpeedX:Number;
public static var LString:String = "L";
public static var isPlay:Boolean;
public static var initTrans:ColorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
public static var channelNum:uint = 3;
public static var DString:String = "D";
public static var nowLoading:int;
public static var musicTrans:SoundTransform = new SoundTransform();
public static var _loadPercentTxt:TextField;
public static var whiteFilters:Array = [new GlowFilter(0xFFFFFF, 1, 10, 10)];
public static var sound1Channel:SoundChannel = new SoundChannel();
public static var shakeCount:uint;
public static var babyArr:Array;
public static var enemyTimeArr:Array = new Array(30);
public static var AString:String = "A";
public static var tableArr:Array;
public static var mapInforArr:Array;
public static var bgContainer:Sprite;
public static var bgRect:Rectangle;
public static var gameBg:Sprite;
public static var total_score:Number = 0;
public static var hitTestSprite:Sprite;
public static var topObjectContainer:Sprite;
public static var effectContainer:Sprite;
public static var moveObjectContainer:Sprite;
public static var rightMapLimit:Number = 0;
public static var whiteTrans:ColorTransform = new ColorTransform(0, 0, 0, 1, 0xFF, 0xFF, 0xFF, 0);
public static function initData():void{
var _local3:uint;
actionArr = [];
effectArr = [];
objectArr = [];
babyArr = [];
objInScreenArr = [];
can_clickArr = [];
removeArr = [];
tableArr = [];
clickObj = [];
var _local1:uint;
while (_local1 < mapArr.length) {
mapArr[_local1] = new Array(heightLength);
_local3 = 0;
while (_local3 < mapArr[_local1].length) {
mapArr[_local1][_local3] = 0;
_local3++;
};
_local1++;
};
clicked = false;
isPausing = false;
can_pass = false;
can_click = true;
creater = null;
currentMap = null;
gameContainer = null;
bgContainer = null;
effectContainer = null;
moveObjectContainer = null;
bottomObjectContainer = null;
personContainer = null;
topObjectContainer = null;
pause_page = null;
gameUI = null;
controlClass = null;
map = null;
currentClickObj = null;
showGirl = null;
bgPage = null;
var _local2:uint;
while (_local2 < enemyTimeArr.length) {
enemyTimeArr[_local2] = 0;
_local2++;
};
}
public static function SuperInit():void{
total_level_num = 0;
current_life = 500;
level_index = 1;
controlWho = null;
}
}
}//package com.gq.system
Section 8
//GameDesignClass (com.gq.system.GameDesignClass)
package com.gq.system {
import flash.display.*;
public class GameDesignClass {
public var Scen:DisplayObjectContainer;
public static const keyArr:Array = [[32, "SPACE"], [17, "CTRL"], [16, "SHIFT"], [20, "CAPS"], [27, "ESC"], [8, "BACK"], [112, "F1"], [113, "F2"], [114, "F3"], [115, "F4"], [116, "F5"], [117, "F6"], [118, "F7"], [119, "F8"], [120, "F9"], [121, "F10"], [122, "F11"], [123, "F12"], [19, "SCRLK"], [45, "INSERT"], [36, "HOME"], [33, "PAGEUP"], [34, "PAGEDN"], [46, "DEL"], [35, "END"], [38, "↑"], [40, "↓"], [37, "←"], [39, "→"], [13, "ENTER"], [144, "NUMLOCK"]];
public static const waitPositionArr:Array = [[125, 240], [400, 300]];
public static const clothOriData:Object = {hat:9, hand:7, glove:3, hair:1, glass:4, bag:4, necklace:11, eyebrow:1, eyelash:1, eye:1, shadow:1, mouth:1, face:1, cape:6, dress:11, cloth:7, trousers:5, bikini:4, shoe:10, skin:1, hand2:1};
public static const price:Object = {wood:500, lumber:2000, machine:1000, stone:5000, light:20000};
public static const tablePositionArr:Array = [[100, 160], [300, 160], [500, 160], [100, 280], [300, 280], [500, 280], [100, 400], [300, 400], [500, 400]];
public static const goalArr:Array = [150, 170, 190, 210, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1500, 1800, 2100, 2500];
public static const workerWaitPositionArr:Array = [[350, 80], [390, 80], [430, 80], [500, 80]];
public static const guestComeSpeed:Array = [450, 400, 400, 350, 350, 350, 300, 300, 300, 250, 250, 200, 200, 150, 150, 100, 100, 80, 80, 60];
public static const levelTimeArr:Array = [3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000];
public static const waiterPositionArr:Array = [[600, 200], [600, 280], [600, 360], [600, 440]];
public static const totalLevelNumArr:Array = [5, 5, 5, 6];
public static var bgData:Array = [1, 999, 999, 1];
public static var downIndex:Array = [0, 0, 0];
public static var mapArray:Array = [0, 0, 0, 0];
public static var addScore:Number = 50;
public static var landHeight:int = 280;
public static var clothData:Object = {hat:9, hand:7, glove:3, hair:1, glass:4, bag:4, necklace:11, eyebrow:1, eyelash:1, eye:1, shadow:1, mouth:1, face:1, cape:6, dress:11, cloth:7, trousers:5, bikini:4, shoe:10, skin:1, hand2:1};
public static var upIndex:Array = [0, 0, 0];
public function GameDesignClass(_arg1:DisplayObjectContainer):void{
Scen = _arg1;
GameData.Scen = Scen;
GameTools.shareObject();
GameData.initData();
GameSys.createGame();
GameTools.addMask();
}
}
}//package com.gq.system
Section 9
//GameSys (com.gq.system.GameSys)
package com.gq.system {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import com.gq.moveobject.*;
import flash.media.*;
import com.gq.ui.*;
public class GameSys {
public static var counter:uint;
public static function addEffects(_arg1:Sprite, _arg2:String, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:int=1, _arg8:Number=0):void{
var _local9:Class = GameTools.createClass(("com.macrojoy.effects." + _arg2));
var _local10:* = new (_local9);
GameTools.pushArr(GameData.actionArr, _local10);
if (_arg1 == GameData.personContainer){
GameTools.pushArr(GameData.objectArr, _local10);
GameData.idIndex++;
_local10.myID = GameData.idIndex;
};
_local10.createEffect(_arg1, _arg3, _arg4, _arg5, _arg6);
_local10._this.scaleX = _arg7;
_local10._this.rotation = _arg8;
}
private static function enterframe(_arg1:Event):void{
if (!GameData.isPausing){
updataEvent();
};
}
public static function missionComplete():void{
GameData.isPausing = true;
if (GameData.current_score >= GameData.current_goal){
if (GameData.game_level < 20){
GameTools.createPage(Win, false);
} else {
GameTools.createPage(Congratulation, false);
};
} else {
GameTools.createPage(Lose, false);
};
}
public static function Build():void{
GameTools.giveSaveData();
GameData.initData();
creatObject("Scen", "topSprite");
InitialGame();
GameTools.addBlack();
GameTools.addMask();
}
public static function adjustMe(_arg1:Number, _arg2:Number):void{
if (((!((GameData.bitmap.x == -(_arg1)))) || (!((GameData.bitmap.y == -(_arg2)))))){
GameData.bgRect.x = (GameData.bgRect.x - (GameData.bitmap.x + _arg1));
GameData.bgRect.y = (GameData.bgRect.y - (GameData.bitmap.y + _arg2));
GameData.bitmap.x = -(_arg1);
GameData.bitmap.y = -(_arg2);
copyBg();
};
}
private static function creatObject(_arg1:String, _arg2:String):void{
GameData[_arg2] = new Sprite();
GameData[_arg2].mouseEnabled = false;
GameData[_arg1].addChild(GameData[_arg2]);
}
private static function removeAction(_arg1:Array):void{
var _local2:int = (_arg1.length - 1);
while (_local2 >= 0) {
_arg1[_local2].removeMe();
GameTools.unPushArr(_arg1, _arg1[_local2]);
_local2--;
};
_arg1 = [];
}
private static function updataEvent():void{
moveAction(GameData.actionArr);
removeAction(GameData.removeArr);
}
public static function createGame():void{
GameTools.createPage(Page1);
}
public static function buildStage():void{
creatObject("Scen", "topSprite");
creatObject("topSprite", "gameContainer");
creatObject("gameContainer", "bgContainer");
creatObject("gameContainer", "moveObjectContainer");
}
private static function mapAction():void{
adjustMe(GameData.gameContainer.x, GameData.gameContainer.y);
}
public static function removeStage():void{
SoundMixer.stopAll();
GameData.isPlay = false;
GameData.Scen.stage.removeEventListener(Event.ENTER_FRAME, enterframe);
GameData.Scen.mask = null;
if (GameData.controlClass){
GameData.controlClass.removeMe();
};
if (GameData.gameUI != null){
GameData.gameUI.removeMe();
};
GameData.initData();
}
private static function moveAction(_arg1:Array):void{
var _local2:uint;
while (_local2 < _arg1.length) {
_arg1[_local2].updataEvent();
_local2++;
};
}
private static function createShowGirl():void{
GameData.creater.createObj("Scen", "ShowGirl", "ShowGirlMc", GameDesignClass.waitPositionArr[0][0], GameDesignClass.waitPositionArr[0][1], 0, []);
}
private static function InitialGame():void{
GameStart();
GameData.controlClass = new Ctrl(GameData.Scen);
}
private static function GameStart():void{
GameData.isPlay = true;
GameData.Scen.stage.addEventListener(Event.ENTER_FRAME, enterframe);
GameData.Scen.stage.focus = null;
}
public static function copyBg():void{
GameData.screenBmd.copyPixels(GameData.resourceBmd, GameData.bgRect, new Point(0, 0));
}
public static function createGameMap(_arg1:String):void{
var _local2:uint = uint(_arg1);
GameData.currentMap = new Map();
GameData.currentMap.getData(_arg1);
GameData.bgContainer.addChild(GameData.currentMap);
}
private static function judgeIfAddInScreen(_arg1:Number):void{
var _local3:*;
GameData.objInScreenArr = [];
var _local2:int = (GameData.objectArr.length - 1);
while (_local2 >= 0) {
_local3 = GameData.objectArr[_local2];
if (GameTools.ifOutScreen(_local3.myX, (_local3.myY + _local3.myZ), _arg1)){
if (!_local3.notAdd){
_local3.removeMc();
GameTools.unPushArr(GameData.actionArr, _local3);
};
} else {
GameTools.pushArr(GameData.objInScreenArr, _local3);
if (_local3.notAdd){
_local3.addMc();
GameTools.pushArr(GameData.actionArr, _local3);
};
};
_local2--;
};
}
private static function judgeIfCreate(_arg1:Array, _arg2:Function):void{
var _local3:Array;
var _local4:uint;
var _local5:Array;
if (_arg1.length > 0){
_local3 = _arg1.concat();
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4];
if (GameTools.judgeInScreen(_local5[3], _local5[4], 0.5)){
if (_local5[1] == "Enemy"){
if ((((_local5[9] == 0)) || ((_local5[9] == GameData.currentIndex)))){
_arg2(_local5[0], _local5[1], _local5[2], _local5[3], _local5[4], _local5[5], _local5[6], _local5[7], _local5[8], _local5[9], _local5[10]);
GameTools.unPushArr(_arg1, _local5);
};
} else {
_arg2(_local5[0], _local5[1], _local5[2], _local5[3], _local5[4], _local5[5], _local5[6], _local5[7], _local5[8], _local5[9]);
GameTools.unPushArr(_arg1, _local5);
};
};
_local4++;
};
};
}
}
}//package com.gq.system
Section 10
//GameTools (com.gq.system.GameTools)
package com.gq.system {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import com.gq.moveobject.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import com.gq.ui.*;
import flash.net.*;
public class GameTools {
public static function adjustFrame(_arg1:uint):void{
GameData.Scen.stage.frameRate = _arg1;
}
public static function judgeInSceen(_arg1:MovieClip):Boolean{
var _local2:Point = GameData.personContainer.localToGlobal(new Point(_arg1.x, _arg1.y));
if ((((((((_local2.x >= 0)) && ((_local2.x <= GameData.screenWidth)))) && ((_local2.y >= 0)))) && ((_local2.y <= GameData.screenHeight)))){
return (true);
};
return (false);
}
public static function addMusic(_arg1:String, _arg2:String, _arg3:uint=999, _arg4:Number=0):void{
var _local5:Class = (GameData.sndLoader.contentLoaderInfo.applicationDomain.getDefinition(_arg2) as Class);
var _local6:Sound = new (_local5);
GameData[_arg1] = _local6;
GameData[(_arg1 + "Channel")].stop();
GameData[(_arg1 + "Channel")] = _local6.play(_arg4, _arg3);
adjustVolume(_arg1);
}
public static function cleanupMemory():void{
try {
new LocalConnection().connect("foo");
new LocalConnection().connect("foo");
new LocalConnection().connect("foo");
new LocalConnection().connect("foo");
} catch(e:Error) {
};
}
public static function getTureAngle(_arg1:Number):Number{
if (_arg1 < 0){
return ((_arg1 + 360));
};
if (_arg1 > 360){
return ((_arg1 - 360));
};
return (_arg1);
}
public static function hideZero(_arg1:MovieClip):void{
var _local2:int = (_arg1.numChildren - 1);
while (_local2 >= 0) {
if ((_arg1.getChildAt(_local2) as MovieClip).currentFrame == 1){
_arg1.getChildAt(_local2).visible = false;
} else {
break;
};
_local2--;
};
}
public static function drawRectangle(_arg1:Sprite, _arg2:uint, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
_arg1.graphics.lineStyle(1);
_arg1.graphics.beginFill(_arg2);
_arg1.graphics.drawRect(_arg3, _arg4, _arg5, _arg6);
}
public static function ifOutScreen(_arg1:Number, _arg2:Number, _arg3:Number=50):Boolean{
var _local4:Point = GameData.personContainer.localToGlobal(new Point(_arg1, _arg2));
if ((((((((_local4.x < -(_arg3))) || ((_local4.x > (GameData.screenWidth + _arg3))))) || ((_local4.y < -(_arg3))))) || ((_local4.y > (GameData.screenHeight + _arg3))))){
return (true);
};
return (false);
}
public static function unPushArr(_arg1:Array, _arg2):void{
if (_arg1.indexOf(_arg2) != -1){
_arg1.splice(_arg1.indexOf(_arg2), 1);
};
}
public static function calcuCurve(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Array{
var _local6:int = _arg5;
var _local7:Point = new Point(_arg1, _arg2);
var _local8:Point = new Point(_arg3, _arg4);
var _local9:Point = new Point(0, Math.round((Math.min(_local7.y, _local8.y) + _local6)));
var _local10:Number = (((Math.sqrt(((_local7.y - _local9.y) / (_local8.y - _local9.y))) * _local8.x) + _local7.x) / (1 + Math.sqrt(((_local7.y - _local9.y) / (_local8.y - _local9.y)))));
var _local11:Number = ((_local7.y - _local9.y) / ((_local7.x - _local10) * (_local7.x - _local10)));
var _local12:Number = _local9.y;
return ([_local11, _local10, _local12]);
}
public static function getNum(_arg1:int, _arg2:int, _arg3:MovieClip=null):Array{
var _local4:Array = new Array();
var _local5:int = _arg1;
var _local6:uint;
while (_local6 < _arg2) {
_local4.push((_local5 % 10));
_local5 = int((_local5 / 10));
if (_arg3 != null){
(_arg3.getChildAt(_local6) as MovieClip).gotoAndStop((_local4[_local6] + 1));
};
_local6++;
};
return (_local4);
}
public static function gotoFrame(_arg1:MovieClip, _arg2:String):void{
if (_arg1 != null){
if (_arg1.currentLabel != _arg2){
_arg1.gotoAndStop(_arg2);
};
};
}
public static function addEffect(_arg1:DisplayObjectContainer, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String):void{
var _local6:Class = createClass(_arg5);
var _local7:MovieClip = new (_local6);
_local7.x = _arg2;
_local7.y = _arg3;
_local7.scaleX = _arg4;
_arg1.addChild(_local7);
}
public static function hitTest(_arg1:MovieClip, _arg2:MovieClip, _arg3:uint):Boolean{
var _local4:Point;
if (_arg3 == 1){
return (_arg1.hitTestObject(_arg2));
};
_local4 = _arg2.parent.localToGlobal(new Point(_arg2.x, _arg2.y));
return (_arg1.hitTestPoint(_local4.x, _local4.y, true));
}
public static function Pause():void{
if (!GameData.isPausing){
} else {
if (GameData.pause_page != null){
GameData.pause_page.resumeFunc();
};
};
}
public static function myHitTestPoint(_arg1:BitmapData, _arg2:Number, _arg3:Number):String{
GameData.hitTestSprite["picture"] = new BitmapData(2, 2, true, 0);
var _local4:Matrix = new Matrix();
_local4.tx = -(_arg2);
_local4.ty = -(_arg3);
GameData.hitTestSprite["picture"].draw(GameData.hitTestSprite, _local4);
var _local5:String = GameData.hitTestSprite["picture"].getPixel32(1, 1).toString(16);
return (_local5);
}
public static function adjustVolume(_arg1:String):void{
if (_arg1 == "music"){
GameData[(_arg1 + "Channel")].soundTransform = GameData.musicTrans;
} else {
GameData[(_arg1 + "Channel")].soundTransform = GameData.soundTrans;
};
}
public static function removeWho(_arg1:DisplayObjectContainer):void{
var _local2:int = (_arg1.numChildren - 1);
while (_local2 >= 0) {
_arg1.removeChild(_arg1.getChildAt(_local2));
_local2--;
};
}
public static function createClass(_arg1:String):Class{
return ((getDefinitionByName(_arg1) as Class));
}
public static function getShadow(_arg1:Sprite, _arg2, _arg3:Number, _arg4:Number):MovieClip{
var _local5:MovieClip = new ShadowEffect(_arg2);
_arg1.addChild(_local5);
_local5.x = _arg3;
_local5.y = _arg4;
_local5.scaleX = _arg2.parent.scaleX;
return (_local5);
}
public static function calcuRotation(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number = (_arg4 - _arg2);
var _local6:Number = (_arg3 - _arg1);
return ((Math.atan2(_local5, _local6) / 0.01745));
}
public static function getTab(_arg1:Number, _arg2:Boolean=false):Number{
if (_arg1 != 0){
return ((_arg1 / Math.abs(_arg1)));
};
if (_arg2){
return (0);
};
return (1);
}
public static function addFilters(_arg1, _arg2:Array):void{
_arg1.filters = [];
_arg1.filters = _arg2;
}
public static function gamePause(_arg1:Boolean):void{
var i:int;
var ctrlMc:*;
var _pause = _arg1;
i = (GameData.actionArr.length - 1);
while (i >= 0) {
try {
ctrlMc = GameData.actionArr[i].myHost;
} catch(e) {
ctrlMc = GameData.actionArr[i];
};
if (_pause){
ctrlMc.pauseMe();
} else {
ctrlMc.resumeMe();
};
i = (i - 1);
};
var k:int = (GameData.effectArr.length - 1);
while (k >= 0) {
ctrlMc = GameData.effectArr[k];
if (_pause){
ctrlMc.pauseMe();
} else {
ctrlMc.resumeMe();
};
k = (k - 1);
};
}
public static function addBlack():void{
var _local1:Black = new Black();
GameData.Scen.addChild(_local1);
}
public static function myLoader(_arg1:int, _arg2:Boolean):void{
var loadNext:Boolean;
var progressHandler:*;
var completeHandler:*;
var lv = _arg1;
var ifContinue = _arg2;
var loadAssetAction:* = function (_arg1:int):void{
var _local2:Loader;
var _local3:String;
if (loadNext){
GameData.nowLoading = _arg1;
_local2 = (GameData[("Loader" + _arg1)] as Loader);
if (_local2.contentLoaderInfo.bytesLoaded == 0){
trace(_arg1, "未加载过");
_local3 = (("assets/bg" + String(_arg1)) + ".swf");
addText();
_local2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
_local2.load(new URLRequest(_local3));
} else {
if (_local2.contentLoaderInfo.bytesLoaded < _local2.contentLoaderInfo.bytesTotal){
GameData.nowLoading--;
} else {
if (!GameData.isPlay){
GameSys.Build();
if (GameData.nowLoading < 4){
loadAssetAction(++GameData.nowLoading);
};
};
};
};
};
};
progressHandler = function (_arg1:ProgressEvent):void{
var _local2:LoaderInfo = (_arg1.target as LoaderInfo);
var _local3:Number = (Math.floor(((_local2.bytesLoaded / _local2.bytesTotal) * 10000)) / 100);
GameData._loadPercentTxt.text = (_local3.toString() + "% Loaded");
if (!GameData.isPlay){
GameData._loadPercentTxt.visible = true;
} else {
GameData._loadPercentTxt.visible = false;
};
};
completeHandler = function (_arg1:Event):void{
GameDesignClass.mapArray[(GameData.nowLoading - 1)] = 1;
if (!GameData.isPlay){
GameSys.Build();
};
removeText();
if (++GameData.nowLoading < (GameData.game_level + 2)){
if (GameData.nowLoading < 5){
loadAssetAction(GameData.nowLoading);
};
} else {
GameData.nowLoading = 0;
_arg1.target.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.target.removeEventListener(Event.COMPLETE, completeHandler);
};
};
var addText:* = function ():void{
GameData._loadPercentTxt = new TextField();
GameData.Scen.addChild(GameData._loadPercentTxt);
var _local2 = GameData._loadPercentTxt;
with (_local2) {
x = 350;
y = 250;
textColor = 0xFF9900;
};
};
var removeText:* = function ():void{
GameData.Scen.removeChild(GameData._loadPercentTxt);
GameData._loadPercentTxt = null;
};
loadNext = true;
loadAssetAction(lv);
}
public static function pushArr(_arg1:Array, _arg2):void{
if (_arg1.indexOf(_arg2) == -1){
_arg1.push(_arg2);
};
}
public static function judgeInScreen(_arg1:Number, _arg2:Number, _arg3:Number=0.5):Boolean{
var _local4:Point = GameData.moveObjectContainer.localToGlobal(new Point(_arg1, _arg2));
if ((((((((_local4.x > ((0 - _arg3) * GameData.screenWidth))) && ((_local4.x < ((_arg3 + 1) * GameData.screenWidth))))) && ((_local4.y > ((0 - _arg3) * GameData.screenHeight))))) && ((_local4.y < ((_arg3 + 1) * GameData.screenHeight))))){
return (true);
};
return (false);
}
public static function createPage(_arg1:Class, _arg2:Boolean=true):void{
var _local3:Sprite = new (_arg1);
GameData.Scen.addChild(_local3);
if (_arg2){
addBlack();
};
}
public static function addShake():void{
var _local1:ShakeClass = new ShakeClass(GameData.Scen, 2, 10, GameData.Scen);
}
public static function adjustRotation(_arg1:Number, _arg2:Point, _arg3:MovieClip):int{
var _local4:int;
var _local5:int;
var _local6:uint;
while (_arg3.hitTestPoint((_arg2.x + (Math.sin((((_arg1 + _local4) + 1) * 0.01745)) * 5)), (_arg2.y - (Math.cos((((_arg1 + _local4) + 1) * 0.01745)) * 5)), true)) {
_local4++;
++_local6;
if (_local6 == 90){
break;
};
};
_local6 = 0;
while (_arg3.hitTestPoint((_arg2.x + (Math.sin((((_arg1 - _local5) - 1) * 0.01745)) * 5)), (_arg2.y - (Math.cos((((_arg1 - _local5) - 1) * 0.01745)) * 5)), true)) {
_local5++;
++_local6;
if (_local6 == 90){
break;
};
};
if (_local4 <= _local5){
return (_local4);
};
return (-(_local5));
}
public static function changeXY(_arg1, _arg2:Sprite, _arg3:Point, _arg4:Boolean=true):Point{
_arg3 = _arg1.parent.localToGlobal(_arg3);
if (_arg4){
return (_arg3);
};
return (_arg2.globalToLocal(_arg3));
}
public static function getDistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number = (Math.pow((_arg1 - _arg3), 2) + Math.pow((_arg2 - _arg4), 2));
return (Math.sqrt(_local5));
}
public static function addMask():void{
var _local1:Sprite = new Sprite();
_local1.graphics.lineStyle(1);
_local1.graphics.beginFill(0);
_local1.graphics.drawRect(0, 0, GameData.screenWidth, GameData.screenHeight);
GameData.Scen.mask = _local1;
GameData.Scen.addChild(_local1);
}
public static function compareFunc(_arg1, _arg2:int, _arg3:Array):Boolean{
return ((_arg1 == _arg3[0]));
}
public static function addColors(_arg1:Sprite, _arg2:ColorTransform):void{
_arg1.transform.colorTransform = _arg2;
}
public static function adjudgeRotation(_arg1:Number, _arg2:Number):int{
if (_arg1 > 180){
_arg1 = (_arg1 - 360);
} else {
if (_arg1 < -180){
_arg1 = (_arg1 + 360);
};
};
if (((((((_arg1 - _arg2) > 180)) && (((_arg1 - _arg2) < 360)))) || (((((_arg1 - _arg2) > -180)) && (((_arg1 - _arg2) < 0)))))){
return (1);
};
if (((((((_arg1 - _arg2) < 180)) && (((_arg1 - _arg2) > 0)))) || (((((_arg1 - _arg2) < -180)) && (((_arg1 - _arg2) > -360)))))){
return (-1);
};
return (1);
}
public static function cloneObject(_arg1:Object){
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
return (_local2.readObject());
}
public static function getMeBySwf(_arg1:String, _arg2:String):Class{
return ((getDefinitionByName(_arg2) as Class));
}
public static function shareObject():void{
GameData.myShareObject = SharedObject.getLocal(("JALUDO_GUQING_GAME_1" + GameData.VERSON));
var _local1:String;
_local1 = GameData.myShareObject.flush(10000);
}
public static function giveSaveData(_arg1:Boolean=true):void{
if (_arg1){
if (1){
};
};
}
getQualifiedClassName(ShowGirl);
getQualifiedClassName(Objects);
}
}//package com.gq.system
Section 11
//JPEGEncoder (com.gq.system.JPEGEncoder)
package com.gq.system {
import flash.display.*;
import flash.utils.*;
public class JPEGEncoder {
private var fdtbl_UV:Array;
private var std_ac_chrominance_values:Array;
private var std_dc_chrominance_nrcodes:Array;
private var std_dc_chrominance_values:Array;
private var ZigZag:Array;
private var YAC_HT:Array;
private var bytenew:int;// = 0
private var fdtbl_Y:Array;
private var std_ac_chrominance_nrcodes:Array;
private var YDC_HT:Array;
private var DU:Array;
private var std_ac_luminance_values:Array;
private var UVTable:Array;
private var UDU:Array;
private var YDU:Array;
private var byteout:ByteArray;
private var UVAC_HT:Array;
private var UVDC_HT:Array;
private var bytepos:int;// = 7
private var VDU:Array;
private var std_ac_luminance_nrcodes:Array;
private var std_dc_luminance_values:Array;
private var YTable:Array;
private var std_dc_luminance_nrcodes:Array;
private var bitcode:Array;
private var category:Array;
public static const CONTENT_TYPE:String = "image/jpeg";
public function JPEGEncoder(_arg1:Number=50){
ZigZag = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63];
YTable = new Array(64);
UVTable = new Array(64);
fdtbl_Y = new Array(64);
fdtbl_UV = new Array(64);
std_dc_luminance_nrcodes = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0];
std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
std_ac_luminance_nrcodes = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125];
std_ac_luminance_values = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250];
std_dc_chrominance_nrcodes = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0];
std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
std_ac_chrominance_nrcodes = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119];
std_ac_chrominance_values = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250];
bitcode = new Array(0xFFFF);
category = new Array(0xFFFF);
DU = new Array(64);
YDU = new Array(64);
UDU = new Array(64);
VDU = new Array(64);
super();
if (_arg1 <= 0){
_arg1 = 1;
};
if (_arg1 > 100){
_arg1 = 100;
};
var _local2:int;
if (_arg1 < 50){
_local2 = int((5000 / _arg1));
} else {
_local2 = int((200 - (_arg1 * 2)));
};
initHuffmanTbl();
initCategoryNumber();
initQuantTables(_local2);
}
private function initHuffmanTbl():void{
YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes, std_dc_luminance_values);
UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes, std_dc_chrominance_values);
YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes, std_ac_luminance_values);
UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes, std_ac_chrominance_values);
}
private function RGB2YUV(_arg1:Object, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{
var _local8:int;
var _local9:uint;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local6:int;
var _local7:int;
while (_local7 < 8) {
_local8 = 0;
while (_local8 < 8) {
_local9 = getPixel32(_arg1, (_arg2 + _local8), (_arg3 + _local7), _arg4, _arg5);
_local10 = Number(((_local9 >> 16) & 0xFF));
_local11 = Number(((_local9 >> 8) & 0xFF));
_local12 = Number((_local9 & 0xFF));
YDU[_local6] = ((((0.299 * _local10) + (0.587 * _local11)) + (0.114 * _local12)) - 128);
UDU[_local6] = (((-0.16874 * _local10) + (-0.33126 * _local11)) + (0.5 * _local12));
VDU[_local6] = (((0.5 * _local10) + (-0.41869 * _local11)) + (-0.08131 * _local12));
_local6++;
_local8++;
};
_local7++;
};
}
private function writeWord(_arg1:int):void{
writeByte(((_arg1 >> 8) & 0xFF));
writeByte((_arg1 & 0xFF));
}
private function writeByte(_arg1:int):void{
byteout.writeByte(_arg1);
}
private function writeDHT():void{
var _local1:int;
writeWord(65476);
writeWord(418);
writeByte(0);
_local1 = 0;
while (_local1 < 16) {
writeByte(std_dc_luminance_nrcodes[(_local1 + 1)]);
_local1++;
};
_local1 = 0;
while (_local1 <= 11) {
writeByte(std_dc_luminance_values[_local1]);
_local1++;
};
writeByte(16);
_local1 = 0;
while (_local1 < 16) {
writeByte(std_ac_luminance_nrcodes[(_local1 + 1)]);
_local1++;
};
_local1 = 0;
while (_local1 <= 161) {
writeByte(std_ac_luminance_values[_local1]);
_local1++;
};
writeByte(1);
_local1 = 0;
while (_local1 < 16) {
writeByte(std_dc_chrominance_nrcodes[(_local1 + 1)]);
_local1++;
};
_local1 = 0;
while (_local1 <= 11) {
writeByte(std_dc_chrominance_values[_local1]);
_local1++;
};
writeByte(17);
_local1 = 0;
while (_local1 < 16) {
writeByte(std_ac_chrominance_nrcodes[(_local1 + 1)]);
_local1++;
};
_local1 = 0;
while (_local1 <= 161) {
writeByte(std_ac_chrominance_values[_local1]);
_local1++;
};
}
private function writeBits(_arg1:BitString):void{
var _local2:int = _arg1.val;
var _local3:int = (_arg1.len - 1);
while (_local3 >= 0) {
if ((_local2 & uint((1 << _local3)))){
bytenew = (bytenew | uint((1 << bytepos)));
};
_local3--;
bytepos--;
if (bytepos < 0){
if (bytenew == 0xFF){
writeByte(0xFF);
writeByte(0);
} else {
writeByte(bytenew);
};
bytepos = 7;
bytenew = 0;
};
};
}
public function encode(_arg1:BitmapData):ByteArray{
return (internalEncode(_arg1, _arg1.width, _arg1.height, _arg1.transparent));
}
private function initCategoryNumber():void{
var _local1:int;
var _local2 = 1;
var _local3 = 2;
var _local4 = 1;
while (_local4 <= 15) {
_local1 = _local2;
while (_local1 < _local3) {
category[(32767 + _local1)] = _local4;
bitcode[(32767 + _local1)] = new BitString();
bitcode[(32767 + _local1)].len = _local4;
bitcode[(32767 + _local1)].val = _local1;
_local1++;
};
_local1 = -((_local3 - 1));
while (_local1 <= -(_local2)) {
category[(32767 + _local1)] = _local4;
bitcode[(32767 + _local1)] = new BitString();
bitcode[(32767 + _local1)].len = _local4;
bitcode[(32767 + _local1)].val = ((_local3 - 1) + _local1);
_local1++;
};
_local2 = (_local2 << 1);
_local3 = (_local3 << 1);
_local4++;
};
}
private function writeDQT():void{
var _local1:int;
writeWord(65499);
writeWord(132);
writeByte(0);
_local1 = 0;
while (_local1 < 64) {
writeByte(YTable[_local1]);
_local1++;
};
writeByte(1);
_local1 = 0;
while (_local1 < 64) {
writeByte(UVTable[_local1]);
_local1++;
};
}
private function writeAPP0():void{
writeWord(65504);
writeWord(16);
writeByte(74);
writeByte(70);
writeByte(73);
writeByte(70);
writeByte(0);
writeByte(1);
writeByte(1);
writeByte(0);
writeWord(1);
writeWord(1);
writeByte(0);
writeByte(0);
}
private function getPixel32(_arg1:Object, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):uint{
var _local6:BitmapData;
var _local7:ByteArray;
if ((_arg1 is BitmapData)){
_local6 = (_arg1 as BitmapData);
return (_local6.getPixel32(_arg2, _arg3));
};
if ((_arg1 is ByteArray)){
_local7 = (_arg1 as ByteArray);
_local7.position = (((_arg3 * _arg4) * 4) + (_arg2 * 4));
return (_local7.readUnsignedInt());
};
throw (new ArgumentError("The source argument must be an instance of flash.display.BitmapData or flash.utils.ByteArray."));
}
private function writeSOS():void{
writeWord(65498);
writeWord(12);
writeByte(3);
writeByte(1);
writeByte(0);
writeByte(2);
writeByte(17);
writeByte(3);
writeByte(17);
writeByte(0);
writeByte(63);
writeByte(0);
}
private function internalEncode(_arg1:Object, _arg2:int, _arg3:int, _arg4:Boolean=true):ByteArray{
var _local9:int;
var _local10:BitString;
byteout = new ByteArray();
bytenew = 0;
bytepos = 7;
writeWord(65496);
writeAPP0();
writeDQT();
writeSOF0(_arg2, _arg3);
writeDHT();
writeSOS();
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:Number = 0;
bytenew = 0;
bytepos = 7;
var _local8:int;
while (_local8 < _arg3) {
_local9 = 0;
while (_local9 < _arg2) {
RGB2YUV(_arg1, _local9, _local8, _arg2, _arg3);
_local5 = processDU(YDU, fdtbl_Y, _local5, YDC_HT, YAC_HT);
_local6 = processDU(UDU, fdtbl_UV, _local6, UVDC_HT, UVAC_HT);
_local7 = processDU(VDU, fdtbl_UV, _local7, UVDC_HT, UVAC_HT);
_local9 = (_local9 + 8);
};
_local8 = (_local8 + 8);
};
if (bytepos >= 0){
_local10 = new BitString();
_local10.len = (bytepos + 1);
_local10.val = ((1 << (bytepos + 1)) - 1);
writeBits(_local10);
};
writeWord(65497);
return (byteout);
}
private function processDU(_arg1:Array, _arg2:Array, _arg3:Number, _arg4:Array, _arg5:Array):Number{
var _local8:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local6:BitString = _arg5[0];
var _local7:BitString = _arg5[240];
var _local9:Array = fDCTQuant(_arg1, _arg2);
_local8 = 0;
while (_local8 < 64) {
DU[ZigZag[_local8]] = _local9[_local8];
_local8++;
};
var _local10:int = (DU[0] - _arg3);
_arg3 = DU[0];
if (_local10 == 0){
writeBits(_arg4[0]);
} else {
writeBits(_arg4[category[(32767 + _local10)]]);
writeBits(bitcode[(32767 + _local10)]);
};
var _local11 = 63;
while ((((_local11 > 0)) && ((DU[_local11] == 0)))) {
_local11--;
};
if (_local11 == 0){
writeBits(_local6);
return (_arg3);
};
_local8 = 1;
while (_local8 <= _local11) {
_local12 = _local8;
while ((((DU[_local8] == 0)) && ((_local8 <= _local11)))) {
_local8++;
};
_local13 = (_local8 - _local12);
if (_local13 >= 16){
_local14 = 1;
while (_local14 <= (_local13 / 16)) {
writeBits(_local7);
_local14++;
};
_local13 = int((_local13 & 15));
};
writeBits(_arg5[((_local13 * 16) + category[(32767 + DU[_local8])])]);
writeBits(bitcode[(32767 + DU[_local8])]);
_local8++;
};
if (_local11 != 63){
writeBits(_local6);
};
return (_arg3);
}
public function encodeByteArray(_arg1:ByteArray, _arg2:int, _arg3:int, _arg4:Boolean=true):ByteArray{
return (internalEncode(_arg1, _arg2, _arg3, _arg4));
}
public function get contentType():String{
return (CONTENT_TYPE);
}
private function initQuantTables(_arg1:int):void{
var _local3:Number;
var _local8:int;
var _local2:int;
var _local4:Array = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99];
_local2 = 0;
while (_local2 < 64) {
_local3 = Math.floor((((_local4[_local2] * _arg1) + 50) / 100));
if (_local3 < 1){
_local3 = 1;
} else {
if (_local3 > 0xFF){
_local3 = 0xFF;
};
};
YTable[ZigZag[_local2]] = _local3;
_local2++;
};
var _local5:Array = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99];
_local2 = 0;
while (_local2 < 64) {
_local3 = Math.floor((((_local5[_local2] * _arg1) + 50) / 100));
if (_local3 < 1){
_local3 = 1;
} else {
if (_local3 > 0xFF){
_local3 = 0xFF;
};
};
UVTable[ZigZag[_local2]] = _local3;
_local2++;
};
var _local6:Array = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379];
_local2 = 0;
var _local7:int;
while (_local7 < 8) {
_local8 = 0;
while (_local8 < 8) {
fdtbl_Y[_local2] = (1 / (((YTable[ZigZag[_local2]] * _local6[_local7]) * _local6[_local8]) * 8));
fdtbl_UV[_local2] = (1 / (((UVTable[ZigZag[_local2]] * _local6[_local7]) * _local6[_local8]) * 8));
_local2++;
_local8++;
};
_local7++;
};
}
private function writeSOF0(_arg1:int, _arg2:int):void{
writeWord(65472);
writeWord(17);
writeByte(8);
writeWord(_arg2);
writeWord(_arg1);
writeByte(3);
writeByte(1);
writeByte(17);
writeByte(0);
writeByte(2);
writeByte(17);
writeByte(1);
writeByte(3);
writeByte(17);
writeByte(1);
}
private function computeHuffmanTbl(_arg1:Array, _arg2:Array):Array{
var _local7:int;
var _local3:int;
var _local4:int;
var _local5:Array = new Array();
var _local6 = 1;
while (_local6 <= 16) {
_local7 = 1;
while (_local7 <= _arg1[_local6]) {
_local5[_arg2[_local4]] = new BitString();
_local5[_arg2[_local4]].val = _local3;
_local5[_arg2[_local4]].len = _local6;
_local4++;
_local3++;
_local7++;
};
_local3 = (_local3 * 2);
_local6++;
};
return (_local5);
}
private function fDCTQuant(_arg1:Array, _arg2:Array):Array{
var _local4:int;
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;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local3:int;
_local4 = 0;
while (_local4 < 8) {
_local5 = (_arg1[(_local3 + 0)] + _arg1[(_local3 + 7)]);
_local6 = (_arg1[(_local3 + 0)] - _arg1[(_local3 + 7)]);
_local7 = (_arg1[(_local3 + 1)] + _arg1[(_local3 + 6)]);
_local8 = (_arg1[(_local3 + 1)] - _arg1[(_local3 + 6)]);
_local9 = (_arg1[(_local3 + 2)] + _arg1[(_local3 + 5)]);
_local10 = (_arg1[(_local3 + 2)] - _arg1[(_local3 + 5)]);
_local11 = (_arg1[(_local3 + 3)] + _arg1[(_local3 + 4)]);
_local12 = (_arg1[(_local3 + 3)] - _arg1[(_local3 + 4)]);
_local13 = (_local5 + _local11);
_local14 = (_local5 - _local11);
_local15 = (_local7 + _local9);
_local16 = (_local7 - _local9);
_arg1[(_local3 + 0)] = (_local13 + _local15);
_arg1[(_local3 + 4)] = (_local13 - _local15);
_local17 = ((_local16 + _local14) * 0.707106781);
_arg1[(_local3 + 2)] = (_local14 + _local17);
_arg1[(_local3 + 6)] = (_local14 - _local17);
_local13 = (_local12 + _local10);
_local15 = (_local10 + _local8);
_local16 = (_local8 + _local6);
_local18 = ((_local13 - _local16) * 0.382683433);
_local19 = ((0.5411961 * _local13) + _local18);
_local20 = ((1.306562965 * _local16) + _local18);
_local21 = (_local15 * 0.707106781);
_local22 = (_local6 + _local21);
_local23 = (_local6 - _local21);
_arg1[(_local3 + 5)] = (_local23 + _local19);
_arg1[(_local3 + 3)] = (_local23 - _local19);
_arg1[(_local3 + 1)] = (_local22 + _local20);
_arg1[(_local3 + 7)] = (_local22 - _local20);
_local3 = (_local3 + 8);
_local4++;
};
_local3 = 0;
_local4 = 0;
while (_local4 < 8) {
_local5 = (_arg1[(_local3 + 0)] + _arg1[(_local3 + 56)]);
_local6 = (_arg1[(_local3 + 0)] - _arg1[(_local3 + 56)]);
_local7 = (_arg1[(_local3 + 8)] + _arg1[(_local3 + 48)]);
_local8 = (_arg1[(_local3 + 8)] - _arg1[(_local3 + 48)]);
_local9 = (_arg1[(_local3 + 16)] + _arg1[(_local3 + 40)]);
_local10 = (_arg1[(_local3 + 16)] - _arg1[(_local3 + 40)]);
_local11 = (_arg1[(_local3 + 24)] + _arg1[(_local3 + 32)]);
_local12 = (_arg1[(_local3 + 24)] - _arg1[(_local3 + 32)]);
_local13 = (_local5 + _local11);
_local14 = (_local5 - _local11);
_local15 = (_local7 + _local9);
_local16 = (_local7 - _local9);
_arg1[(_local3 + 0)] = (_local13 + _local15);
_arg1[(_local3 + 32)] = (_local13 - _local15);
_local17 = ((_local16 + _local14) * 0.707106781);
_arg1[(_local3 + 16)] = (_local14 + _local17);
_arg1[(_local3 + 48)] = (_local14 - _local17);
_local13 = (_local12 + _local10);
_local15 = (_local10 + _local8);
_local16 = (_local8 + _local6);
_local18 = ((_local13 - _local16) * 0.382683433);
_local19 = ((0.5411961 * _local13) + _local18);
_local20 = ((1.306562965 * _local16) + _local18);
_local21 = (_local15 * 0.707106781);
_local22 = (_local6 + _local21);
_local23 = (_local6 - _local21);
_arg1[(_local3 + 40)] = (_local23 + _local19);
_arg1[(_local3 + 24)] = (_local23 - _local19);
_arg1[(_local3 + 8)] = (_local22 + _local20);
_arg1[(_local3 + 56)] = (_local22 - _local20);
_local3++;
_local4++;
};
_local4 = 0;
while (_local4 < 64) {
_arg1[_local4] = Math.round((_arg1[_local4] * _arg2[_local4]));
_local4++;
};
return (_arg1);
}
}
}//package com.gq.system
class BitString {
public var val:int;// = 0
public var len:int;// = 0
private function BitString(){
}
}
Section 12
//Map (com.gq.system.Map)
package com.gq.system {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import com.gq.ui.*;
public class Map extends Pages {
public var startMove:Boolean;
private var currentDressType:String;// = ""
private var currentTools:String;// = ""
public var back:Boolean;
private var currentHairColor:uint;// = 1
private var position:Object;
public var clickTarget;
public var can_change:Boolean;// = true
public function Map():void{
position = {shooes:[100, 400], muffler:[120, 220], glove:[120, 220], shirt:[130, 230], coat:[120, 220], sweater:[120, 220], trousers:[120, 320], skirt:[120, 300]};
super();
GameData.map = this;
GameTools.pushArr(GameData.actionArr, this);
}
private function initStyle():void{
initHair();
initBox();
initHead();
initBag();
initHat();
myBtns.dressBtns.mouseEnabled = false;
myBtns.dressBtns.buttonMode = true;
chooseDress("cloth");
}
private function chooseTools(_arg1:String):void{
if ((((((_arg1 == "face")) || ((_arg1 == "shadow")))) || ((_arg1 == "body")))){
if (currentTools == _arg1){
currentTools = "";
boxOpen(_arg1, 1);
} else {
currentTools = _arg1;
boxOpen("face", 1);
boxOpen("shadow", 1);
boxOpen("body", 1);
boxOpen(_arg1);
};
};
}
override protected function clickHD(_arg1:MouseEvent):void{
var _local5:String;
var _local6:uint;
var _local7:String;
var _local8:uint;
var _local9:uint;
var _local10:MovieClip;
var _local2:String = _arg1.target.name;
var _local3:uint = _local2.indexOf("_");
var _local4:String = _local2.substring(0, _local3);
if (_local2 == "hair"){
changeFunc("hair", myBtns.hair.currentFrame);
SoundClass.addMusic("sound", "select");
} else {
_local5 = _local2.substring((_local3 + 1), _local2.length);
if (_local4 == "tools"){
chooseTools(_local5);
SoundClass.addMusic("sound", "select");
} else {
if (_local4 == "lash"){
GameData.showGirl.currentEyeType = uint(_local5);
changeFunc("lashstyle", 999);
} else {
if (_local4 == "headdress"){
changeFunc("headdress", uint(_local5));
} else {
if (_local4 == "choose"){
chooseStyle(_local5);
} else {
if (_local4 == "color"){
_local6 = _local2.lastIndexOf("_");
_local7 = _local2.substring((_local3 + 1), _local6);
_local8 = uint(_local2.substring((_local6 + 1), _local2.length));
if (_local7 == "hair"){
currentHairColor = _local8;
myBtns.hair.gotoAndStop(((((myBtns.hair.currentFrame - 1) % 8) + 1) + ((currentHairColor - 1) * 8)));
changeFunc("hair", myBtns.hair.currentFrame);
} else {
if (_local7 == "mouth"){
changeFunc("mouth", _local8);
} else {
if (_local7 == "eye"){
changeFunc("eye", _local8);
} else {
if (_local7 == "lash"){
changeFunc("lash", _local8);
} else {
if ((((((_local7 == "shadow")) || ((_local7 == "face")))) || ((_local7 == "body")))){
if (currentTools == _local7){
changeFunc(_local7, _local8);
};
};
};
};
};
};
} else {
if (_local4 == "dress"){
chooseDress(_local5);
SoundClass.addMusic("sound", "select");
} else {
if (_local4 == "mc"){
if (can_change){
can_change = false;
changeDress((_arg1.target as MovieClip), _arg1.target.currentLabel, _arg1.target.currentFrame);
_local9 = uint(_local5);
while (_local9 <= 3) {
_local10 = myBtns.dressBtns[currentDressType][("mc_" + String(_local9))];
changeToNextFrame(_local10);
_local9++;
};
if (myBtns.dressBtns[currentDressType].mc_2.currentFrame == myBtns.dressBtns[currentDressType].mc_1.currentFrame){
changeToNextFrame(myBtns.dressBtns[currentDressType].mc_2);
};
while ((((myBtns.dressBtns[currentDressType].mc_3.currentFrame == myBtns.dressBtns[currentDressType].mc_1.currentFrame)) || ((myBtns.dressBtns[currentDressType].mc_3.currentFrame == myBtns.dressBtns[currentDressType].mc_2.currentFrame)))) {
changeToNextFrame(myBtns.dressBtns[currentDressType].mc_3);
};
SoundClass.addMusic("sound", "select");
};
} else {
if (_local4 == "bag"){
myBtns.bag_1.visible = true;
myBtns.bag_2.visible = true;
_arg1.target.visible = false;
changeFunc("bag", uint(_local5));
} else {
if (_local4 == "hat"){
changeFunc("hat", uint(_local5));
};
};
};
};
};
};
};
};
};
};
}
private function changeFunc(_arg1:String, _arg2:uint):void{
var which = _arg1;
var index = _arg2;
try {
var _local4 = GameData.showGirl;
_local4[("change_" + which)](index);
SoundClass.addMusic("sound", "select");
} catch(e) {
trace("无此函数");
};
}
public function updataEvent():void{
if (startMove){
if (back){
if (currentFrame > 1){
prevFrame();
if ((currentFrame % 15) == 1){
back = false;
startMove = false;
};
};
} else {
if (currentFrame < totalFrames){
nextFrame();
if ((currentFrame % 15) == 1){
back = false;
startMove = false;
};
};
};
};
}
private function initHead():void{
myBtns.head.mouseEnabled = false;
myBtns.head.buttonMode = true;
myBtns.head.gotoAndStop(1);
}
private function initBag():void{
myBtns.bag_1.gotoAndStop(1);
myBtns.bag_2.gotoAndStop(2);
myBtns.bag_1.buttonMode = true;
myBtns.bag_2.buttonMode = true;
}
private function initHair():void{
myBtns.hair.gotoAndStop(1);
myBtns.hair.buttonMode = true;
myBtns.hair.hot.mouseEnabled = false;
}
private function chooseStyle(_arg1:String):void{
if (_arg1 == "hair"){
if (myBtns.hair.currentFrame < (8 * currentHairColor)){
myBtns.hair.nextFrame();
} else {
myBtns.hair.gotoAndStop((((currentHairColor - 1) * 8) + 1));
};
} else {
if (_arg1 == "dress"){
if (currentDressType != ""){
nextDress(currentDressType);
};
};
};
SoundClass.addMusic("sound", "select");
}
public function initBox():void{
myBtns.shadow.mouseChildren = false;
myBtns.shadow.mouseEnabled = false;
myBtns.face.mouseChildren = false;
myBtns.face.mouseEnabled = false;
myBtns.body.mouseChildren = false;
myBtns.body.mouseChildren = false;
boxOpen("shadow", 1);
boxOpen("face", 1);
boxOpen("body", 1);
currentTools = "";
}
private function nextDress(_arg1:String):void{
var _local2:uint = 1;
while (_local2 <= 3) {
changeToNextFrame(myBtns.dressBtns[_arg1][("mc_" + String(_local2))]);
while (!(checkOk(_arg1, _local2))) {
changeToNextFrame(myBtns.dressBtns[_arg1][("mc_" + String(_local2))]);
};
_local2++;
};
}
public function getData(_arg1:String):void{
GameData.mapArr = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 1, 0, 0, 1, 1, 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, 1], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [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, 1, 1, 1, 1, 0, 0, 0, 1, 1], [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, 1, 1], [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, 1, 1], [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, 1, 1], [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, 1, 0, 0, 0, 0, 1, 1, 1], [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, 1, 1, 1, 1, 1, 1, 1, 1], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
}
private function initHat():void{
myBtns.hat.mouseEnabled = false;
myBtns.hat.gotoAndStop(1);
}
private function changeDress(_arg1:MovieClip, _arg2:String, _arg3:uint):void{
var _local4:uint = _arg2.indexOf("_");
var _local5:String = _arg2.substring(0, _local4);
var _local6:String = _arg2.substring((_local4 + 1), _arg2.length);
var _local7:Point = _arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y));
var _local8:Point = new Point(position[_local5][0], position[_local5][1]);
new MoveMc(_local7, _local8, _local5, (_arg3 - int(_local6)), _arg1);
}
private function changeToNextFrame(_arg1:MovieClip):void{
if (_arg1.currentFrame < _arg1.totalFrames){
_arg1.nextFrame();
} else {
_arg1.gotoAndStop(1);
};
}
private function checkOk(_arg1:String, _arg2:uint):Boolean{
var _local3:MovieClip = myBtns.dressBtns[_arg1][("mc_" + String(_arg2))];
var _local4:String = _local3.currentLabel.substring(0, _local3.currentLabel.indexOf("_"));
var _local5:String = _local3.currentLabel.substring((_local3.currentLabel.indexOf("_") + 1), _local3.currentLabel.length);
if (GameData.showGirl._this[_local4].currentFrame == (_local3.currentFrame - uint(_local5))){
return (false);
};
if (_arg2 == 2){
if (myBtns.dressBtns[_arg1].mc_2.currentFrame == myBtns.dressBtns[_arg1].mc_1.currentFrame){
return (false);
};
} else {
if (_arg2 == 3){
if ((((myBtns.dressBtns[_arg1].mc_3.currentFrame == myBtns.dressBtns[_arg1].mc_1.currentFrame)) || ((myBtns.dressBtns[_arg1].mc_3.currentFrame == myBtns.dressBtns[_arg1].mc_2.currentFrame)))){
return (false);
};
};
};
return (true);
}
private function boxOpen(_arg1:String, _arg2:uint=2){
var _local4:MovieClip;
var _local3:uint;
while (_local3 < myBtns[_arg1].numChildren) {
_local4 = (myBtns[_arg1].getChildAt(_local3) as MovieClip);
_local4.gotoAndStop(_arg2);
_local3++;
};
}
private function chooseDress(_arg1:String):void{
myBtns.dressBtns[_arg1].visible = true;
GameTools.addFilters(myBtns[("dress_" + _arg1)], GameData.whiteFilters);
currentDressType = _arg1;
myBtns.dressBtns[_arg1].mc_1.gotoAndStop(1);
myBtns.dressBtns[_arg1].mc_2.gotoAndStop(2);
myBtns.dressBtns[_arg1].mc_3.gotoAndStop(3);
while (!(checkOk(_arg1, 1))) {
changeToNextFrame(myBtns.dressBtns[_arg1].mc_1);
};
while (!(checkOk(_arg1, 2))) {
changeToNextFrame(myBtns.dressBtns[_arg1].mc_2);
};
while (!(checkOk(_arg1, 3))) {
changeToNextFrame(myBtns.dressBtns[_arg1].mc_3);
};
}
override protected function init():void{
stop();
super.init();
initStyle();
}
}
}//package com.gq.system
Section 13
//MonsterCreater (com.gq.system.MonsterCreater)
package com.gq.system {
import com.gq.moveobject.*;
public class MonsterCreater {
private var createCount:uint;
private var createNum:uint;
private var createCD:uint;// = 50
public function MonsterCreater():void{
createCD = 20;
createCount = createCD;
}
public function updataEvent():void{
if ((((++createCount >= createCD)) && (!(GameData.can_pass)))){
createCount = 0;
createMonster();
};
}
public function createObj(_arg1:String, _arg2:String, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Array, _arg8:uint=0):MoveObject{
var _local9:Class = GameTools.createClass(("com.gq.moveobject." + _arg2));
var _local10:MoveObject = new (_local9);
_local10.init(_arg4, _arg5, _arg6, "stand1");
GameTools.pushArr(GameData.actionArr, _local10);
GameTools.pushArr(GameData.objectArr, _local10);
_local10.createMe(GameData[_arg1], _arg3, 0, "objects", _arg7);
return (_local10);
}
private function createMonster():void{
}
}
}//package com.gq.system
Section 14
//Printer (com.gq.system.Printer)
package com.gq.system {
import flash.display.*;
import flash.geom.*;
import flash.printing.*;
public class Printer {
public function Printer(_arg1:DisplayObjectContainer):void{
var _local2:BitmapData = new BitmapData(GameData.screenWidth, GameData.screenHeight);
var _local3:Rectangle = _arg1.getBounds(_arg1);
var _local4:Matrix = new Matrix(1, 0, 0, 1, 0, 0);
_local2.draw(_arg1, _local4);
var _local5:Bitmap = new Bitmap(_local2);
var _local6:Sprite = new Sprite();
_local6.addChild(_local5);
_local6.rotation = 90;
var _local7:PrintJob = new PrintJob();
_local7.start();
_local7.addPage(_local6);
_local7.send();
}
}
}//package com.gq.system
Section 15
//SoundClass (com.gq.system.SoundClass)
package com.gq.system {
import flash.utils.*;
import flash.media.*;
public class SoundClass {
public static var sound2Channel:SoundChannel = new SoundChannel();
public static var sound1:Sound = new Sound();
public static var sound2:Sound = new Sound();
public static var sound4:Sound = new Sound();
public static var sound3:Sound = new Sound();
public static var time:uint;
public static var sound:Sound = new Sound();
public static var sound4Channel:SoundChannel = new SoundChannel();
public static var sound3Channel:SoundChannel = new SoundChannel();
public static var sound1Channel:SoundChannel = new SoundChannel();
public static var music:Sound = new Sound();
public static var musicChannel:SoundChannel = new SoundChannel();
public static var channelName:String;
public static var currentSoundTransform:SoundTransform = new SoundTransform();
public static var soundName:String;
public static var soundChannel:SoundChannel = new SoundChannel();
public function SoundClass():void{
}
public static function init():void{
playMusic();
}
public static function addMusic(_arg1:String, _arg2:String, _arg3:uint=1):void{
channelName = _arg1;
if (_arg1 == "music"){
SoundClass.currentSoundTransform = GameData.musicTrans;
} else {
SoundClass.currentSoundTransform = GameData.soundTrans;
};
soundName = _arg2;
time = _arg3;
init();
}
public static function playMusic(_arg1:Number=0):void{
var _local2:Class = (getDefinitionByName(soundName) as Class);
var _local3:Sound = new (_local2);
SoundClass[channelName] = _local3;
SoundClass[(channelName + "Channel")].stop();
SoundClass[(channelName + "Channel")] = _local3.play(_arg1, time);
adjustVolume(channelName);
}
public static function playSound():void{
try {
musicChannel = music.play(1, 9999);
currentSoundTransform = GameData.musicTrans;
adjustVolume("music");
} catch(e) {
};
try {
sound4Channel = sound4.play(1, 9999);
currentSoundTransform = GameData.soundTrans;
adjustVolume("sound");
} catch(e) {
};
}
public static function setVolume(_arg1:Number):void{
var _local2:SoundTransform = new SoundTransform();
_local2.volume = _arg1;
GameData.soundTrans.volume = _arg1;
GameData.musicTrans.volume = _arg1;
SoundClass.musicChannel.soundTransform = GameData.musicTrans;
SoundClass.soundChannel.soundTransform = GameData.soundTrans;
SoundClass.sound1Channel.soundTransform = GameData.soundTrans;
SoundClass.sound2Channel.soundTransform = GameData.soundTrans;
SoundClass.sound3Channel.soundTransform = GameData.soundTrans;
SoundClass.sound4Channel.soundTransform = GameData.soundTrans;
}
public static function stopSound():void{
try {
musicChannel.stop();
} catch(e) {
};
try {
soundChannel.stop();
} catch(e) {
};
try {
sound1Channel.stop();
} catch(e) {
};
try {
sound2Channel.stop();
} catch(e) {
};
try {
sound3Channel.stop();
} catch(e) {
};
try {
sound4Channel.stop();
} catch(e) {
};
}
public static function adjustVolume(_arg1:String):void{
SoundClass[(_arg1 + "Channel")].soundTransform = currentSoundTransform;
}
}
}//package com.gq.system
Section 16
//Black (com.gq.ui.Black)
package com.gq.ui {
import flash.display.*;
import flash.events.*;
import com.gq.system.*;
public class Black extends Sprite {
public function Black():void{
init();
}
private function init():void{
drawMySelf();
addEventListener(Event.ENTER_FRAME, updataEvent);
}
private function drawMySelf():void{
graphics.lineStyle(1);
graphics.beginFill(0);
graphics.drawRect(0, 0, GameData.screenWidth, GameData.screenHeight);
}
private function updataEvent(_arg1:Event):void{
alpha = (alpha - 0.05);
if (alpha <= 0){
removeMe();
};
}
private function removeMe():void{
removeEventListener(Event.ENTER_FRAME, updataEvent);
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.gq.ui
Section 17
//Congratulation (com.gq.ui.Congratulation)
package com.gq.ui {
import com.gq.system.*;
public class Congratulation extends Pages {
public function Congratulation():void{
}
override protected function init():void{
super.init();
}
public function backFunc():void{
removeMe();
GameSys.removeStage();
GameTools.createPage(Page1);
}
}
}//package com.gq.ui
Section 18
//GameUI (com.gq.ui.GameUI)
package com.gq.ui {
import flash.display.*;
import flash.events.*;
import com.gq.system.*;
import flash.system.*;
public class GameUI extends Pages {
private var done:Boolean;
public var outBtns:MovieClip;
private var timeCount:uint;
public var sound:MovieClip;
public var currentCount:uint;
private var boardOk:Boolean;// = true
public var board:MovieClip;
private var boardMode:String;// = "boardIn"
public var totalCount:uint;
private var currentMode:String;
public function GameUI():void{
GameData.gameUI = this;
}
public function menuFunc():void{
removeMe();
GameSys.removeStage();
GameSys.createGame();
}
public function outSideMode():void{
GameData.currentClickObj = null;
GameTools.pushArr(GameData.can_clickArr, GameData.showGirl);
GameData.showGirl.currentMode = "out";
GameData.showGirl._this.scaleX = GameTools.getTab(GameData.showGirl.distScaleOut);
currentMode = "out";
myBtns.removeEventListener(MouseEvent.CLICK, clickHD);
outBtns.addEventListener(MouseEvent.MOUSE_DOWN, clickHD);
board.addEventListener(MouseEvent.CLICK, chooseObj);
}
override protected function init():void{
myBtns.addEventListener(MouseEvent.CLICK, clickHD);
sound.addEventListener(MouseEvent.CLICK, soundHD);
addEventListener(Event.ENTER_FRAME, enterframeHD);
stop();
outBtns.channel.stop();
outBtns.channel.buttonMode = true;
sound.buttonMode = true;
var _local1:String = Capabilities.version;
if (uint(_local1.substring(4, _local1.indexOf(","))) < 10){
outBtns.photo.visible = false;
};
if (GameData.soundTrans.volume == 0){
sound.gotoAndStop(2);
} else {
sound.gotoAndStop(1);
};
}
private function enterframeHD(_arg1:Event):void{
if (!GameData.isPausing){
updataEvent();
};
}
public function scale_upFunc():void{
if (GameData.currentClickObj){
GameData.currentClickObj.myHost.scaleUp();
};
}
private function updataEvent():void{
if (currentMode == "out"){
if (currentFrame < totalFrames){
nextFrame();
} else {
currentMode = "";
};
} else {
if (currentMode == "in"){
if (currentFrame > 1){
prevFrame();
} else {
currentMode = "";
};
};
};
controlBoard();
}
public function nextFunc():void{
GameData.map.startMove = true;
GameData.map.back = false;
GameData.map.initBox();
if (GameData.map.currentFrame >= 46){
outSideMode();
};
}
private function controlBoard():void{
if (!boardOk){
var _local1 = this;
_local1[(boardMode + "Func")]();
};
}
private function soundHD(_arg1:MouseEvent):void{
if (sound.currentFrame == 1){
SoundClass.setVolume(0);
sound.gotoAndStop(2);
} else {
SoundClass.setVolume(1);
sound.gotoAndStop(1);
};
}
public function scale_downFunc():void{
if (GameData.currentClickObj){
GameData.currentClickObj.myHost.scaleDown();
};
}
override protected function clickHD(_arg1:MouseEvent):void{
GameData.controlClass.impossible = true;
super.clickHD(_arg1);
}
public function inSideMode():void{
if (GameData.currentClickObj){
GameTools.addFilters(GameData.currentClickObj, []);
GameData.currentClickObj = null;
};
GameTools.unPushArr(GameData.can_clickArr, GameData.showGirl);
GameData.showGirl.currentMode = "in";
currentMode = "in";
myBtns.addEventListener(MouseEvent.CLICK, clickHD);
outBtns.removeEventListener(MouseEvent.MOUSE_DOWN, clickHD);
board.removeEventListener(MouseEvent.CLICK, chooseObj);
}
private function chooseObj(_arg1:MouseEvent):void{
}
public function backFunc():void{
GameData.map.startMove = true;
GameData.map.back = true;
GameData.map.initBox();
if (GameData.map.currentFrame == GameData.map.totalFrames){
inSideMode();
if (outBtns.channel.y < 228){
boardOk = false;
boardMode = "boardIn";
outBtns.channel.y = 228;
outBtns.channel.gotoAndStop(1);
};
};
}
public function photoFunc():void{
stopDrag();
GameData.isPausing = true;
GameData.controlClass.isPhoto = true;
}
private function boardInFunc():void{
var _local1:Number;
if (board.y < 572){
_local1 = ((575 - board.y) / 10);
board.y = (board.y + _local1);
outBtns.channel.y = (outBtns.channel.y + _local1);
} else {
board.y = 575;
outBtns.channel.gotoAndStop(1);
outBtns.channel.y = 228;
boardOk = true;
};
}
public function ptFunc():void{
try {
new Printer(GameData.Scen);
} catch(e) {
};
}
private function Time():void{
}
public function scaleFunc():void{
if (GameData.currentClickObj){
GameData.currentClickObj.scaleX = (GameData.currentClickObj.scaleX * -1);
};
}
public function delFunc():void{
if (((GameData.currentClickObj) && (!((GameData.currentClickObj.myHost == GameData.showGirl))))){
GameData.currentClickObj.myHost.removeMe();
GameData.currentClickObj = null;
};
}
public function bgFunc():void{
if (GameData.map.myBtns.map.currentFrame < GameData.map.myBtns.map.totalFrames){
GameData.map.myBtns.map.nextFrame();
} else {
GameData.map.myBtns.map.gotoAndStop(1);
};
}
private function Score():void{
}
override public function removeMe():void{
GameData.gameUI = null;
removeEventListener(Event.ENTER_FRAME, enterframeHD);
parent.removeChild(this);
}
public function channelFunc():void{
if (boardOk){
boardMode = ((boardMode)=="boardIn") ? "boardOut" : "boardIn";
boardOk = false;
};
}
private function boardOutFunc():void{
var _local1:Number;
if (board.y > 402){
_local1 = ((400 - board.y) / 10);
board.y = (board.y + _local1);
outBtns.channel.y = (outBtns.channel.y + _local1);
} else {
board.y = 400;
outBtns.channel.gotoAndStop(2);
boardOk = true;
};
}
}
}//package com.gq.ui
Section 19
//HelpPage (com.gq.ui.HelpPage)
package com.gq.ui {
import flash.events.*;
import com.gq.system.*;
public class HelpPage extends Pages {
public function HelpPage():void{
}
override protected function init():void{
myBtns.addEventListener(MouseEvent.CLICK, clickHD);
}
public function backFunc():void{
GameTools.createPage(Page1);
removeMe();
}
}
}//package com.gq.ui
Section 20
//Lose (com.gq.ui.Lose)
package com.gq.ui {
import flash.events.*;
import com.gq.system.*;
public class Lose extends Pages {
public function Lose():void{
}
override protected function init():void{
addEventListener(Event.ENTER_FRAME, updataEvent);
}
public function backFunc():void{
removeMe();
GameSys.removeStage();
GameTools.createPage(Page1);
}
public function againFunc():void{
removeMe();
GameSys.removeStage();
GameSys.Build();
}
private function updataEvent(_arg1:Event):void{
if (currentFrame == totalFrames){
stop();
removeEventListener(Event.ENTER_FRAME, updataEvent);
};
}
override public function removeMe():void{
super.removeMe();
}
}
}//package com.gq.ui
Section 21
//MoveMc (com.gq.ui.MoveMc)
package com.gq.ui {
import flash.display.*;
import flash.geom.*;
import com.gq.system.*;
public class MoveMc extends MovieClip {
private var shadow:MovieClip;
private var part:String;
private var num:uint;
private var distPoint:Point;
public function MoveMc(_arg1:Point, _arg2:Point, _arg3:String, _arg4:uint, _arg5):void{
x = _arg1.x;
y = _arg1.y;
distPoint = _arg2;
part = _arg3;
num = _arg4;
GameTools.pushArr(GameData.actionArr, this);
getMyPic(_arg5);
GameData.Scen.addChild(this);
scaleX = (scaleY = 1.15);
}
public function updataEvent():void{
var _local1:Number = (distPoint.x - x);
var _local2:Number = (distPoint.y - y);
if ((((Math.abs(_local1) < 2)) && ((Math.abs(_local2) < 2)))){
removeMe();
GameData.showGirl.changePic(part, num);
GameData.map.can_change = true;
} else {
x = (x + (_local1 / 5));
y = (y + (_local2 / 5));
};
}
private function getMyPic(_arg1):void{
shadow = GameTools.getShadow(this, _arg1, 0, 0);
}
public function removeMe():void{
shadow.removeMe();
GameTools.unPushArr(GameData.actionArr, this);
parent.removeChild(this);
}
}
}//package com.gq.ui
Section 22
//Page1 (com.gq.ui.Page1)
package com.gq.ui {
import flash.display.*;
import flash.events.*;
import com.gq.system.*;
import flash.text.*;
public class Page1 extends Pages {
public var __id3_:MovieClip;
public function Page1():void{
__setProp___id3__sprite60_Layer124_0();
}
override protected function init():void{
try {
mySound = "title";
myUrl = "moregames-menu";
super.init();
controlSoundBtn();
GameDesignClass.clothData = GameTools.cloneObject(GameDesignClass.clothOriData);
} catch(e) {
};
}
private function showTestButton():void{
var mc:SimpleButton;
var mcClick:*;
mcClick = function (_arg1:MouseEvent):void{
mc.enabled = false;
GameData.GAME_TESTING = true;
mc.removeEventListener(MouseEvent.CLICK, mcClick);
};
mc = new SimpleButton();
addChild(mc);
mc.x = 630;
mc.y = 30;
var whiteRect:Sprite = new Sprite();
var redRect:Sprite = new Sprite();
GameTools.drawRectangle(whiteRect, 0xFFFFFF, 0, 0, 50, 20);
GameTools.drawRectangle(redRect, 0xFF0000, 0, 0, 50, 20);
mc.upState = whiteRect;
mc.downState = (mc.overState = (mc.hitTestState = redRect));
var _text:TextField = new TextField();
redRect.addChild(_text);
_text.text = "Test";
_text = new TextField();
_text.text = "Test";
whiteRect.addChild(_text);
mc.addEventListener(MouseEvent.CLICK, mcClick);
}
function __setProp___id3__sprite60_Layer124_0(){
try {
__id3_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id3_.Type = "logo-menu";
__id3_.Goto = 1;
try {
__id3_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function helpFunc():void{
removeMe();
GameTools.createPage(HelpPage);
}
public function startFunc():void{
removeMe();
GameTools.createPage(Page3);
GameSys.Build();
}
public function soundFunc():void{
if (myBtns.sound.currentFrame == 1){
SoundClass.setVolume(0);
myBtns.sound.gotoAndStop(2);
} else {
SoundClass.setVolume(1);
myBtns.sound.gotoAndStop(1);
};
}
private function showVerson():void{
var _local1:TextField = new TextField();
GameData.Scen.addChild(_local1);
_local1.x = 600;
_local1.height = 20;
_local1.text = ("Verson:" + GameData.VERSON);
}
}
}//package com.gq.ui
Section 23
//Page3 (com.gq.ui.Page3)
package com.gq.ui {
import flash.display.*;
import flash.events.*;
import com.gq.system.*;
public class Page3 extends Pages {
private var eyebrow_colorCount:uint;
private var mouthCount:uint;
public var barbie:MovieClip;
private var evtName:String;// = ""
private var currentColorIndex:uint;
private var skinCount:uint;
private var eyelashCount:uint;
public var mc:MovieClip;
private var eyebrowCount:uint;
public var __id2_:MovieClip;
private var faceCount:uint;
private var currentChangeIndex:uint;
public var box:MovieClip;
private var hairCount:uint;
public var chooseBtns:MovieClip;
private var shadowCount:uint;
public var tools:MovieClip;
private var eyeCount:uint;
private var evtCount:uint;
public function Page3():void{
__setProp___id2__sprite454_Layer294_0();
}
private function chooseTools(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
showBox(_local2);
SoundClass.addMusic("sound", "press");
}
private function showBox(_arg1:String):void{
if (box.currentLabel == _arg1){
box.gotoAndStop("empty");
} else {
box.gotoAndStop(_arg1);
};
}
function __setProp___id2__sprite454_Layer294_0(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_.Type = "logo-menu";
__id2_.Goto = 1;
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function initListeners():void{
box.addEventListener(MouseEvent.CLICK, changeAvata);
chooseBtns.addEventListener(MouseEvent.CLICK, chooseTools);
addEventListener(Event.ENTER_FRAME, updataEvent);
}
override protected function init():void{
myUrl = "moregames-menu";
super.init();
controlSoundBtn();
initDress(barbie.body);
initMc();
initTools();
initListeners();
}
private function initTools():void{
tools.eyebrow.gotoAndStop(GameDesignClass.clothData.eyebrow);
tools.eyelash.gotoAndStop(GameDesignClass.clothData.eyelash);
tools.eye.gotoAndStop(GameDesignClass.clothData.eye);
tools.shadow.gotoAndStop(GameDesignClass.clothData.shadow);
tools.mouth.gotoAndStop(GameDesignClass.clothData.mouth);
tools.face.gotoAndStop(GameDesignClass.clothData.face);
tools.skin.gotoAndStop(GameDesignClass.clothData.skin);
}
private function judgeEvent():void{
if (evtName != ""){
if (++evtCount == this[(evtName + "Count")]){
changeEvent();
};
};
}
private function initMc():void{
mc.hair.stop();
mc.shadow.stop();
mc.eye.stop();
mc.skin.stop();
mc.mouth.stop();
mc.face.stop();
mc.eyelash.stop();
mc.eyebrow.stop();
mc.eyebrow_color.stop();
hairCount = mc.hair.totalFrames;
shadowCount = mc.shadow.totalFrames;
eyeCount = mc.eye.totalFrames;
skinCount = mc.skin.totalFrames;
mouthCount = mc.mouth.totalFrames;
faceCount = mc.face.totalFrames;
eyelashCount = mc.eyelash.totalFrames;
eyebrowCount = mc.eyebrow.totalFrames;
eyebrow_colorCount = eyebrowCount;
box.gotoAndStop("empty");
barbie.body.hat.visible = false;
barbie.body.glass.visible = false;
}
private function changeEvent():void{
trace(evtName);
if (evtName == "eyebrow"){
barbie.body.eyebrow.gotoAndStop((((currentChangeIndex - 1) * 6) + 1));
} else {
if (evtName == "eyebrow_color"){
barbie.body.eyebrow.gotoAndStop(((uint(((barbie.body.eyebrow.currentFrame - 1) / 6)) * 6) + currentColorIndex));
} else {
barbie.body[evtName].gotoAndStop(currentChangeIndex);
GameDesignClass.clothData[evtName] = currentChangeIndex;
if (evtName == "skin"){
barbie.body.hand2.gotoAndStop(currentChangeIndex);
GameDesignClass.clothData.hand2 = currentChangeIndex;
};
};
};
evtName = "";
}
private function updataEvent(_arg1:Event):void{
judgeEvent();
}
public function nextFunc():void{
removeMe();
GameTools.createPage(Page4);
}
private function changeAvata(_arg1:MouseEvent):void{
var _local3:String;
var _local2:String = _arg1.target.name;
if (_local2 == "box"){
} else {
_local3 = _local2.substring(0, _local2.lastIndexOf("_"));
evtCount = 0;
evtName = _local3;
mc[_local3].play();
if (_local3 == "eyebrow_color"){
currentColorIndex = uint(_local2.substring((_local2.lastIndexOf("_") + 1), _local2.length));
} else {
currentChangeIndex = uint(_local2.substring((_local2.lastIndexOf("_") + 1), _local2.length));
};
SoundClass.addMusic("sound", "press");
};
}
public function soundFunc():void{
if (myBtns.sound.currentFrame == 1){
SoundClass.setVolume(0);
myBtns.sound.gotoAndStop(2);
} else {
SoundClass.setVolume(1);
myBtns.sound.gotoAndStop(1);
};
}
override protected function delListeners():void{
super.delListeners();
box.removeEventListener(MouseEvent.CLICK, changeAvata);
chooseBtns.removeEventListener(MouseEvent.CLICK, chooseTools);
removeEventListener(Event.ENTER_FRAME, updataEvent);
}
}
}//package com.gq.ui
Section 24
//Page4 (com.gq.ui.Page4)
package com.gq.ui {
import flash.display.*;
import flash.events.*;
import com.gq.system.*;
public class Page4 extends Pages {
public var __id1_:MovieClip;
public var up_1:MovieClip;
public var up_2:MovieClip;
public var up_3:MovieClip;
private var maxDressNum:Object;
public var controlBtns:MovieClip;
public var down_2:MovieClip;
public var down_3:MovieClip;
public var down_1:MovieClip;
public var body:MovieClip;
public var dressMc:MovieClip;
public var dressBtns:MovieClip;
public function Page4():void{
__setProp___id1__sprite559_();
}
private function initDownDress(_arg1:uint):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
_local2 = checkIndex(down_1, _arg1);
_local3 = checkIndex(down_1, (_local2 + 1));
_local4 = checkIndex(down_1, (_local3 + 1));
down_1.gotoAndStop(_local2);
down_2.gotoAndStop(_local3);
down_3.gotoAndStop(_local4);
}
private function initMc():void{
dressMc.stop();
initUpDress(1);
initDownDress(1);
dressMc.buttonMode = true;
up_1.buttonMode = true;
up_2.buttonMode = true;
up_3.buttonMode = true;
down_1.buttonMode = true;
down_2.buttonMode = true;
down_3.buttonMode = true;
}
public function backFunc():void{
removeMe();
GameTools.createPage(Page3);
}
private function mouseOutHd(_arg1:MouseEvent):void{
_arg1.target.scaleX = (_arg1.target.scaleY = (_arg1.target.scaleY / 1.1));
}
override protected function init():void{
myUrl = "moregames-menu";
super.init();
controlSoundBtn();
initListeners();
initDress(body);
initMc();
maxDressNum = {hat:[24, 31], hand:[32, 37], glove:[12, 13], hair:[12, 21], glass:[9, 11], bag:[6, 8], necklace:[14, 23], cape:[1, 5], dress:[14, 23], cloth:[8, 13], trousers:[4, 7], bikini:[1, 3]};
}
private function downDressHd(_arg1:MouseEvent):void{
body.shoe.gotoAndStop(_arg1.target.currentFrame);
GameDesignClass.clothData.shoe = body.shoe.currentFrame;
SoundClass.addMusic("sound", "press");
}
public function nextFunc():void{
removeMe();
GameTools.createPage(Page5);
}
private function chooseDress(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
dressMc.gotoAndStop(_local2);
SoundClass.addMusic("sound", "press");
}
private function updataEvent(_arg1:Event):void{
if (((!((GameDesignClass.clothData.dress == GameDesignClass.clothOriData.dress))) || (!((GameDesignClass.clothData.cloth == GameDesignClass.clothOriData.cloth))))){
body.bikini.visible = false;
} else {
body.bikini.visible = true;
};
}
private function initListeners():void{
addEventListener(Event.ENTER_FRAME, updataEvent);
dressBtns.addEventListener(MouseEvent.CLICK, chooseDress);
controlBtns.addEventListener(MouseEvent.CLICK, controlDress);
body.addEventListener(MouseEvent.CLICK, clickPerson);
dressMc.addEventListener(MouseEvent.CLICK, dressHd);
up_1.addEventListener(MouseEvent.CLICK, upDressHd);
up_2.addEventListener(MouseEvent.CLICK, upDressHd);
up_3.addEventListener(MouseEvent.CLICK, upDressHd);
down_1.addEventListener(MouseEvent.CLICK, downDressHd);
down_2.addEventListener(MouseEvent.CLICK, downDressHd);
down_3.addEventListener(MouseEvent.CLICK, downDressHd);
dressMc.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
up_1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
up_2.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
up_3.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
down_1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
down_2.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
down_3.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
dressMc.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
up_1.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
up_2.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
up_3.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
down_1.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
down_2.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
down_3.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
}
private function controlDress(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name.substring(0, _arg1.target.name.indexOf("_"));
var _local3:String = _arg1.target.name.substring((_arg1.target.name.indexOf("_") + 1), _arg1.target.name.length);
if (_local2 == "up"){
if (_local3 == "left"){
initUpDress((up_1.currentFrame - 3));
} else {
initUpDress((up_1.currentFrame + 3));
};
} else {
if (_local2 == "mid"){
if (_local3 == "left"){
changeDress((dressMc.currentFrame - 1));
} else {
changeDress((dressMc.currentFrame + 1));
};
} else {
if (_local2 == "down"){
if (_local3 == "left"){
initDownDress((down_1.currentFrame - 3));
} else {
initDownDress((down_1.currentFrame + 3));
};
};
};
};
SoundClass.addMusic("sound", "press");
}
private function dressHd(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.currentLabel;
body[_local2].gotoAndStop((_arg1.target.currentFrame - (maxDressNum[_local2][0] - 1)));
GameDesignClass.clothData[_local2] = body[_local2].currentFrame;
SoundClass.addMusic("sound", "press");
}
private function checkIndex(_arg1:MovieClip, _arg2:uint):uint{
if (_arg2 < 1){
_arg2 = _arg1.totalFrames;
};
while (((!((GameDesignClass.upIndex.indexOf(_arg2) == -1))) || ((_arg2 > _arg1.totalFrames)))) {
_arg2++;
if (_arg2 > _arg1.totalFrames){
_arg2 = 1;
};
};
return (_arg2);
}
override protected function delListeners():void{
super.delListeners();
removeEventListener(Event.ENTER_FRAME, updataEvent);
dressBtns.removeEventListener(MouseEvent.CLICK, chooseDress);
controlBtns.removeEventListener(MouseEvent.CLICK, controlDress);
dressMc.removeEventListener(MouseEvent.CLICK, dressHd);
body.removeEventListener(MouseEvent.CLICK, clickPerson);
up_1.removeEventListener(MouseEvent.CLICK, upDressHd);
up_2.removeEventListener(MouseEvent.CLICK, upDressHd);
up_3.removeEventListener(MouseEvent.CLICK, upDressHd);
down_1.removeEventListener(MouseEvent.CLICK, downDressHd);
down_2.removeEventListener(MouseEvent.CLICK, downDressHd);
down_3.removeEventListener(MouseEvent.CLICK, downDressHd);
dressMc.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
up_1.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
up_2.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
up_3.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
down_1.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
down_2.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
down_3.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHd);
dressMc.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
up_1.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
up_2.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
up_3.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
down_1.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
down_2.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
down_3.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHd);
}
private function mouseOverHd(_arg1:MouseEvent):void{
_arg1.target.scaleX = (_arg1.target.scaleY = (_arg1.target.scaleY * 1.1));
}
private function changeDress(_arg1:uint):void{
var _local2:Array = maxDressNum[dressMc.currentLabel];
if (_arg1 < _local2[0]){
_arg1 = _local2[1];
} else {
if (_arg1 > _local2[1]){
_arg1 = _local2[0];
};
};
dressMc.gotoAndStop(_arg1);
}
private function upDressHd(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.currentLabel;
trace(1, _local2);
trace(2, (_arg1.target.currentFrame - (maxDressNum[_local2][0] - 1)));
trace(3, maxDressNum[_local2][0]);
body[_local2].gotoAndStop((_arg1.target.currentFrame - (maxDressNum[_local2][0] - 1)));
GameDesignClass.clothData[_local2] = body[_local2].currentFrame;
SoundClass.addMusic("sound", "press");
}
public function soundFunc():void{
if (myBtns.sound.currentFrame == 1){
SoundClass.setVolume(0);
myBtns.sound.gotoAndStop(2);
} else {
SoundClass.setVolume(1);
myBtns.sound.gotoAndStop(1);
};
}
private function initUpDress(_arg1:uint):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
_local2 = checkIndex(up_1, _arg1);
_local3 = checkIndex(up_1, (_local2 + 1));
_local4 = checkIndex(up_1, (_local3 + 1));
up_1.gotoAndStop(_local2);
up_2.gotoAndStop(_local3);
up_3.gotoAndStop(_local4);
}
private function clickPerson(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
trace(_local2);
trace(GameDesignClass.clothOriData[_local2]);
_arg1.target.gotoAndStop(GameDesignClass.clothOriData[_local2]);
GameDesignClass.clothData[_local2] = GameDesignClass.clothOriData[_local2];
SoundClass.addMusic("sound", "press");
}
function __setProp___id1__sprite559_(){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_.Type = "logo-ingame";
__id1_.Goto = 1;
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package com.gq.ui
Section 25
//Page5 (com.gq.ui.Page5)
package com.gq.ui {
import flash.display.*;
import flash.events.*;
import com.gq.moveobject.*;
import com.gq.system.*;
public class Page5 extends Pages {
private var done:Boolean;// = true
public var bg:MovieClip;
private var maxDressNum:Object;
public var body:MovieClip;
public var board:MovieClip;
public var showBoard:MovieClip;
public var __id0_:MovieClip;
private var moveDir:String;// = "up"
public function Page5():void{
__setProp___id0__sprite658_Layer506_0();
}
private function clickBg(_arg1:MouseEvent):void{
cancelSelect();
}
public function menuFunc():void{
GameDesignClass.bgData = [1, 999, 999, 1];
removeMe();
GameSys.removeStage();
GameSys.createGame();
}
private function initMc():void{
bg.gotoAndStop(GameDesignClass.bgData[0]);
if (GameDesignClass.bgData[1] != 999){
body.x = GameDesignClass.bgData[1];
body.y = GameDesignClass.bgData[2];
body.scaleX = (body.scaleY = GameDesignClass.bgData[3]);
};
board.buttonMode = true;
if (((!((GameDesignClass.clothData.dress == GameDesignClass.clothOriData.dress))) || (!((GameDesignClass.clothData.cloth == GameDesignClass.clothOriData.cloth))))){
body.bikini.visible = false;
};
}
override protected function myBtnsFunc():void{
cancelSelect();
}
function __setProp___id0__sprite658_Layer506_0(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.Type = "logo-menu";
__id0_.Goto = 1;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function move_up():void{
if ((-67 - board.y) > -1){
board.y = -67;
done = true;
myBtns.channel.scaleY = (myBtns.channel.scaleY * -1);
} else {
board.y = (board.y + ((-67 - board.y) / 10));
};
myBtns.channel.y = (board.y + 70);
}
private function initListeners():void{
addEventListener(Event.ENTER_FRAME, updataEvent);
board.addEventListener(MouseEvent.CLICK, chooseObject);
bg.addEventListener(MouseEvent.CLICK, clickBg);
}
override protected function init():void{
try {
myUrl = "moregames-menu";
super.init();
controlSoundBtn();
initListeners();
initDress(body);
initMc();
body.mouseChildren = false;
GameTools.pushArr(GameData.can_clickArr, body);
GameData.topSprite.visible = true;
addChildAt(GameData.topSprite, 1);
GameData.topSprite.addChild(body);
} catch(e) {
};
}
private function updataEvent(_arg1:Event):void{
if (!done){
var _local2 = this;
_local2[("move_" + moveDir)]();
};
}
private function cancelSelect():void{
if (GameData.currentClickObj){
GameTools.addFilters(GameData.currentClickObj, []);
GameData.currentClickObj = null;
};
}
private function move_down():void{
if ((200 - board.y) < 1){
board.y = 200;
done = true;
myBtns.channel.scaleY = (myBtns.channel.scaleY * -1);
} else {
board.y = (board.y + ((200 - board.y) / 10));
};
myBtns.channel.y = (board.y + 70);
}
public function backFunc():void{
GameDesignClass.bgData = [bg.currentFrame, body.x, body.y, body.scaleX];
body.parent.removeChild(body);
GameData.topSprite.visible = false;
removeMe();
GameTools.createPage(Page4);
GameData.clicked = true;
}
public function scale_upFunc():void{
if (GameData.currentClickObj){
scaleUp(GameData.currentClickObj);
};
}
public function photoFunc():void{
stopDrag();
DrawBMP.DrawReady(GameData.Scen.stage, GameData.Scen, [myBtns, showBoard, board]);
GameData.controlClass.isPhoto = true;
}
private function scaleDown(_arg1:MovieClip):void{
if (Math.abs(_arg1.scaleX) > 0.2){
_arg1.scaleX = (_arg1.scaleX - (0.1 * GameTools.getTab(_arg1.scaleX)));
_arg1.scaleY = Math.abs(_arg1.scaleX);
};
}
private function scaleUp(_arg1:MovieClip):void{
if (Math.abs(_arg1.scaleX) < 10){
_arg1.scaleX = (_arg1.scaleX + (0.1 * GameTools.getTab(_arg1.scaleX)));
_arg1.scaleY = Math.abs(_arg1.scaleX);
};
}
public function ptFunc():void{
board.visible = false;
myBtns.visible = false;
showBoard.visible = false;
try {
new Printer(GameData.Scen);
} catch(e) {
};
board.visible = true;
myBtns.visible = true;
showBoard.visible = true;
}
public function scaleFunc():void{
}
public function delFunc():void{
if (GameData.currentClickObj){
if (GameData.currentClickObj != body){
GameData.currentClickObj.removeMe();
} else {
GameTools.addFilters(GameData.currentClickObj, []);
};
GameData.currentClickObj = null;
};
}
public function bgFunc():void{
if (bg.currentFrame < bg.totalFrames){
bg.nextFrame();
} else {
bg.gotoAndStop(1);
};
}
override protected function delListeners():void{
super.delListeners();
removeEventListener(Event.ENTER_FRAME, updataEvent);
}
private function chooseObject(_arg1:Event):void{
var _local3:Objects;
var _local2:String = _arg1.target.name.substring(3, _arg1.target.name.length);
if (_local2 != "rd"){
_local3 = new Objects(uint(_local2));
GameData.topSprite.addChild(_local3);
};
}
public function soundFunc():void{
if (myBtns.sound.currentFrame == 1){
SoundClass.setVolume(0);
myBtns.sound.gotoAndStop(2);
} else {
SoundClass.setVolume(1);
myBtns.sound.gotoAndStop(1);
};
}
public function scale_downFunc():void{
if (GameData.currentClickObj){
scaleDown(GameData.currentClickObj);
};
}
public function channelFunc():void{
if (done){
done = false;
moveDir = ((moveDir)=="up") ? "down" : "up";
};
}
}
}//package com.gq.ui
Section 26
//Pages (com.gq.ui.Pages)
package com.gq.ui {
import flash.display.*;
import flash.events.*;
import com.gq.system.*;
public class Pages extends MovieClip {
public var myBtns:MovieClip;
protected var myUrl:String;// = "moregames-donepage"
protected var mySound:String;// = ""
protected var myCount:uint;
public function Pages():void{
init();
}
protected function clickHD(_arg1:MouseEvent):void{
var _local2 = this;
_local2[(_arg1.target.name + "Func")]();
SoundClass.addMusic("sound", "press");
}
protected function initDress(_arg1:MovieClip):void{
var _local3:MovieClip;
_arg1.hat.gotoAndStop(GameDesignClass.clothData.hat);
_arg1.hand.gotoAndStop(GameDesignClass.clothData.hand);
_arg1.glove.gotoAndStop(GameDesignClass.clothData.glove);
_arg1.hair.gotoAndStop(GameDesignClass.clothData.hair);
_arg1.glass.gotoAndStop(GameDesignClass.clothData.glass);
_arg1.bag.gotoAndStop(GameDesignClass.clothData.bag);
_arg1.necklace.gotoAndStop(GameDesignClass.clothData.necklace);
_arg1.eyebrow.gotoAndStop(GameDesignClass.clothData.eyebrow);
_arg1.eyelash.gotoAndStop(GameDesignClass.clothData.eyelash);
_arg1.eye.gotoAndStop(GameDesignClass.clothData.eye);
_arg1.shadow.gotoAndStop(GameDesignClass.clothData.shadow);
_arg1.mouth.gotoAndStop(GameDesignClass.clothData.mouth);
_arg1.face.gotoAndStop(GameDesignClass.clothData.face);
_arg1.cape.gotoAndStop(GameDesignClass.clothData.cape);
_arg1.dress.gotoAndStop(GameDesignClass.clothData.dress);
_arg1.cloth.gotoAndStop(GameDesignClass.clothData.cloth);
_arg1.trousers.gotoAndStop(GameDesignClass.clothData.trousers);
_arg1.bikini.gotoAndStop(GameDesignClass.clothData.bikini);
_arg1.shoe.gotoAndStop(GameDesignClass.clothData.shoe);
_arg1.skin.gotoAndStop(GameDesignClass.clothData.skin);
_arg1.hand2.gotoAndStop(GameDesignClass.clothData.hand2);
_arg1.eye.mouseEnabled = false;
_arg1.face.mouseEnabled = false;
_arg1.skin.mouseEnabled = false;
_arg1.hair.mouseEnabled = false;
var _local2:uint;
while (_local2 < _arg1.numChildren) {
_local3 = (_arg1.getChildAt(_local2) as MovieClip);
if (_local3 != null){
_local3.buttonMode = true;
};
_local2++;
};
}
protected function controlSoundBtn():void{
if (myBtns.sound != null){
myBtns.sound.buttonMode = true;
if (GameData.soundTrans.volume == 0){
myBtns.sound.gotoAndStop(2);
} else {
myBtns.sound.gotoAndStop(1);
};
};
}
protected function getScore():void{
}
protected function myBtnsFunc():void{
}
protected function init():void{
if (mySound != ""){
SoundClass.addMusic("music", mySound, 999);
};
myBtns.addEventListener(MouseEvent.CLICK, clickHD);
}
protected function delListeners():void{
myBtns.removeEventListener(MouseEvent.CLICK, clickHD);
}
protected function calcuWho(_arg1:MovieClip, _arg2:Number, _arg3:uint):void{
var _local4:Array = GameTools.getNum((_arg2 * _arg3), _arg1.numChildren);
var _local5:uint;
while (_local5 < _arg1.numChildren) {
(_arg1.getChildAt(_local5) as MovieClip).gotoAndStop((_local4[_local5] + 1));
_local5++;
};
}
public function moreFunc():void{
MovieClip(root).LogoMoreGame(myUrl);
}
public function removeMe():void{
delListeners();
parent.removeChild(this);
}
}
}//package com.gq.ui
Section 27
//ShadowEffect (com.gq.ui.ShadowEffect)
package com.gq.ui {
import flash.display.*;
import flash.geom.*;
import com.gq.system.*;
public class ShadowEffect extends MovieClip {
private var shadowBitmapData:BitmapData;
private var blueColor:ColorTransform;
private var shadowBitmap:Bitmap;
public function ShadowEffect(_arg1):void{
var _local2:Matrix;
blueColor = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
super();
GameTools.pushArr(GameData.effectArr, this);
shadowBitmapData = new BitmapData(_arg1.width, _arg1.height, true, 0);
shadowBitmap = new Bitmap(shadowBitmapData);
addChild(shadowBitmap);
_local2 = new Matrix();
_local2.tx = -(_arg1.getBounds(_arg1).x);
_local2.ty = -(_arg1.getBounds(_arg1).y);
shadowBitmap.x = -(_local2.tx);
shadowBitmap.y = -(_local2.ty);
shadowBitmapData.draw(_arg1, _local2);
}
public function resumeMe():void{
}
public function updataEvent():void{
shadowBitmap.alpha = (shadowBitmap.alpha - 0.1);
if (shadowBitmap.alpha <= 0.1){
removeMe();
};
}
public function removeMe():void{
GameTools.cleanupMemory();
GameTools.unPushArr(GameData.effectArr, this);
parent.removeChild(this);
}
public function pauseMe():void{
}
}
}//package com.gq.ui
Section 28
//ShakeClass (com.gq.ui.ShakeClass)
package com.gq.ui {
import flash.display.*;
import flash.events.*;
public class ShakeClass extends Sprite {
private var count:uint;
private var oldX:Number;
private var oldY:Number;
private var controlMc:DisplayObjectContainer;
private var shakeTime:uint;
private var shakePower:uint;
public function ShakeClass(_arg1:DisplayObjectContainer, _arg2:uint, _arg3:uint, _arg4:DisplayObjectContainer){
controlMc = _arg1;
shakePower = _arg2;
shakeTime = _arg3;
init();
_arg4.addChild(this);
}
private function init():void{
oldX = controlMc.x;
oldY = controlMc.y;
addEventListener(Event.ENTER_FRAME, updataEvent);
}
private function updataEvent(_arg1:Event):void{
controlMc.x = (oldX + (((Math.round(Math.random()) * 2) - 1) * shakePower));
controlMc.y = (oldY + (((Math.round(Math.random()) * 2) - 1) * shakePower));
if (++count == shakeTime){
controlMc.x = oldX;
controlMc.y = oldY;
removeMe();
};
}
private function removeMe():void{
removeEventListener(Event.ENTER_FRAME, updataEvent);
parent.removeChild(this);
}
}
}//package com.gq.ui
Section 29
//Win (com.gq.ui.Win)
package com.gq.ui {
import flash.events.*;
import com.gq.system.*;
public class Win extends Pages {
public function Win():void{
}
override protected function init():void{
addEventListener(Event.ENTER_FRAME, updataEvent);
}
public function backFunc():void{
removeMe();
GameSys.removeStage();
GameTools.createPage(Page1, false);
}
override public function removeMe():void{
parent.removeChild(this);
}
private function updataEvent(_arg1:Event):void{
if (currentFrame == totalFrames){
stop();
removeEventListener(Event.ENTER_FRAME, updataEvent);
};
}
public function nextFunc():void{
GameData.game_level++;
removeMe();
GameSys.removeStage();
GameSys.Build();
}
}
}//package com.gq.ui
Section 30
//LOGOTitter_113 (Main_fla.LOGOTitter_113)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class LOGOTitter_113 extends MovieClip {
public var Goto:Number;
public var Type:String;
public var Logo:MovieClip;
public function LOGOTitter_113(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Logo.buttonMode = true;
Logo.mouseChildren = false;
Logo.addEventListener(MouseEvent.CLICK, NewLogo);
Logo.addEventListener(MouseEvent.MOUSE_OVER, Over);
Logo.addEventListener(MouseEvent.MOUSE_OUT, Out);
}
public function NewLogo(_arg1){
if ((MovieClip(root).LogoMoreGame as Function)){
MovieClip(root).LogoMoreGame(Type);
} else {
trace(Type);
trace("loading...Error!");
};
gotoAndStop(3);
}
public function Over(_arg1){
gotoAndStop(2);
}
public function Out(_arg1){
gotoAndStop(1);
}
}
}//package Main_fla
Section 31
//LOGOTitter_114 (Main_fla.LOGOTitter_114)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class LOGOTitter_114 extends MovieClip {
public var LogoColor:MovieClip;
public var Logo:MovieClip;
public function LOGOTitter_114(){
addFrameScript(1, frame2);
}
function frame2(){
LogoColor.gotoAndStop(MovieClip(parent).Goto);
gotoAndStop(MovieClip(root).Goto);
}
}
}//package Main_fla
Section 32
//MainTimeline (Main_fla.MainTimeline)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import com.gq.system.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class MainTimeline extends MovieClip {
public var Goto:String;
public var domain:String;
public var ServerFps;
public var TitterIntro:MovieClip;
public var portal:String;
public var Url:String;
public var loader:URLLoader;
public var GameName:String;
public var MochiBotKey:String;
public var utm_content:String;
public var sender:LocalConnection;
public var url:String;
public var IntroOK:Boolean;
public var continueButton:Number;
public var branding:String;
public function MainTimeline(){
addFrameScript(0, frame1, 4, frame5);
}
public function CuntryType(_arg1:String){
var _local2:String;
switch (_arg1){
case "mary.com":
_local2 = "MaryCOM";
break;
case "titter.com":
_local2 = "TitterCOM";
break;
case "titter.fr":
_local2 = "TitterFR";
break;
case "titter.es":
_local2 = "TitterES";
break;
case "titter.pt":
_local2 = "TitterPT";
break;
case "titter.nl":
_local2 = "TitterNL";
break;
case "titter.it":
_local2 = "TitterIT";
break;
case "warda.com":
_local2 = "WardaCOM";
break;
case "titter.com.cn":
_local2 = "TitterCOMCN";
break;
case "titter.co.id":
_local2 = "TitterCOID";
break;
case "tessaspiele.de":
_local2 = "TessaspieleDE";
break;
case "tessagames.co.uk":
_local2 = "TessagamesCOUK";
break;
case "titter.pl":
_local2 = "TitterPL";
break;
case "titter.no":
_local2 = "TitterNO";
break;
case "titter.se":
_local2 = "TitterSE";
break;
case "titter.dk":
_local2 = "TitterDK";
break;
case "titter.hu":
_local2 = "TitterHU";
break;
case "titter.gr":
_local2 = "TitterGR";
break;
case "titter.tw":
_local2 = "TitterTW";
break;
case "titter.fi":
_local2 = "TitterFI";
break;
case "irgytessy.ru":
_local2 = "IrgytessyRU";
break;
case "kikirti.com":
_local2 = "KikirtiCOM";
break;
};
Url = ("http://www." + _arg1);
Goto = _local2;
}
public function com(_arg1){
var _local2:String;
_local2 = _arg1.target.data.toLowerCase();
trace(_local2);
CuntryType(_local2);
TitterIntro.titterBtn.Logo.gotoAndStop(Goto);
TitterIntro.Loading.gotoAndStop(Goto);
NewLoadingReady();
}
public function ingameOK(_arg1){
utm_content = "ingame";
MoreGameURL(true);
}
public function preloader(_arg1){
utm_content = "preloader";
MoreGameURL(true);
}
public function gameover(_arg1){
utm_content = "gameover";
MoreGameURL(true);
}
public function LogoMoreGame(_arg1:String){
utm_content = _arg1;
MoreGameURL(true);
}
public function youwin(_arg1){
utm_content = "youwin";
MoreGameURL(true);
}
public function GameUrl(){
var _local2:String;
var _local1:String = ((((((("?utm_campaign=" + GameName) + "&utm_content=") + utm_content) + "&utm_medium=") + branding) + "&utm_source=") + _local2);
_local2 = ("http://www.mary.com/tessa-s-wedding.html" + _local1);
var _local3:URLRequest = new URLRequest(_local2);
navigateToURL(_local3);
}
function frame5(){
new GameDesignClass(this);
}
function frame1(){
MochiBotKey = "13f59a48";
GameName = "Princess barbie";
branding = "original";
continueButton = 1;
ServerFps = stage.frameRate;
stage.frameRate = 30;
stop();
MochiBot.track(this, MochiBotKey);
sender = new LocalConnection();
url = root.loaderInfo.url;
domain = sender.domain;
utm_content = "intro";
TitterIntro.GameURL.addEventListener(MouseEvent.CLICK, BGUrl);
Url = "http://www.mary.com";
Goto = "MaryCOM";
if (domain != "localhost"){
loader = new URLLoader(new URLRequest("http://api.jaludo.com/geoip/index.php?return=domain&type=gameshell&portal=mary"));
loader.addEventListener(Event.COMPLETE, com);
} else {
NewLoadingReady();
};
}
public function menu(_arg1){
utm_content = "menu";
MoreGameURL(true);
}
public function NewLoadingReady(){
var onEnterFramee:*;
onEnterFramee = function (_arg1:Event){
var _local2:Number;
var _local3:Number;
if (framesLoaded == totalFrames){
trace("Loading.......(100%)");
TitterIntro.gotoAndStop(2);
TitterIntro.removeEventListener(Event.ENTER_FRAME, onEnterFramee);
} else {
_local2 = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
_local3 = Math.round((_local2 * 100));
TitterIntro.LoadingPic.gotoAndStop(_local3);
TitterIntro.loadTxt.text = (_local3 + "%");
};
};
TitterIntro.addEventListener(Event.ENTER_FRAME, onEnterFramee);
}
public function MoreGameURL(_arg1){
var _local2:String = ((((((("?utm_campaign=" + GameName) + "&utm_content=") + utm_content) + "&utm_medium=") + branding) + "&utm_source=") + url);
var _local3:String = (Url + _local2);
var _local4:URLRequest = new URLRequest(_local3);
navigateToURL(_local4);
}
public function LoadGamePlay(){
SoundMixer.stopAll();
stage.frameRate = ServerFps;
gotoAndStop(5);
trace("动画播放完毕,您的游戏跳到第5帧!");
}
public function BGUrl(_arg1){
if (IntroOK){
LogoMoreGame("intro");
} else {
LogoMoreGame("preloader");
};
}
public function intro(_arg1){
utm_content = "intro";
MoreGameURL(true);
}
}
}//package Main_fla
Section 33
//Timeline_179 (Main_fla.Timeline_179)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_179 extends MovieClip {
public function Timeline_179(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 34
//Timeline_181 (Main_fla.Timeline_181)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_181 extends MovieClip {
public function Timeline_181(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 35
//Timeline_183 (Main_fla.Timeline_183)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_183 extends MovieClip {
public function Timeline_183(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 36
//Timeline_185 (Main_fla.Timeline_185)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_185 extends MovieClip {
public function Timeline_185(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 37
//Timeline_187 (Main_fla.Timeline_187)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_187 extends MovieClip {
public function Timeline_187(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 38
//Timeline_189 (Main_fla.Timeline_189)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_189 extends MovieClip {
public function Timeline_189(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 39
//Timeline_191 (Main_fla.Timeline_191)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_191 extends MovieClip {
public function Timeline_191(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 40
//Timeline_193 (Main_fla.Timeline_193)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_193 extends MovieClip {
public function Timeline_193(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 41
//Timeline_229 (Main_fla.Timeline_229)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class Timeline_229 extends MovieClip {
public function Timeline_229(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 42
//YDK_1 (Main_fla.YDK_1)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_1 extends MovieClip {
public var Loading:MovieClip;
public var Gif:MovieClip;
public var Loaded:MovieClip;
public var Continue:MovieClip;
public var loadTxt:TextField;
public var LoadingPic:MovieClip;
public var titterBtn:MovieClip;
public var GameURL:SimpleButton;
public function YDK_1(){
addFrameScript(0, frame1, 1, frame2, 150, frame151);
}
function frame151(){
MovieClip(root).LoadGamePlay();
stop();
}
public function run(_arg1){
if (MovieClip(root).LoadingGif){
MovieClip(root).LoadGamePlay();
} else {
MovieClip(root).IntroOK = true;
SoundMixer.stopAll();
play();
};
}
function frame2(){
stop();
Continue.Continue.mouseChildren = false;
Continue.Continue.buttonMode = true;
Continue.Continue.addEventListener(MouseEvent.MOUSE_OVER, run);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 43
//YDK_11 (Main_fla.YDK_11)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_11 extends MovieClip {
public function YDK_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 44
//YDK_2 (Main_fla.YDK_2)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_2 extends MovieClip {
public var role2_mc:MovieClip;
public var Frame:Number;
public function YDK_2(){
addFrameScript(0, frame1, 15, frame16, 24, frame25, 32, frame33, 40, frame41, 127, frame128);
}
function frame1(){
Frame = 20;
}
function frame128(){
stop();
}
public function run(_arg1){
Loading(Frame);
}
function frame33(){
Frame = 60;
addEventListener(Event.ENTER_FRAME, run);
}
function frame25(){
Frame = 40;
addEventListener(Event.ENTER_FRAME, run);
}
function frame41(){
Frame = 80;
addEventListener(Event.ENTER_FRAME, run);
}
function frame16(){
Frame = 20;
addEventListener(Event.ENTER_FRAME, run);
}
public function Loading(_arg1){
var _local2:Number = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
var _local3:Number = Math.round((_local2 * 100));
if (_local3 < _arg1){
stop();
} else {
removeEventListener(Event.ENTER_FRAME, run);
play();
};
}
}
}//package Main_fla
Section 45
//YDK_21 (Main_fla.YDK_21)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_21 extends MovieClip {
public var glowMc:MovieClip;
public var Logo:MovieClip;
public function YDK_21(){
addFrameScript(0, frame1, 5, frame6, 9, frame10);
}
function frame1(){
stop();
}
function frame6(){
stop();
}
function frame10(){
gotoAndPlay(1);
}
}
}//package Main_fla
Section 46
//YDK_22 (Main_fla.YDK_22)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_22 extends MovieClip {
public function YDK_22(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(MovieClip(root).Goto);
stop();
}
}
}//package Main_fla
Section 47
//YDK_8 (Main_fla.YDK_8)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_8 extends MovieClip {
public function YDK_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 48
//YDK_90 (Main_fla.YDK_90)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_90 extends MovieClip {
public function YDK_90(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
}
}
}//package Main_fla
Section 49
//YDK_94 (Main_fla.YDK_94)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_94 extends MovieClip {
public function YDK_94(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 50
//YDK_95 (Main_fla.YDK_95)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_95 extends MovieClip {
public function YDK_95(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(MovieClip(root).Goto);
stop();
}
}
}//package Main_fla
Section 51
//YDK_98 (Main_fla.YDK_98)
package Main_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.ui.*;
public dynamic class YDK_98 extends MovieClip {
public function YDK_98(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(MovieClip(root).Goto);
}
}
}//package Main_fla
Section 52
//CutMenuID (CutMenuID)
package {
import flash.display.*;
public dynamic class CutMenuID extends MovieClip {
public var Save:SimpleButton;
public var Exit:SimpleButton;
}
}//package
Section 53
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 54
//Music2 (Music2)
package {
import flash.media.*;
public dynamic class Music2 extends Sound {
}
}//package
Section 55
//press (press)
package {
import flash.media.*;
public dynamic class press extends Sound {
}
}//package
Section 56
//ScissorID (ScissorID)
package {
import flash.display.*;
public dynamic class ScissorID extends MovieClip {
}
}//package
Section 57
//title (title)
package {
import flash.media.*;
public dynamic class title extends Sound {
}
}//package