Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader {
private static var cpmstarLoader:Loader;
public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{
var _local3:String;
Security.allowDomain("server.cpmstar.com");
_local3 = "http://server.cpmstar.com/adviewas3.swf";
cpmstarLoader = new Loader();
cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (cpmstarLoader);
}
}
}//package CPMStar
Section 2
//ag_intro_mc_32 (CrackShot_fla.ag_intro_mc_32)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class ag_intro_mc_32 extends MovieClip {
public function ag_intro_mc_32(){
addFrameScript(0, frame1, 160, frame161);
}
public function OMD(_arg1:Event){
MovieClip(root).SKIPPER.removeEventListener(MouseEvent.MOUSE_DOWN, OMD);
MovieClip(root).transistion("TITLE");
}
function frame161(){
MovieClip(root).SKIPPER.removeEventListener(MouseEvent.MOUSE_DOWN, OMD);
MovieClip(root).play();
}
function frame1(){
MovieClip(root).SKIPPER.addEventListener(MouseEvent.MOUSE_DOWN, OMD);
MovieClip(parent).stop();
gotoAndPlay(2);
}
}
}//package CrackShot_fla
Section 3
//BG_39 (CrackShot_fla.BG_39)
package CrackShot_fla {
import flash.display.*;
public dynamic class BG_39 extends MovieClip {
public var BG:MovieClip;
}
}//package CrackShot_fla
Section 4
//BULLETTIMEBAR_78 (CrackShot_fla.BULLETTIMEBAR_78)
package CrackShot_fla {
import flash.display.*;
public dynamic class BULLETTIMEBAR_78 extends MovieClip {
public var BAR:MovieClip;
}
}//package CrackShot_fla
Section 5
//CRACKSHOT_56 (CrackShot_fla.CRACKSHOT_56)
package CrackShot_fla {
import flash.display.*;
public dynamic class CRACKSHOT_56 extends MovieClip {
public var POSE:MovieClip;
public var GA:MovieClip;
}
}//package CrackShot_fla
Section 6
//Crackshot_Arm_L_14 (CrackShot_fla.Crackshot_Arm_L_14)
package CrackShot_fla {
import flash.display.*;
public dynamic class Crackshot_Arm_L_14 extends MovieClip {
public var GUN:MovieClip;
public var ARM_L_D:MovieClip;
public var ARM_L_H:MovieClip;
public var ARM_L_U:MovieClip;
}
}//package CrackShot_fla
Section 7
//CrackShot_GunArm_1 (CrackShot_fla.CrackShot_GunArm_1)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class CrackShot_GunArm_1 extends MovieClip {
public var ARM_R_D:MovieClip;
public var ARM_R_U:MovieClip;
public var GUN:MovieClip;
public var HAND_R_B:MovieClip;
public var HAND_R_F:MovieClip;
public function CrackShot_GunArm_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrackShot_fla
Section 8
//Crackshot_Head_16 (CrackShot_fla.Crackshot_Head_16)
package CrackShot_fla {
import flash.display.*;
public dynamic class Crackshot_Head_16 extends MovieClip {
public var EYES:MovieClip;
public var FACE:MovieClip;
public var HAT:MovieClip;
public var MOUTH:MovieClip;
}
}//package CrackShot_fla
Section 9
//Crackshot_leparts_9 (CrackShot_fla.Crackshot_leparts_9)
package CrackShot_fla {
import flash.display.*;
public dynamic class Crackshot_leparts_9 extends MovieClip {
public var LEG_L_U:MovieClip;
public var LEG_L_D:MovieClip;
public var Leg_R_D:MovieClip;
public var Leg_R_U:MovieClip;
}
}//package CrackShot_fla
Section 10
//Crackshot_Part_Body_12 (CrackShot_fla.Crackshot_Part_Body_12)
package CrackShot_fla {
import flash.display.*;
public dynamic class Crackshot_Part_Body_12 extends MovieClip {
public var ARM:MovieClip;
}
}//package CrackShot_fla
Section 11
//Crackshot_Part_Body2_45 (CrackShot_fla.Crackshot_Part_Body2_45)
package CrackShot_fla {
import flash.display.*;
public dynamic class Crackshot_Part_Body2_45 extends MovieClip {
public var ARM:MovieClip;
}
}//package CrackShot_fla
Section 12
//CrackShot_Pose_Stand_8 (CrackShot_fla.CrackShot_Pose_Stand_8)
package CrackShot_fla {
import flash.display.*;
public dynamic class CrackShot_Pose_Stand_8 extends MovieClip {
public var hit:MovieClip;
public var BODY:MovieClip;
public var HEAD:MovieClip;
}
}//package CrackShot_fla
Section 13
//CrackShot_Pose_Stand2_43 (CrackShot_fla.CrackShot_Pose_Stand2_43)
package CrackShot_fla {
import flash.display.*;
public dynamic class CrackShot_Pose_Stand2_43 extends MovieClip {
public var hit:MovieClip;
public var BODY:MovieClip;
public var HEAD:MovieClip;
}
}//package CrackShot_fla
Section 14
//Crackshotlegs2_44 (CrackShot_fla.Crackshotlegs2_44)
package CrackShot_fla {
import flash.display.*;
public dynamic class Crackshotlegs2_44 extends MovieClip {
public var LEG_L_U:MovieClip;
public var LEG_L_D:MovieClip;
public var Leg_R_D:MovieClip;
public var Leg_R_U:MovieClip;
}
}//package CrackShot_fla
Section 15
//CREDITSPAGE_48 (CrackShot_fla.CREDITSPAGE_48)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class CREDITSPAGE_48 extends MovieClip {
public var dateString:String;
public var date:Date;
public function CREDITSPAGE_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
date = new Date();
dateString = "";
dateString = (dateString + date.fullYear);
if (date.month < 10){
dateString = (dateString + "0");
};
dateString = (dateString + date.month);
if (Number(dateString) > 200902){
gotoAndStop(2);
};
trace(dateString);
}
}
}//package CrackShot_fla
Section 16
//EDITOR_54 (CrackShot_fla.EDITOR_54)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class EDITOR_54 extends MovieClip {
public var manScale:Number;
public var SAVESCREEN:MovieClip;
public var LOADS:SimpleButton;
public var blockSize:Number;
public var PREV:SimpleButton;
public var manMove:Boolean;
public var PALETTE:MovieClip;
public var ZNumToChar:Array;
public var SAVES:SimpleButton;
public var CS:MovieClip;
public var slotSave;
public var BASE:MovieClip;
public var LOADSCREEN:MovieClip;
public var targetY;
public var levelCodeS;
public var GSY:Number;
public var GSX:Number;
public var EXITS:SimpleButton;
public var EXITSCREEN:MovieClip;
public var PALS:LE_Block;
public var mouseCheck:MovieClip;
public var paintBrush;
public var levelCode;
public var MC:MovieClip;
public var textString;
public var manStore:Point;
public var slotName:TextField;
public var baseBlocks:Array;
public var mousePressed:Boolean;
public var levelHeight:Number;
public function EDITOR_54(){
addFrameScript(0, frame1);
}
public function MouseUp(_arg1:Event){
mousePressed = false;
if (CS.alpha < 1){
CS.alpha = 1;
CS.x = manStore.x;
CS.y = manStore.y;
};
manMove = false;
}
public function saveLevel(){
var _local1:String;
var _local2:int;
_local1 = "";
_local2 = 0;
while (_local2 < baseBlocks.length) {
_local1 = (_local1 + textString.charAt((baseBlocks[_local2].currentFrame - 1)));
_local2++;
};
_local1 = ZCrush(_local1);
_local1 = (_local1 + "@");
_local1 = (_local1 + CS.x);
_local1 = (_local1 + "@");
_local1 = (_local1 + CS.y);
_local1 = (_local1 + "@");
_local1 = (_local1 + SAVESCREEN[("slotName" + MovieClip(root).activeSave)].text);
MovieClip(root).savefile.data[("editor_slot" + MovieClip(root).activeSave)] = _local1;
MovieClip(root).savefile.data[(("editor_slot" + MovieClip(root).activeSave) + "_name")] = SAVESCREEN[("slotName" + MovieClip(root).activeSave)].text;
updateScreenNames();
trace(MovieClip(root).savefile.data[("editor_slot" + MovieClip(root).activeSave)]);
}
public function destroyEditor(){
var _local1:int;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
_local1 = 0;
while (_local1 < baseBlocks.length) {
BASE.removeChild(baseBlocks[_local1]);
delete baseBlocks[_local1];
baseBlocks.splice(_local1, 1);
_local1--;
_local1++;
};
}
public function loadLevel(){
var _local1:*;
var _local2:int;
_local1 = ZCompile(MovieClip(root).savefile.data[("editor_slot" + MovieClip(root).activeSave)]);
_local2 = 0;
while (_local2 < baseBlocks.length) {
baseBlocks[_local2].ID = _local1.charAt(_local2);
baseBlocks[_local2].gotoAndStop(baseBlocks[_local2].ID);
_local2++;
};
}
function frame1(){
ZNumToChar = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K");
levelCodeS = MovieClip(root).savefile.data[("editor_slot" + MovieClip(root).activeSave)].split("@");
levelCode = ZCompile(levelCodeS[0]);
CS.x = Number(levelCodeS[1]);
CS.y = Number(levelCodeS[2]);
paintBrush = "B";
baseBlocks = new Array();
slotSave = MovieClip(root).activeSave;
blockSize = 40;
levelHeight = 440;
GSX = 14;
GSY = 10;
y = (y + 20);
targetY = 20;
populateBase();
manScale = CS.scaleX;
manMove = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
mousePressed = false;
manStore = new Point(CS.x, CS.y);
addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
addEventListener(MouseEvent.MOUSE_UP, MouseUp);
MC.width = 1;
MC.width = 1;
textString = "ABCDEFGHIJKL";
setPalettes();
updateScreenNames();
}
public function ZCompile(_arg1){
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = "";
_local3 = "";
_local4 = 0;
while (_local4 < _arg1.length) {
_local5 = Number(_arg1.charAt(_local4));
if (!isNaN(_local5)){
_local3 = (_local3 + _arg1.charAt(_local4));
} else {
if (_local3 == ""){
_local3 = "1";
_local4--;
} else {
_local6 = 0;
while (_local6 < Number(_local3)) {
_local2 = (_local2 + _arg1.charAt(_local4));
_local6++;
};
_local3 = "";
};
};
_local4++;
};
return (_local2);
}
public function ZCrush(_arg1){
var _local2:String;
var _local3:int;
var _local4:Number;
var _local5:String;
var _local6:Number;
var _local7:Number;
_local2 = "";
_local3 = 0;
_local4 = 0;
while (_local4 < _arg1.length) {
_local5 = _arg1.charAt(_local4);
_local3 = 0;
while (_arg1.charAt((_local4 + _local3)) == _local5) {
_local3++;
};
_local4 = (_local4 + (_local3 - 1));
_local6 = 0;
_local7 = 0;
if (_local3 > 1){
_local2 = (_local2 + _local3);
};
_local2 = (_local2 + _local5);
_local4++;
};
return (_local2);
}
public function changeM(){
var _local1:Point;
var _local2:Number;
_local1 = new Point(mouseX, mouseY);
if ((((((((_local1.x < (GSX * blockSize))) && ((_local1.x > 0)))) && ((_local1.y < (GSY * blockSize))))) && ((_local1.y > 0)))){
_local2 = (Math.floor((_local1.x / blockSize)) + (Math.floor((_local1.y / blockSize)) * GSX));
if (mousePressed){
if (!baseBlocks[_local2].hitTestObject(CS.POSE.hit)){
baseBlocks[_local2].ID = paintBrush;
baseBlocks[_local2].gotoAndStop(paintBrush);
};
};
};
}
public function onEnterFrame(_arg1:Event){
var _local2:int;
if (manMove == true){
CS.x = ((Math.floor((mouseX / 40)) * 40) + 20);
CS.y = ((Math.floor((mouseY / 40)) * 40) + 20);
if (CS.x > 280){
CS.scaleX = -(manScale);
} else {
CS.scaleX = manScale;
};
CS.alpha = 1;
trace(((CS.x + " ") + CS.y));
_local2 = 0;
while (_local2 < baseBlocks.length) {
if (((baseBlocks[_local2].hitTestObject(CS.POSE.hit)) && (!((baseBlocks[_local2].ID == "A"))))){
CS.alpha = 0.3;
};
_local2++;
};
};
slotName.text = ("SaveSlot: " + MovieClip(root).activeSave);
PALS.gotoAndStop(paintBrush);
y = (y + ((targetY - y) / 3));
changeM();
}
public function MouseDown(_arg1:Event){
checkButtons();
if (mouseY > 0){
MC.x = mouseX;
MC.y = mouseY;
if (!MC.hitTestObject(CS.POSE.hit)){
mousePressed = true;
} else {
manStore.x = CS.x;
manStore.y = CS.y;
manMove = true;
};
MC.x = -300;
};
}
public function populateBase(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:MovieClip;
_local1 = 0;
_local2 = 0;
_local3 = 0;
while (_local3 < (GSX * GSY)) {
_local4 = new LE_Block();
_local4.x = (blockSize * _local1);
_local4.y = (blockSize * _local2);
_local4.width = blockSize;
_local4.height = blockSize;
_local4.ID = "";
BASE.addChild(_local4);
baseBlocks.push(_local4);
_local1++;
if (_local1 == GSX){
_local1 = 0;
_local2++;
};
_local3++;
};
loadLevel();
}
public function resetPanels(){
PALETTE.x = 1000;
LOADSCREEN.x = 1000;
SAVESCREEN.x = 1000;
EXITSCREEN.x = 1000;
}
public function ZNumCrush(_arg1){
var _local2:String;
var _local3:Number;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + ZNumToChar[Number(_arg1.charAt(_local3))]);
_local3++;
};
return (ZCrush(_local2));
}
public function checkButtons(){
var _local1:*;
var _local2:*;
var _local3:int;
mouseCheck.width = 1;
mouseCheck.height = 1;
mouseCheck.x = mouseX;
mouseCheck.y = mouseY;
_local1 = mouseCheck;
_local2 = PALETTE;
if (_local1.hitTestObject(SAVES)){
resetPanels();
SAVESCREEN.x = 0;
targetY = levelHeight;
} else {
if (_local1.hitTestObject(LOADS)){
resetPanels();
LOADSCREEN.x = 0;
targetY = levelHeight;
updateScreenNames();
} else {
if (((((((((_local1.hitTestObject(EXITSCREEN.NO)) || (_local1.hitTestObject(LOADSCREEN.NO)))) || (_local1.hitTestObject(SAVESCREEN.NO)))) || (_local1.hitTestObject(SAVESCREEN.CANCEL)))) || (_local1.hitTestObject(LOADSCREEN.CANCEL)))){
targetY = 20;
MovieClip(root).activeSave = slotSave;
} else {
if (_local1.hitTestObject(EXITS)){
resetPanels();
EXITSCREEN.x = 0;
targetY = levelHeight;
} else {
if (_local1.hitTestObject(PALS)){
resetPanels();
PALETTE.x = 0;
targetY = levelHeight;
updateScreenNames();
} else {
if (_local1.hitTestObject(SAVESCREEN.UN1)){
saveLevelNames(1);
} else {
if (_local1.hitTestObject(SAVESCREEN.UN2)){
saveLevelNames(2);
} else {
if (_local1.hitTestObject(SAVESCREEN.UN3)){
saveLevelNames(3);
} else {
if (((_local1.hitTestObject(SAVESCREEN.S1)) && ((SAVESCREEN.S1.alpha == 1)))){
MovieClip(root).activeSave = 1;
targetY = (levelHeight * 2);
} else {
if (((_local1.hitTestObject(SAVESCREEN.S2)) && ((SAVESCREEN.S2.alpha == 1)))){
MovieClip(root).activeSave = 2;
targetY = (levelHeight * 2);
} else {
if (((_local1.hitTestObject(SAVESCREEN.S3)) && ((SAVESCREEN.S3.alpha == 1)))){
MovieClip(root).activeSave = 3;
targetY = (levelHeight * 2);
} else {
if (((_local1.hitTestObject(LOADSCREEN.S1)) && ((LOADSCREEN.S1.alpha == 1)))){
MovieClip(root).activeSave = 1;
targetY = (levelHeight * 2);
} else {
if (((_local1.hitTestObject(LOADSCREEN.S2)) && ((LOADSCREEN.S2.alpha == 1)))){
MovieClip(root).activeSave = 2;
targetY = (levelHeight * 2);
} else {
if (_local1.hitTestObject(PREV)){
saveLevel();
slotSave = MovieClip(root).activeSave;
destroyEditor();
MovieClip(root).nextFrame();
} else {
if (((_local1.hitTestObject(LOADSCREEN.S3)) && ((LOADSCREEN.S3.alpha == 1)))){
MovieClip(root).activeSave = 3;
targetY = (levelHeight * 2);
} else {
if (_local1.hitTestObject(LOADSCREEN.CS)){
targetY = 20;
loadLevel();
slotSave = MovieClip(root).activeSave;
} else {
if (_local1.hitTestObject(SAVESCREEN.CS)){
targetY = 20;
saveLevel();
slotSave = MovieClip(root).activeSave;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
_local3 = 0;
while (_local3 < textString.length) {
if (_local1.hitTestObject(_local2[textString.charAt(_local3)])){
paintBrush = textString.charAt(_local3);
targetY = 20;
};
_local3++;
};
_local1.x = -1000;
_local2 = null;
_local1 = null;
}
public function saveLevelNames(_arg1){
trace("SAVED");
MovieClip(root).savefile.data[(("editor_slot" + _arg1) + "_name")] = SAVESCREEN[("slotName" + _arg1)].text;
MovieClip(root).savefile.flush();
}
public function updateScreenNames(){
SAVESCREEN.S1.alpha = 1;
SAVESCREEN.S2.alpha = 1;
SAVESCREEN.S3.alpha = 1;
LOADSCREEN.S1.alpha = 1;
LOADSCREEN.S2.alpha = 1;
LOADSCREEN.S3.alpha = 1;
SAVESCREEN[("S" + MovieClip(root).activeSave)].alpha = 0.1;
LOADSCREEN[("S" + MovieClip(root).activeSave)].alpha = 0.1;
SAVESCREEN.slotName1.text = MovieClip(root).savefile.data.editor_slot1_name;
SAVESCREEN.slotName2.text = MovieClip(root).savefile.data.editor_slot2_name;
SAVESCREEN.slotName3.text = MovieClip(root).savefile.data.editor_slot3_name;
SAVESCREEN.slotShare1.text = MovieClip(root).savefile.data.editor_slot1;
SAVESCREEN.slotShare2.text = MovieClip(root).savefile.data.editor_slot2;
SAVESCREEN.slotShare3.text = MovieClip(root).savefile.data.editor_slot3;
LOADSCREEN.slotName1.text = MovieClip(root).savefile.data.editor_slot1_name;
LOADSCREEN.slotName2.text = MovieClip(root).savefile.data.editor_slot2_name;
LOADSCREEN.slotName3.text = MovieClip(root).savefile.data.editor_slot3_name;
}
public function ZNumCompile(_arg1){
var _local2:String;
var _local3:Number;
var _local4:Number;
_arg1 = ZCompile(_arg1);
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = 0;
while (_local4 < ZNumToChar.length) {
if (_arg1.charAt(_local3) == ZNumToChar[_local4]){
_local2 = (_local2 + String(_local4));
};
_local4++;
};
_local3++;
};
return (_local2);
}
public function setPalettes(){
var _local1:int;
_local1 = 0;
while (_local1 < textString.length) {
PALETTE[textString.charAt(_local1)].gotoAndStop(textString.charAt(_local1));
_local1++;
};
}
}
}//package CrackShot_fla
Section 17
//EndScene_83 (CrackShot_fla.EndScene_83)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class EndScene_83 extends MovieClip {
public var BCK:SimpleButton;
public function EndScene_83(){
addFrameScript(0, frame1);
}
public function OMU(_arg1:Event){
BCK.removeEventListener(MouseEvent.MOUSE_UP, OMU);
MovieClip(root).transistion("TITLE");
}
function frame1(){
SoundMixer.stopAll();
MovieClip(root).playSound("FAN");
BCK.addEventListener(MouseEvent.MOUSE_UP, OMU);
}
}
}//package CrackShot_fla
Section 18
//EOL_80 (CrackShot_fla.EOL_80)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class EOL_80 extends MovieClip {
public var contButton:SimpleButton;
public var prevBeat:MovieClip;
public var expBeat:MovieClip;
public var descBox:TextField;
public var dataBox:TextField;
public function EOL_80(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
contButton.visible = false;
expBeat.visible = false;
prevBeat.visible = false;
}
function frame30(){
stop();
}
}
}//package CrackShot_fla
Section 19
//GAMEENGINE_64 (CrackShot_fla.GAMEENGINE_64)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class GAMEENGINE_64 extends MovieClip {
public var water_colourTransform:ColorTransform;
public var _targetCont:BitmapData;
public var gunFrame;
public var BTIME:Number;
public var manScale;
public var vaseArray:Array;
public var water_defData:BitmapData;
public var spawnCycle:Number;
public var smokeArray;
public var blockSize:Number;
public var water_source:DisplayObject;
public var BG:MovieClip;
public var speedArray:Array;
public var ZNumToChar:Array;
public var objectArray:Array;
public var outLine:GlowFilter;
public var Dir;
public var bmpScaler:Number;
public var CS:MovieClip;
public var bulletArray:Array;
public var water_scaleInv:Number;
public var SCORE;
public var trans_m:Matrix;
public var _targetContT:BitmapData;
public var heartTimer:Number;
public var score:Number;
public var usedArray:Array;
public var heartType:String;
public var BEXPArray:Array;
public var _target:Bitmap;
public var water_buffer1:BitmapData;
public var water_buffer2:BitmapData;
public var targCount:int;
public var ammo:int;
public var EOLTime:int;
public var BTIMEMAX:Number;
public var HUD:MovieClip;
public var _keys:Array;
public var levelCodeS;
public var curGun:int;
public var MASK;
public var GSY;
public var dropShadow:DropShadowFilter;
public var EFFECTS;
public var GSX;
public var scoreArray:Array;
public var arenaWidth:int;
public var bulletCycle:Number;
public var arenaHeight:int;
public var water_expandFilter:ConvolutionFilter;
public var BGPlane:MovieClip;
public var EOLText:String;
public var water_fullRect:Rectangle;
public var water_origin:Point;
public var SMOKE;
public var TARG;
public var checkGunReady:Boolean;
public var water_drawRect:Rectangle;
public var curRot:int;
public var BULLETS;
public var water_filter:DisplacementMapFilter;
public var gameIntro:int;
public var EOLData:String;
public var LEVELENDED;
public var baseBlocks:Array;
public var mousePressed:Boolean;
public var wall;
public var worldSpeed:Number;
public var endGameTimer:int;
public var gameTime:Number;
public var water_matrix:Matrix;
public function GAMEENGINE_64(){
addFrameScript(0, frame1);
}
public function handleKeyUp(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _keys.indexOf(_arg1.keyCode);
if (_local2 > -1){
_keys.splice(_local2, 1);
};
}
public function newBEXP(_arg1, _arg2){
var _local3:MovieClip;
_local3 = new BEXP();
_local3.x = (_arg1 + 20);
_local3.y = (_arg2 + 20);
newPuff((_arg1 + 20), (_arg2 + 20), 80, 8);
_local3.visible = false;
MovieClip(root).playSound("EXP");
EFFECTS.addChild(_local3);
BEXPArray.push(_local3);
}
public function rand(_arg1:Number=10, _arg2:Number=0){
return (Math.round(((Math.random() * _arg1) + _arg2)));
}
public function updateSmoke(){
var _local1:int;
var _local2:Smoke;
var _local3:*;
_local1 = 0;
while (_local1 < smokeArray.length) {
_local2 = smokeArray[_local1];
moveObject(_local2, _local2.speed.x, _local2.speed.y, _local2.spin);
_local2.speed.y = (_local2.speed.y - (0.5 * worldSpeed));
_local2.alph = (_local2.alph - (0.1 * worldSpeed));
_local3 = (Math.round((_local2.alph * 100)) / 100);
_local2.alpha = _local3;
_local2.scaleX = (_local2.scaleX + (0.05 * worldSpeed));
_local2.scaleY = _local2.scaleX;
if (_local2.alpha < 0){
SMOKE.removeChild(_local2);
delete smokeArray[_local1];
smokeArray.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function pythagPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
var _local6:Point;
var _local7:Point;
_local6 = new Point(_arg1, _arg3);
_local7 = new Point(_arg1, _arg3);
return (pythag(_local6, _local7, _arg5));
}
public function hitTestX(_arg1, _arg2, _arg3){
return (_arg1.hitTestPoint((_arg2 + x), (_arg3 + y), true));
}
public function faceControl(){
var _local1:Point;
var _local2:Point;
var _local3:*;
_local1 = new Point(CS.x, CS.y);
_local2 = new Point(TARG.x, TARG.y);
_local3 = angle(_local1, _local2);
if (TARG.x > CS.x){
Dir = 1;
} else {
if (TARG.x < (CS.x - 20)){
Dir = -1;
};
};
if (Dir > 0){
CS.GA.rotation = (_local3 - (90 * Dir));
} else {
if (_local3 < 0){
_local3 = (_local3 + 360);
};
CS.GA.rotation = -((_local3 - (90 * Dir)));
};
CS.scaleX = (manScale * Dir);
}
public function handleKeyDown(_arg1:KeyboardEvent):void{
if (_keys.indexOf(_arg1.keyCode) == -1){
_keys.push(_arg1.keyCode);
};
}
public function switchBuffers():void{
var _local1:BitmapData;
_local1 = water_buffer1;
water_buffer1 = water_buffer2;
water_buffer2 = _local1;
}
function frame1(){
_keys = new Array();
stage.addEventListener(KeyboardEvent.KEY_DOWN, this.handleKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, this.handleKeyUp);
ZNumToChar = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K");
MovieClip(root).BULLETTIME.alpha = 0;
wall = new MovieClip();
addChild(wall);
EFFECTS = new MovieClip();
addChild(EFFECTS);
BULLETS = new MovieClip();
addChild(BULLETS);
SMOKE = new MovieClip();
addChild(SMOKE);
SCORE = new MovieClip();
addChild(SCORE);
MASK = new GameMasker();
addChild(MASK);
TARG = new TargetCircle();
addChild(TARG);
curGun = 1;
curRot = 0;
dropShadow = new DropShadowFilter(4, 45, 0, 0.5, 8, 8, 2);
outLine = new GlowFilter(0, 1, 2, 2, 10);
HUD.EXIT.addEventListener(MouseEvent.MOUSE_UP, ExitPreview);
SoundMixer.stopAll();
HUD.RESET.addEventListener(MouseEvent.MOUSE_UP, ResetPreview);
wall.filters = [outLine, dropShadow];
EFFECTS.filters = [outLine, dropShadow];
speedArray = new Array(0.01, 0.051, 0.125, 0.5, 1);
MovieClip(root).activeCode = MovieClip(root).activeSave;
if (MovieClip(root).gameMode == 0){
HUD.x = (HUD.x + 290);
levelCodeS = MovieClip(root).levelCode.split("@");
trace(levelCodeS);
} else {
levelCodeS = MovieClip(root).savefile.data[("editor_slot" + MovieClip(root).activeCode)].split("@");
};
CS.x = (Number(levelCodeS[1]) - x);
CS.y = (Number(levelCodeS[2]) - y);
MASK.x = CS.x;
MASK.y = CS.y;
endGameTimer = 60;
levelCode = ZCompile(levelCodeS[0]);
objectArray = new Array();
blockSize = 40;
GSX = 14;
GSY = 10;
ammo = 12;
gameTime = 0;
baseBlocks = new Array();
targCount = 0;
populateBase();
bulletCycle = 30;
mousePressed = false;
worldSpeed = 1;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mDown);
stage.addEventListener(MouseEvent.MOUSE_UP, mUp);
MovieClip(root).gunReady = false;
gunFrame = 1;
checkGunReady = false;
spawnCycle = 0;
HUD.gameTimeText.text = Math.floor((gameTime / 24));
gameIntro = 60;
LEVELENDED = false;
bulletArray = new Array();
usedArray = new Array();
smokeArray = new Array();
vaseArray = new Array();
manScale = CS.scaleX;
Dir = 1;
y = (y + 20);
heartTimer = 0;
heartType = "HEART0";
BEXPArray = new Array();
arenaWidth = 560;
arenaHeight = 420;
bmpScaler = 8;
trans_m = new Matrix();
water_origin = new Point();
_targetContT = new BitmapData(arenaWidth, arenaHeight, true, 0x333333);
_target = new Bitmap(_targetContT);
BGPlane.addChild(_target);
newRippler(_target, 20, 2);
convertSceneToBitmap();
_targetCont = new BitmapData((arenaWidth / bmpScaler), (arenaHeight / bmpScaler), true, 0x333333);
BTIMEMAX = (MovieClip(root).bLevel * 48);
BTIME = BTIMEMAX;
score = 0;
scoreArray = new Array();
EOLTime = 0;
EOLText = "";
EOLData = "";
}
public function BTIMECONTROL(){
var _local1:*;
if (gameIntro == 0){
_local1 = MovieClip(root).BULLETTIME;
if (((isKeyPressed(32)) && ((BTIME > 0)))){
if (_local1.alpha < 1){
_local1.alpha = (_local1.alpha + 0.25);
};
BTIME--;
_local1.BAR.scaleX = (((100 / BTIMEMAX) * BTIME) / 100);
HUD.SLIDER.value = 2;
} else {
if (_local1.alpha > 0){
_local1.alpha = (_local1.alpha - 0.1);
};
HUD.SLIDER.value = 4;
};
};
}
public function moveObject(_arg1:Object, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
_arg1.x = (_arg1.x + (_arg2 * worldSpeed));
_arg1.y = (_arg1.y + (_arg3 * worldSpeed));
if (_arg4 != 0){
_arg1.rotation = (_arg1.rotation + (_arg4 * worldSpeed));
};
}
public function ZCompile(_arg1){
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = "";
_local3 = "";
_local4 = 0;
while (_local4 < _arg1.length) {
_local5 = Number(_arg1.charAt(_local4));
if (!isNaN(_local5)){
_local3 = (_local3 + _arg1.charAt(_local4));
} else {
if (_local3 == ""){
_local3 = "1";
_local4--;
} else {
_local6 = 0;
while (_local6 < Number(_local3)) {
_local2 = (_local2 + _arg1.charAt(_local4));
_local6++;
};
_local3 = "";
};
};
_local4++;
};
return (_local2);
}
public function anglePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
return ((Math.round(((Math.atan2((_arg4 - _arg2), (_arg3 - _arg1)) / Math.PI) * 180)) + 90));
}
public function ZCrush(_arg1){
var _local2:String;
var _local3:int;
var _local4:Number;
var _local5:String;
var _local6:Number;
var _local7:Number;
_local2 = "";
_local3 = 0;
_local4 = 0;
while (_local4 < _arg1.length) {
_local5 = _arg1.charAt(_local4);
_local3 = 0;
while (_arg1.charAt((_local4 + _local3)) == _local5) {
_local3++;
};
_local4 = (_local4 + (_local3 - 1));
_local6 = 0;
_local7 = 0;
if (_local3 > 1){
_local2 = (_local2 + _local3);
};
_local2 = (_local2 + _local5);
_local4++;
};
return (_local2);
}
public function newRippler(_arg1:DisplayObject, _arg2:Number, _arg3:Number=2){
var _local4:Number;
var _local5:Number;
water_source = _arg1;
water_scaleInv = (1 / _arg3);
water_buffer1 = new BitmapData((_arg1.width * water_scaleInv), (_arg1.height * water_scaleInv), false, 0);
water_buffer2 = new BitmapData(water_buffer1.width, water_buffer1.height, false, 0);
water_defData = new BitmapData(_arg1.width, _arg1.height, false, 0x7F7F7F);
_local4 = (water_defData.width / water_buffer1.width);
_local5 = (water_defData.height / water_buffer1.height);
water_fullRect = new Rectangle(0, 0, water_buffer1.width, water_buffer1.height);
water_drawRect = new Rectangle();
water_filter = new DisplacementMapFilter(water_defData, water_origin, BitmapDataChannel.BLUE, BitmapDataChannel.BLUE, _arg2, _arg2, "wrap");
water_source.filters = [water_filter];
water_expandFilter = new ConvolutionFilter(3, 3, [0.5, 1, 0.5, 1, 0, 1, 0.5, 1, 0.5], 3);
water_colourTransform = new ColorTransform(1, 1, 1, 1, 127, 127, 127);
water_matrix = new Matrix(_local4, 0, 0, _local5);
}
public function drawRipple(_arg1:int, _arg2:int, _arg3:int, _arg4:Number):void{
var _local5:int;
var _local6:int;
_local5 = (_arg3 >> 1);
_local6 = (((_arg4 * 0xFF) & 0xFF) * _arg4);
water_drawRect.x = ((-(_local5) + _arg1) * water_scaleInv);
water_drawRect.y = ((-(_local5) + _arg2) * water_scaleInv);
water_drawRect.width = (water_drawRect.height = (_arg3 * water_scaleInv));
water_buffer1.fillRect(water_drawRect, _local6);
}
public function updateBullets(){
var _local1:Boolean;
var _local2:int;
var _local3:MovieClip;
var _local4:Point;
var _local5:*;
var _local6:Point;
var _local7:int;
var _local8:*;
var _local9:Number;
var _local10:Boolean;
var _local11:int;
var _local12:String;
var _local13:Boolean;
var _local14:Number;
if (HUD.SLIDER.value != 4){
_local1 = true;
};
_local2 = 0;
while (_local2 < bulletArray.length) {
_local3 = bulletArray[_local2];
_local4 = new Point(_local3.x, _local3.y);
_local5 = (worldSpeed * 200);
moveObject(_local3, _local3.speed.x, _local3.speed.y);
_local6 = new Point(_local3.x, _local3.y);
_local7 = 0;
while (_local7 < _local5) {
moveObject(_local4, (_local3.speed.x / _local5), (_local3.speed.y / _local5));
if (hitTestX(wall, _local4.x, _local4.y)){
_local3.x = _local4.x;
_local3.y = _local4.y;
while (hitTestX(wall, _local3.x, _local3.y)) {
_local3.x = (_local3.x - (_local3.speed.x / 100));
_local3.y = (_local3.y - (_local3.speed.y / 100));
};
_local8 = new Point(((_local3.x + (_local3.speed.x / 50)) + x), (((_local3.y + (_local3.speed.y / 50)) + y) - 20));
_local9 = (Math.floor((_local8.x / blockSize)) + (Math.floor((_local8.y / blockSize)) * GSX));
_local10 = false;
_local11 = 0;
while (_local11 < usedArray.length) {
if (usedArray[_local11] == _local9){
_local10 = true;
};
_local11++;
};
_local12 = levelCode.charAt(_local9);
_local13 = true;
if ((((((_local10 == false)) && ((((((((((_local12 == "E")) || ((_local12 == "H")))) || ((_local12 == "I")))) || ((_local12 == "J")))) || ((_local12 == "K")))))) || ((_local12 == "L")))){
usedArray.push(_local9);
if (_local12 == "E"){
MovieClip(root).playSound("SMASH");
newVaseSmash(objectArray[_local9].x, objectArray[_local9].y);
_local3.x = _local6.x;
_local3.y = _local6.y;
} else {
if (_local12 == "H"){
MovieClip(root).playSound("SMASH");
newVaseSmash(objectArray[_local9].x, objectArray[_local9].y, 1);
_local3.destroy = true;
} else {
if (_local12 == "I"){
newScore(objectArray[_local9].x, objectArray[_local9].y, 50);
MovieClip(root).playSound("TARG1");
newVaseSmash(objectArray[_local9].x, objectArray[_local9].y, 2);
targCount--;
_local3.destroy = true;
} else {
if (_local12 == "J"){
newScore(objectArray[_local9].x, objectArray[_local9].y, 75);
MovieClip(root).playSound("TARG2");
targCount--;
newVaseSmash(objectArray[_local9].x, objectArray[_local9].y, 3);
_local3.destroy = true;
} else {
if (_local12 == "K"){
newScore(objectArray[_local9].x, objectArray[_local9].y, 100);
MovieClip(root).playSound("TARG3");
targCount--;
newVaseSmash(objectArray[_local9].x, objectArray[_local9].y, 4);
_local3.destroy = true;
} else {
if (_local12 == "L"){
newBEXP(objectArray[_local9].x, objectArray[_local9].y);
_local3.destroy = true;
};
};
};
};
};
};
objectArray[_local9].y = -300;
objectArray[_local9].width = 0;
objectArray[_local9].height = 0;
_local13 = false;
};
if (_local13 == true){
newPuff(_local3.x, _local3.y, 20, 5);
_local14 = 1;
if (((hitTestX(wall, (_local3.x + _local14), _local3.y)) || (hitTestX(wall, (_local3.x - _local14), _local3.y)))){
_local3.speed.x = (_local3.speed.x * -1);
if (_local12 == "G"){
_local3.destroy = true;
} else {
if (_local12 == "F"){
_local3.life = (_local3.life - 0.5);
} else {
bulletLife(_local3, _local3.speed.y);
};
};
};
if (((hitTestX(wall, _local3.x, (_local3.y + _local14))) || (hitTestX(wall, _local3.x, (_local3.y - _local14))))){
_local3.speed.y = (_local3.speed.y * -1);
if (_local12 == "G"){
_local3.destroy = true;
} else {
if (_local12 == "F"){
} else {
bulletLife(_local3, _local3.speed.x);
};
};
};
};
};
if (_local3.life <= 0){
_local3.destroy = true;
};
if (_local3.destroy == true){
_local7 = _local5;
BULLETS.removeChild(bulletArray[_local2]);
delete bulletArray[_local2];
bulletArray.splice(_local2, 1);
_local2--;
};
_local3.rotation = (calcAngle(_local3.speed.x, _local3.speed.y) - 90);
if (_local1 == true){
drawRipple((_local3.x - BG.x), (_local3.y - BG.y), (10 + (Math.random() * 6)), 5);
};
_local7++;
};
_local2++;
};
}
public function mDown(_arg1:Event){
if ((((((gameIntro == 0)) && ((MovieClip(root).gunReady == true)))) && ((mouseY > -210)))){
MovieClip(root).gunReady = false;
checkGunReady = false;
gunFrame = 1;
if (ammo > 0){
HUD[("B" + ammo)].alpha = 0.2;
ammo--;
newBullet(CS.x, CS.y, CS.GA.rotation);
MovieClip(root).playSound("GUN");
};
};
mousePressed = true;
}
public function ExitPreview(_arg1:Event){
toEditor();
}
public function newBullet(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){
var _local4:BULLET;
var _local5:Point;
_local4 = new BULLET();
BULLETS.addChild(_local4);
_local4.life = 10;
if (Dir > 0){
_local5 = rotatedXY(50, 0, CS.GA.rotation);
_local4.speed = calcSpeed(_arg3, 80);
} else {
_local5 = rotatedXY(-50, 0, (CS.GA.rotation * -1));
_local4.speed = calcSpeed((-(_arg3) + 180), 80);
};
_local4.x = (_local5.x + CS.x);
_local4.y = (_local5.y + CS.y);
newPuff(_local4.x, _local4.y, 40, 3);
_local4.destroy = false;
bulletArray.push(_local4);
}
public function onEnterFrame(_arg1:Event){
var _local2:String;
if (LEVELENDED == false){
if ((((checkGunReady == false)) && ((MovieClip(root).gunReady == true)))){
checkGunReady = true;
if (curGun == 1){
curGun = 2;
} else {
curRot = 0;
curGun = 1;
};
};
updateScore();
BTIMECONTROL();
updateBEXP();
heartBeat();
faceControl();
crackShot();
if (gameIntro > 0){
gameIntro--;
if (gameIntro == 0){
MASK.play();
MovieClip(root).gunReady = true;
MovieClip(root).playMusic("GAME");
};
} else {
MovieClip(root).changeMusicVolume((HUD.SLIDER.value / 4));
gameTime = (gameTime + worldSpeed);
_local2 = (Math.floor(((gameTime * 100) / 24)) / 100);
if (_local2.length == 1){
_local2 = (_local2 + ".00");
} else {
if (_local2.length == 3){
_local2 = (_local2 + "0");
};
};
HUD.gameTimeText.text = _local2;
updateSmoke();
updateVaseSmash();
worldSpeed = speedArray[HUD.SLIDER.value];
updateBullets();
spawnCycle = (spawnCycle + (worldSpeed * 3));
if (spawnCycle > 1){
spawnCycle--;
};
};
updateRippler();
convertSceneToBitmap();
CS.gotoAndStop(curGun);
if ((((targCount == 0)) || ((((ammo == 0)) && ((bulletArray.length == 0)))))){
endGameTimer--;
gameTime = (gameTime - worldSpeed);
if (endGameTimer == 0){
LEVELENDED = true;
};
};
} else {
MovieClip(root).EOL.x = 300;
MovieClip(root).EOL.y = 170;
EOLF();
};
}
public function destroyRipple():void{
water_buffer1.dispose();
water_buffer2.dispose();
water_defData.dispose();
}
public function newScore(_arg1, _arg2, _arg3, _arg4:Number=3){
var _local5:MovieClip;
var _local6:String;
score = (score + (_arg3 + (20 * _arg4)));
_local5 = new SCOREMC();
_local5.x = _arg1;
_local5.y = _arg2;
_local6 = ("+" + _arg3);
if (_arg4 != 0){
};
_local5.am.text = _local6;
SCORE.addChild(_local5);
scoreArray.push(_local5);
HUD.scoreText.text = score;
}
public function angle(_arg1:Object, _arg2:Object){
return (anglePoint(_arg1.x, _arg1.y, _arg2.x, _arg2.y));
}
public function destroyAS3Key(){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.handleKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, this.handleKeyUp);
}
public function populateBase(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:MovieClip;
_local1 = 0;
_local2 = 0;
_local3 = 0;
while (_local3 < (GSX * GSY)) {
if (levelCode.charAt(_local3) != "A"){
_local4 = new LE_Block();
_local4.x = ((blockSize * _local1) - x);
_local4.y = ((blockSize * _local2) - y);
_local4.width = blockSize;
_local4.height = blockSize;
_local4.ID = levelCode.charAt(_local3);
if ((((((_local4.ID == "J")) || ((_local4.ID == "K")))) || ((_local4.ID == "I")))){
targCount++;
};
_local4.gotoAndStop(_local4.ID);
wall.addChild(_local4);
baseBlocks.push(_local4);
objectArray.push(_local4);
} else {
objectArray.push(0);
};
_local1++;
if (_local1 == GSX){
_local1 = 0;
_local2++;
};
_local3++;
};
trace(("TARGS:" + targCount));
}
public function destroyEngine(){
var _local1:int;
destroyBG();
SoundMixer.stopAll();
_local1 = 0;
while (_local1 < bulletArray.length) {
BULLETS.removeChild(bulletArray[_local1]);
delete bulletArray[_local1];
bulletArray.splice(_local1, 1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < smokeArray.length) {
SMOKE.removeChild(smokeArray[_local1]);
delete smokeArray[_local1];
smokeArray.splice(_local1, 1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < vaseArray.length) {
EFFECTS.removeChild(vaseArray[_local1]);
delete vaseArray[_local1];
vaseArray.splice(_local1, 1);
_local1--;
_local1++;
};
removeChild(EFFECTS);
EFFECTS = null;
removeChild(BULLETS);
BULLETS = null;
removeChild(SMOKE);
SMOKE = null;
removeChild(SCORE);
SCORE = null;
removeChild(wall);
wall = null;
removeChild(MASK);
MASK = null;
removeChild(TARG);
TARG = null;
destroyAS3Key();
HUD.EXIT.removeEventListener(MouseEvent.MOUSE_UP, ExitPreview);
HUD.RESET.removeEventListener(MouseEvent.MOUSE_UP, ResetPreview);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, mUp);
}
public function updateVaseSmash(){
var _local1:int;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < vaseArray.length) {
_local2 = vaseArray[_local1];
moveObject(_local2, (_local2.speed.x * _local2.speedInc), (_local2.speed.y * _local2.speedInc), _local2.spin);
if (_local2.speedInc > 1){
_local2.speedInc = (_local2.speedInc - (0.25 * worldSpeed));
};
_local2.speed.y = (_local2.speed.y + (1 * worldSpeed));
if (_local2.y > 300){
EFFECTS.removeChild(_local2);
delete vaseArray[_local1];
vaseArray.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function updateBEXP(){
var _local1:int;
var _local2:int;
var _local3:*;
_local1 = 0;
while (_local1 < BEXPArray.length) {
BEXPArray[_local1].width = (BEXPArray[_local1].width + 15);
BEXPArray[_local1].height = (BEXPArray[_local1].height + 15);
if (BEXPArray[_local1].width > 80){
_local2 = 0;
while (_local2 < objectArray.length) {
if (objectArray[_local2] != 0){
_local3 = objectArray[_local2].ID;
if (objectArray[_local2].hitTestObject(BEXPArray[_local1])){
if (_local3 == "L"){
newBEXP(objectArray[_local2].x, objectArray[_local2].y);
};
if ((((((((((((_local3 == "E")) || ((_local3 == "H")))) || ((_local3 == "I")))) || ((_local3 == "J")))) || ((_local3 == "K")))) || ((_local3 == "L")))){
usedArray.push(_local2);
if (_local3 == "I"){
newScore(objectArray[_local2].x, objectArray[_local2].y, 50);
targCount--;
MovieClip(root).playSound("TARG1");
newVaseSmash(objectArray[_local2].x, objectArray[_local2].y, 2);
} else {
if (_local3 == "J"){
newScore(objectArray[_local2].x, objectArray[_local2].y, 75);
targCount--;
MovieClip(root).playSound("TARG2");
newVaseSmash(objectArray[_local2].x, objectArray[_local2].y, 3);
} else {
if (_local3 == "K"){
newScore(objectArray[_local2].x, objectArray[_local2].y, 100);
targCount--;
MovieClip(root).playSound("TARG3");
newVaseSmash(objectArray[_local2].x, objectArray[_local2].y, 4);
} else {
if (_local3 == "H"){
newVaseSmash(objectArray[_local2].x, objectArray[_local2].y, 1);
} else {
if (_local3 == "E"){
newVaseSmash(objectArray[_local2].x, objectArray[_local2].y, 0);
};
};
};
};
};
newPuff((objectArray[_local2].x + 20), (objectArray[_local2].y + 20), 40, 4);
objectArray[_local2].x = (objectArray[_local2].x - 600);
objectArray[_local2].width = 0;
objectArray[_local2].height = 0;
};
};
};
_local2++;
};
EFFECTS.removeChild(BEXPArray[_local1]);
delete BEXPArray[_local1];
BEXPArray.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function calcSpeed(_arg1:Number=0, _arg2:Number=10){
var _local3:Number;
var _local4:Point;
_local3 = (_arg1 / (180 / Math.PI));
_local4 = new Point();
_local4.x = (_arg2 * Math.cos(_local3));
_local4.y = (_arg2 * Math.sin(_local3));
return (_local4);
}
public function heartBeat(){
if (HUD.SLIDER.value == 4){
heartType = "HEART0";
} else {
if (HUD.SLIDER.value == 3){
heartType = "HEART1";
} else {
heartType = "HEART2";
};
};
heartTimer = (heartTimer + (0.5 + (worldSpeed * 1.5)));
if (heartTimer > 48){
heartTimer = (heartTimer - 48);
MovieClip(root).playSound(heartType);
};
}
public function bulletLife(_arg1:MovieClip, _arg2:Number){
if (_arg2 < 0){
_arg2 = (_arg2 * -1);
};
if (_arg2 > 30){
_arg2 = 30;
};
_arg1.life = (_arg1.life - ((31 - _arg2) + 1));
MovieClip(root).playSound("RIC");
}
public function pythag(_arg1:Object, _arg2:Object, _arg3:Number){
var _local4:*;
_local4 = Math.sqrt((Math.pow((_arg1.y - _arg2.y), 2) + Math.pow((_arg1.x - _arg2.x), 2)));
return ((_local4 < _arg3));
}
public function contButton(_arg1:Event){
if (score > MovieClip(root).savefile.data.scoreArray[MovieClip(root).levelNum]){
MovieClip(root).savefile.data.scoreArray[MovieClip(root).levelNum] = score;
MovieClip(root).savefile.flush();
};
MovieClip(root).EOL.removeEventListener(MouseEvent.MOUSE_UP, contButton);
toEditor();
}
public function rotatedXY(_arg1:Number, _arg2:Number, _arg3){
var _local4:Point;
var _local5:*;
var _local6:*;
var _local7:*;
_local4 = new Point();
_local5 = ((6.28 / 360) * _arg3);
_local6 = Math.sin(_local5);
_local7 = Math.cos(_local5);
_local4.x = ((_arg1 * _local7) - (_arg2 * _local6));
_local4.y = ((_arg1 * _local6) + (_arg2 * _local7));
return (_local4);
}
public function adjustVar(_arg1:Number, _arg2:Number){
return ((_arg1 + (_arg2 * worldSpeed)));
}
public function updateRippler(){
var _local1:BitmapData;
_local1 = water_buffer2.clone();
water_buffer2.applyFilter(water_buffer1, water_fullRect, water_origin, water_expandFilter);
water_buffer2.draw(_local1, null, null, BlendMode.SUBTRACT, null, false);
water_defData.draw(water_buffer2, water_matrix, water_colourTransform, null, null, true);
water_filter.mapBitmap = water_defData;
water_source.filters = [water_filter];
_local1.dispose();
switchBuffers();
}
public function convertSceneToBitmap(){
if (HUD.SLIDER.value == 4){
if (BGPlane.alpha > 0){
BGPlane.alpha = (BGPlane.alpha - 0.05);
};
} else {
if (BGPlane.alpha < 1){
BGPlane.alpha = (BGPlane.alpha + 0.05);
};
};
BG.BG.scaleX = (1 / bmpScaler);
BG.BG.scaleY = (1 / bmpScaler);
_target.scaleX = bmpScaler;
_target.scaleY = bmpScaler;
_targetCont = new BitmapData((arenaWidth / bmpScaler), (arenaHeight / bmpScaler), true, 0x333333);
_targetCont.draw(BG, trans_m, null, null);
_target.bitmapData = _targetCont;
BG.BG.scaleX = 1;
BG.BG.scaleY = 1;
}
public function newPuff(_arg1, _arg2, _arg3, _arg4){
var _local5:int;
_local5 = 0;
while (_local5 < _arg4) {
newSmoke(((_arg1 + ((Math.random() * _arg3) / 2)) - (_arg3 / 4)), ((_arg2 + ((Math.random() * _arg3) / 2)) - (_arg3 / 4)), (((Math.random() * _arg3) / 2) + (_arg3 / 2)));
_local5++;
};
}
public function updateScore(){
var _local1:int;
_local1 = 0;
while (_local1 < scoreArray.length) {
scoreArray[_local1].y = (scoreArray[_local1].y - 5);
scoreArray[_local1].alpha = (scoreArray[_local1].alpha - 0.05);
if (scoreArray[_local1].alpha == 0){
SCORE.removeChild(scoreArray[_local1]);
delete scoreArray[_local1];
scoreArray.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function ZNumCrush(_arg1){
var _local2:String;
var _local3:Number;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + ZNumToChar[Number(_arg1.charAt(_local3))]);
_local3++;
};
return (ZCrush(_local2));
}
public function calcAngle(_arg1:Number, _arg2:Number){
return (anglePoint(0, 0, _arg1, _arg2));
}
public function ResetPreview(_arg1:Event){
destroyEngine();
MovieClip(root).gotoAndStop("RESET");
}
public function isKeyPressed(_arg1:int):Boolean{
return ((_keys.indexOf(_arg1) > -1));
}
public function EOLF(){
if (EOLTime == 0){
SoundMixer.stopAll();
MovieClip(root).playSound("FAN");
MovieClip(root).EOL.play();
};
EOLTime = (EOLTime + 10);
MovieClip(root).EOL.descBox.text = EOLText;
MovieClip(root).EOL.dataBox.text = EOLData;
if (EOLTime == 40){
MovieClip(root).playSound("GUN");
EOLText = (EOLText + "POINTS................\n");
EOLData = (EOLData + (Number(HUD.scoreText.text) + "\n"));
} else {
if (EOLTime == 80){
MovieClip(root).playSound("GUN");
EOLText = (EOLText + "TIME..................\n");
EOLData = (EOLData + (HUD.gameTimeText.text + "\n"));
} else {
if (EOLTime == 120){
MovieClip(root).playSound("GUN");
EOLText = (EOLText + "TIME BONUS........\n");
EOLData = (EOLData + (Math.round((200 / Number(HUD.gameTimeText.text))) + "\n"));
score = Math.ceil((Number(HUD.scoreText.text) + Math.round((200 / Number(HUD.gameTimeText.text)))));
} else {
if (EOLTime == 160){
MovieClip(root).playSound("GUN");
EOLText = (EOLText + "BULLET BONUS......\n");
EOLData = (EOLData + (Math.round((30 * ammo)) + "\n"));
score = (score + Math.round((30 * ammo)));
} else {
if (EOLTime == 200){
MovieClip(root).playSound("GUN");
EOLText = (EOLText + "\nYOUR SCORE........\n");
EOLData = (EOLData + (("\n" + score) + "\n"));
} else {
if (EOLTime == 240){
MovieClip(root).playSound("GUN");
EOLText = (EOLText + "PREVIOUS BEST...\n");
EOLData = (EOLData + (MovieClip(root).savefile.data.scoreArray[MovieClip(root).levelNum] + "\n"));
if (score >= MovieClip(root).savefile.data.scoreArray[MovieClip(root).levelNum]){
MovieClip(root).EOL.prevBeat.visible = true;
};
} else {
if (EOLTime == 280){
MovieClip(root).playSound("GUN");
EOLText = (EOLText + "EXPERT SCORE.....\n");
trace("HERE WE GO");
if (levelCodeS[4] != null){
EOLData = (EOLData + (levelCodeS[4] + "\n"));
trace("HERE WE GO2");
if (score >= Number(levelCodeS[4])){
MovieClip(root).EOL.expBeat.visible = true;
MovieClip(root).savefile.data.expArray[MovieClip(root).levelNum] = true;
MovieClip(root).savefile.flush();
};
};
MovieClip(root).EOL.contButton.visible = true;
MovieClip(root).EOL.addEventListener(MouseEvent.MOUSE_UP, contButton);
};
};
};
};
};
};
};
}
public function newSmoke(_arg1, _arg2, _arg3){
var _local4:Smoke;
_local4 = new Smoke();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.width = (_arg3 / 2);
_local4.height = (_arg3 / 2);
_local4.alph = 1;
_local4.spin = 40;
_local4.speed = new Point(((Math.random() * 6) - 3), ((Math.random() * 6) - 3));
smokeArray.push(_local4);
SMOKE.addChild(_local4);
}
public function toEditor(){
destroyEngine();
if (MovieClip(root).gameMode == 0){
MovieClip(root).transistion("LEVELS");
} else {
if (MovieClip(root).gameMode == 1){
MovieClip(root).gotoAndStop("EDITOR");
};
};
}
public function ZNumCompile(_arg1){
var _local2:String;
var _local3:Number;
var _local4:Number;
_arg1 = ZCompile(_arg1);
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = 0;
while (_local4 < ZNumToChar.length) {
if (_arg1.charAt(_local3) == ZNumToChar[_local4]){
_local2 = (_local2 + String(_local4));
};
_local4++;
};
_local3++;
};
return (_local2);
}
public function crackShot(){
TARG.x = (TARG.x + ((mouseX - TARG.x) / (1 / worldSpeed)));
TARG.y = (TARG.y + ((mouseY - TARG.y) / (1 / worldSpeed)));
if (MovieClip(root).gunReady == false){
gunFrame = (gunFrame + (worldSpeed * 40));
if (gunFrame >= 200){
gunFrame = 1;
MovieClip(root).gunReady = true;
};
} else {
gunFrame = 1;
};
CS.GA.gotoAndStop(Math.round(gunFrame));
CS.POSE.HEAD.rotation = (CS.GA.rotation / 2);
CS.POSE.BODY.rotation = (CS.POSE.HEAD.rotation / 10);
CS.POSE.BODY.ARM.rotation = ((CS.POSE.BODY.rotation * 5) + curRot);
}
public function destroyBG(){
destroyRipple();
_targetCont.dispose();
_targetContT.dispose();
_targetCont = null;
_targetContT = null;
BGPlane.removeChild(_target);
_target = null;
}
public function reduceVar(_arg1:Number=0, _arg2:Number=1.1){
return ((_arg1 / _arg2));
}
public function getRippleImage():BitmapData{
return (water_defData);
}
public function mUp(_arg1:Event){
mousePressed = false;
}
public function newVaseSmash(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){
var _local4:Array;
var _local5:int;
var _local6:MovieClip;
_local4 = new Array(Particles_Vase, Particles_Bottle, Particles_Target, Particles_Target2, Particles_Target3);
_local5 = 1;
while (_local5 < 14) {
_local6 = new (_local4[_arg3]);
_local6.x = (_arg1 + 20);
_local6.y = (_arg2 + 20);
_local6.rotation = (Math.random() * 360);
_local6.rotation = (_local6.rotation / 1.5);
_local6.rotation = (_local6.rotation - 90);
_local6.speedInc = 2;
_local6.scaleX = 2;
_local6.scaleY = _local6.scaleX;
_local6.gotoAndStop(_local5);
_local6.spin = ((Math.random() * 400) - 200);
_local6.speed = calcSpeed(_local6.rotation, ((Math.random() * 5) + 5));
_local6.x = (_local6.x + (_local6.speed.x * 2));
_local6.y = (_local6.y + (_local6.speed.y * 2));
vaseArray.push(_local6);
EFFECTS.addChild(_local6);
_local5++;
};
}
}
}//package CrackShot_fla
Section 20
//GetRadyText_88 (CrackShot_fla.GetRadyText_88)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class GetRadyText_88 extends MovieClip {
public function GetRadyText_88(){
addFrameScript(58, frame59);
}
function frame59(){
stop();
}
}
}//package CrackShot_fla
Section 21
//HUD_66 (CrackShot_fla.HUD_66)
package CrackShot_fla {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class HUD_66 extends MovieClip {
public var B12:BULLET;
public var EXIT:SimpleButton;
public var B2:BULLET;
public var B3:BULLET;
public var B4:BULLET;
public var B5:BULLET;
public var B7:BULLET;
public var B1:BULLET;
public var B6:BULLET;
public var RESET:SimpleButton;
public var B8:BULLET;
public var B9:BULLET;
public var gameTimeText:TextField;
public var B10:BULLET;
public var scoreText:TextField;
public var SLIDER:Slider;
public var B11:BULLET;
public function HUD_66(){
__setProp_SLIDER_HUD_Layer1_1();
}
function __setProp_SLIDER_HUD_Layer1_1(){
try {
SLIDER["componentInspectorSetting"] = true;
} catch(e:Error) {
};
SLIDER.direction = "horizontal";
SLIDER.enabled = true;
SLIDER.liveDragging = false;
SLIDER.maximum = 4;
SLIDER.minimum = 0;
SLIDER.snapInterval = 0;
SLIDER.tickInterval = 0;
SLIDER.value = 4;
SLIDER.visible = true;
try {
SLIDER["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package CrackShot_fla
Section 22
//ITLESCRENMAN_42 (CrackShot_fla.ITLESCRENMAN_42)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class ITLESCRENMAN_42 extends MovieClip {
public var POSE:MovieClip;
public var GA:MovieClip;
public function ITLESCRENMAN_42(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrackShot_fla
Section 23
//LE_ExitWarning_59 (CrackShot_fla.LE_ExitWarning_59)
package CrackShot_fla {
import flash.display.*;
public dynamic class LE_ExitWarning_59 extends MovieClip {
public var NO:SimpleButton;
public var YES:SimpleButton;
}
}//package CrackShot_fla
Section 24
//LE_LoadScreen_62 (CrackShot_fla.LE_LoadScreen_62)
package CrackShot_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LE_LoadScreen_62 extends MovieClip {
public var S1:SimpleButton;
public var S2:SimpleButton;
public var S3:SimpleButton;
public var CS:SimpleButton;
public var CANCEL:SimpleButton;
public var slotName1:TextField;
public var slotName2:TextField;
public var slotName3:TextField;
public var NO:SimpleButton;
}
}//package CrackShot_fla
Section 25
//LE_PalletteScreen_63 (CrackShot_fla.LE_PalletteScreen_63)
package CrackShot_fla {
import flash.display.*;
public dynamic class LE_PalletteScreen_63 extends MovieClip {
public var C:LE_Block;
public var D:LE_Block;
public var E:LE_Block;
public var H:LE_Block;
public var L:LE_Block;
public var I:LE_Block;
public var G:LE_Block;
public var K:LE_Block;
public var J:LE_Block;
public var B:LE_Block;
public var F:LE_Block;
public var A:LE_Block;
}
}//package CrackShot_fla
Section 26
//LE_SaveScreen_61 (CrackShot_fla.LE_SaveScreen_61)
package CrackShot_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LE_SaveScreen_61 extends MovieClip {
public var S1:SimpleButton;
public var S2:SimpleButton;
public var S3:SimpleButton;
public var CS:SimpleButton;
public var slotName1:TextField;
public var slotName2:TextField;
public var slotName3:TextField;
public var CANCEL:SimpleButton;
public var UN2:SimpleButton;
public var UN3:SimpleButton;
public var NO:SimpleButton;
public var slotPar1:TextField;
public var slotPar2:TextField;
public var slotShare1:TextField;
public var slotShare2:TextField;
public var slotShare3:TextField;
public var slotPar3:TextField;
public var UN1:SimpleButton;
}
}//package CrackShot_fla
Section 27
//LevelLock_53 (CrackShot_fla.LevelLock_53)
package CrackShot_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LevelLock_53 extends MovieClip {
public var scoreNeed:TextField;
}
}//package CrackShot_fla
Section 28
//LevelLockend_51 (CrackShot_fla.LevelLockend_51)
package CrackShot_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LevelLockend_51 extends MovieClip {
public var scoreNeed:TextField;
}
}//package CrackShot_fla
Section 29
//LEVELSELECT_50 (CrackShot_fla.LEVELSELECT_50)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class LEVELSELECT_50 extends MovieClip {
public var L4Score:TextField;
public var totalScoreText:TextField;
public var L1Score:TextField;
public var BCK:SimpleButton;
public var lock1:MovieClip;
public var lock2:MovieClip;
public var lock3:MovieClip;
public var lock4:MovieClip;
public var m:int;
public var i:int;
public var L11Score:TextField;
public var bLevelText:TextField;
public var L8Score:TextField;
public var L5Score:TextField;
public var L2Score:TextField;
public var scoreArray:Array;
public var exp11:MovieClip;
public var exp12:MovieClip;
public var exp10:MovieClip;
public var L12Score:TextField;
public var L9Score:TextField;
public var L6Score:TextField;
public var L1:SimpleButton;
public var L2:SimpleButton;
public var L3:SimpleButton;
public var L5:SimpleButton;
public var L10:SimpleButton;
public var L12:SimpleButton;
public var L6:SimpleButton;
public var L4:SimpleButton;
public var L7:SimpleButton;
public var L11:SimpleButton;
public var L9:SimpleButton;
public var L8:SimpleButton;
public var MC:MovieClip;
public var L3Score:TextField;
public var lockEnd:MovieClip;
public var exp1:MovieClip;
public var exp2:MovieClip;
public var exp3:MovieClip;
public var exp4:MovieClip;
public var exp6:MovieClip;
public var exp7:MovieClip;
public var exp8:MovieClip;
public var exp9:MovieClip;
public var TSM:MovieClip;
public var exp5:MovieClip;
public var totalScore:Number;
public var L7Score:TextField;
public var L10Score:TextField;
public function LEVELSELECT_50(){
addFrameScript(0, frame1);
}
public function OMU(_arg1:Event){
MC.x = mouseX;
MC.y = mouseY;
if (MC.hitTestObject(lockEnd)){
trace("DARLING");
if (totalScore >= scoreArray[4]){
MovieClip(root).transistion("ENDOFGAME");
};
};
if (((MC.hitTestObject(L1)) && (!(checkLocks())))){
DTS();
trace("Level1");
MovieClip(root).levelCode = "C12B2C10AKA2C7AJ4A2C4AI7A2C9AJ2A2C6AI5A2C12A2C8AI3A2C12AC14B@100@300@Your_Name_Here@1025";
MovieClip(root).transistion("TUT");
MovieClip(root).levelNum = 1;
} else {
if (((MC.hitTestObject(L2)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 2;
MovieClip(root).levelCode = "C12B2C12A2C12A2C12A2C3AJ3AC4A6C3AC4A2C7AC4A2C5A5I2A2C12AC14B@100@300@Your_Name_Here@930";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L3)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 3;
MovieClip(root).levelCode = "C12B2C12A2C12A2C12ACGI10AKCFI10ABCFI11ACGI11ACGI11AC3G11B@500@300@Your_Name_Here@950";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L4)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 4;
MovieClip(root).levelCode = "C12G2C12A2C12A2C12A2CLAHE3A2EIHJ2CLA2C3A2CACA2CLA4CA2CACA2CL3AKCA2CACA2C5LCA2CACAC14B@260@180@Your_Name_Here@750";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L5)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 5;
MovieClip(root).levelCode = "C12B2C2F2ICJ6A2CKF2ACLE5A2CAF2A2CLE4A2CAF2AI2CLE3A2CAF3AI2CLE2A2C6AI2CL2G2CAF8A2G2CAF8A2GC14B@180@300@Lucy@1050";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L6)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 6;
MovieClip(root).levelCode = "C12B2CI11A2CI11A7C7A2CAJI2E5A9C7A2C2AE9A2CAELH8A2CILELE6AIC14B@460@100@Lucy@930";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L7)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 7;
MovieClip(root).levelCode = "C12B2C2AI7AIA2C12A2C12A2C5AGI5A2C5AG6A2C5AG6A2CJ4AG6A2CGK4GI5AC14B@500@300@Lucy@950";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L8)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 8;
MovieClip(root).levelCode = "C12B2C8A3EI2C8A6C12AF3C6AF3AFC8AF3AFC8AFAIAFCI7AFAJAFCI6AIFAKAF14B@60@100@Lucy@1000";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L9)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 9;
MovieClip(root).levelCode = "C12B2CJ10AI3C5AI4A3CAI4AC2AI2A2CAC7AC2A2C12A2C10AIA2C10ACA2CI11AC14B@180@300@Lucy@950";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L10)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 10;
MovieClip(root).levelCode = "C12B2CKJI6AIJK2CJI8AIJ2CI10AI2C12A2C12A2CI10A3CJI8A4CKJI6A4C14B@260@300@Lucy@1500";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L11)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 11;
MovieClip(root).levelCode = "C12B2C7A5F2C11AJ2C7A5F2C9AI2A2C6AI2AF2A2CAD4AG2AF2A2CIH4AG2AFAJ2CAD4AGAK3FC14B@180@300@Lucy@830";
MovieClip(root).transistion("TUT");
} else {
if (((MC.hitTestObject(L12)) && (!(checkLocks())))){
DTS();
MovieClip(root).levelNum = 12;
MovieClip(root).levelCode = "C12B2CI10AI2C12A2C12A2C5A3C4A2C6AK5A2C12A2C12A2CI4AJIJ3AIC14B@300@100@Lucy@950";
MovieClip(root).transistion("TUT");
} else {
if (MC.hitTestObject(BCK)){
DTS();
MovieClip(root).transistion("TITLE");
};
};
};
};
};
};
};
};
};
};
};
};
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_UP, OMU);
MC.width = 1;
MC.height = 1;
m = 1;
while (m < 13) {
this[("exp" + m)].visible = false;
if (MovieClip(root).savefile.data.expArray[m] == true){
this[("exp" + m)].visible = true;
};
m++;
};
totalScore = 0;
MovieClip(root).bLevel = 0;
i = 1;
while (i < 13) {
if (MovieClip(root).savefile.data.scoreArray[i] == undefined){
MovieClip(root).savefile.data.scoreArray[i] = 0;
MovieClip(root).savefile.flush();
};
if (MovieClip(root).savefile.data.scoreArray[i] > 0){
MovieClip(root).bLevel++;
};
this[(("L" + i) + "Score")].text = MovieClip(root).savefile.data.scoreArray[i];
totalScore = (totalScore + MovieClip(root).savefile.data.scoreArray[i]);
i++;
};
bLevelText.text = ((MovieClip(root).bLevel * 2) + " Seconds");
totalScoreText.text = totalScore;
stop();
scoreArray = new Array(0, 2500, 4800, 8000, 11000);
i = 1;
while (i < 5) {
this[("lock" + i)].scoreNeed.text = scoreArray[(i - 1)];
if (MovieClip(root).savefile.data.lockArray[i] == true){
this[("lock" + i)].x = (this[("lock" + i)].x - 400);
};
i++;
};
lockEnd.scoreNeed.text = scoreArray[4];
}
public function checkLocks(){
var _local1:int;
_local1 = 1;
while (_local1 < 5) {
if (MC.hitTestObject(this[("lock" + _local1)])){
trace(_local1);
return (true);
};
_local1++;
};
return (false);
}
public function onEnterFrame(_arg1:Event){
i = 1;
while (i < 5) {
if (MovieClip(root).savefile.data.lockArray[i] == true){
this[("lock" + i)].x = (this[("lock" + i)].x - 5);
};
i++;
};
if (totalScore >= scoreArray[0]){
MovieClip(root).savefile.data.lockArray[1] = true;
MovieClip(root).savefile.flush();
};
if (totalScore >= scoreArray[1]){
MovieClip(root).savefile.data.lockArray[2] = true;
MovieClip(root).savefile.flush();
};
if (totalScore >= scoreArray[2]){
MovieClip(root).savefile.data.lockArray[3] = true;
MovieClip(root).savefile.flush();
};
if (totalScore >= scoreArray[3]){
MovieClip(root).savefile.data.lockArray[4] = true;
MovieClip(root).savefile.flush();
};
}
public function DTS(){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.removeEventListener(MouseEvent.MOUSE_UP, OMU);
}
}
}//package CrackShot_fla
Section 30
//MainTimeline (CrackShot_fla.MainTimeline)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import CPMStar.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class MainTimeline extends MovieClip {
public var ad:DisplayObject;
public var bytesloaded;
public var urlStart:Number;
public var domEnd:Number;
public var SC:SoundChannel;
public var myContextMenu:ContextMenu;
public var S:Sound;
public var audioActive:Boolean;
public var savefile:SharedObject;
public var blankLevel;
public var POSE:MovieClip;
public var bytesDone;
public var adBox:MovieClip;
public var LastDot:Number;
public var gameMode;
public var CPMStarSubPoolID:int;
public var CPMStarPoolID:int;
public var BULLETTIME:MovieClip;
public var domain:String;
public var GA:MovieClip;
public var EOL:MovieClip;
public var urlEnd:Number;
public var bytesMax;
public var LOGOMASK:MovieClip;
public var SKIPPER:SimpleButton;
public var FADER:MovieClip;
public var levelNum;
public var url:String;
public var SKIP:SimpleButton;
public var myVol:SoundTransform;
public var levelCode;
public var activeSave;
public var LOGO:MovieClip;
public var TUT:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 5, frame6, 7, frame8, 9, frame10);
}
public function OMU(_arg1:Event){
LOGO.removeEventListener(MouseEvent.MOUSE_UP, OMU);
if (domain != ""){
adBox.removeChild(ad);
ad = null;
};
play();
}
public function playSound(_arg1){
var _local2:Sound;
var _local3:SoundTransform;
var _local4:SoundChannel;
if (audioActive == true){
_local3 = new SoundTransform();
_local3.volume = 1;
if (_arg1 == "HEART0"){
_local2 = new SND_H0();
} else {
if (_arg1 == "HEART1"){
_local2 = new SND_H1();
_local3.volume = 2;
} else {
if (_arg1 == "HEART2"){
_local2 = new SND_H2();
_local3.volume = 3;
} else {
if (_arg1 == "EXP"){
_local2 = new SND_EXP();
_local3.volume = 2;
} else {
if (_arg1 == "TARG1"){
_local2 = new SND_TARGL();
_local3.volume = 0.2;
} else {
if (_arg1 == "TARG2"){
_local2 = new SND_TARGM();
_local3.volume = 0.2;
} else {
if (_arg1 == "TARG3"){
_local2 = new SND_TARGS();
_local3.volume = 0.2;
} else {
if (_arg1 == "GUN"){
_local2 = new SND_GUN();
_local3.volume = 1;
} else {
if (_arg1 == "RIC"){
_local2 = new SND_RIC();
_local3.volume = 1;
} else {
if (_arg1 == "SMASH"){
_local2 = new SND_SMASH();
_local3.volume = 1;
} else {
if (_arg1 == "FAN"){
_local2 = new SND_FAN();
_local3.volume = 1;
};
};
};
};
};
};
};
};
};
};
};
_local4 = new SoundChannel();
_local4.soundTransform = _local3;
_local4 = _local2.play();
};
}
function frame10(){
TUT.gotoAndStop(levelNum);
SKIP.addEventListener(MouseEvent.MOUSE_UP, OMUTUT);
if ((((savefile.data.scoreArray[levelNum] > 0)) || ((levelNum > 5)))){
SKIP.removeEventListener(MouseEvent.MOUSE_UP, OMUTUT);
transistion("GAME");
};
}
public function OMUTUT(_arg1:Event){
SKIP.removeEventListener(MouseEvent.MOUSE_UP, OMUTUT);
transistion("GAME");
}
function frame2(){
stop();
savefile = SharedObject.getLocal("CRACKSHOTv3");
blankLevel = "C12B2C12A2C12A2CAF10A2CAF10A2CAF4AIAIAIA2CAF3A9CAF3A5EHJ2CIF3A7GC14B@180@300@Lucy";
if (savefile.data.editor_slot1 == undefined){
savefile.data.editor_slot1 = blankLevel;
savefile.data.editor_slot2 = blankLevel;
savefile.data.editor_slot3 = blankLevel;
savefile.data.editor_slot1_name = "Your_Name_Here";
savefile.data.editor_slot2_name = "Your_Name_Here";
savefile.data.editor_slot3_name = "Your_Name_Here";
savefile.data.scoreArray = new Array();
savefile.data.expArray = new Array();
savefile.data.lockArray = new Array();
savefile.flush();
};
saveGame();
activeSave = 1;
gameMode = 0;
levelNum = 0;
levelCode = blankLevel;
audioActive = true;
addEventListener(Event.ENTER_FRAME, handleTransistion);
}
function frame6(){
stop();
}
function frame3(){
stop();
}
function frame1(){
LOGO.mask = LOGOMASK;
stop();
addEventListener(Event.ENTER_FRAME, preLoader);
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
contextMenu = myContextMenu;
bytesMax = 100;
bytesDone = 0;
bytesloaded = stage.loaderInfo.bytesLoaded;
url = stage.loaderInfo.url;
urlStart = (url.indexOf("://") + 3);
urlEnd = url.indexOf("/", urlStart);
domain = url.substring(urlStart, urlEnd);
LastDot = (domain.lastIndexOf(".") - 1);
domEnd = (domain.lastIndexOf(".", LastDot) + 1);
domain = domain.substring(domEnd, domain.length);
if (domain != ""){
CPMStarPoolID = 1052;
CPMStarSubPoolID = 21;
ad = AdLoader.LoadAd(CPMStarPoolID, CPMStarSubPoolID);
adBox.addChild(ad);
} else {
bytesDone = 90;
};
stop();
}
function frame8(){
gotoAndStop("GAME");
}
public function preLoader(_arg1:Event){
var _local2:*;
var _local3:*;
_local2 = bytesMax;
_local3 = bytesDone;
if (bytesDone > 40){
if (LOGO.y > 286){
LOGO.y = (LOGO.y - 4);
LOGOMASK.y = (LOGOMASK.y - 4);
};
};
if (bytesDone < 100){
bytesDone = (bytesDone + ((Math.random() * 0.5) + 0.1));
};
LOGOMASK.gotoAndStop(Math.floor(bytesDone));
if ((((_local3 >= _local2)) && ((LOGO.y <= 286)))){
removeEventListener(Event.ENTER_FRAME, preLoader);
LOGO.gotoAndStop(2);
LOGO.addEventListener(MouseEvent.MOUSE_UP, OMU);
};
}
public function handleTransistion(_arg1:Event){
if (FADER.alpha > 0){
FADER.alpha = (FADER.alpha - 1);
} else {
FADER.scaleX = 0;
};
}
public function saveGame(){
savefile.flush();
}
public function playMusic(_arg1){
if (audioActive == true){
myVol = new SoundTransform();
myVol.volume = 0;
if (_arg1 == "GAME"){
S = new SND_GAME();
} else {
if (_arg1 == "MENU"){
S = new SND_MENU();
};
};
SC = new SoundChannel();
SC.soundTransform = myVol;
SC = S.play(0, 1000);
};
}
public function changeMusicVolume(_arg1){
myVol.volume = _arg1;
SC.soundTransform = myVol;
}
public function transistion(_arg1){
FADER.scaleX = 1;
gotoAndStop(_arg1);
}
public function gotoLink(_arg1){
var url:String;
var request:URLRequest;
var targ = _arg1;
url = targ;
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
}
}//package CrackShot_fla
Section 31
//MenuMusic_36 (CrackShot_fla.MenuMusic_36)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class MenuMusic_36 extends MovieClip {
public function MenuMusic_36(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(root).playMusic("MENU");
}
}
}//package CrackShot_fla
Section 32
//SystemSquare_21 (CrackShot_fla.SystemSquare_21)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class SystemSquare_21 extends MovieClip {
public function SystemSquare_21(){
addFrameScript(0, frame1);
}
function frame1(){
alpha = 0;
}
}
}//package CrackShot_fla
Section 33
//Title_Logomask_24 (CrackShot_fla.Title_Logomask_24)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class Title_Logomask_24 extends MovieClip {
public function Title_Logomask_24(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
}
}
}//package CrackShot_fla
Section 34
//TITLELOGO_22 (CrackShot_fla.TITLELOGO_22)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class TITLELOGO_22 extends MovieClip {
public function TITLELOGO_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrackShot_fla
Section 35
//TITLESCREEN_38 (CrackShot_fla.TITLESCREEN_38)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class TITLESCREEN_38 extends MovieClip {
public var CREDITSPAGE:MovieClip;
public var CREATE:SimpleButton;
public var QH:SimpleButton;
public var QL:SimpleButton;
public var QM:SimpleButton;
public var MUTE:SimpleButton;
public var ARMOR:SimpleButton;
public var CUSTOM:SimpleButton;
public var BEGIN:SimpleButton;
public var MC:MovieClip;
public var CREDITS:SimpleButton;
public var TSM:MovieClip;
public var LOGO:MovieClip;
public function TITLESCREEN_38(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_UP, OMU);
MC.width = 1;
MC.height = 1;
LOGO.gotoAndStop(3);
stop();
}
public function OMU(_arg1:Event){
MC.x = mouseX;
MC.y = mouseY;
if (MC.hitTestObject(CREDITSPAGE)){
CREDITSPAGE.x = 1000;
} else {
if (MC.hitTestObject(BEGIN)){
DTS();
MovieClip(root).transistion("LEVELS");
} else {
if (MC.hitTestObject(ARMOR)){
MovieClip(root).gotoLink("http://www.armorgames.com");
} else {
if (MC.hitTestObject(QL)){
stage.quality = StageQuality.LOW;
} else {
if (MC.hitTestObject(QM)){
stage.quality = StageQuality.MEDIUM;
} else {
if (MC.hitTestObject(QH)){
stage.quality = StageQuality.HIGH;
} else {
if (MC.hitTestObject(MUTE)){
if (MovieClip(root).audioActive == true){
MovieClip(root).audioActive = false;
SoundMixer.stopAll();
} else {
MovieClip(root).audioActive = true;
MovieClip(root).playMusic("MENU");
};
} else {
if (MC.hitTestObject(CREDITS)){
CREDITSPAGE.x = 0;
};
};
};
};
};
};
};
};
}
public function onEnterFrame(_arg1:Event){
}
public function DTS(){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.removeEventListener(MouseEvent.MOUSE_UP, OMU);
}
}
}//package CrackShot_fla
Section 36
//TUTORIAL_84 (CrackShot_fla.TUTORIAL_84)
package CrackShot_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class TUTORIAL_84 extends MovieClip {
public function TUTORIAL_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrackShot_fla
Section 37
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 38
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 39
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 40
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 41
//Slider (fl.controls.Slider)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class Slider extends UIComponent implements IFocusManagerComponent {
protected var _direction:String;
protected var _liveDragging:Boolean;// = false
protected var _value:Number;// = 0
protected var _snapInterval:Number;// = 0
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 10
protected var track:BaseButton;
protected var _tickInterval:Number;// = 0
protected var tickContainer:Sprite;
protected var thumb:BaseButton;
protected static const TICK_STYLES:Object = {upSkin:"tickSkin"};
protected static const TRACK_STYLES:Object = {upSkin:"sliderTrackSkin", overSkin:"sliderTrackSkin", downSkin:"sliderTrackSkin", disabledSkin:"sliderTrackDisabledSkin"};
protected static const THUMB_STYLES:Object = {upSkin:"thumbUpSkin", overSkin:"thumbOverSkin", downSkin:"thumbDownSkin", disabledSkin:"thumbDisabledSkin"};
protected static var defaultStyles:Object = {thumbUpSkin:"SliderThumb_upSkin", thumbOverSkin:"SliderThumb_overSkin", thumbDownSkin:"SliderThumb_downSkin", thumbDisabledSkin:"SliderThumb_disabledSkin", sliderTrackSkin:"SliderTrack_skin", sliderTrackDisabledSkin:"SliderTrack_disabledSkin", tickSkin:"SliderTick_skin", focusRectSkin:null, focusRectPadding:null};
public function Slider(){
_direction = SliderDirection.HORIZONTAL;
_minimum = 0;
_maximum = 10;
_value = 0;
_tickInterval = 0;
_snapInterval = 0;
_liveDragging = false;
super();
setStyles();
}
public function get minimum():Number{
return (_minimum);
}
public function set minimum(_arg1:Number):void{
_minimum = _arg1;
this.value = Math.max(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function positionThumb():void{
thumb.x = ((((_direction)==SliderDirection.VERTICAL) ? ((maximum - minimum) - value) : (value - minimum) / (maximum - minimum)) * _width);
}
protected function clearTicks():void{
if (((!(tickContainer)) || (!(tickContainer.parent)))){
return;
};
removeChild(tickContainer);
}
protected function onTrackClick(_arg1:MouseEvent):void{
calculateValue(track.mouseX, InteractionInputType.MOUSE, SliderEventClickTarget.TRACK);
if (!liveDragging){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE));
};
}
public function set maximum(_arg1:Number):void{
_maximum = _arg1;
this.value = Math.min(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get liveDragging():Boolean{
return (_liveDragging);
}
protected function doDrag(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
_local2 = (_width / snapInterval);
_local3 = track.mouseX;
calculateValue(_local3, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_DRAG, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:Number;
var _local4:Boolean;
if (!enabled){
return;
};
_local2 = ((snapInterval)>0) ? snapInterval : 1;
_local4 = (direction == SliderDirection.HORIZONTAL);
if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local4))))){
_local3 = (value - _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local4))))){
_local3 = (value + _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local4))))){
_local3 = minimum;
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local4))))){
_local3 = maximum;
};
};
};
};
if (!isNaN(_local3)){
_arg1.stopPropagation();
doSetValue(_local3, InteractionInputType.KEYBOARD, null, _arg1.keyCode);
};
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
super.enabled = _arg1;
track.enabled = (thumb.enabled = _arg1);
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_PRESS, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
}
public function get snapInterval():Number{
return (_snapInterval);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_RELEASE, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
public function set liveDragging(_arg1:Boolean):void{
_liveDragging = _arg1;
}
public function set value(_arg1:Number):void{
doSetValue(_arg1);
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
_direction = _arg1;
_local2 = (_direction == SliderDirection.VERTICAL);
if (isLivePreview){
if (_local2){
setScaleY(-1);
y = track.height;
} else {
setScaleY(1);
y = 0;
};
positionThumb();
return;
};
if (((_local2) && (componentInspectorSetting))){
if ((rotation % 90) == 0){
setScaleY(-1);
};
};
if (!componentInspectorSetting){
rotation = (_local2) ? 90 : 0;
};
}
public function set tickInterval(_arg1:Number):void{
_tickInterval = _arg1;
invalidate(InvalidationType.SIZE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
track.setSize(_width, track.height);
track.drawNow();
thumb.drawNow();
};
if (tickInterval > 0){
drawTicks();
} else {
clearTicks();
};
positionThumb();
super.draw();
}
override protected function configUI():void{
super.configUI();
thumb = new BaseButton();
thumb.setSize(13, 13);
thumb.autoRepeat = false;
addChild(thumb);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
track = new BaseButton();
track.move(0, 0);
track.setSize(80, 4);
track.autoRepeat = false;
track.useHandCursor = false;
track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true);
addChildAt(track, 0);
}
public function set snapInterval(_arg1:Number):void{
_snapInterval = _arg1;
}
public function get value():Number{
return (_value);
}
public function get direction():String{
return (_direction);
}
public function get tickInterval():Number{
return (_tickInterval);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if ((((_direction == SliderDirection.VERTICAL)) && (!(isLivePreview)))){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
invalidate(InvalidationType.SIZE);
}
protected function drawTicks():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:DisplayObject;
clearTicks();
tickContainer = new Sprite();
_local1 = ((maximum)<1) ? (tickInterval / 100) : tickInterval;
_local2 = ((maximum - minimum) / _local1);
_local3 = (_width / _local2);
_local4 = 0;
while (_local4 <= _local2) {
_local5 = getDisplayObjectInstance(getStyleValue("tickSkin"));
_local5.x = (_local3 * _local4);
_local5.y = ((track.y - _local5.height) - 2);
tickContainer.addChild(_local5);
_local4++;
};
addChild(tickContainer);
}
protected function calculateValue(_arg1:Number, _arg2:String, _arg3:String, _arg4:int=undefined):void{
var _local5:Number;
_local5 = ((_arg1 / _width) * (maximum - minimum));
if (_direction == SliderDirection.VERTICAL){
_local5 = (maximum - _local5);
} else {
_local5 = (minimum + _local5);
};
doSetValue(_local5, _arg2, _arg3, _arg4);
}
protected function getPrecision(_arg1:Number):Number{
var _local2:String;
_local2 = _arg1.toString();
if (_local2.indexOf(".") == -1){
return (0);
};
return (_local2.split(".").pop().length);
}
protected function doSetValue(_arg1:Number, _arg2:String=null, _arg3:String=null, _arg4:int=undefined):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = _value;
if (((!((_snapInterval == 0))) && (!((_snapInterval == 1))))){
_local6 = Math.pow(10, getPrecision(snapInterval));
_local7 = (_snapInterval * _local6);
_local8 = Math.round((_arg1 * _local6));
_local9 = (Math.round((_local8 / _local7)) * _local7);
_arg1 = (_local9 / _local6);
_value = Math.max(minimum, Math.min(maximum, _arg1));
} else {
_value = Math.max(minimum, Math.min(maximum, Math.round(_arg1)));
};
if (((!((_local5 == _value))) && (((((liveDragging) && (!((_arg3 == null))))) || ((_arg2 == InteractionInputType.KEYBOARD)))))){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, _arg3, _arg2, _arg4));
};
positionThumb();
}
protected function setStyles():void{
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 42
//SliderDirection (fl.controls.SliderDirection)
package fl.controls {
public class SliderDirection {
public static var HORIZONTAL:String = "horizontal";
public static var VERTICAL:String = "vertical";
}
}//package fl.controls
Section 43
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 44
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 45
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import fl.events.*;
import flash.text.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 46
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 47
//InteractionInputType (fl.events.InteractionInputType)
package fl.events {
public class InteractionInputType {
public static const MOUSE:String = "mouse";
public static const KEYBOARD:String = "keyboard";
}
}//package fl.events
Section 48
//SliderEvent (fl.events.SliderEvent)
package fl.events {
import flash.events.*;
public class SliderEvent extends Event {
protected var _triggerEvent:String;
protected var _keyCode:Number;
protected var _value:Number;
protected var _clickTarget:String;
public static const CHANGE:String = "change";
public static const THUMB_PRESS:String = "thumbPress";
public static const THUMB_DRAG:String = "thumbDrag";
public static const THUMB_RELEASE:String = "thumbRelease";
public function SliderEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:int=0){
_value = _arg2;
_keyCode = _arg5;
_triggerEvent = _arg4;
_clickTarget = _arg3;
super(_arg1);
}
public function get clickTarget():String{
return (_clickTarget);
}
override public function clone():Event{
return (new SliderEvent(type, _value, _clickTarget, _triggerEvent, _keyCode));
}
override public function toString():String{
return (formatToString("SliderEvent", "type", "value", "bubbles", "cancelable", "keyCode", "triggerEvent", "clickTarget"));
}
public function get triggerEvent():String{
return (_triggerEvent);
}
public function get value():Number{
return (_value);
}
public function get keyCode():Number{
return (_keyCode);
}
}
}//package fl.events
Section 49
//SliderEventClickTarget (fl.events.SliderEventClickTarget)
package fl.events {
public class SliderEventClickTarget {
public static const TRACK:String = "track";
public static const THUMB:String = "thumb";
}
}//package fl.events
Section 50
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 51
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 52
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 53
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 54
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 55
//BEXP (BEXP)
package {
import flash.display.*;
public dynamic class BEXP extends MovieClip {
}
}//package
Section 56
//BULLET (BULLET)
package {
import flash.display.*;
public dynamic class BULLET extends MovieClip {
}
}//package
Section 57
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 58
//GameMasker (GameMasker)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
public dynamic class GameMasker extends MovieClip {
public var GR:MovieClip;
public function GameMasker(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
if (y < -20){
GR.y = (GR.y + 180);
};
}
function frame11(){
stop();
visible = false;
}
}
}//package
Section 59
//LE_Block (LE_Block)
package {
import flash.display.*;
public dynamic class LE_Block extends MovieClip {
}
}//package
Section 60
//Particles_Bottle (Particles_Bottle)
package {
import flash.display.*;
public dynamic class Particles_Bottle extends MovieClip {
}
}//package
Section 61
//Particles_Target (Particles_Target)
package {
import flash.display.*;
public dynamic class Particles_Target extends MovieClip {
}
}//package
Section 62
//Particles_Target2 (Particles_Target2)
package {
import flash.display.*;
public dynamic class Particles_Target2 extends MovieClip {
}
}//package
Section 63
//Particles_Target3 (Particles_Target3)
package {
import flash.display.*;
public dynamic class Particles_Target3 extends MovieClip {
}
}//package
Section 64
//Particles_Vase (Particles_Vase)
package {
import flash.display.*;
public dynamic class Particles_Vase extends MovieClip {
}
}//package
Section 65
//SCOREMC (SCOREMC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class SCOREMC extends MovieClip {
public var am:TextField;
}
}//package
Section 66
//SliderThumb_disabledSkin (SliderThumb_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_disabledSkin extends MovieClip {
}
}//package
Section 67
//SliderThumb_downSkin (SliderThumb_downSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_downSkin extends MovieClip {
}
}//package
Section 68
//SliderThumb_overSkin (SliderThumb_overSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_overSkin extends MovieClip {
}
}//package
Section 69
//SliderThumb_upSkin (SliderThumb_upSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_upSkin extends MovieClip {
}
}//package
Section 70
//SliderTick_skin (SliderTick_skin)
package {
import flash.display.*;
public dynamic class SliderTick_skin extends MovieClip {
}
}//package
Section 71
//SliderTrack_disabledSkin (SliderTrack_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderTrack_disabledSkin extends MovieClip {
}
}//package
Section 72
//SliderTrack_skin (SliderTrack_skin)
package {
import flash.display.*;
public dynamic class SliderTrack_skin extends MovieClip {
}
}//package
Section 73
//Smoke (Smoke)
package {
import flash.display.*;
public dynamic class Smoke extends MovieClip {
}
}//package
Section 74
//SND_EXP (SND_EXP)
package {
import flash.media.*;
public dynamic class SND_EXP extends Sound {
}
}//package
Section 75
//SND_FAN (SND_FAN)
package {
import flash.media.*;
public dynamic class SND_FAN extends Sound {
}
}//package
Section 76
//SND_GAME (SND_GAME)
package {
import flash.media.*;
public dynamic class SND_GAME extends Sound {
}
}//package
Section 77
//SND_GUN (SND_GUN)
package {
import flash.media.*;
public dynamic class SND_GUN extends Sound {
}
}//package
Section 78
//SND_H0 (SND_H0)
package {
import flash.media.*;
public dynamic class SND_H0 extends Sound {
}
}//package
Section 79
//SND_H1 (SND_H1)
package {
import flash.media.*;
public dynamic class SND_H1 extends Sound {
}
}//package
Section 80
//SND_H2 (SND_H2)
package {
import flash.media.*;
public dynamic class SND_H2 extends Sound {
}
}//package
Section 81
//SND_MENU (SND_MENU)
package {
import flash.media.*;
public dynamic class SND_MENU extends Sound {
}
}//package
Section 82
//SND_RIC (SND_RIC)
package {
import flash.media.*;
public dynamic class SND_RIC extends Sound {
}
}//package
Section 83
//SND_SMASH (SND_SMASH)
package {
import flash.media.*;
public dynamic class SND_SMASH extends Sound {
}
}//package
Section 84
//SND_TARGL (SND_TARGL)
package {
import flash.media.*;
public dynamic class SND_TARGL extends Sound {
}
}//package
Section 85
//SND_TARGM (SND_TARGM)
package {
import flash.media.*;
public dynamic class SND_TARGM extends Sound {
}
}//package
Section 86
//SND_TARGS (SND_TARGS)
package {
import flash.media.*;
public dynamic class SND_TARGS extends Sound {
}
}//package
Section 87
//SND_TIME (SND_TIME)
package {
import flash.media.*;
public dynamic class SND_TIME extends Sound {
}
}//package
Section 88
//TargetCircle (TargetCircle)
package {
import flash.display.*;
public dynamic class TargetCircle extends MovieClip {
}
}//package