Section 1
//BitString (com.adobe.images.BitString)
package com.adobe.images {
public class BitString {
public var val:int;// = 0
public var len:int;// = 0
}
}//package com.adobe.images
Section 2
//JPGEncoder (com.adobe.images.JPGEncoder)
package com.adobe.images {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class JPGEncoder {
private var fdtbl_UV:Array;
private var std_ac_chrominance_values:Array;
private var std_dc_chrominance_values:Array;
private var ZigZag:Array;
private var YDC_HT:Array;
private var YAC_HT:Array;
private var bytenew:int;// = 0
private var fdtbl_Y:Array;
private var std_ac_chrominance_nrcodes:Array;
private var DU:Array;
private var std_ac_luminance_values:Array;
private var std_dc_chrominance_nrcodes:Array;
private var UVTable:Array;
private var YDU:Array;
private var UDU:Array;
private var byteout:ByteArray;
private var UVAC_HT:Array;
private var UVDC_HT:Array;
private var bytepos:int;// = 7
private var VDU:Array;
private var std_ac_luminance_nrcodes:Array;
private var std_dc_luminance_values:Array;
private var YTable:Array;
private var std_dc_luminance_nrcodes:Array;
private var bitcode:Array;
private var category:Array;
public function JPGEncoder(_arg1:Number=50){
ZigZag = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63];
YTable = new Array(64);
UVTable = new Array(64);
fdtbl_Y = new Array(64);
fdtbl_UV = new Array(64);
std_dc_luminance_nrcodes = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0];
std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
std_ac_luminance_nrcodes = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125];
std_ac_luminance_values = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250];
std_dc_chrominance_nrcodes = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0];
std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
std_ac_chrominance_nrcodes = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119];
std_ac_chrominance_values = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250];
bitcode = new Array(0xFFFF);
category = new Array(0xFFFF);
DU = new Array(64);
YDU = new Array(64);
UDU = new Array(64);
VDU = new Array(64);
super();
if (_arg1 <= 0){
_arg1 = 1;
};
if (_arg1 > 100){
_arg1 = 100;
};
var _local2:int;
if (_arg1 < 50){
_local2 = int((5000 / _arg1));
} else {
_local2 = int((200 - (_arg1 * 2)));
};
initHuffmanTbl();
initCategoryNumber();
initQuantTables(_local2);
}
private function initHuffmanTbl():void{
YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes, std_dc_luminance_values);
UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes, std_dc_chrominance_values);
YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes, std_ac_luminance_values);
UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes, std_ac_chrominance_values);
}
private function RGB2YUV(_arg1:BitmapData, _arg2:int, _arg3:int):void{
var _local6:int;
var _local7:uint;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local4:int;
var _local5:int;
while (_local5 < 8) {
_local6 = 0;
while (_local6 < 8) {
_local7 = _arg1.getPixel32((_arg2 + _local6), (_arg3 + _local5));
_local8 = Number(((_local7 >> 16) & 0xFF));
_local9 = Number(((_local7 >> 8) & 0xFF));
_local10 = Number((_local7 & 0xFF));
YDU[_local4] = ((((0.299 * _local8) + (0.587 * _local9)) + (0.114 * _local10)) - 128);
UDU[_local4] = (((-0.16874 * _local8) + (-0.33126 * _local9)) + (0.5 * _local10));
VDU[_local4] = (((0.5 * _local8) + (-0.41869 * _local9)) + (-0.08131 * _local10));
_local4++;
_local6++;
};
_local5++;
};
}
private function writeBits(_arg1:BitString):void{
var _local2:int = _arg1.val;
var _local3:int = (_arg1.len - 1);
while (_local3 >= 0) {
if ((_local2 & uint((1 << _local3)))){
bytenew = (bytenew | uint((1 << bytepos)));
};
_local3--;
bytepos--;
if (bytepos < 0){
if (bytenew == 0xFF){
writeByte(0xFF);
writeByte(0);
} else {
writeByte(bytenew);
};
bytepos = 7;
bytenew = 0;
};
};
}
private function writeWord(_arg1:int):void{
writeByte(((_arg1 >> 8) & 0xFF));
writeByte((_arg1 & 0xFF));
}
private function writeByte(_arg1:int):void{
byteout.writeByte(_arg1);
}
private function writeDHT():void{
var _local1:int;
writeWord(65476);
writeWord(418);
writeByte(0);
_local1 = 0;
while (_local1 < 16) {
writeByte(std_dc_luminance_nrcodes[(_local1 + 1)]);
_local1++;
};
_local1 = 0;
while (_local1 <= 11) {
writeByte(std_dc_luminance_values[_local1]);
_local1++;
};
writeByte(16);
_local1 = 0;
while (_local1 < 16) {
writeByte(std_ac_luminance_nrcodes[(_local1 + 1)]);
_local1++;
};
_local1 = 0;
while (_local1 <= 161) {
writeByte(std_ac_luminance_values[_local1]);
_local1++;
};
writeByte(1);
_local1 = 0;
while (_local1 < 16) {
writeByte(std_dc_chrominance_nrcodes[(_local1 + 1)]);
_local1++;
};
_local1 = 0;
while (_local1 <= 11) {
writeByte(std_dc_chrominance_values[_local1]);
_local1++;
};
writeByte(17);
_local1 = 0;
while (_local1 < 16) {
writeByte(std_ac_chrominance_nrcodes[(_local1 + 1)]);
_local1++;
};
_local1 = 0;
while (_local1 <= 161) {
writeByte(std_ac_chrominance_values[_local1]);
_local1++;
};
}
public function encode(_arg1:BitmapData):ByteArray{
var _local6:int;
var _local7:BitString;
byteout = new ByteArray();
bytenew = 0;
bytepos = 7;
writeWord(65496);
writeAPP0();
writeDQT();
writeSOF0(_arg1.width, _arg1.height);
writeDHT();
writeSOS();
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:Number = 0;
bytenew = 0;
bytepos = 7;
var _local5:int;
while (_local5 < _arg1.height) {
_local6 = 0;
while (_local6 < _arg1.width) {
RGB2YUV(_arg1, _local6, _local5);
_local2 = processDU(YDU, fdtbl_Y, _local2, YDC_HT, YAC_HT);
_local3 = processDU(UDU, fdtbl_UV, _local3, UVDC_HT, UVAC_HT);
_local4 = processDU(VDU, fdtbl_UV, _local4, UVDC_HT, UVAC_HT);
_local6 = (_local6 + 8);
};
_local5 = (_local5 + 8);
};
if (bytepos >= 0){
_local7 = new BitString();
_local7.len = (bytepos + 1);
_local7.val = ((1 << (bytepos + 1)) - 1);
writeBits(_local7);
};
writeWord(65497);
return (byteout);
}
private function initCategoryNumber():void{
var _local3:int;
var _local1 = 1;
var _local2 = 2;
var _local4 = 1;
while (_local4 <= 15) {
_local3 = _local1;
while (_local3 < _local2) {
category[(32767 + _local3)] = _local4;
bitcode[(32767 + _local3)] = new BitString();
bitcode[(32767 + _local3)].len = _local4;
bitcode[(32767 + _local3)].val = _local3;
_local3++;
};
_local3 = -((_local2 - 1));
while (_local3 <= -(_local1)) {
category[(32767 + _local3)] = _local4;
bitcode[(32767 + _local3)] = new BitString();
bitcode[(32767 + _local3)].len = _local4;
bitcode[(32767 + _local3)].val = ((_local2 - 1) + _local3);
_local3++;
};
_local1 = (_local1 << 1);
_local2 = (_local2 << 1);
_local4++;
};
}
private function writeDQT():void{
var _local1:int;
writeWord(65499);
writeWord(132);
writeByte(0);
_local1 = 0;
while (_local1 < 64) {
writeByte(YTable[_local1]);
_local1++;
};
writeByte(1);
_local1 = 0;
while (_local1 < 64) {
writeByte(UVTable[_local1]);
_local1++;
};
}
private function writeAPP0():void{
writeWord(65504);
writeWord(16);
writeByte(74);
writeByte(70);
writeByte(73);
writeByte(70);
writeByte(0);
writeByte(1);
writeByte(1);
writeByte(0);
writeWord(1);
writeWord(1);
writeByte(0);
writeByte(0);
}
private function writeSOS():void{
writeWord(65498);
writeWord(12);
writeByte(3);
writeByte(1);
writeByte(0);
writeByte(2);
writeByte(17);
writeByte(3);
writeByte(17);
writeByte(0);
writeByte(63);
writeByte(0);
}
private function processDU(_arg1:Array, _arg2:Array, _arg3:Number, _arg4:Array, _arg5:Array):Number{
var _local8:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local6:BitString = _arg5[0];
var _local7:BitString = _arg5[240];
var _local9:Array = fDCTQuant(_arg1, _arg2);
_local8 = 0;
while (_local8 < 64) {
DU[ZigZag[_local8]] = _local9[_local8];
_local8++;
};
var _local10:int = (DU[0] - _arg3);
_arg3 = DU[0];
if (_local10 == 0){
writeBits(_arg4[0]);
} else {
writeBits(_arg4[category[(32767 + _local10)]]);
writeBits(bitcode[(32767 + _local10)]);
};
var _local11 = 63;
while ((((_local11 > 0)) && ((DU[_local11] == 0)))) {
_local11--;
};
if (_local11 == 0){
writeBits(_local6);
return (_arg3);
};
_local8 = 1;
while (_local8 <= _local11) {
_local12 = _local8;
while ((((DU[_local8] == 0)) && ((_local8 <= _local11)))) {
_local8++;
};
_local13 = (_local8 - _local12);
if (_local13 >= 16){
_local14 = 1;
while (_local14 <= (_local13 / 16)) {
writeBits(_local7);
_local14++;
};
_local13 = int((_local13 & 15));
};
writeBits(_arg5[((_local13 * 16) + category[(32767 + DU[_local8])])]);
writeBits(bitcode[(32767 + DU[_local8])]);
_local8++;
};
if (_local11 != 63){
writeBits(_local6);
};
return (_arg3);
}
private function initQuantTables(_arg1:int):void{
var _local2:int;
var _local3:Number;
var _local8:int;
var _local4:Array = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99];
_local2 = 0;
while (_local2 < 64) {
_local3 = Math.floor((((_local4[_local2] * _arg1) + 50) / 100));
if (_local3 < 1){
_local3 = 1;
} else {
if (_local3 > 0xFF){
_local3 = 0xFF;
};
};
YTable[ZigZag[_local2]] = _local3;
_local2++;
};
var _local5:Array = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99];
_local2 = 0;
while (_local2 < 64) {
_local3 = Math.floor((((_local5[_local2] * _arg1) + 50) / 100));
if (_local3 < 1){
_local3 = 1;
} else {
if (_local3 > 0xFF){
_local3 = 0xFF;
};
};
UVTable[ZigZag[_local2]] = _local3;
_local2++;
};
var _local6:Array = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379];
_local2 = 0;
var _local7:int;
while (_local7 < 8) {
_local8 = 0;
while (_local8 < 8) {
fdtbl_Y[_local2] = (1 / (((YTable[ZigZag[_local2]] * _local6[_local7]) * _local6[_local8]) * 8));
fdtbl_UV[_local2] = (1 / (((UVTable[ZigZag[_local2]] * _local6[_local7]) * _local6[_local8]) * 8));
_local2++;
_local8++;
};
_local7++;
};
}
private function writeSOF0(_arg1:int, _arg2:int):void{
writeWord(65472);
writeWord(17);
writeByte(8);
writeWord(_arg2);
writeWord(_arg1);
writeByte(3);
writeByte(1);
writeByte(17);
writeByte(0);
writeByte(2);
writeByte(17);
writeByte(1);
writeByte(3);
writeByte(17);
writeByte(1);
}
private function computeHuffmanTbl(_arg1:Array, _arg2:Array):Array{
var _local7:int;
var _local3:int;
var _local4:int;
var _local5:Array = new Array();
var _local6 = 1;
while (_local6 <= 16) {
_local7 = 1;
while (_local7 <= _arg1[_local6]) {
_local5[_arg2[_local4]] = new BitString();
_local5[_arg2[_local4]].val = _local3;
_local5[_arg2[_local4]].len = _local6;
_local4++;
_local3++;
_local7++;
};
_local3 = (_local3 * 2);
_local6++;
};
return (_local5);
}
private function fDCTQuant(_arg1:Array, _arg2:Array):Array{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:int;
var _local23:int;
_local22 = 0;
while (_local22 < 8) {
_local3 = (_arg1[(_local23 + 0)] + _arg1[(_local23 + 7)]);
_local10 = (_arg1[(_local23 + 0)] - _arg1[(_local23 + 7)]);
_local4 = (_arg1[(_local23 + 1)] + _arg1[(_local23 + 6)]);
_local9 = (_arg1[(_local23 + 1)] - _arg1[(_local23 + 6)]);
_local5 = (_arg1[(_local23 + 2)] + _arg1[(_local23 + 5)]);
_local8 = (_arg1[(_local23 + 2)] - _arg1[(_local23 + 5)]);
_local6 = (_arg1[(_local23 + 3)] + _arg1[(_local23 + 4)]);
_local7 = (_arg1[(_local23 + 3)] - _arg1[(_local23 + 4)]);
_local11 = (_local3 + _local6);
_local14 = (_local3 - _local6);
_local12 = (_local4 + _local5);
_local13 = (_local4 - _local5);
_arg1[(_local23 + 0)] = (_local11 + _local12);
_arg1[(_local23 + 4)] = (_local11 - _local12);
_local15 = ((_local13 + _local14) * 0.707106781);
_arg1[(_local23 + 2)] = (_local14 + _local15);
_arg1[(_local23 + 6)] = (_local14 - _local15);
_local11 = (_local7 + _local8);
_local12 = (_local8 + _local9);
_local13 = (_local9 + _local10);
_local19 = ((_local11 - _local13) * 0.382683433);
_local16 = ((0.5411961 * _local11) + _local19);
_local18 = ((1.306562965 * _local13) + _local19);
_local17 = (_local12 * 0.707106781);
_local20 = (_local10 + _local17);
_local21 = (_local10 - _local17);
_arg1[(_local23 + 5)] = (_local21 + _local16);
_arg1[(_local23 + 3)] = (_local21 - _local16);
_arg1[(_local23 + 1)] = (_local20 + _local18);
_arg1[(_local23 + 7)] = (_local20 - _local18);
_local23 = (_local23 + 8);
_local22++;
};
_local23 = 0;
_local22 = 0;
while (_local22 < 8) {
_local3 = (_arg1[(_local23 + 0)] + _arg1[(_local23 + 56)]);
_local10 = (_arg1[(_local23 + 0)] - _arg1[(_local23 + 56)]);
_local4 = (_arg1[(_local23 + 8)] + _arg1[(_local23 + 48)]);
_local9 = (_arg1[(_local23 + 8)] - _arg1[(_local23 + 48)]);
_local5 = (_arg1[(_local23 + 16)] + _arg1[(_local23 + 40)]);
_local8 = (_arg1[(_local23 + 16)] - _arg1[(_local23 + 40)]);
_local6 = (_arg1[(_local23 + 24)] + _arg1[(_local23 + 32)]);
_local7 = (_arg1[(_local23 + 24)] - _arg1[(_local23 + 32)]);
_local11 = (_local3 + _local6);
_local14 = (_local3 - _local6);
_local12 = (_local4 + _local5);
_local13 = (_local4 - _local5);
_arg1[(_local23 + 0)] = (_local11 + _local12);
_arg1[(_local23 + 32)] = (_local11 - _local12);
_local15 = ((_local13 + _local14) * 0.707106781);
_arg1[(_local23 + 16)] = (_local14 + _local15);
_arg1[(_local23 + 48)] = (_local14 - _local15);
_local11 = (_local7 + _local8);
_local12 = (_local8 + _local9);
_local13 = (_local9 + _local10);
_local19 = ((_local11 - _local13) * 0.382683433);
_local16 = ((0.5411961 * _local11) + _local19);
_local18 = ((1.306562965 * _local13) + _local19);
_local17 = (_local12 * 0.707106781);
_local20 = (_local10 + _local17);
_local21 = (_local10 - _local17);
_arg1[(_local23 + 40)] = (_local21 + _local16);
_arg1[(_local23 + 24)] = (_local21 - _local16);
_arg1[(_local23 + 8)] = (_local20 + _local18);
_arg1[(_local23 + 56)] = (_local20 - _local18);
_local23++;
_local22++;
};
_local22 = 0;
while (_local22 < 64) {
_arg1[_local22] = Math.round((_arg1[_local22] * _arg2[_local22]));
_local22++;
};
return (_arg1);
}
}
}//package com.adobe.images
Section 3
//GameParamsEvent (com.gamezhero.api.as3.events.GameParamsEvent)
package com.gamezhero.api.as3.events {
import flash.events.*;
public class GameParamsEvent extends Event {
private var value_;
public static const GAME_PARAMS_RECEIVED:String = "game_params_received";
public function GameParamsEvent(_arg1:String){
super(_arg1);
}
public function get value(){
return (value_);
}
public function set value(_arg1):void{
value_ = _arg1;
}
override public function toString():String{
return (formatToString("GameParamsEvent"));
}
}
}//package com.gamezhero.api.as3.events
Section 4
//Background (com.gamezhero.api.as3.gui.Background)
package com.gamezhero.api.as3.gui {
import flash.display.*;
public class Background extends MovieClip {
private var _goal:MovieClip;
private var _bg:MovieClip;
public function Background(_arg1:MovieClip){
_goal = _arg1;
_goal.addChild(this);
ini();
iniEvents();
}
public function remove():void{
clearEvents();
_goal.removeChild(this);
}
private function clearEvents():void{
}
public function update(_arg1:Number, _arg2:Number):void{
this.x = 0;
this.y = 0;
this.width = (_arg1 + 100);
this.height = (_arg2 + 100);
}
private function getBg():MovieClip{
var _local1:MovieClip = new MovieClip();
_local1.graphics.beginFill(0, 1);
_local1.graphics.lineStyle(0, 0, 0);
_local1.graphics.moveTo(0, 0);
_local1.graphics.lineTo(1000, 0);
_local1.graphics.lineTo(1000, 1000);
_local1.graphics.lineTo(0, 1000);
_local1.graphics.lineTo(0, 0);
_local1.graphics.endFill();
return (_local1);
}
private function ini():void{
_bg = getBg();
this.addChild(_bg);
}
private function iniEvents():void{
}
}
}//package com.gamezhero.api.as3.gui
Section 5
//Indicator (com.gamezhero.api.as3.gui.Indicator)
package com.gamezhero.api.as3.gui {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.utils.*;
public class Indicator extends MovieClip {
private var _timer:Timer;
private var _goal:MovieClip;
private var _indicator:MovieClip;
private var _dalpha:Number;
private var _info_text:TextField;
private var _arr:Array;
private var _n:uint;// = 10
private var _timer_2:Timer;
private var _current:Number;// = 0
public function Indicator(_arg1:MovieClip){
_dalpha = (360 / _n);
_arr = new Array();
super();
_goal = _arg1;
_goal.addChild(this);
ini();
iniEvents();
}
public function setSize(_arg1:Number, _arg2:Number):void{
this.visible = true;
this.width = _arg1;
this.height = _arg2;
}
public function remove():void{
clearEvents();
_goal.removeChild(this);
}
private function getItem():MovieClip{
var _local1:MovieClip = new MovieClip();
_local1.graphics.beginFill(0xFFFFFF, 1);
_local1.graphics.lineStyle(0, 0, 0);
_local1.graphics.moveTo(32.3, -5.7);
_local1.graphics.curveTo(30, -3.3, 30, 0);
_local1.graphics.curveTo(30, 3.3, 32.3, 5.6);
_local1.graphics.curveTo(34.7, 8, 38.05, 8);
_local1.graphics.lineTo(57, 8);
_local1.graphics.curveTo(60.3, 8, 62.6, 5.6);
_local1.graphics.curveTo(65, 3.3, 65, 0);
_local1.graphics.curveTo(65, -3.3, 62.6, -5.7);
_local1.graphics.curveTo(60.3, -8, 57, -8);
_local1.graphics.lineTo(38.05, -8);
_local1.graphics.curveTo(34.7, -8, 32.3, -5.7);
_local1.graphics.endFill();
_indicator.addChild(_local1);
return (_local1);
}
private function clearEvents():void{
_timer.removeEventListener(TimerEvent.TIMER, updateIndicator);
_timer_2.removeEventListener(TimerEvent.TIMER, updateCurrent);
}
public function setPos(_arg1:Number, _arg2:Number):void{
this.visible = true;
this.x = _arg1;
this.y = _arg2;
}
private function updateIndicator(_arg1:TimerEvent=null):void{
var _local2:uint;
while (_local2 < _n) {
_arr[_local2].alpha = (_arr[_local2].alpha - 0.07);
if (_arr[_local2].alpha <= 0){
_arr[_local2].alpha = 0;
};
_local2++;
};
_arg1.updateAfterEvent();
}
public function createInfoText():void{
_info_text = new TextField();
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.size = 11;
_local1.font = "Arial";
_info_text.defaultTextFormat = _local1;
_info_text.autoSize = TextFieldAutoSize.CENTER;
_indicator.addChild(_info_text);
var _local2:Number = 100;
var _local3:Number = 20;
_local2 = _info_text.width;
_local3 = _info_text.height;
_info_text.x = (-(_local2) / 2);
_info_text.y = -10;
}
public function update(_arg1:Number, _arg2:Number):void{
this.visible = true;
this.x = (_arg1 / 2);
this.y = (_arg2 / 2);
}
private function iniEvents():void{
_timer.addEventListener(TimerEvent.TIMER, updateIndicator);
_timer.start();
_timer_2.addEventListener(TimerEvent.TIMER, updateCurrent);
_timer_2.start();
}
public function setVal(_arg1:String):void{
_info_text.text = _arg1;
}
private function getBorder():MovieClip{
var _local1:Number = 10;
var _local2:Number = 150;
var _local3:Number = 150;
var _local4:MovieClip = new MovieClip();
_local4.graphics.beginFill(0x333333, 1);
_local4.graphics.moveTo(_local1, 0);
_local4.graphics.lineTo((_local2 - _local1), 0);
_local4.graphics.curveTo(_local2, 0, _local2, _local1);
_local4.graphics.lineTo(_local2, _local1);
_local4.graphics.lineTo(_local2, (_local3 - _local1));
_local4.graphics.curveTo(_local2, _local3, (_local2 - _local1), _local3);
_local4.graphics.lineTo((_local2 - _local1), _local3);
_local4.graphics.lineTo(_local1, _local3);
_local4.graphics.curveTo(0, _local3, 0, (_local3 - _local1));
_local4.graphics.lineTo(0, (_local3 - _local1));
_local4.graphics.lineTo(0, _local1);
_local4.graphics.curveTo(0, 0, _local1, 0);
_local4.graphics.lineTo(_local1, 0);
_local4.graphics.endFill();
_indicator.addChild(_local4);
_local4.x = (-(_local4.width) / 2);
_local4.y = (-(_local4.height) / 2);
return (_local4);
}
private function ini():void{
var _local2:MovieClip;
this.visible = false;
_timer = new Timer((1000 / 40), 0);
_timer_2 = new Timer((1000 / 20), 0);
_indicator = new MovieClip();
this.addChild(_indicator);
getBorder();
var _local1:uint;
while (_local1 < _n) {
_local2 = getItem();
_local2.rotation = (_dalpha * _local1);
_local2.alpha = 0.2;
_arr.push(_local2);
_local1++;
};
createInfoText();
}
private function updateCurrent(_arg1:TimerEvent=null):void{
_current++;
if (_current >= _arr.length){
_current = 0;
};
_arr[_current].alpha = 1;
_arg1.updateAfterEvent();
}
}
}//package com.gamezhero.api.as3.gui
Section 6
//Watermark (com.gamezhero.api.as3.gui.Watermark)
package com.gamezhero.api.as3.gui {
import flash.display.*;
public class Watermark extends Sprite {
private var dat:Array;
public function Watermark(){
dat = [{fill:[0xFFFFFF], origin:[146.4, 27.9], records:[[144.25, 27.9, 142.5, 26.85], [140.8, 25.8, 139.7, 23.8], [138.65, 21.85, 138.65, 19.1], [138.65, 16.5, 139.6, 14.45], [140.5, 12.35, 142.35, 11.2], [144.1, 10.05, 146.65, 10], [149, 10.05, 150.75, 11.15], [150.8, 11.15], [152.5, 12.25, 153.45, 14.25], [154.4, 16.1, 154.4, 18.7], [154.4, 21.35, 153.5, 23.35], [152.55, 25.5, 150.75, 26.7], [148.95, 27.85, 146.4, 27.9]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:"donut", origin:[146.65, 24.9], records:[[148.1, 24.85, 149.15, 24.2], [150.1, 23.45, 150.65, 22.2], [151.25, 20.9, 151.25, 19.1], [151.25, 16.05, 150.05, 14.5], [148.85, 13, 146.4, 13], [144.3, 13, 143.1, 14.4], [141.85, 15.8, 141.85, 18.7], [141.85, 21.7, 143.05, 23.3], [144.25, 24.85, 146.65, 24.9]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:[0xFFFFFF], origin:[119.8, 24.65], records:[[120.5, 24.5, 121.1, 24.35], [121.25, 24.25, 121.4, 24.35], [121.55, 24.35, 121.65, 24.5], [121.75, 24.65, 121.75, 24.8], [121.75, 25.45], [121.75, 26.15, 121.5, 26.65], [121.25, 27.2, 120.4, 27.55], [120.35, 27.55], [119.6, 27.75, 118.2, 27.75], [116.2, 27.75], [112.9, 27.75, 111.35, 25.9], [111.3, 25.9], [109.75, 23.95, 109.75, 20.4], [109.75, 17.45], [109.75, 16.75, 109.85, 15.95], [109.9, 15.1, 110.05, 14.35], [110.15, 13.55, 110.35, 12.95], [110.65, 11.6, 111.25, 11], [111.8, 10.25, 112.85, 10.25], [121.4, 10.25], [121.6, 10.25, 121.75, 10.4], [121.9, 10.55, 121.9, 10.75], [121.9, 11.65], [121.9, 12.3, 121.4, 12.75], [121.4, 12.8], [120.95, 13.25, 119.8, 13.25], [113.45, 13.25], [113.25, 14.1, 113.15, 15.15], [113.15, 15.2], [113, 16.25, 112.95, 17.25], [119.55, 17.25], [119.75, 17.25, 119.9, 17.4], [120.05, 17.55, 120.05, 17.75], [120.05, 18.45], [120.05, 19.15, 119.55, 19.65], [119.55, 19.7], [119.1, 20.1, 118.1, 20.1], [112.95, 20.1], [112.95, 20.8], [112.95, 22.3, 113.35, 23.25], [113.7, 24.05, 114.55, 24.4], [114.6, 24.4], [115.45, 24.8, 116.95, 24.75], [118.15, 24.75], [119.05, 24.75, 119.85, 24.65], [119.8, 24.65]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:[0xFFFFFF], origin:[136.4, 27.65], records:[[136.2, 27.65, 136, 27.7], [135.95, 27.7, 135.9, 27.7], [135.6, 27.7, 135.45, 27.7], [134.6, 27.7, 134.1, 27.35], [133.5, 26.95, 133.2, 26.2], [131.95, 23.2], [131.45, 22.1, 131.1, 21.55], [130.75, 21.05, 130.4, 20.9], [130.1, 20.75, 129.7, 20.75], [128.85, 20.7, 128.05, 20.6], [127.7, 20.55, 127.45, 20.5], [127.45, 27.15], [127.45, 27.35, 127.3, 27.5], [127.15, 27.65, 126.95, 27.65], [126.1, 27.65], [125.15, 27.65, 124.7, 27.15], [124.2, 26.7, 124.2, 25.75], [124.2, 11.35], [124.2, 11.2, 124.3, 11.05], [124.4, 10.9, 124.55, 10.9], [125.05, 10.75, 125.85, 10.55], [125.85, 10.5], [126.55, 10.35, 127.35, 10.25], [128.2, 10.15, 128.85, 10.15], [130.3, 10.15], [133, 10.15, 134.55, 11.45], [136.1, 12.75, 136.15, 15.1], [136.15, 15.15], [136.1, 16.55, 135.55, 17.55], [134.95, 18.55, 134, 19.15], [133.65, 19.35, 133.25, 19.5], [133.35, 19.6, 133.5, 19.75], [134.05, 20.25, 134.35, 20.9], [134.35, 20.85], [134.65, 21.45, 134.85, 21.95], [136.3, 25.5], [136.45, 25.75, 136.65, 26.15], [136.65, 26.2], [136.85, 26.45, 136.95, 26.6], [137.1, 26.75, 137.1, 26.95], [137.1, 27.1], [137.1, 27.25, 137, 27.4], [136.9, 27.55, 136.75, 27.6], [136.55, 27.65], [136.45, 27.65, 136.4, 27.65]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:"donut", origin:[132.95, 15.5], records:[[132.9, 14.5, 132.6, 13.95], [132.25, 13.45, 131.65, 13.3], [130.95, 13.05, 130.15, 13.05], [128.9, 13.05], [128.55, 13.05, 128.1, 13.15], [128.05, 13.15], [127.75, 13.2, 127.45, 13.25], [127.45, 17.65], [127.95, 17.7, 128.5, 17.75], [129.2, 17.8, 129.9, 17.8], [130.65, 17.8, 131.4, 17.6], [132.1, 17.35, 132.5, 16.8], [132.55, 16.8], [132.9, 16.3, 132.95, 15.5]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:[0xFFFFFF], origin:[95.75, 27.65], records:[[94.9, 27.65], [94.25, 27.65, 93.7, 27.15], [93.05, 26.7, 93, 25.6], [93, 10.75], [93, 10.55, 93.15, 10.4], [93.3, 10.25, 93.5, 10.25], [94.7, 10.25], [95.3, 10.25, 95.75, 10.7], [96.2, 11.05, 96.25, 11.8], [96.25, 17.05], [103.45, 17.05], [103.45, 10.75], [103.45, 10.55, 103.6, 10.4], [103.75, 10.25, 103.95, 10.25], [105, 10.25], [105.65, 10.25, 106.15, 10.7], [106.65, 11.1, 106.65, 11.85], [106.65, 27.15], [106.65, 27.35, 106.5, 27.5], [106.35, 27.65, 106.15, 27.65], [105.4, 27.65], [104.65, 27.65, 104.15, 27.15], [104.1, 27.1], [103.5, 26.6, 103.45, 25.6], [103.45, 20.1], [96.25, 20.1], [96.25, 27.15], [96.25, 27.35, 96.1, 27.5], [95.95, 27.65, 95.75, 27.65]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:[0xFF9900], origin:[78.2, 27.15], records:[[77.7, 26.65, 77.7, 25.95], [77.7, 25.3, 78, 24.6], [78, 24.65], [78.25, 23.95, 78.85, 23.05], [79.4, 22.2, 80.35, 21], [85, 15.1], [85.6, 14.35, 86, 13.65], [86.1, 13.45, 86.2, 13.25], [78.05, 13.25], [77.85, 13.25, 77.7, 13.1], [77.55, 12.95, 77.55, 12.75], [77.55, 12.3], [77.55, 11.3, 78.1, 10.8], [78.6, 10.25, 79.95, 10.25], [88.4, 10.25], [88.95, 10.25, 89.45, 10.75], [89.9, 11.15, 89.95, 11.9], [89.95, 11.95], [89.95, 12.8, 89.4, 13.95], [88.85, 14.95, 87.8, 16.3], [83.2, 22.2], [83.2, 22.25], [82.5, 23.05, 82, 23.9], [81.95, 23.9], [81.65, 24.3, 81.45, 24.65], [89.65, 24.65], [89.85, 24.65, 90, 24.8], [90.15, 24.95, 90.15, 25.15], [90.15, 26], [90.15, 26.75, 89.6, 27.2], [89.55, 27.2], [89.05, 27.65, 88.25, 27.65], [79.6, 27.65], [78.75, 27.65, 78.25, 27.2], [78.2, 27.15]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:[0xFFFFFF], origin:[73.85, 24.65], records:[[73.8, 24.65], [74.5, 24.5, 75.05, 24.35], [75.2, 24.25, 75.35, 24.35], [75.5, 24.35, 75.6, 24.5], [75.7, 24.65, 75.7, 24.8], [75.7, 25.45], [75.7, 26.1, 75.5, 26.6], [75.3, 27.15, 74.4, 27.55], [74.35, 27.55], [73.6, 27.75, 72.2, 27.75], [70.2, 27.75], [66.9, 27.75, 65.35, 25.9], [65.3, 25.9], [63.75, 23.95, 63.75, 20.4], [63.75, 17.45], [63.75, 16.75, 63.85, 15.95], [63.9, 15.1, 64.05, 14.35], [64.15, 13.55, 64.35, 12.95], [64.65, 11.6, 65.25, 11], [65.8, 10.25, 66.85, 10.25], [75.35, 10.25], [75.55, 10.25, 75.7, 10.4], [75.85, 10.55, 75.85, 10.75], [75.85, 11.65], [75.85, 12.3, 75.4, 12.75], [75, 13.25, 73.8, 13.25], [67.45, 13.25], [67.25, 14.1, 67.15, 15.15], [67.15, 15.2], [67, 16.25, 66.95, 17.25], [73.55, 17.25], [73.75, 17.25, 73.9, 17.4], [74.05, 17.55, 74.05, 17.75], [74.05, 18.45], [74.05, 19.15, 73.55, 19.65], [73.55, 19.7], [73.1, 20.1, 72.1, 20.1], [66.95, 20.1], [66.95, 20.8], [66.95, 22.3, 67.35, 23.25], [67.7, 24.05, 68.55, 24.4], [68.6, 24.4], [69.45, 24.8, 70.95, 24.75], [72.15, 24.75], [73.05, 24.75, 73.85, 24.65]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:[0xFFFFFF], origin:[45.65, 15.05], records:[[45.5, 15.95, 45.4, 16.95], [45.25, 18.8, 45.1, 20.65], [44.95, 22.5, 44.9, 24.15], [44.85, 25.85, 44.8, 27.2], [44.8, 27.35, 44.65, 27.5], [44.5, 27.65, 44.3, 27.65], [43.65, 27.65], [42.85, 27.65, 42.25, 27.05], [41.7, 26.5, 41.65, 25.45], [41.65, 25.4], [41.65, 23.65, 41.8, 21.65], [41.95, 19.6, 42.2, 17.6], [42.4, 15.6, 42.65, 13.8], [42.95, 12.05, 43.15, 10.7], [43.2, 10.5, 43.35, 10.4], [43.45, 10.25, 43.65, 10.25], [44.5, 10.25], [45.75, 10.25, 46.55, 10.9], [47.35, 11.5, 47.8, 12.5], [47.8, 12.45], [48.25, 13.3, 48.6, 14.25], [50.75, 20.65], [51, 21.45, 51.25, 22.3], [51.55, 21.4, 51.85, 20.6], [53.95, 14.75], [54.3, 13.8, 54.7, 12.95], [55.1, 12.05, 55.5, 11.45], [55.9, 10.8, 56.1, 10.5], [56.15, 10.35, 56.3, 10.3], [56.4, 10.25, 56.5, 10.25], [57.1, 10.25], [58.4, 10.25, 59.1, 11.3], [59.75, 12.15, 59.9, 13.8], [60.1, 15.9, 60.3, 18.2], [60.5, 20.55, 60.6, 22.9], [60.75, 25.2, 60.75, 27.15], [60.75, 27.35, 60.6, 27.5], [60.45, 27.65, 60.25, 27.65], [59.45, 27.65], [58.5, 27.65, 58, 27.1], [57.5, 26.6, 57.5, 25.4], [57.5, 24.6, 57.5, 23.45], [57.45, 22.2, 57.35, 20.9], [57.3, 19.5, 57.15, 18.1], [57.05, 16.7, 56.9, 15.5], [56.9, 15.3, 56.9, 15.15], [56.55, 15.95, 56.2, 17.1], [53.65, 24.45], [53.65, 24.4], [53.35, 25.25, 53, 26.05], [53.05, 26.05], [52.7, 26.8, 52.4, 27.4], [52.35, 27.5, 52.2, 27.6], [52.1, 27.65, 51.95, 27.65], [51.45, 27.65], [51.05, 27.65, 50.5, 27.35], [50.45, 27.3], [50, 26.95, 49.45, 25.9], [48.95, 24.9, 48.35, 22.95], [46.3, 16.75], [46.3, 16.8], [46, 15.95, 45.65, 15.1], [45.65, 15.05]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:[0xFFFFFF], origin:[36, 23.3], records:[[29.1, 23.3], [28.95, 23.75, 28.85, 24.3], [28.85, 24.25], [28.7, 25.05, 28.55, 25.8], [28.55, 25.85], [28.35, 26.55, 28.25, 27.25], [28.2, 27.4, 28.1, 27.55], [27.95, 27.65, 27.75, 27.65], [26.9, 27.65], [26.15, 27.65, 25.8, 27.25], [25.4, 26.9, 25.4, 26.1], [25.4, 25.35, 25.8, 23.8], [26.1, 22.3, 26.75, 20.4], [27.3, 18.55, 28.1, 16.65], [28.85, 14.7, 29.65, 13.1], [30.45, 11.45, 31.25, 10.45], [31.3, 10.35, 31.45, 10.3], [31.55, 10.25, 31.65, 10.25], [32.4, 10.25], [33.25, 10.25, 33.9, 10.85], [34.5, 11.3, 35.05, 12.4], [35.05, 12.35], [35.6, 13.3, 36.3, 15], [37, 16.6, 37.75, 18.65], [38.45, 20.65, 39.05, 22.85], [39.6, 25.05, 39.9, 27.1], [39.9, 27.2, 39.85, 27.35], [39.8, 27.5, 39.7, 27.6], [39.55, 27.65, 39.4, 27.65], [38.65, 27.65], [37.75, 27.65, 37.25, 27.25], [36.75, 26.85, 36.6, 26.1], [36.45, 25.25, 36.25, 24.35], [36.3, 24.4], [36.1, 23.8, 36, 23.3]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}, {fill:"donut", origin:[29.9, 20.5], records:[[35.15, 20.5], [34.55, 18.6, 33.9, 16.9], [33.25, 15.3, 32.5, 13.8], [31.65, 15.35, 31.1, 16.95], [30.45, 18.6, 29.9, 20.5]], strokes:[null, "-", "-", "-", "-"]}, {fill:[0xFFFFFF], origin:[20.9, 20.55], records:[[20.9, 20.15, 20.85, 19.75], [20.85, 19.6, 20.9, 19.5], [20.95, 19.35, 21.1, 19.3], [21.2, 19.2, 21.35, 19.2], [22.35, 19.2], [23.1, 19.25, 23.5, 19.7], [23.55, 19.75], [23.95, 20.2, 23.95, 20.85], [23.95, 23.65], [24, 25.7, 22.6, 26.8], [22.55, 26.8], [21.25, 27.9, 18.4, 27.9], [16.1, 27.9, 14.2, 26.8], [12.35, 25.65, 11.2, 23.65], [10, 21.65, 10, 19], [10, 16.4, 11, 14.45], [12.05, 12.4, 14.05, 11.25], [16.05, 10.05, 18.95, 10], [20.4, 10, 21.45, 10.5], [21.5, 10.5], [22.6, 10.95, 23.2, 11.75], [23.8, 12.55, 23.8, 13.45], [23.8, 14.25], [23.8, 14.45, 23.65, 14.6], [23.5, 14.75, 23.3, 14.75], [23.2, 14.75], [23.1, 14.75, 23, 14.7], [22.85, 14.65, 22.8, 14.55], [22.35, 13.95, 21.35, 13.5], [20.3, 13.05, 18.65, 13], [17.2, 13, 16, 13.65], [14.75, 14.25, 14, 15.5], [13.2, 16.8, 13.2, 18.75], [13.2, 20.9, 14, 22.25], [14.7, 23.55, 16, 24.25], [17.25, 24.9, 18.8, 24.9], [19.7, 24.9, 20.2, 24.7], [20.25, 24.7], [20.6, 24.55, 20.8, 24.3], [20.95, 23.8, 20.95, 23.1], [20.95, 21.55], [20.95, 21.1, 20.9, 20.6], [20.9, 20.55]], strokes:[null, "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"]}];
super();
ini();
}
private function ini():void{
var _local4:Object;
var _local5:Array;
var _local6:Array;
var _local7:String;
var _local8:Number;
var _local9:Array;
var _local1:String;
var _local2:Graphics = this.graphics;
var _local3:Number = 0;
while (_local3 < dat.length) {
_local4 = dat[_local3];
_local2.moveTo(_local4.origin[0], _local4.origin[1]);
if ((((_local4.fill == -1)) || ((_local4.fill == "stroke")))){
if (_local1 != "stroke"){
_local2.endFill();
_local1 = _local4.fill;
};
} else {
if (_local4.fill != "donut"){
if (_local4.fill.length != 5){
_local2.beginFill.apply(_local2, _local4.fill);
} else {
_local2.beginGradientFill.apply(_local2, _local4.fill);
};
_local1 = _local4.fill;
};
};
_local5 = _local4.records;
_local6 = _local4.strokes;
_local7 = "-1";
if (_local6[0] == null){
_local2.lineStyle();
} else {
_local2.lineStyle.apply(_local2, _local6[0]);
};
_local8 = 0;
while (_local8 < _local5.length) {
_local7 = _local6[_local8];
if (_local7 != "-"){
if (_local7 == null){
_local2.lineStyle();
} else {
_local2.lineStyle(_local7[0], _local7[1]);
};
};
_local9 = _local5[_local8];
if (_local9.length == 4){
_local2.curveTo(_local9[0], _local9[1], _local9[2], _local9[3]);
} else {
_local2.lineTo(_local9[0], _local9[1]);
};
_local8++;
};
_local3++;
};
_local2.endFill();
}
}
}//package com.gamezhero.api.as3.gui
Section 7
//URL (com.gamezhero.api.as3.utils.URL)
package com.gamezhero.api.as3.utils {
public class URL {
private var _scheme:String;
private var _host:String;
private var _query:String;
private var _path:String;
private var _userinfo:String;
private var _port:String;
private var _url:String;
private var _fragment:String;
private static const PATTERN:RegExp = /^([A-Za-z0-9_+.]{1,8}:\/\/)?([!-~]+@)?([^\/?#:]*)(:[0-9]*)?(\/[^?#]*)?(\?[^#]*)?(\#.*)?/i;
public function URL(_arg1:String):void{
var _local2:Array = _arg1.match(URL.PATTERN);
_url = _local2[0];
_scheme = _local2[1];
_userinfo = _local2[2];
_host = _local2[3];
_port = _local2[4];
_path = _local2[5];
_query = _local2[6];
_fragment = _local2[7];
}
public function get port():int{
return (((_port.length <= 0)) ? undefined : int(_port.substring(1, _port.length)));
}
public function get fragment():String{
return (((_fragment.length <= 0)) ? undefined : _fragment);
}
public function get query():Object{
var _local2:String;
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local1:Object = {raw:undefined, parsed:undefined};
if (((_query) && ((_query.length > 0)))){
_local1.raw = _query;
_local2 = _query.substring(1, _query.length);
_local3 = _local2.split("&");
_local1.parsed = ((_local3.length > 0)) ? {} : undefined;
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4].split("=");
_local1.parsed[_local5[0]] = _local5[1];
_local4++;
};
};
return (_local1);
}
public function get scheme():String{
return (((_scheme.length <= 0)) ? undefined : _scheme.substring(0, (_scheme.length - 3)));
}
public function get host():String{
return (((_host.length <= 0)) ? undefined : _host);
}
public function get path():String{
return (((_path.length <= 0)) ? undefined : _path);
}
public function get url():String{
return (((_url.length <= 0)) ? undefined : _url);
}
public function get userinfo():Object{
var _local2:Array;
var _local1:Object = {user:undefined, pass:undefined};
if (_userinfo){
_local2 = _userinfo.substring(0, (_userinfo.length - 1)).split(":");
_local1.user = (_local2[0]) ? _local2[0] : _local1.user;
_local1.pass = (_local2[1]) ? _local2[1] : _local1.pas;
};
return (_local1);
}
}
}//package com.gamezhero.api.as3.utils
Section 8
//GameParams (com.gamezhero.api.as3.GameParams)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.gamezhero.api.as3.events.*;
import flash.utils.*;
public class GameParams extends MovieClip {
private var _send_localconnection_gameparams:LocalConnection;
private var _gamezhero_code_gameparams:Number;
private var tries:uint;// = 2
private var _obj_listener_gameparams:Object;
private var _loader_gameparams:Loader;
private var _recived_name_connection_gameparams:String;
private var _receive_localconnection_gameparams:LocalConnection;
private var _send_name_connection_gameparams:String;
public function GameParams(){
_receive_localconnection_gameparams = new LocalConnection();
_send_localconnection_gameparams = new LocalConnection();
_loader_gameparams = new Loader();
_obj_listener_gameparams = new Object();
super();
_gamezhero_code_gameparams = new Date().getTime();
_recived_name_connection_gameparams = ("_recived_gamezhero_gameparams_" + _gamezhero_code_gameparams);
_send_name_connection_gameparams = ("_send_gamezhero_gameparams_" + _gamezhero_code_gameparams);
iniLocalConnectionsGameParams();
iniEvents();
loadGameParamsEngine();
}
private function loadGameParamsEngine():void{
var url:String = (GamezheroGlobal.toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 103, 97, 109, 101, 112, 97, 114, 97, 109, 115, 47, 103, 97, 109, 101, 112, 97, 114, 97, 109, 115, 95, 118, 49, 46, 115, 119, 102, 63, 103, 97, 109, 101, 122, 104, 101, 114, 111, 67, 111, 100, 101, 61]) + String(_gamezhero_code_gameparams));
var request:URLRequest = new URLRequest(url);
try {
_loader_gameparams.load(request);
} catch(e:Error) {
receivedAction({error:2});
};
}
private function checkGameParams(_arg1:TimerEvent=null):void{
_send_localconnection_gameparams.send(_send_name_connection_gameparams, "gameparamsIsOk", null);
}
private function onErrorReciveGameParams(_arg1:SecurityErrorEvent=null):void{
receivedAction({error:4});
}
private function clearEvents():void{
_loader_gameparams.contentLoaderInfo.removeEventListener(Event.INIT, gameParamsLoaderInit);
_loader_gameparams.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, gameParamsLoaderError);
_receive_localconnection_gameparams.removeEventListener(StatusEvent.STATUS, onStatusReciveGameParams);
_receive_localconnection_gameparams.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorReciveGameParams);
_send_localconnection_gameparams.removeEventListener(StatusEvent.STATUS, onStatusSendGameParams);
_send_localconnection_gameparams.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorSendGameParams);
}
private function onErrorSendGameParams(_arg1:SecurityErrorEvent=null):void{
receivedAction({});
}
private function onStatusReciveGameParams(_arg1:StatusEvent=null):void{
switch (_arg1.level){
case "status":
break;
case "error":
receivedAction({error:5});
break;
};
}
private function onStatusSendGameParams(_arg1:StatusEvent=null):void{
switch (_arg1.level){
case "status":
break;
case "error":
receivedAction({error:6});
break;
};
}
private function iniEvents():void{
_loader_gameparams.contentLoaderInfo.addEventListener(Event.INIT, gameParamsLoaderInit);
_loader_gameparams.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, gameParamsLoaderError);
_receive_localconnection_gameparams.addEventListener(StatusEvent.STATUS, onStatusReciveGameParams);
_receive_localconnection_gameparams.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorReciveGameParams);
_send_localconnection_gameparams.addEventListener(StatusEvent.STATUS, onStatusSendGameParams);
_send_localconnection_gameparams.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorSendGameParams);
}
private function getInfo():Object{
var _local1:Object = new Object();
_local1["game_name"] = GamezheroGlobal.gameName;
_local1["game_domain"] = GamezheroGlobal.getDomain();
return ((_local1 as Object));
}
private function iniLocalConnectionsGameParams():void{
_obj_listener_gameparams = new Object();
_obj_listener_gameparams.gameparamsOk = function ():void{
_send_localconnection_gameparams.send(_send_name_connection_gameparams, "getParams", getInfo());
};
_obj_listener_gameparams.iniParams = function (_arg1:Object):void{
receivedAction(_arg1);
};
var dom:String = GamezheroGlobal.toText([102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109]);
_receive_localconnection_gameparams.allowInsecureDomain(dom);
_receive_localconnection_gameparams.allowDomain(dom);
_receive_localconnection_gameparams.client = _obj_listener_gameparams;
try {
_receive_localconnection_gameparams.connect(_recived_name_connection_gameparams);
} catch(e:Error) {
receivedAction({error:1});
};
_send_localconnection_gameparams.allowInsecureDomain(dom);
_send_localconnection_gameparams.allowDomain(dom);
}
private function receivedAction(_arg1:Object):void{
var _local2:GameParamsEvent = new GameParamsEvent(GameParamsEvent.GAME_PARAMS_RECEIVED);
_local2.value = _arg1;
this.dispatchEvent(_local2);
clearEvents();
}
private function gameParamsLoaderInit(_arg1:Event=null):void{
var _local2:Timer = new Timer(200, 1);
_local2.addEventListener(TimerEvent.TIMER, checkGameParams);
_local2.start();
}
private function gameParamsLoaderError(_arg1:Event=null):void{
tries--;
if (tries == 0){
receivedAction({error:3});
} else {
loadGameParamsEngine();
};
}
}
}//package com.gamezhero.api.as3
Section 9
//GamePreloader (com.gamezhero.api.as3.GamePreloader)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import com.google.analytics.*;
import com.gamezhero.api.as3.gui.*;
import flash.ui.*;
public class GamePreloader extends MovieClip {
private var _indicator:Indicator;
private var _obj_listener_preloader:Object;
private var tries:uint;// = 2
private var _gamezhero_code_preloader:Number;
private var _quality_old:String;
private var progress:Number;// = 0
private var _rate_old:Number;
private var _send_name_connection_preloader:String;
private var _scale_old:String;
private var _recived_name_connection_preloader:String;
private var _obj:Object;
private var _preloader_active_flag:Boolean;// = false
private var _urls:Dictionary;
private var _timer:Timer;
private var _loader_preloader_skin:Loader;
private var _bg:Background;
private var _recive_localconnection_preloader:LocalConnection;
private var _error_flag:Boolean;// = false
private var _in_target:String;
private var _align_old:String;
private var _send_localconnection_preloader:LocalConnection;
private var _par:MovieClip;
private var _amount_try:uint;// = 10
private var _in_url:String;// = "null"
private var _tracker:GATracker;
private var _debug_flag:Boolean;// = false
public static const FINISH:String = "PRELOAD_COMPLETE";
public function GamePreloader(_arg1:MovieClip, _arg2:Object=null){
var par = _arg1;
var iniObject = _arg2;
_timer = new Timer((1000 / 10), 0);
_obj = new Object();
_urls = new Dictionary();
_recive_localconnection_preloader = new LocalConnection();
_send_localconnection_preloader = new LocalConnection();
_loader_preloader_skin = new Loader();
_obj_listener_preloader = new Object();
super();
_par = par;
_par.addChild(this);
if (iniObject != null){
_obj = iniObject;
};
try {
_debug_flag = _obj["debug"];
} catch(e:Error) {
_debug_flag = false;
};
_bg = new Background(this);
_indicator = new Indicator(this);
_gamezhero_code_preloader = new Date().getTime();
_recived_name_connection_preloader = ("_recived_gamezhero_preloader_" + _gamezhero_code_preloader);
_send_name_connection_preloader = ("_send_gamezhero_preloader_" + _gamezhero_code_preloader);
iniLocalConnectionsPreloader();
iniEvents();
iniStage();
iniGoogleAnalitics();
}
private function ioErrorHandler(_arg1:IOErrorEvent=null):void{
beginScenario2();
}
private function preloaderLoaderError(_arg1:Event=null):void{
trace("ERROR");
tries--;
if (tries == 0){
beginScenario2();
} else {
loadPreloaderSkin();
};
}
private function preloaderLoaderComplete(_arg1:Event=null):void{
}
private function actionDone(_arg1:TimerEvent=null):void{
var _local2:Event;
this.alpha = (this.alpha - 1);
if (this.alpha <= 1){
this.alpha = 0;
clearEvents();
clearStageEvents();
clearTimers();
setStageSettings();
_local2 = new Event(FINISH);
this.dispatchEvent(_local2);
_indicator.remove();
_bg.remove();
_par.removeChild(this);
};
_arg1.updateAfterEvent();
}
private function gotoAction(_arg1:MouseEvent=null):void{
trace((((("gotoAction 2 " + _in_url) + " ") + _in_target) + " "));
if (_in_url != "null"){
GamezheroGlobal.getURL(_in_url, _in_target);
_in_url = "null";
};
}
private function iniStage(_arg1:Event=null):void{
var event = _arg1;
this.removeEventListener(Event.ENTER_FRAME, iniStage);
try {
getStageSettings();
iniStageSettings();
iniContextMenu();
iniStageEvents();
if (_debug_flag == false){
loadPreloaderSkin();
} else {
beginScenario2();
};
} catch(e:Error) {
_amount_try--;
if (_amount_try <= 0){
beginScenario2();
} else {
this.addEventListener(Event.ENTER_FRAME, iniStage);
};
};
}
private function resizeAction(_arg1:Event=null):void{
var obj:Object;
var event = _arg1;
obj = new Object();
try {
obj.width = stage.stageWidth;
obj.height = stage.stageHeight;
} catch(e:Error) {
obj.width = 550;
obj.height = 400;
};
if ((((_error_flag == false)) && ((_preloader_active_flag == true)))){
try {
_send_localconnection_preloader.send(_send_name_connection_preloader, GamezheroGlobal.toText([117, 112, 100, 97, 116, 101, 80, 111, 115]), obj);
} catch(e:Error) {
beginScenario2();
};
};
_indicator.update(obj.width, obj.height);
_bg.update(obj.width, obj.height);
}
private function getStageSettings():void{
_scale_old = stage.scaleMode;
_align_old = stage.align;
_rate_old = stage.frameRate;
_quality_old = stage.quality;
}
private function setStageSettings():void{
stage.scaleMode = _scale_old;
stage.align = _align_old;
stage.frameRate = _rate_old;
stage.quality = _quality_old;
}
private function beginScenario2():void{
_error_flag = true;
clearTimers();
_timer.addEventListener(TimerEvent.TIMER, updatePreloader2);
_timer.start();
}
private function iniEvents():void{
_par.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_par.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressAction);
_loader_preloader_skin.contentLoaderInfo.addEventListener(Event.INIT, preloaderLoaderInit);
_loader_preloader_skin.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, preloaderLoaderError);
_recive_localconnection_preloader.addEventListener(StatusEvent.STATUS, onStatusRecivePreloader);
_recive_localconnection_preloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorRecivePreloader);
_send_localconnection_preloader.addEventListener(StatusEvent.STATUS, onStatusSendPreloader);
_send_localconnection_preloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorSendPreloader);
}
private function updatePreloader2(_arg1:TimerEvent=null):void{
var proc:Number;
var obj:Object;
var event = _arg1;
iniStageSettings();
proc = progress;
_indicator.setVal((Math.round((proc * 100)) + " %"));
if (proc >= 1){
action();
};
obj = new Object();
try {
obj.width = stage.stageWidth;
obj.height = stage.stageHeight;
} catch(e:Error) {
obj.width = 550;
obj.height = 400;
};
event.updateAfterEvent();
}
private function iniContextMenu():void{
var _local5:String;
var _local6:ContextMenuItem;
var _local1:String = GamezheroGlobal.getDomain(_par.stage);
var _local2:String = GamezheroGlobal.gameName;
_obj.gamezhero_url = (((("http://www.gamezhero.com/?utm_campaign=" + _local2) + "&utm_source=") + _local1) + "&utm_medium=preloader");
_obj.gamezhero_menu = {Free Online Games @ Gamezhero.com:(((("http://www.gamezhero.com/?utm_campaign=" + _local2) + "&utm_source=") + _local1) + "&utm_medium=context_menu"), Send To Friends:(((((("http://www.gamezhero.com/sendtofriends/" + _local2) + "-onlinegames.html?utm_campaign=") + _local2) + "&utm_source=") + _local1) + "&utm_medium=send_to_friends_context_menu"), Put This Game To Your Blog or Site:(((((("http://www.gamezhero.com/freewebsitegames/" + _local2) + "-onlinegames.html?utm_campaign=") + _local2) + "&utm_source=") + _local1) + "&utm_medium=free_web_site_games_context")};
var _local3:ContextMenu = new ContextMenu();
_local3.hideBuiltInItems();
var _local4:ContextMenuBuiltInItems = _local3.builtInItems;
_local4.quality = true;
_local4.print = true;
for (_local5 in _obj.gamezhero_menu) {
_local6 = new ContextMenuItem(_local5);
_urls[_local6] = _obj.gamezhero_menu[_local5];
_local6.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, getURLContextMenu);
_local3.customItems.push(_local6);
};
trace("INI CONTEXT MENU");
this.parent.contextMenu = _local3;
}
private function getInfo():Object{
var _local1:UserInfo = new UserInfo(_par);
return ((_local1 as Object));
}
private function onStatusRecivePreloader(_arg1:StatusEvent=null):void{
trace("infoObject.level", _arg1.level);
switch (_arg1.level){
case "status":
break;
case "error":
beginScenario2();
break;
};
}
private function iniLocalConnectionsPreloader():void{
_obj_listener_preloader = new Object();
_obj_listener_preloader.preloaderOk = function ():void{
_send_localconnection_preloader.send(_send_name_connection_preloader, GamezheroGlobal.toText([105, 110, 105, 80, 114, 101, 108, 111, 97, 100, 101, 114]), getInfo());
beginScenario1();
};
_obj_listener_preloader.preloaderGetUrlAction = function (_arg1:String, _arg2:String):void{
var url = _arg1;
var target = _arg2;
try {
_tracker.trackEvent("preloader", "click", GamezheroGlobal.gameName);
} catch(e:Error) {
};
gotoActionIni(url, target);
};
_obj_listener_preloader.finishAction = function (_arg1:Object):void{
action();
};
var dom:String = GamezheroGlobal.toText([102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109]);
_recive_localconnection_preloader.allowInsecureDomain(dom);
_recive_localconnection_preloader.allowDomain(dom);
_recive_localconnection_preloader.client = _obj_listener_preloader;
try {
_recive_localconnection_preloader.connect(_recived_name_connection_preloader);
} catch(e:Error) {
beginScenario2();
};
_send_localconnection_preloader.allowInsecureDomain(dom);
_send_localconnection_preloader.allowDomain(dom);
}
private function onStatusSendPreloader(_arg1:StatusEvent=null):void{
trace("onStatusSendPreloader.level", _arg1.level);
switch (_arg1.level){
case "status":
break;
case "error":
beginScenario2();
break;
};
}
private function iniGoogleAnalitics():void{
try {
_tracker = new GATracker(this, "UA-262190-10", "AS3", false);
_tracker.trackEvent("preloader", "loading", GamezheroGlobal.gameName);
} catch(e:Error) {
};
}
private function getURLContextMenu(_arg1:ContextMenuEvent=null):void{
GamezheroGlobal.getURL(_urls[_arg1.target], "_blank");
}
private function iniStageEvents():void{
stage.addEventListener(Event.RESIZE, resizeAction);
resizeAction();
}
public function action(_arg1:Event=null):void{
clearTimers();
_timer.addEventListener(TimerEvent.TIMER, actionDone);
_timer.start();
}
private function progressAction(_arg1:ProgressEvent=null):void{
var event = _arg1;
try {
progress = (event.bytesLoaded / event.bytesTotal);
} catch(e:Error) {
progress = 0;
};
}
private function iniStageSettings():void{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = 20;
stage.quality = StageQuality.HIGH;
}
private function clearEvents():void{
_par.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_par.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressAction);
this.removeEventListener(Event.ENTER_FRAME, iniStage);
_loader_preloader_skin.contentLoaderInfo.removeEventListener(Event.INIT, preloaderLoaderInit);
_loader_preloader_skin.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, preloaderLoaderError);
_recive_localconnection_preloader.removeEventListener(StatusEvent.STATUS, onStatusRecivePreloader);
_recive_localconnection_preloader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorRecivePreloader);
_recive_localconnection_preloader.client = {};
_recive_localconnection_preloader.close();
_recive_localconnection_preloader = new LocalConnection();
_send_localconnection_preloader.removeEventListener(StatusEvent.STATUS, onStatusSendPreloader);
_send_localconnection_preloader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorSendPreloader);
_send_localconnection_preloader = new LocalConnection();
}
private function updatePreloader1(_arg1:TimerEvent=null):void{
var proc:Number;
var obj:Object;
var event = _arg1;
iniStageSettings();
_indicator.setVal("Loading...");
proc = progress;
obj = new Object();
try {
obj.width = stage.stageWidth;
obj.height = stage.stageHeight;
} catch(e:Error) {
obj.width = 550;
obj.height = 400;
};
obj.loaded = proc;
_send_localconnection_preloader.send(_send_name_connection_preloader, GamezheroGlobal.toText([117, 112, 100, 97, 116, 101, 80, 114, 101, 108, 111, 97, 100, 101, 114]), obj);
event.updateAfterEvent();
}
private function loadPreloaderSkin():void{
var url:String = (GamezheroGlobal.toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 112, 114, 101, 108, 111, 97, 100, 101, 114, 47, 112, 114, 101, 108, 111, 97, 100, 101, 114, 95, 118, 49, 46, 115, 119, 102, 63, 103, 97, 109, 101, 122, 104, 101, 114, 111, 67, 111, 100, 101, 61]) + String(_gamezhero_code_preloader));
trace(url);
var request:URLRequest = new URLRequest(url);
try {
_loader_preloader_skin.load(request);
addChild(_loader_preloader_skin);
} catch(e:Error) {
beginScenario2();
};
}
private function preloaderLoaderInit(_arg1:Event=null):void{
var _local2:Timer = new Timer(200, 1);
_local2.addEventListener(TimerEvent.TIMER, checkPreloader);
_local2.start();
}
private function checkPreloader(_arg1:TimerEvent=null):void{
_send_localconnection_preloader.send(_send_name_connection_preloader, GamezheroGlobal.toText([112, 114, 101, 108, 111, 97, 100, 101, 114, 73, 115, 79, 107]), null);
}
private function clearStageEvents():void{
try {
stage.removeEventListener(Event.RESIZE, resizeAction);
} catch(e:Error) {
};
}
private function onErrorRecivePreloader(_arg1:SecurityErrorEvent=null):void{
beginScenario2();
}
private function moveAction(_arg1:MouseEvent=null):void{
}
private function beginScenario1():void{
_preloader_active_flag = true;
clearTimers();
_timer.addEventListener(TimerEvent.TIMER, updatePreloader1);
_timer.start();
resizeAction();
}
private function clearTimers():void{
_timer.removeEventListener(TimerEvent.TIMER, updatePreloader1);
_timer.removeEventListener(TimerEvent.TIMER, updatePreloader2);
_timer.removeEventListener(TimerEvent.TIMER, actionDone);
}
private function onErrorSendPreloader(_arg1:SecurityErrorEvent=null):void{
beginScenario2();
}
private function gotoActionIni(_arg1:String, _arg2:String):void{
trace((((("gotoAction 1 " + _arg1) + " ") + _arg2) + " "));
_in_url = _arg1;
_in_target = _arg2;
gotoAction();
}
}
}//package com.gamezhero.api.as3
Section 10
//GamezheroApi (com.gamezhero.api.as3.GamezheroApi)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.system.*;
import flash.net.*;
import com.gamezhero.api.as3.events.*;
import flash.utils.*;
import com.adobe.images.*;
import com.gamezhero.api.as3.gui.*;
import flash.filters.*;
import flash.printing.*;
public class GamezheroApi {
private static var _score_continue_function:Function;
private static var params:Object = new Object();
private static var _preloader_goal:MovieClip;
private static var _preloader_next_step_function:Function;
private static var _score_error_function:Function;
private static var _score_submit_function:Function;
private static var _score_goal:MovieClip;
public static function linkZorroLogo():void{
if (!params["logo"]){
GamezheroGlobal.getURL((((("http://www.gamezhero.com/?utm_campaign=" + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.getDomain()) + "&utm_medium=zorro_logo"), "_blank");
} else {
GamezheroGlobal.getURL(params["logo"], "_blank");
};
}
public static function score(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Function, _arg7:Function, _arg8:Function, _arg9:Object=null):void{
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Object;
var _local14:SubmitArea;
GamezheroGlobal.gameCode = _arg2;
_score_goal = (_arg1 as MovieClip);
_score_submit_function = _arg6;
_score_continue_function = _arg7;
_score_error_function = _arg8;
if (GamezheroGlobal.gameName == "unset"){
trace("Error. GamezheroApi don't ini !");
} else {
_local10 = _arg3;
_local11 = _arg4;
_local12 = _arg5;
_local13 = _arg9;
if (_local13 == null){
_local13 = {border:{width:4, color:0xFFFFFF, alpha:100}, background:{topColor:0x999999, bottomColor:0x666666, topAlpha:100, bottomAlpha:100, cornerRadius:10}, language:"ENG"};
};
_local14 = new SubmitArea(_score_goal, _local11, _local12, _local10, _local13);
_local14.addEventListener(SubmitArea.SUBMITED, scoreSubmitAction);
_local14.addEventListener(SubmitArea.CONTINUE, scoreContinueAction);
_local14.addEventListener(SubmitArea.ERROR, scoreErrorAction);
};
}
public static function linkTopScore():void{
if (!params["top_score"]){
GamezheroGlobal.getURL((((((("http://www.gamezhero.com/topscore/" + GamezheroGlobal.gameName) + "/top100.html?utm_campaign=") + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.getDomain()) + "&utm_medium=submit_score"), "_blank");
} else {
GamezheroGlobal.getURL(params["top_score"], "_blank");
};
}
private static function gameParamsReceived(_arg1:GameParamsEvent=null):void{
var _local3:String;
var _local2:Object = (_arg1.value as Object);
for (_local3 in _local2) {
params[_local3] = _local2[_local3];
};
}
private static function scoreSubmitAction(_arg1:Event=null):void{
_score_submit_function.apply();
}
public static function linkMoreGames():void{
if (!params["more_games"]){
GamezheroGlobal.getURL((((("http://www.gamezhero.com/?utm_campaign=" + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.getDomain()) + "&utm_medium=more_free_games"), "_blank");
} else {
GamezheroGlobal.getURL(params["more_games"], "_blank");
};
}
public static function ini(_arg1:String):void{
Security.allowDomain("www.gamezhero.com", "gamezhero.com", "files.gamezhero.com", "data.gamezhero.com", "*.gamezhero.com");
Security.allowInsecureDomain("www.gamezhero.com", "gamezhero.com", "files.gamezhero.com", "data.gamezhero.com", "*.gamezhero.com");
GamezheroGlobal.gameName = _arg1;
var _local2:GameParams = new GameParams();
_local2.addEventListener(GameParamsEvent.GAME_PARAMS_RECEIVED, gameParamsReceived);
}
public static function linkTwitter():void{
if (!params["twitter"]){
GamezheroGlobal.getURL("http://twitter.com/gamezhero", "_blank");
} else {
GamezheroGlobal.getURL(params["twitter"], "_blank");
};
}
public static function createScreenShot(_arg1:MovieClip, _arg2:Number=-1, _arg3:Number=-1):void{
var _local4:String;
if (!params["screen_shot"]){
_local4 = (((((("http://www.gamezhero.com/gallery/" + GamezheroGlobal.gameName) + "/add.html?utm_campaign=") + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.getDomain()) + "&utm_medium=top_score");
} else {
_local4 = params["screen_shot"];
};
if (_arg2 <= 0){
_arg2 = Capabilities.screenResolutionX;
};
if (_arg3 <= 0){
_arg3 = Capabilities.screenResolutionY;
};
var _local5:Rectangle = _arg1.getRect(_arg1);
var _local6:Number = _local5.x;
var _local7:Number = _local5.y;
var _local8:BitmapData = new BitmapData(_arg2, _arg3);
var _local9:Number = Math.max((_arg2 / _arg1.width), (_arg3 / _arg1.height));
var _local10:Matrix = new Matrix();
_local10.scale(_local9, _local9);
_local10.ty = ((-(((_arg1.height * _local9) - _arg3)) / 2) - (_local7 * _local9));
_local10.tx = ((-(((_arg1.width * _local9) - _arg2)) / 2) - (_local6 * _local9));
var _local11:Watermark = new Watermark();
_local11.width = (Math.max((_arg1.width - (((_arg1.width * _local9) - _arg2) / _local9)), (_arg1.height - (((_arg1.height * _local9) - _arg3) / _local9))) * 0.1);
_local11.scaleY = _local11.scaleX;
_local11.filters = [new GlowFilter(0, 0.5, 2, 2)];
_arg1.addChild(_local11);
_local11.x = (-(_local10.tx) / _local9);
_local11.y = (-(_local10.ty) / _local9);
_local8.draw(_arg1, _local10);
_arg1.removeChild(_local11);
var _local12:JPGEncoder = new JPGEncoder(85);
var _local13:ByteArray = _local12.encode(_local8);
var _local14:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream");
var _local15:URLRequest = new URLRequest(_local4);
_local15.requestHeaders.push(_local14);
_local15.method = URLRequestMethod.POST;
_local15.data = _local13;
navigateToURL(_local15, "_blank");
_local8.dispose();
}
private static function scoreErrorAction(_arg1:Event=null):void{
_score_error_function.apply();
}
public static function linkSendToFrined():void{
if (!params["send_to_friends"]){
GamezheroGlobal.getURL((((((("http://www.gamezhero.com/sendtofriends/" + GamezheroGlobal.gameName) + "-games.html?utm_campaign=") + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.getDomain()) + "&utm_medium=send_to_friend"), "_blank");
} else {
GamezheroGlobal.getURL(params["send_to_friends"], "_blank");
};
}
private static function scoreContinueAction(_arg1:Event=null):void{
_score_continue_function.apply();
}
private static function preloaderNextStep(_arg1:Event=null):void{
_preloader_next_step_function.apply();
}
public static function preloader(_arg1:MovieClip, _arg2:Function):void{
var _local3:GamePreloader;
_preloader_goal = (_arg1 as MovieClip);
_preloader_next_step_function = _arg2;
if (GamezheroGlobal.gameName == "unset"){
trace("Error. GamezheroApi didn't initialise...");
} else {
_local3 = new GamePreloader(_preloader_goal, {debug:false});
_local3.addEventListener(GamePreloader.FINISH, preloaderNextStep);
};
}
public static function sentToPrint(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var kof:Number;
var options:PrintJobOptions;
var mc = _arg1;
var _x = _arg2;
var _y = _arg3;
var _w = _arg4;
var _h = _arg5;
var p:PrintJob = new PrintJob();
var w:Number = 598.5;
var h:Number = 846.45;
var rotation_foo:Number = mc.rotation;
mc.rotation = 0;
var width_foo:Number = mc.width;
var height_foo:Number = mc.height;
var parent_foo:DisplayObject = (mc.parent as DisplayObject);
var index_foo:Number = (parent_foo as MovieClip).getChildIndex(mc);
var sp:MovieClip = new MovieClip();
sp.addChild(mc);
if (mc.width > mc.height){
mc.rotation = -90;
};
var wm:Sprite = new Sprite();
var wm1:Watermark = new Watermark();
var wm2:Watermark = new Watermark();
wm1.y = (wm1.y + 2);
wm1.x = (wm1.x + 2);
wm1.alpha = 0.5;
var ct:ColorTransform = new ColorTransform();
ct.color = 0;
wm1.transform.colorTransform = ct;
wm.addChild(wm1);
wm.addChild(wm2);
(parent_foo as MovieClip).addChildAt(sp, index_foo);
var tx:Number = 0;
var ty:Number = 0;
var margin:Number = 10;
var rec:Rectangle = mc.getRect(sp);
var dx_foo:Number = rec.x;
var dy_foo:Number = rec.y;
var rec2:Rectangle = mc.getRect(mc);
var dx_foo2:Number = rec2.x;
var dy_foo2:Number = rec2.y;
kof = Math.min((w / (sp.width + margin)), (h / (sp.height + margin)));
sp.width = (sp.width * kof);
sp.height = (sp.height * kof);
tx = ((((sp.width / kof) - (w / kof)) / 2) + dx_foo);
ty = ((((sp.height / kof) - (h / kof)) / 2) + dy_foo);
mc.addChild(wm);
wm.width = ((h * 0.1) / kof);
wm.scaleY = wm.scaleX;
wm.x = dx_foo2;
wm.y = dy_foo2;
if (p.start()){
try {
options = new PrintJobOptions();
options.printAsBitmap = false;
p.addPage((sp as Sprite), new Rectangle(tx, ty, w, h), options);
} catch(e:Error) {
};
p.send();
};
mc.rotation = rotation_foo;
mc.width = width_foo;
mc.height = height_foo;
(parent_foo as MovieClip).removeChild(sp);
(parent_foo as MovieClip).addChildAt(mc, index_foo);
}
public static function linkPublish():void{
if (!params["embed"]){
GamezheroGlobal.getURL((((((("http://www.gamezhero.com/freewebsitegames/" + GamezheroGlobal.gameName) + "-games.html?utm_campaign=") + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.getDomain()) + "&utm_medium=free_web_site_games"), "_blank");
} else {
GamezheroGlobal.getURL(params["embed"], "_blank");
};
}
}
}//package com.gamezhero.api.as3
Section 11
//GamezheroGlobal (com.gamezhero.api.as3.GamezheroGlobal)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.net.*;
import com.gamezhero.api.as3.utils.*;
import flash.external.*;
public class GamezheroGlobal {
public static const SAFARI:String = "safari";
public static const FIREFOX:String = "firefox";
public static const CHROME:String = "chrome";
public static const IE:String = "ie";
public static const OPERA:String = "opera";
public static var gameNameVar:String = "unset";
public static var host:String = "error";
public static var browser:String = "unset";
public static var gameCodeVar:String = "unset";
public static function getDomain(_arg1:Stage=null):String{
var url:URL;
var stage = _arg1;
if (host != "error"){
return (host);
};
try {
url = new URL(stage.loaderInfo.url);
host = url.host;
if (url.host == null){
host = "local";
};
} catch(e:Error) {
host = "error";
};
return (host);
}
public static function toText(_arg1:Array):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
public static function getURL(_arg1:String, _arg2:String):void{
var _local3:URLRequest = new URLRequest(_arg1);
navigateToURL(_local3, _arg2);
}
public static function get gameName():String{
return (gameNameVar);
}
public static function getBrowser():String{
var st:String;
if (browser == "unset"){
if (ExternalInterface.available){
try {
st = ExternalInterface.call("function (){ return navigator['userAgent']}");
st = st.toLowerCase();
if (st.indexOf("firefox") != -1){
browser = FIREFOX;
} else {
if (st.indexOf("chrome") != -1){
browser = CHROME;
} else {
if (st.indexOf("safari") != -1){
browser = SAFARI;
} else {
if (st.indexOf("opera") != -1){
browser = OPERA;
} else {
browser = IE;
};
};
};
};
} catch(e:Error) {
browser = IE;
};
} else {
browser = IE;
};
};
return (browser);
}
public static function set gameName(_arg1:String):void{
gameNameVar = _arg1;
}
public static function set gameCode(_arg1:String):void{
gameCodeVar = _arg1;
}
public static function get gameCode():String{
return (gameCodeVar);
}
}
}//package com.gamezhero.api.as3
Section 12
//SubmitArea (com.gamezhero.api.as3.SubmitArea)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import com.gamezhero.api.as3.gui.*;
public class SubmitArea extends MovieClip {
private var reciveLocalConnection_engine:LocalConnection;
private var sendLocalConnection_skin:LocalConnection;
private var score_value:Number;// = 0
private var sendNameConnection_skin:String;
private var x_pos:Number;// = 0
private var y_pos:Number;// = 0
private var _indicator:Indicator;
private var score:Number;
private var goal:MovieClip;
private var skin_mc:MovieClip;
private var loader_skin:Loader;
private var gamezheroCode_engine:Number;
private var engine_mc:MovieClip;
private var skin_info:Object;
private var _loader:URLVariables;
private var reciveLocalConnection_skin:LocalConnection;
private var recivedNameConnection_engine:String;
private var sendLocalConnection_engine:LocalConnection;
private var sendNameConnection_engine:String;
private var _loader_url:String;// = "null"
private var objListenerSkin:Object;
public var versionGame:String;// = "2.0"
private var gamezheroCode_skin:Number;
private var loader_engine:Loader;
private var objListenerEngine:Object;
private var recivedNameConnection_skin:String;
private var infoText:TextField;
public static const SUBMITED:String = "gamezhero_submited";
public static const CONTINUE:String = "gamezhero_continue";
public static const ERROR:String = "gamezhero_error";
public function SubmitArea(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object){
reciveLocalConnection_skin = new LocalConnection();
sendLocalConnection_skin = new LocalConnection();
reciveLocalConnection_engine = new LocalConnection();
sendLocalConnection_engine = new LocalConnection();
loader_skin = new Loader();
loader_engine = new Loader();
objListenerSkin = new Object();
objListenerEngine = new Object();
_loader = new URLVariables();
super();
gamezheroCode_skin = new Date().getTime();
gamezheroCode_engine = gamezheroCode_skin;
recivedNameConnection_skin = ("_send_gamezhero_skin_" + gamezheroCode_skin);
sendNameConnection_skin = ("_recive_gamezhero_skin_" + gamezheroCode_skin);
recivedNameConnection_engine = ("_send_gamezhero_engine_" + gamezheroCode_engine);
sendNameConnection_engine = ("_recive_gamezhero_engine_" + gamezheroCode_engine);
iniLocalConnectionsSkin();
iniLocalConnectionsEngine();
iniSubmitArea(_arg1, _arg2, _arg3, _arg4, _arg5);
iniEvents();
}
private function iniSkin():void{
loader_skin.x = x_pos;
loader_skin.y = y_pos;
infoText.text = "";
try {
_indicator.remove();
} catch(e:Error) {
};
sendLocalConnection_skin.send(sendNameConnection_skin, "iniSkin", skin_info);
}
private function loadSkin():void{
infoText.text = "Loading Skin...";
var url:String = (toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 115, 99, 111, 114, 101, 47, 115, 107, 105, 110, 47, 115, 107, 105, 110, 95, 118, 49, 46, 115, 119, 102, 63, 103, 97, 109, 101, 122, 104, 101, 114, 111, 67, 111, 100, 101, 61]) + gamezheroCode_skin);
var request:URLRequest = new URLRequest(url);
try {
loader_skin.load(request);
addChild(loader_skin);
} catch(e:Error) {
infoText.text = "Error Loading Skin...";
errorAction();
};
}
public function submitAction(_arg1:String=""):void{
diactivateAllEvents();
deleteAll();
dispatchEvent(new Event(SUBMITED));
}
private function diactivateAllEvents():void{
loader_skin.contentLoaderInfo.removeEventListener(Event.INIT, skinLoaderInit);
loader_skin.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, skinLoaderError);
loader_engine.contentLoaderInfo.removeEventListener(Event.INIT, engineLoaderInit);
loader_engine.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, engineLoaderError);
reciveLocalConnection_skin.removeEventListener(StatusEvent.STATUS, onStatusReciveSkin);
reciveLocalConnection_skin.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorReciveSkin);
sendLocalConnection_skin.removeEventListener(StatusEvent.STATUS, onStatusSendSkin);
sendLocalConnection_skin.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorSendSkin);
reciveLocalConnection_engine.removeEventListener(StatusEvent.STATUS, onStatusReciveEngine);
reciveLocalConnection_engine.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorReciveEngine);
sendLocalConnection_engine.removeEventListener(StatusEvent.STATUS, onStatusSendEngine);
sendLocalConnection_engine.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorSendEngine);
}
private function onStatusReciveEngine(_arg1:StatusEvent=null):void{
switch (_arg1.level){
case "status":
break;
case "error":
infoText.text = "Error Connections 'Recive From Engine'";
break;
};
}
public function createInfoText():void{
infoText = new TextField();
infoText.autoSize = TextFieldAutoSize.LEFT;
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.size = 11;
_local1.font = "Arial";
infoText.defaultTextFormat = _local1;
this.addChild(infoText);
infoText.x = 10;
infoText.y = 10;
infoText.visible = false;
}
private function iniEvents():void{
loader_skin.contentLoaderInfo.addEventListener(Event.INIT, skinLoaderInit);
loader_skin.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, skinLoaderError);
loader_engine.contentLoaderInfo.addEventListener(Event.INIT, engineLoaderInit);
loader_engine.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, engineLoaderError);
reciveLocalConnection_skin.addEventListener(StatusEvent.STATUS, onStatusReciveSkin);
reciveLocalConnection_skin.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorReciveSkin);
sendLocalConnection_skin.addEventListener(StatusEvent.STATUS, onStatusSendSkin);
sendLocalConnection_skin.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorSendSkin);
reciveLocalConnection_engine.addEventListener(StatusEvent.STATUS, onStatusReciveEngine);
reciveLocalConnection_engine.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorReciveEngine);
sendLocalConnection_engine.addEventListener(StatusEvent.STATUS, onStatusSendEngine);
sendLocalConnection_engine.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorSendEngine);
}
private function engineLoaderError(_arg1:Event=null):void{
infoText.text = "Error Loading Engine...";
errorAction();
}
private function onStatusReciveSkin(_arg1:StatusEvent=null):void{
switch (_arg1.level){
case "status":
break;
case "error":
infoText.text = "Error Connections 'Recive From Skin'";
break;
};
}
private function engineLoaderInit(_arg1:Event=null):void{
infoText.text = "Check Engine Connection...";
var _local2:Timer = new Timer(200, 1);
_local2.addEventListener(TimerEvent.TIMER, checkEngine);
_local2.start();
}
private function onStatusSendEngine(_arg1:StatusEvent=null):void{
switch (_arg1.level){
case "status":
break;
case "error":
infoText.text = "Error Connections 'Send To Engine'";
break;
};
}
private function checkSkin(_arg1:TimerEvent=null):void{
sendLocalConnection_skin.send(sendNameConnection_skin, "skinIsOk");
}
private function iniLocalConnectionsSkin():void{
objListenerSkin = new Object();
objListenerSkin.skinOk = function ():void{
loadEngine();
};
objListenerSkin.submitAction = function (_arg1:String):void{
sendLocalConnection_engine.send(sendNameConnection_engine, toText([115, 101, 110, 100, 83, 99, 111, 114, 101]), _arg1);
};
objListenerSkin.errorInputActin = function ():void{
};
objListenerSkin.continueAction = function ():void{
continueAction();
};
var dom:String = toText([102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109]);
reciveLocalConnection_skin.allowInsecureDomain(dom);
reciveLocalConnection_skin.allowDomain(dom);
reciveLocalConnection_skin.client = objListenerSkin;
reciveLocalConnection_skin.connect(recivedNameConnection_skin);
sendLocalConnection_skin.allowInsecureDomain(dom);
sendLocalConnection_skin.allowDomain(dom);
}
private function onErrorReciveSkin(_arg1:SecurityErrorEvent=null):void{
errorAction();
}
private function onStatusSendSkin(_arg1:StatusEvent=null):void{
switch (_arg1.level){
case "status":
break;
case "error":
infoText.text = "Error Connections 'Send To Skin'";
break;
};
}
private function onErrorSendSkin(_arg1:SecurityErrorEvent=null):void{
errorAction();
}
private function skinLoaderInit(_arg1:Event=null):void{
infoText.text = "Check Skin Connection... ";
var _local2:Timer = new Timer(200, 1);
_local2.addEventListener(TimerEvent.TIMER, checkSkin);
_local2.start();
}
public function continueAction():void{
diactivateAllEvents();
deleteAll();
dispatchEvent(new Event(CONTINUE));
}
private function onErrorReciveEngine(_arg1:SecurityErrorEvent=null):void{
errorAction();
}
private function sendScoreAction(_arg1:MouseEvent=null):void{
var _local2:URLRequest;
if (_loader_url != "null"){
_local2 = new URLRequest(_loader_url);
_local2.method = URLRequestMethod.POST;
_local2.data = _loader;
navigateToURL(_local2, "_blank");
_loader = new URLVariables();
_loader_url = "null";
submitAction();
};
}
private function toText(_arg1:Array):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
private function iniSubmitArea(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object):void{
goal = (_arg1 as MovieClip);
goal.addChild(this);
x_pos = _arg2;
y_pos = _arg3;
score_value = Math.abs(Math.round(_arg4));
skin_info = _arg5;
skin_info.score = score_value;
skin_info.gameName = GamezheroGlobal.gameName;
skin_info.gameCode = GamezheroGlobal.gameCode;
skin_info.domain = GamezheroGlobal.getDomain(goal.stage);
_indicator = new Indicator(goal);
_indicator.setSize(50, 50);
_indicator.setPos(30, 30);
createInfoText();
loadSkin();
}
private function deleteAll():void{
try {
this.removeChild(infoText);
} catch(e:Error) {
};
try {
this.removeChild(loader_skin);
} catch(e:Error) {
};
try {
this.removeChild(loader_engine);
} catch(e:Error) {
};
try {
_indicator.remove();
} catch(e:Error) {
};
try {
goal.removeChild(this);
} catch(e:Error) {
};
}
private function onErrorSendEngine(_arg1:SecurityErrorEvent=null):void{
errorAction();
}
private function loadEngine():void{
infoText.text = "Loading Engine...";
var url:String = (toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 115, 99, 111, 114, 101, 47, 101, 110, 103, 105, 110, 101, 47, 101, 110, 103, 105, 110, 101, 95, 118, 49, 46, 115, 119, 102, 63, 103, 97, 109, 101, 122, 104, 101, 114, 111, 67, 111, 100, 101, 61]) + gamezheroCode_engine);
var request:URLRequest = new URLRequest(url);
try {
loader_engine.load(request);
addChild(loader_engine);
} catch(e:Error) {
infoText.text = "Error Loading Engine...";
errorAction();
};
}
public function errorAction():void{
diactivateAllEvents();
deleteAll();
dispatchEvent(new Event(ERROR));
}
private function iniLocalConnectionsEngine():void{
objListenerEngine = new Object();
objListenerEngine.engineOk = function ():void{
sendLocalConnection_engine.send(sendNameConnection_engine, "iniEngine", skin_info);
infoText.text = "Engine Connections...";
};
objListenerEngine.engineError = function ():void{
infoText.text = "Error Engine...";
};
objListenerEngine.submitActionDone = function (_arg1:Object):void{
sendScore(_arg1);
};
objListenerEngine.engineActivated = function ():void{
iniSkin();
};
var dom:String = toText([102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109]);
reciveLocalConnection_engine.allowDomain(dom);
reciveLocalConnection_engine.allowInsecureDomain(dom);
reciveLocalConnection_engine.client = objListenerEngine;
reciveLocalConnection_engine.connect(recivedNameConnection_engine);
sendLocalConnection_engine.allowDomain(dom);
sendLocalConnection_engine.allowInsecureDomain(dom);
}
private function moveAction(_arg1:MouseEvent=null):void{
}
private function sendScore(_arg1:Object):void{
var _local2:String;
_loader = new URLVariables();
_loader_url = _arg1.url;
for (_local2 in _arg1.vars) {
_loader[_local2] = _arg1.vars[_local2];
};
sendScoreAction();
}
private function checkEngine(_arg1:TimerEvent=null):void{
sendLocalConnection_engine.send(sendNameConnection_engine, "engineIsOk");
}
private function fromText(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
private function skinLoaderError(_arg1:Event=null):void{
infoText.text = "Error Loading Skin...";
errorAction();
}
}
}//package com.gamezhero.api.as3
Section 13
//UserInfo (com.gamezhero.api.as3.UserInfo)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.system.*;
import flash.external.*;
public class UserInfo {
public var flash_domain:String;
private var _stage:Stage;
public var ad_zone:String;// = "preloader"
public var flash_height:Number;
public var flash_vars:Object;
public var referrer:String;
public var flash_url:String;
public var browser:String;
public var href:String;
private var _goal:MovieClip;
public var flash_width:Number;
public var game_name:String;
public var api_version:String;// = "AS3 - v3.0"
public var publisher:String;// = "gamezhero"
public var capabilities:String;
public function UserInfo(_arg1:MovieClip){
var g = _arg1;
_goal = g;
try {
_stage = _goal.stage;
} catch(e:Error) {
};
super();
iniInfo();
}
private function iniInfo():void{
var i:String;
this["publisher"] = "gamezhero";
this["ad_zone"] = "preloader";
this["api_version"] = "AS3 - v3.0";
this["flash_vars"] = new Object();
this["capabilities"] = Capabilities.serverString;
if (ExternalInterface.available){
try {
this["href"] = ExternalInterface.call("function (){return document.location.href}");
} catch(e:Error) {
this["href"] = "-1";
};
try {
this["browser"] = ExternalInterface.call("function (){var st = ''; for (i in navigator){ if (typeof(navigator[i])!='function'){ st+=i+'='+navigator[i]+'&'; }} return st}");
} catch(e:Error) {
this["browser"] = "-1";
};
try {
this["referrer"] = ExternalInterface.call("function (){return document.referrer}");
} catch(e:Error) {
this["referrer"] = "-1";
};
} else {
this["href"] = "-1";
this["browser"] = "-1";
this["referrer"] = "-1";
};
this["game_name"] = GamezheroGlobal.gameName;
this["flash_domain"] = GamezheroGlobal.getDomain();
try {
this["flash_width"] = _stage.stageWidth;
this["flash_height"] = _stage.stageHeight;
this["flash_url"] = _stage.root.loaderInfo.url;
} catch(e:Error) {
};
try {
for (i in _stage.root.loaderInfo.parameters) {
this["flash_vars"][i] = _stage.root.loaderInfo.parameters[i];
};
} catch(e:Error) {
};
}
}
}//package com.gamezhero.api.as3
Section 14
//CampaignInfo (com.google.analytics.campaign.CampaignInfo)
package com.google.analytics.campaign {
import com.google.analytics.utils.*;
public class CampaignInfo {
private var _new:Boolean;
private var _empty:Boolean;
public function CampaignInfo(_arg1:Boolean=true, _arg2:Boolean=false){
_empty = _arg1;
_new = _arg2;
}
public function toURLString():String{
var _local1:Variables = toVariables();
return (_local1.toString());
}
public function isNew():Boolean{
return (_new);
}
public function get utmcn():String{
return ("1");
}
public function isEmpty():Boolean{
return (_empty);
}
public function toVariables():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
if (((!(isEmpty())) && (isNew()))){
_local1.utmcn = utmcn;
};
if (((!(isEmpty())) && (!(isNew())))){
_local1.utmcr = utmcr;
};
return (_local1);
}
public function get utmcr():String{
return ("1");
}
}
}//package com.google.analytics.campaign
Section 15
//CampaignKey (com.google.analytics.campaign.CampaignKey)
package com.google.analytics.campaign {
public class CampaignKey {
public var UCMD:String;// = "utm_medium"
public var UCID:String;// = "utm_id"
public var UCTR:String;// = "utm_term"
public var UCSR:String;// = "utm_source"
public var UCNO:String;// = "utm_nooverride"
public var UCCN:String;// = "utm_campaign"
public var UGCLID:String;// = "gclid"
public var UCCT:String;// = "utm_content"
}
}//package com.google.analytics.campaign
Section 16
//CampaignManager (com.google.analytics.campaign.CampaignManager)
package com.google.analytics.campaign {
import com.google.analytics.core.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.utils.*;
public class CampaignManager {
private var _config:Configuration;
private var _domainHash:Number;
private var _debug:DebugConfiguration;
private var _timeStamp:Number;
private var _referrer:String;
private var _buffer:Buffer;
public static const trackingDelimiter:String = "|";
public function CampaignManager(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Number, _arg5:String, _arg6:Number){
_config = _arg1;
_debug = _arg2;
_buffer = _arg3;
_domainHash = _arg4;
_referrer = _arg5;
_timeStamp = _arg6;
}
public function getCampaignInformation(_arg1:String, _arg2:Boolean):CampaignInfo{
var _local4:CampaignTracker;
var _local8:CampaignTracker;
var _local9:int;
var _local3:CampaignInfo = new CampaignInfo();
var _local5:Boolean;
var _local6:Boolean;
var _local7:int;
if (((_config.allowLinker) && (_buffer.isGenuine()))){
if (!_buffer.hasUTMZ()){
return (_local3);
};
};
_local4 = getTrackerFromSearchString(_arg1);
if (isValid(_local4)){
_local6 = hasNoOverride(_arg1);
if (((_local6) && (!(_buffer.hasUTMZ())))){
return (_local3);
};
};
if (!isValid(_local4)){
_local4 = getOrganicCampaign();
if (((!(_buffer.hasUTMZ())) && (isIgnoredKeyword(_local4)))){
return (_local3);
};
};
if (((!(isValid(_local4))) && (_arg2))){
_local4 = getReferrerCampaign();
if (((!(_buffer.hasUTMZ())) && (isIgnoredReferral(_local4)))){
return (_local3);
};
};
if (!isValid(_local4)){
if (((!(_buffer.hasUTMZ())) && (_arg2))){
_local4 = getDirectCampaign();
};
};
if (!isValid(_local4)){
return (_local3);
};
if (((_buffer.hasUTMZ()) && (!(_buffer.utmz.isEmpty())))){
_local8 = new CampaignTracker();
_local8.fromTrackerString(_buffer.utmz.campaignTracking);
_local5 = (_local8.toTrackerString() == _local4.toTrackerString());
_local7 = _buffer.utmz.responseCount;
};
if (((!(_local5)) || (_arg2))){
_local9 = _buffer.utma.sessionCount;
_local7++;
if (_local9 == 0){
_local9 = 1;
};
_buffer.utmz.domainHash = _domainHash;
_buffer.utmz.campaignCreation = _timeStamp;
_buffer.utmz.campaignSessions = _local9;
_buffer.utmz.responseCount = _local7;
_buffer.utmz.campaignTracking = _local4.toTrackerString();
_debug.info(_buffer.utmz.toString(), VisualDebugMode.geek);
_local3 = new CampaignInfo(false, true);
} else {
_local3 = new CampaignInfo(false, false);
};
return (_local3);
}
public function hasNoOverride(_arg1:String):Boolean{
var _local2:CampaignKey = _config.campaignKey;
if (_arg1 == ""){
return (false);
};
var _local3:Variables = new Variables(_arg1);
var _local4 = "";
if (_local3.hasOwnProperty(_local2.UCNO)){
_local4 = _local3[_local2.UCNO];
switch (_local4){
case "1":
return (true);
case "":
case "0":
default:
return (false);
};
};
return (false);
}
public function getTrackerFromSearchString(_arg1:String):CampaignTracker{
var _local2:CampaignTracker = getOrganicCampaign();
var _local3:CampaignTracker = new CampaignTracker();
var _local4:CampaignKey = _config.campaignKey;
if (_arg1 == ""){
return (_local3);
};
var _local5:Variables = new Variables(_arg1);
if (_local5.hasOwnProperty(_local4.UCID)){
_local3.id = _local5[_local4.UCID];
};
if (_local5.hasOwnProperty(_local4.UCSR)){
_local3.source = _local5[_local4.UCSR];
};
if (_local5.hasOwnProperty(_local4.UGCLID)){
_local3.clickId = _local5[_local4.UGCLID];
};
if (_local5.hasOwnProperty(_local4.UCCN)){
_local3.name = _local5[_local4.UCCN];
} else {
_local3.name = "(not set)";
};
if (_local5.hasOwnProperty(_local4.UCMD)){
_local3.medium = _local5[_local4.UCMD];
} else {
_local3.medium = "(not set)";
};
if (_local5.hasOwnProperty(_local4.UCTR)){
_local3.term = _local5[_local4.UCTR];
} else {
if (((_local2) && (!((_local2.term == ""))))){
_local3.term = _local2.term;
};
};
if (_local5.hasOwnProperty(_local4.UCCT)){
_local3.content = _local5[_local4.UCCT];
};
return (_local3);
}
public function getOrganicCampaign():CampaignTracker{
var _local1:CampaignTracker;
var _local4:Array;
var _local5:OrganicReferrer;
var _local6:String;
if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){
return (_local1);
};
var _local2:URL = new URL(_referrer);
var _local3 = "";
if (_local2.hostName != ""){
if (_local2.hostName.indexOf(".") > -1){
_local4 = _local2.hostName.split(".");
switch (_local4.length){
case 2:
_local3 = _local4[0];
break;
case 3:
_local3 = _local4[1];
break;
};
};
};
if (_config.organic.match(_local3)){
_local5 = _config.organic.getReferrerByName(_local3);
_local6 = _config.organic.getKeywordValue(_local5, _local2.search);
_local1 = new CampaignTracker();
_local1.source = _local5.engine;
_local1.name = "(organic)";
_local1.medium = "organic";
_local1.term = _local6;
};
return (_local1);
}
public function getDirectCampaign():CampaignTracker{
var _local1:CampaignTracker = new CampaignTracker();
_local1.source = "(direct)";
_local1.name = "(direct)";
_local1.medium = "(none)";
return (_local1);
}
public function isIgnoredKeyword(_arg1:CampaignTracker):Boolean{
if (((_arg1) && ((_arg1.medium == "organic")))){
return (_config.organic.isIgnoredKeyword(_arg1.term));
};
return (false);
}
public function isIgnoredReferral(_arg1:CampaignTracker):Boolean{
if (((_arg1) && ((_arg1.medium == "referral")))){
return (_config.organic.isIgnoredReferral(_arg1.source));
};
return (false);
}
public function isValid(_arg1:CampaignTracker):Boolean{
if (((_arg1) && (_arg1.isValid()))){
return (true);
};
return (false);
}
public function getReferrerCampaign():CampaignTracker{
var _local1:CampaignTracker;
if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){
return (_local1);
};
var _local2:URL = new URL(_referrer);
var _local3:String = _local2.hostName;
var _local4:String = _local2.path;
if (_local3.indexOf("www.") == 0){
_local3 = _local3.substr(4);
};
_local1 = new CampaignTracker();
_local1.source = _local3;
_local1.name = "(referral)";
_local1.medium = "referral";
_local1.content = _local4;
return (_local1);
}
public static function isInvalidReferrer(_arg1:String):Boolean{
var _local2:URL;
if ((((((_arg1 == "")) || ((_arg1 == "-")))) || ((_arg1 == "0")))){
return (true);
};
if (_arg1.indexOf("://") > -1){
_local2 = new URL(_arg1);
if ((((_local2.protocol == Protocols.file)) || ((_local2.protocol == Protocols.none)))){
return (true);
};
};
return (false);
}
public static function isFromGoogleCSE(_arg1:String, _arg2:Configuration):Boolean{
var _local3:URL = new URL(_arg1);
if (_local3.hostName.indexOf(_arg2.google) > -1){
if (_local3.search.indexOf((_arg2.googleSearchParam + "=")) > -1){
if (_local3.path == ("/" + _arg2.googleCsePath)){
return (true);
};
};
};
return (false);
}
}
}//package com.google.analytics.campaign
Section 17
//CampaignTracker (com.google.analytics.campaign.CampaignTracker)
package com.google.analytics.campaign {
import com.google.analytics.utils.*;
public class CampaignTracker {
public var content:String;
public var source:String;
public var clickId:String;
public var name:String;
public var term:String;
public var medium:String;
public var id:String;
public function CampaignTracker(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:String="", _arg5:String="", _arg6:String="", _arg7:String=""){
this.id = _arg1;
this.source = _arg2;
this.clickId = _arg3;
this.name = _arg4;
this.medium = _arg5;
this.term = _arg6;
this.content = _arg7;
}
public function isValid():Boolean{
if (((((!((id == ""))) || (!((source == ""))))) || (!((clickId == ""))))){
return (true);
};
return (false);
}
public function toTrackerString():String{
var _local1:Array = [];
_addIfNotEmpty(_local1, "utmcid=", id);
_addIfNotEmpty(_local1, "utmcsr=", source);
_addIfNotEmpty(_local1, "utmgclid=", clickId);
_addIfNotEmpty(_local1, "utmccn=", name);
_addIfNotEmpty(_local1, "utmcmd=", medium);
_addIfNotEmpty(_local1, "utmctr=", term);
_addIfNotEmpty(_local1, "utmcct=", content);
return (_local1.join(CampaignManager.trackingDelimiter));
}
private function _addIfNotEmpty(_arg1:Array, _arg2:String, _arg3:String):void{
if (_arg3 != ""){
_arg3 = _arg3.split("+").join("%20");
_arg3 = _arg3.split(" ").join("%20");
_arg1.push((_arg2 + _arg3));
};
}
public function fromTrackerString(_arg1:String):void{
var _local2:String = _arg1.split(CampaignManager.trackingDelimiter).join("&");
var _local3:Variables = new Variables(_local2);
if (_local3.hasOwnProperty("utmcid")){
this.id = _local3["utmcid"];
};
if (_local3.hasOwnProperty("utmcsr")){
this.source = _local3["utmcsr"];
};
if (_local3.hasOwnProperty("utmccn")){
this.name = _local3["utmccn"];
};
if (_local3.hasOwnProperty("utmcmd")){
this.medium = _local3["utmcmd"];
};
if (_local3.hasOwnProperty("utmctr")){
this.term = _local3["utmctr"];
};
if (_local3.hasOwnProperty("utmcct")){
this.content = _local3["utmcct"];
};
if (_local3.hasOwnProperty("utmgclid")){
this.clickId = _local3["utmgclid"];
};
}
}
}//package com.google.analytics.campaign
Section 18
//BrowserInfo (com.google.analytics.core.BrowserInfo)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import com.google.analytics.utils.*;
public class BrowserInfo {
private var _config:Configuration;
private var _info:Environment;
public function BrowserInfo(_arg1:Configuration, _arg2:Environment){
_config = _arg1;
_info = _arg2;
}
public function get utmul():String{
return (_info.language.toLowerCase());
}
public function get utmje():String{
return ("0");
}
public function toURLString():String{
var _local1:Variables = toVariables();
return (_local1.toString());
}
public function get utmsr():String{
return (((_info.screenWidth + "x") + _info.screenHeight));
}
public function get utmfl():String{
var _local1:Version;
if (_config.detectFlash){
_local1 = _info.flashVersion;
return (((((_local1.major + ".") + _local1.minor) + " r") + _local1.build));
};
return ("-");
}
public function get utmcs():String{
return (_info.languageEncoding);
}
public function toVariables():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
_local1.utmcs = utmcs;
_local1.utmsr = utmsr;
_local1.utmsc = utmsc;
_local1.utmul = utmul;
_local1.utmje = utmje;
_local1.utmfl = utmfl;
return (_local1);
}
public function get utmsc():String{
return ((_info.screenColorDepth + "-bit"));
}
}
}//package com.google.analytics.core
Section 19
//Buffer (com.google.analytics.core.Buffer)
package com.google.analytics.core {
import flash.events.*;
import flash.net.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.data.*;
public dynamic class Buffer {
private var _SO:SharedObject;
private var _data:Object;
private var _OBJ:Object;
private var _utmb:UTMB;
private var _utmc:UTMC;
private var _utma:UTMA;
private var _debug:DebugConfiguration;
private var _utmk:UTMK;
private var _config:Configuration;
private var _utmv:UTMV;
private var _utmx:UTMX;
private var _utmz:UTMZ;
private var _volatile:Boolean;
public function Buffer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Boolean=false, _arg4:Object=null){
var _local5:String;
super();
_config = _arg1;
_debug = _arg2;
_data = _arg4;
_volatile = _arg3;
if (_volatile){
_OBJ = new Object();
if (_data){
for (_local5 in _data) {
_OBJ[_local5] = _data[_local5];
};
};
};
}
public function save():void{
var flushStatus:String;
if (!isVolatile()){
flushStatus = null;
try {
flushStatus = _SO.flush();
} catch(e:Error) {
_debug.warning("Error...Could not write SharedObject to disk");
};
switch (flushStatus){
case SharedObjectFlushStatus.PENDING:
_debug.info("Requesting permission to save object...");
_SO.addEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus);
break;
case SharedObjectFlushStatus.FLUSHED:
_debug.info("Value flushed to disk.");
break;
};
};
}
public function get utmv():UTMV{
if (!hasUTMV()){
_createUMTV();
};
return (_utmv);
}
public function get utmx():UTMX{
if (!hasUTMX()){
_createUMTX();
};
return (_utmx);
}
public function get utmz():UTMZ{
if (!hasUTMZ()){
_createUMTZ();
};
return (_utmz);
}
public function hasUTMA():Boolean{
if (_utma){
return (true);
};
return (false);
}
public function hasUTMB():Boolean{
if (_utmb){
return (true);
};
return (false);
}
public function hasUTMC():Boolean{
if (_utmc){
return (true);
};
return (false);
}
public function clearCookies():void{
utma.reset();
utmb.reset();
utmc.reset();
utmz.reset();
utmv.reset();
utmk.reset();
}
public function resetCurrentSession():void{
_clearUTMB();
_clearUTMC();
save();
}
public function hasUTMK():Boolean{
if (_utmk){
return (true);
};
return (false);
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
var _local3:String = toLinkerParams();
var _local4:String = _arg1;
var _local5:Array = _arg1.split("#");
if (_local3){
if (_arg2){
if (1 >= _local5.length){
_local4 = (_local4 + ("#" + _local3));
} else {
_local4 = (_local4 + ("&" + _local3));
};
} else {
if (1 >= _local5.length){
if (_arg1.indexOf("?") > -1){
_local4 = (_local4 + "&");
} else {
_local4 = (_local4 + "?");
};
_local4 = (_local4 + _local3);
} else {
_local4 = _local5[0];
if (_arg1.indexOf("?") > -1){
_local4 = (_local4 + "&");
} else {
_local4 = (_local4 + "?");
};
_local4 = (_local4 + ((_local3 + "#") + _local5[1]));
};
};
};
return (_local4);
}
public function generateCookiesHash():Number{
var _local1 = "";
_local1 = (_local1 + utma.valueOf());
_local1 = (_local1 + utmb.valueOf());
_local1 = (_local1 + utmc.valueOf());
_local1 = (_local1 + utmx.valueOf());
_local1 = (_local1 + utmz.valueOf());
_local1 = (_local1 + utmv.valueOf());
return (Utils.generateHash(_local1));
}
private function _createUMTA():void{
_utma = new UTMA();
_utma.proxy = this;
}
private function _createUMTB():void{
_utmb = new UTMB();
_utmb.proxy = this;
}
private function _createUMTC():void{
_utmc = new UTMC();
}
public function hasUTMV():Boolean{
if (_utmv){
return (true);
};
return (false);
}
private function _createUMTK():void{
_utmk = new UTMK();
_utmk.proxy = this;
}
public function hasUTMX():Boolean{
if (_utmx){
return (true);
};
return (false);
}
public function hasUTMZ():Boolean{
if (_utmz){
return (true);
};
return (false);
}
private function _createUMTV():void{
_utmv = new UTMV();
_utmv.proxy = this;
}
private function _createUMTX():void{
_utmx = new UTMX();
_utmx.proxy = this;
}
private function _createUMTZ():void{
_utmz = new UTMZ();
_utmz.proxy = this;
}
public function updateUTMA(_arg1:Number):void{
if (_debug.verbose){
_debug.info((("updateUTMA( " + _arg1) + " )"), VisualDebugMode.advanced);
};
if (!utma.isEmpty()){
if (isNaN(utma.sessionCount)){
utma.sessionCount = 1;
} else {
utma.sessionCount = (utma.sessionCount + 1);
};
utma.lastTime = utma.currentTime;
utma.currentTime = _arg1;
};
}
public function isGenuine():Boolean{
if (!hasUTMK()){
return (true);
};
return ((utmk.hash == generateCookiesHash()));
}
private function _onFlushStatus(_arg1:NetStatusEvent):void{
_debug.info("User closed permission dialog...");
switch (_arg1.info.code){
case "SharedObject.Flush.Success":
_debug.info("User granted permission -- value saved.");
break;
case "SharedObject.Flush.Failed":
_debug.info("User denied permission -- value not saved.");
break;
};
_SO.removeEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus);
}
public function toLinkerParams():String{
var _local1 = "";
_local1 = (_local1 + utma.toURLString());
_local1 = (_local1 + ("&" + utmb.toURLString()));
_local1 = (_local1 + ("&" + utmc.toURLString()));
_local1 = (_local1 + ("&" + utmx.toURLString()));
_local1 = (_local1 + ("&" + utmz.toURLString()));
_local1 = (_local1 + ("&" + utmv.toURLString()));
_local1 = (_local1 + ("&__utmk=" + generateCookiesHash()));
return (_local1);
}
private function _clearUTMA():void{
_utma = null;
if (!isVolatile()){
_SO.data.utma = null;
delete _SO.data.utma;
};
}
private function _clearUTMC():void{
_utmc = null;
}
private function _clearUTMB():void{
_utmb = null;
if (!isVolatile()){
_SO.data.utmb = null;
delete _SO.data.utmb;
};
}
public function update(_arg1:String, _arg2):void{
if (isVolatile()){
_OBJ[_arg1] = _arg2;
} else {
_SO.data[_arg1] = _arg2;
};
}
public function createSO():void{
var saveSO:Boolean;
UTMZ.defaultTimespan = _config.conversionTimeout;
UTMB.defaultTimespan = _config.sessionTimeout;
if (!_volatile){
try {
_SO = SharedObject.getLocal(_config.cookieName, _config.cookiePath);
} catch(e:Error) {
if (_debug.active){
_debug.warning(((("Shared Object " + _config.cookieName) + " failed to be set\nreason: ") + e.message));
};
};
saveSO = false;
if (_SO.data.utma){
if (!hasUTMA()){
_createUMTA();
};
_utma.fromSharedObject(_SO.data.utma);
if (_debug.verbose){
_debug.info(("found: " + _utma.toString(true)), VisualDebugMode.geek);
};
if (_utma.isExpired()){
if (_debug.verbose){
_debug.warning("UTMA has expired", VisualDebugMode.advanced);
};
_clearUTMA();
saveSO = true;
};
};
if (_SO.data.utmb){
if (!hasUTMB()){
_createUMTB();
};
_utmb.fromSharedObject(_SO.data.utmb);
if (_debug.verbose){
_debug.info(("found: " + _utmb.toString(true)), VisualDebugMode.geek);
};
if (_utmb.isExpired()){
if (_debug.verbose){
_debug.warning("UTMB has expired", VisualDebugMode.advanced);
};
_clearUTMB();
saveSO = true;
};
};
if (_SO.data.utmc){
delete _SO.data.utmc;
saveSO = true;
};
if (_SO.data.utmk){
if (!hasUTMK()){
_createUMTK();
};
_utmk.fromSharedObject(_SO.data.utmk);
if (_debug.verbose){
_debug.info(("found: " + _utmk.toString()), VisualDebugMode.geek);
};
};
if (!hasUTMX()){
_createUMTX();
};
if (_SO.data.utmv){
if (!hasUTMV()){
_createUMTV();
};
_utmv.fromSharedObject(_SO.data.utmv);
if (_debug.verbose){
_debug.info(("found: " + _utmv.toString(true)), VisualDebugMode.geek);
};
if (_utmv.isExpired()){
if (_debug.verbose){
_debug.warning("UTMV has expired", VisualDebugMode.advanced);
};
_clearUTMV();
saveSO = true;
};
};
if (_SO.data.utmz){
if (!hasUTMZ()){
_createUMTZ();
};
_utmz.fromSharedObject(_SO.data.utmz);
if (_debug.verbose){
_debug.info(("found: " + _utmz.toString(true)), VisualDebugMode.geek);
};
if (_utmz.isExpired()){
if (_debug.verbose){
_debug.warning("UTMZ has expired", VisualDebugMode.advanced);
};
_clearUTMZ();
saveSO = true;
};
};
if (saveSO){
save();
};
};
}
private function _clearUTMZ():void{
_utmz = null;
if (!isVolatile()){
_SO.data.utmz = null;
delete _SO.data.utmz;
};
}
private function _clearUTMV():void{
_utmv = null;
if (!isVolatile()){
_SO.data.utmv = null;
delete _SO.data.utmv;
};
}
public function isVolatile():Boolean{
return (_volatile);
}
public function get utma():UTMA{
if (!hasUTMA()){
_createUMTA();
};
return (_utma);
}
public function get utmb():UTMB{
if (!hasUTMB()){
_createUMTB();
};
return (_utmb);
}
public function get utmc():UTMC{
if (!hasUTMC()){
_createUMTC();
};
return (_utmc);
}
public function get utmk():UTMK{
if (!hasUTMK()){
_createUMTK();
};
return (_utmk);
}
}
}//package com.google.analytics.core
Section 20
//DocumentInfo (com.google.analytics.core.DocumentInfo)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
public class DocumentInfo {
private var _pageURL:String;
private var _utmr:String;
private var _config:Configuration;
private var _adSense:AdSenseGlobals;
private var _info:Environment;
public function DocumentInfo(_arg1:Configuration, _arg2:Environment, _arg3:String, _arg4:String=null, _arg5:AdSenseGlobals=null){
_config = _arg1;
_info = _arg2;
_utmr = _arg3;
_pageURL = _arg4;
_adSense = _arg5;
}
public function get utmr():String{
if (!_utmr){
return ("-");
};
return (_utmr);
}
public function toURLString():String{
var _local1:Variables = toVariables();
return (_local1.toString());
}
private function _renderPageURL(_arg1:String=""):String{
var _local2:String = _info.locationPath;
var _local3:String = _info.locationSearch;
if (((!(_arg1)) || ((_arg1 == "")))){
_arg1 = (_local2 + unescape(_local3));
if (_arg1 == ""){
_arg1 = "/";
};
};
return (_arg1);
}
public function get utmp():String{
return (_renderPageURL(_pageURL));
}
public function get utmhid():String{
return (String(_generateHitId()));
}
private function _generateHitId():Number{
var _local1:Number;
if (((_adSense.hid) && (!((_adSense.hid == ""))))){
_local1 = Number(_adSense.hid);
} else {
_local1 = Math.round((Math.random() * 2147483647));
_adSense.hid = String(_local1);
};
return (_local1);
}
public function toVariables():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
if (((_config.detectTitle) && (!((utmdt == ""))))){
_local1.utmdt = utmdt;
};
_local1.utmhid = utmhid;
_local1.utmr = utmr;
_local1.utmp = utmp;
return (_local1);
}
public function get utmdt():String{
return (_info.documentTitle);
}
}
}//package com.google.analytics.core
Section 21
//Domain (com.google.analytics.core.Domain)
package com.google.analytics.core {
import com.google.analytics.debug.*;
public class Domain {
private var _mode:DomainNameMode;
private var _debug:DebugConfiguration;
private var _name:String;
public function Domain(_arg1:DomainNameMode=null, _arg2:String="", _arg3:DebugConfiguration=null){
_debug = _arg3;
if (_arg1 == null){
_arg1 = DomainNameMode.auto;
};
_mode = _arg1;
if (_arg1 == DomainNameMode.custom){
this.name = _arg2;
} else {
_name = _arg2;
};
}
public function get mode():DomainNameMode{
return (_mode);
}
public function set mode(_arg1:DomainNameMode):void{
_mode = _arg1;
if (_mode == DomainNameMode.none){
_name = "";
};
}
public function get name():String{
return (_name);
}
public function set name(_arg1:String):void{
if (((!((_arg1.charAt(0) == "."))) && (_debug))){
_debug.warning(("missing leading period \".\", cookie will only be accessible on " + _arg1), VisualDebugMode.geek);
};
_name = _arg1;
}
}
}//package com.google.analytics.core
Section 22
//DomainNameMode (com.google.analytics.core.DomainNameMode)
package com.google.analytics.core {
public class DomainNameMode {
private var _value:int;
private var _name:String;
public static const custom:DomainNameMode = new DomainNameMode(2, "custom");
;
public static const none:DomainNameMode = new DomainNameMode(0, "none");
;
public static const auto:DomainNameMode = new DomainNameMode(1, "auto");
;
public function DomainNameMode(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.core
Section 23
//Ecommerce (com.google.analytics.core.Ecommerce)
package com.google.analytics.core {
import com.google.analytics.debug.*;
import com.google.analytics.ecommerce.*;
public class Ecommerce {
private var _debug:DebugConfiguration;
private var _trans:Array;
public function Ecommerce(_arg1:DebugConfiguration){
this._debug = _arg1;
_trans = new Array();
}
public function getTransLength():Number{
return (_trans.length);
}
public function getTransFromArray(_arg1:Number):Transaction{
return (_trans[_arg1]);
}
public function addTransaction(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String, _arg7:String, _arg8:String):Transaction{
var _local9:Transaction;
_local9 = getTransaction(_arg1);
if (_local9 == null){
_local9 = new Transaction(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
_trans.push(_local9);
} else {
_local9.affiliation = _arg2;
_local9.total = _arg3;
_local9.tax = _arg4;
_local9.shipping = _arg5;
_local9.city = _arg6;
_local9.state = _arg7;
_local9.country = _arg8;
};
return (_local9);
}
public function getTransaction(_arg1:String):Transaction{
var _local2:Number;
_local2 = 0;
while (_local2 < _trans.length) {
if (_trans[_local2].id == _arg1){
return (_trans[_local2]);
};
_local2++;
};
return (null);
}
}
}//package com.google.analytics.core
Section 24
//EventInfo (com.google.analytics.core.EventInfo)
package com.google.analytics.core {
import com.google.analytics.data.*;
import com.google.analytics.utils.*;
public class EventInfo {
private var _ext10:X10;
private var _isEventHit:Boolean;
private var _x10:X10;
public function EventInfo(_arg1:Boolean, _arg2:X10, _arg3:X10=null){
_isEventHit = _arg1;
_x10 = _arg2;
_ext10 = _arg3;
}
public function toURLString():String{
var _local1:Variables = toVariables();
return (_local1.toString());
}
public function get utmt():String{
return ("event");
}
public function get utme():String{
return (_x10.renderMergedUrlString(_ext10));
}
public function toVariables():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
if (_isEventHit){
_local1.utmt = utmt;
};
_local1.utme = utme;
return (_local1);
}
}
}//package com.google.analytics.core
Section 25
//EventTracker (com.google.analytics.core.EventTracker)
package com.google.analytics.core {
import com.google.analytics.v4.*;
public class EventTracker {
private var _parent:GoogleAnalyticsAPI;
public var name:String;
public function EventTracker(_arg1:String, _arg2:GoogleAnalyticsAPI){
this.name = _arg1;
_parent = _arg2;
}
public function trackEvent(_arg1:String, _arg2:String=null, _arg3:Number=NaN):Boolean{
return (_parent.trackEvent(name, _arg1, _arg2, _arg3));
}
}
}//package com.google.analytics.core
Section 26
//ga_internal (com.google.analytics.core.ga_internal)
package com.google.analytics.core {
public namespace ga_internal;
}//package com.google.analytics.core
Section 27
//GIFRequest (com.google.analytics.core.GIFRequest)
package com.google.analytics.core {
import flash.display.*;
import flash.events.*;
import flash.system.*;
import flash.net.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.utils.*;
public class GIFRequest {
private var _info:Environment;
private var _count:int;
private var _utmac:String;
private var _alertcount:int;
private var _debug:DebugConfiguration;
private var _lastRequest:URLRequest;
private var _buffer:Buffer;
private var _config:Configuration;
private var _requests:Array;
public function GIFRequest(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Environment){
_config = _arg1;
_debug = _arg2;
_buffer = _arg3;
_info = _arg4;
_count = 0;
_alertcount = 0;
_requests = [];
}
public function get utmn():String{
return ((Utils.generate32bitRandom() as String));
}
public function onIOError(_arg1:IOErrorEvent):void{
var _local2:String = _lastRequest.url;
var _local3:String = String((_requests.length - 1));
var _local4 = (("Gif Request #" + _local3) + " failed");
if (_debug.GIFRequests){
if (!_debug.verbose){
if (_local2.indexOf("?") > -1){
_local2 = _local2.split("?")[0];
};
_local2 = _shortenURL(_local2);
};
if (int(_debug.mode) > int(VisualDebugMode.basic)){
_local4 = (_local4 + ((" \"" + _local2) + "\" does not exists or is unreachable"));
};
_debug.failure(_local4);
} else {
_debug.warning(_local4);
};
_removeListeners(_arg1.target);
}
public function send(_arg1:String, _arg2:Variables=null, _arg3:Boolean=false, _arg4:Boolean=false):void{
var _local5:String;
var _local6:URLRequest;
var _local7:URLRequest;
_utmac = _arg1;
if (!_arg2){
_arg2 = new Variables();
};
_arg2.URIencode = false;
_arg2.pre = ["utmwv", "utmn", "utmhn", "utmt", "utme", "utmcs", "utmsr", "utmsc", "utmul", "utmje", "utmfl", "utmdt", "utmhid", "utmr", "utmp"];
_arg2.post = ["utmcc"];
if (_debug.verbose){
_debug.info(((("tracking: " + _buffer.utmb.trackCount) + "/") + _config.trackingLimitPerSession), VisualDebugMode.geek);
};
if ((((_buffer.utmb.trackCount < _config.trackingLimitPerSession)) || (_arg3))){
if (_arg4){
updateToken();
};
if (((((_arg3) || (!(_arg4)))) || ((_buffer.utmb.token >= 1)))){
if (((!(_arg3)) && (_arg4))){
_buffer.utmb.token = (_buffer.utmb.token - 1);
};
_buffer.utmb.trackCount = (_buffer.utmb.trackCount + 1);
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
};
_arg2.utmwv = utmwv;
_arg2.utmn = Utils.generate32bitRandom();
if (_info.domainName != ""){
_arg2.utmhn = _info.domainName;
};
if (_config.sampleRate < 1){
_arg2.utmsp = (_config.sampleRate * 100);
};
if ((((_config.serverMode == ServerOperationMode.local)) || ((_config.serverMode == ServerOperationMode.both)))){
_local5 = _info.locationSWFPath;
if (_local5.lastIndexOf("/") > 0){
_local5 = _local5.substring(0, _local5.lastIndexOf("/"));
};
_local6 = new URLRequest();
if (_config.localGIFpath.indexOf("http") == 0){
_local6.url = _config.localGIFpath;
} else {
_local6.url = (_local5 + _config.localGIFpath);
};
_local6.url = (_local6.url + ("?" + _arg2.toString()));
if (((_debug.active) && (_debug.GIFRequests))){
_debugSend(_local6);
} else {
sendRequest(_local6);
};
};
if ((((_config.serverMode == ServerOperationMode.remote)) || ((_config.serverMode == ServerOperationMode.both)))){
_local7 = new URLRequest();
if (_info.protocol == Protocols.HTTPS){
_local7.url = _config.secureRemoteGIFpath;
} else {
if (_info.protocol == Protocols.HTTP){
_local7.url = _config.remoteGIFpath;
} else {
_local7.url = _config.remoteGIFpath;
};
};
_arg2.utmac = utmac;
_arg2.utmcc = encodeURIComponent(utmcc);
_local7.url = (_local7.url + ("?" + _arg2.toString()));
if (((_debug.active) && (_debug.GIFRequests))){
_debugSend(_local7);
} else {
sendRequest(_local7);
};
};
};
};
}
public function onSecurityError(_arg1:SecurityErrorEvent):void{
if (_debug.GIFRequests){
_debug.failure(_arg1.text);
};
}
public function get utmsp():String{
return (((_config.sampleRate * 100) as String));
}
public function get utmcc():String{
var _local1:Array = [];
if (_buffer.hasUTMA()){
_local1.push((_buffer.utma.toURLString() + ";"));
};
if (_buffer.hasUTMZ()){
_local1.push((_buffer.utmz.toURLString() + ";"));
};
if (_buffer.hasUTMV()){
_local1.push((_buffer.utmv.toURLString() + ";"));
};
return (_local1.join("+"));
}
public function get utmac():String{
return (_utmac);
}
public function get utmwv():String{
return (_config.version);
}
public function sendRequest(_arg1:URLRequest):void{
var request = _arg1;
var loader:Loader = new Loader();
loader.name = String(_count++);
var context:LoaderContext = new LoaderContext(false);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
_lastRequest = request;
_requests[loader.name] = new RequestObject(request);
try {
loader.load(request, context);
} catch(e:Error) {
_debug.failure("\"Loader.load()\" could not instanciate Gif Request");
};
}
private function _removeListeners(_arg1:Object):void{
_arg1.removeEventListener(IOErrorEvent.IO_ERROR, onIOError);
_arg1.removeEventListener(Event.COMPLETE, onComplete);
}
public function updateToken():void{
var _local2:Number;
var _local1:Number = new Date().getTime();
_local2 = ((_local1 - _buffer.utmb.lastTime) * (_config.tokenRate / 1000));
if (_debug.verbose){
_debug.info(("tokenDelta: " + _local2), VisualDebugMode.geek);
};
if (_local2 >= 1){
_buffer.utmb.token = Math.min(Math.floor((_buffer.utmb.token + _local2)), _config.bucketCapacity);
_buffer.utmb.lastTime = _local1;
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
};
};
}
public function get utmhn():String{
return (_info.domainName);
}
private function _shortenURL(_arg1:String):String{
var _local2:Array;
if (_arg1.length > 60){
_local2 = _arg1.split("/");
while (_arg1.length > 60) {
_local2.shift();
_arg1 = ("../" + _local2.join("/"));
};
};
return (_arg1);
}
private function _debugSend(_arg1:URLRequest):void{
var _local3:String;
var _local2 = "";
switch (_debug.mode){
case VisualDebugMode.geek:
_local2 = ((("Gif Request #" + _alertcount) + ":\n") + _arg1.url);
break;
case VisualDebugMode.advanced:
_local3 = _arg1.url;
if (_local3.indexOf("?") > -1){
_local3 = _local3.split("?")[0];
};
_local3 = _shortenURL(_local3);
_local2 = (((("Send Gif Request #" + _alertcount) + ":\n") + _local3) + " ?");
break;
case VisualDebugMode.basic:
default:
_local2 = (((("Send " + _config.serverMode.toString()) + " Gif Request #") + _alertcount) + " ?");
};
_debug.alertGifRequest(_local2, _arg1, this);
_alertcount++;
}
public function onComplete(_arg1:Event):void{
var _local2:String = _arg1.target.loader.name;
_requests[_local2].complete();
var _local3 = (("Gif Request #" + _local2) + " sent");
var _local4:String = _requests[_local2].request.url;
if (_debug.GIFRequests){
if (!_debug.verbose){
if (_local4.indexOf("?") > -1){
_local4 = _local4.split("?")[0];
};
_local4 = _shortenURL(_local4);
};
if (int(_debug.mode) > int(VisualDebugMode.basic)){
_local3 = (_local3 + ((" to \"" + _local4) + "\""));
};
_debug.success(_local3);
} else {
_debug.info(_local3);
};
_removeListeners(_arg1.target);
}
}
}//package com.google.analytics.core
Section 28
//IdleTimer (com.google.analytics.core.IdleTimer)
package com.google.analytics.core {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
public class IdleTimer {
private var _stage:Stage;
private var _loop:Timer;
private var _lastMove:int;
private var _inactivity:Number;
private var _debug:DebugConfiguration;
private var _session:Timer;
private var _buffer:Buffer;
public function IdleTimer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:DisplayObject, _arg4:Buffer){
var _local5:Number = _arg1.idleLoop;
var _local6:Number = _arg1.idleTimeout;
var _local7:Number = _arg1.sessionTimeout;
_loop = new Timer((_local5 * 1000));
_session = new Timer((_local7 * 1000), 1);
_debug = _arg2;
_stage = _arg3.stage;
_buffer = _arg4;
_lastMove = getTimer();
_inactivity = (_local6 * 1000);
_loop.addEventListener(TimerEvent.TIMER, checkForIdle);
_session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession);
_stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
_debug.info(((((("delay: " + _local5) + "sec , inactivity: ") + _local6) + "sec, sessionTimeout: ") + _local7), VisualDebugMode.geek);
_loop.start();
}
private function onMouseMove(_arg1:MouseEvent):void{
_lastMove = getTimer();
if (_session.running){
_debug.info("session timer reset", VisualDebugMode.geek);
_session.reset();
};
}
public function endSession(_arg1:TimerEvent):void{
_session.removeEventListener(TimerEvent.TIMER_COMPLETE, endSession);
_debug.info("session timer end session", VisualDebugMode.geek);
_session.reset();
_buffer.resetCurrentSession();
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
_debug.info(_buffer.utmc.toString(), VisualDebugMode.geek);
_session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession);
}
public function checkForIdle(_arg1:TimerEvent):void{
var _local2:int = getTimer();
if ((_local2 - _lastMove) >= _inactivity){
if (!_session.running){
_debug.info("session timer start", VisualDebugMode.geek);
_session.start();
};
};
}
}
}//package com.google.analytics.core
Section 29
//Organic (com.google.analytics.core.Organic)
package com.google.analytics.core {
import com.google.analytics.utils.*;
public class Organic {
private var _sourcesCache:Array;
private var _sourcesEngine:Array;
private var _ignoredKeywords:Array;
private var _ignoredReferralsCache:Object;
private var _ignoredReferrals:Array;
private var _ignoredKeywordsCache:Object;
private var _sources:Array;
public static var throwErrors:Boolean = false;
public function Organic(){
_sources = [];
_sourcesCache = [];
_sourcesEngine = [];
_ignoredReferrals = [];
_ignoredReferralsCache = {};
_ignoredKeywords = [];
_ignoredKeywordsCache = {};
}
public function isIgnoredKeyword(_arg1:String):Boolean{
if (_ignoredKeywordsCache.hasOwnProperty(_arg1)){
return (true);
};
return (false);
}
public function getKeywordValue(_arg1:OrganicReferrer, _arg2:String):String{
var _local3:String = _arg1.keyword;
return (getKeywordValueFromPath(_local3, _arg2));
}
public function isIgnoredReferral(_arg1:String):Boolean{
if (_ignoredReferralsCache.hasOwnProperty(_arg1)){
return (true);
};
return (false);
}
public function clear():void{
clearEngines();
clearIgnoredReferrals();
clearIgnoredKeywords();
}
public function get count():int{
return (_sources.length);
}
public function get ignoredKeywordsCount():int{
return (_ignoredKeywords.length);
}
public function match(_arg1:String):Boolean{
if (_arg1 == ""){
return (false);
};
_arg1 = _arg1.toLowerCase();
if (_sourcesEngine[_arg1] != undefined){
return (true);
};
return (false);
}
public function clearIgnoredKeywords():void{
_ignoredKeywords = [];
_ignoredKeywordsCache = {};
}
public function addSource(_arg1:String, _arg2:String):void{
var _local3:OrganicReferrer = new OrganicReferrer(_arg1, _arg2);
if (_sourcesCache[_local3.toString()] == undefined){
_sources.push(_local3);
_sourcesCache[_local3.toString()] = (_sources.length - 1);
if (_sourcesEngine[_local3.engine] == undefined){
_sourcesEngine[_local3.engine] = [(_sources.length - 1)];
} else {
_sourcesEngine[_local3.engine].push((_sources.length - 1));
};
} else {
if (throwErrors){
throw (new Error((_local3.toString() + " already exists, we don't add it.")));
};
};
}
public function clearEngines():void{
_sources = [];
_sourcesCache = [];
_sourcesEngine = [];
}
public function get ignoredReferralsCount():int{
return (_ignoredReferrals.length);
}
public function addIgnoredReferral(_arg1:String):void{
if (_ignoredReferralsCache[_arg1] == undefined){
_ignoredReferrals.push(_arg1);
_ignoredReferralsCache[_arg1] = (_ignoredReferrals.length - 1);
} else {
if (throwErrors){
throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it.")));
};
};
}
public function clearIgnoredReferrals():void{
_ignoredReferrals = [];
_ignoredReferralsCache = {};
}
public function getReferrerByName(_arg1:String):OrganicReferrer{
var _local2:int;
if (match(_arg1)){
_local2 = _sourcesEngine[_arg1][0];
return (_sources[_local2]);
};
return (null);
}
public function addIgnoredKeyword(_arg1:String):void{
if (_ignoredKeywordsCache[_arg1] == undefined){
_ignoredKeywords.push(_arg1);
_ignoredKeywordsCache[_arg1] = (_ignoredKeywords.length - 1);
} else {
if (throwErrors){
throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it.")));
};
};
}
public function get sources():Array{
return (_sources);
}
public static function getKeywordValueFromPath(_arg1:String, _arg2:String):String{
var _local3:String;
var _local4:Variables;
if (_arg2.indexOf((_arg1 + "=")) > -1){
if (_arg2.charAt(0) == "?"){
_arg2 = _arg2.substr(1);
};
_arg2 = _arg2.split("+").join("%20");
_local4 = new Variables(_arg2);
_local3 = _local4[_arg1];
};
return (_local3);
}
}
}//package com.google.analytics.core
Section 30
//OrganicReferrer (com.google.analytics.core.OrganicReferrer)
package com.google.analytics.core {
public class OrganicReferrer {
private var _engine:String;
private var _keyword:String;
public function OrganicReferrer(_arg1:String, _arg2:String){
this.engine = _arg1;
this.keyword = _arg2;
}
public function get keyword():String{
return (_keyword);
}
public function get engine():String{
return (_engine);
}
public function set engine(_arg1:String):void{
_engine = _arg1.toLowerCase();
}
public function toString():String{
return (((engine + "?") + keyword));
}
public function set keyword(_arg1:String):void{
_keyword = _arg1.toLowerCase();
}
}
}//package com.google.analytics.core
Section 31
//RequestObject (com.google.analytics.core.RequestObject)
package com.google.analytics.core {
import flash.net.*;
import flash.utils.*;
public class RequestObject {
public var start:int;
public var end:int;
public var request:URLRequest;
public function RequestObject(_arg1:URLRequest){
start = getTimer();
this.request = _arg1;
}
public function hasCompleted():Boolean{
return ((end > 0));
}
public function toString():String{
var _local1:Array = [];
_local1.push((("duration: " + duration) + "ms"));
_local1.push(("url: " + request.url));
return ((("{ " + _local1.join(", ")) + " }"));
}
public function complete():void{
end = getTimer();
}
public function get duration():int{
if (!hasCompleted()){
return (0);
};
return ((end - start));
}
}
}//package com.google.analytics.core
Section 32
//ServerOperationMode (com.google.analytics.core.ServerOperationMode)
package com.google.analytics.core {
public class ServerOperationMode {
private var _value:int;
private var _name:String;
public static const both:ServerOperationMode = new ServerOperationMode(2, "both");
;
public static const remote:ServerOperationMode = new ServerOperationMode(1, "remote");
;
public static const local:ServerOperationMode = new ServerOperationMode(0, "local");
;
public function ServerOperationMode(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.core
Section 33
//TrackerCache (com.google.analytics.core.TrackerCache)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import flash.errors.*;
public class TrackerCache implements GoogleAnalyticsAPI {
public var tracker:GoogleAnalyticsAPI;
private var _ar:Array;
public static var CACHE_THROW_ERROR:Boolean;
public function TrackerCache(_arg1:GoogleAnalyticsAPI=null){
this.tracker = _arg1;
_ar = [];
}
public function size():uint{
return (_ar.length);
}
public function flush():void{
var _local1:Object;
var _local2:String;
var _local3:Array;
var _local4:int;
var _local5:int;
if (tracker == null){
return;
};
if (size() > 0){
_local4 = _ar.length;
while (_local5 < _local4) {
_local1 = _ar.shift();
_local2 = (_local1.name as String);
_local3 = (_local1.args as Array);
if (((!((_local2 == null))) && ((_local2 in tracker)))){
(tracker[_local2] as Function).apply(tracker, _local3);
};
_local5++;
};
};
}
public function enqueue(_arg1:String, ... _args):Boolean{
if (_arg1 == null){
return (false);
};
_ar.push({name:_arg1, args:_args});
return (true);
}
public function link(_arg1:String, _arg2:Boolean=false):void{
enqueue("link", _arg1, _arg2);
}
public function addOrganic(_arg1:String, _arg2:String):void{
enqueue("addOrganic", _arg1, _arg2);
}
public function setAllowLinker(_arg1:Boolean):void{
enqueue("setAllowLinker", _arg1);
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
enqueue("trackEvent", _arg1, _arg2, _arg3, _arg4);
return (true);
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLinkerUrl' method for the moment."));
};
return ("");
}
public function getClientInfo():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getClientInfo' method for the moment."));
};
return (false);
}
public function trackTrans():void{
enqueue("trackTrans");
}
public function trackPageview(_arg1:String=""):void{
enqueue("trackPageview", _arg1);
}
public function setClientInfo(_arg1:Boolean):void{
enqueue("setClientInfo", _arg1);
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
enqueue("linkByPost", _arg1, _arg2);
}
public function setCookieTimeout(_arg1:int):void{
enqueue("setCookieTimeout", _arg1);
}
public function isEmpty():Boolean{
return ((_ar.length == 0));
}
public function getDetectTitle():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectTitle' method for the moment."));
};
return (false);
}
public function resetSession():void{
enqueue("resetSession");
}
public function setDetectFlash(_arg1:Boolean):void{
enqueue("setDetectFlash", _arg1);
}
public function clear():void{
_ar = [];
}
public function setCampNameKey(_arg1:String):void{
enqueue("setCampNameKey", _arg1);
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
enqueue("addItem", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
public function createEventTracker(_arg1:String):EventTracker{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'createEventTracker' method for the moment."));
};
return (null);
}
public function clearIgnoredOrganic():void{
enqueue("clearIgnoredOrganic");
}
public function setVar(_arg1:String):void{
enqueue("setVar", _arg1);
}
public function setDomainName(_arg1:String):void{
enqueue("setDomainName", _arg1);
}
public function setCampSourceKey(_arg1:String):void{
enqueue("setCampSourceKey", _arg1);
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'addTrans' method for the moment."));
};
}
public function setCampContentKey(_arg1:String):void{
enqueue("setCampContentKey", _arg1);
}
public function setLocalServerMode():void{
enqueue("setLocalServerMode");
}
public function getLocalGifPath():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLocalGifPath' method for the moment."));
};
return ("");
}
public function setAllowAnchor(_arg1:Boolean):void{
enqueue("setAllowAnchor", _arg1);
}
public function clearIgnoredRef():void{
enqueue("clearIgnoredRef");
}
public function setLocalGifPath(_arg1:String):void{
enqueue("setLocalGifPath", _arg1);
}
public function getVersion():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getVersion' method for the moment."));
};
return ("");
}
public function setCookiePath(_arg1:String):void{
enqueue("setCookiePath", _arg1);
}
public function setSampleRate(_arg1:Number):void{
enqueue("setSampleRate", _arg1);
}
public function setDetectTitle(_arg1:Boolean):void{
enqueue("setDetectTitle", _arg1);
}
public function setAllowHash(_arg1:Boolean):void{
enqueue("setAllowHash", _arg1);
}
public function addIgnoredOrganic(_arg1:String):void{
enqueue("addIgnoredOrganic", _arg1);
}
public function setCampNOKey(_arg1:String):void{
enqueue("setCampNOKey", _arg1);
}
public function getServiceMode():ServerOperationMode{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getServiceMode' method for the moment."));
};
return (null);
}
public function setLocalRemoteServerMode():void{
enqueue("setLocalRemoteServerMode");
}
public function cookiePathCopy(_arg1:String):void{
enqueue("cookiePathCopy", _arg1);
}
public function getDetectFlash():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectFlash' method for the moment."));
};
return (false);
}
public function setCampaignTrack(_arg1:Boolean):void{
enqueue("setCampaignTrack", _arg1);
}
public function clearOrganic():void{
enqueue("clearOrganic");
}
public function setCampTermKey(_arg1:String):void{
enqueue("setCampTermKey", _arg1);
}
public function addIgnoredRef(_arg1:String):void{
enqueue("addIgnoredRef", _arg1);
}
public function setCampMediumKey(_arg1:String):void{
enqueue("setCampMediumKey", _arg1);
}
public function setSessionTimeout(_arg1:int):void{
enqueue("setSessionTimeout", _arg1);
}
public function setRemoteServerMode():void{
enqueue("setRemoteServerMode");
}
public function element(){
return (_ar[0]);
}
public function getAccount():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getAccount' method for the moment."));
};
return ("");
}
}
}//package com.google.analytics.core
Section 34
//TrackerMode (com.google.analytics.core.TrackerMode)
package com.google.analytics.core {
public class TrackerMode {
public static const BRIDGE:String = "Bridge";
public static const AS3:String = "AS3";
}
}//package com.google.analytics.core
Section 35
//Utils (com.google.analytics.core.Utils)
package com.google.analytics.core {
public class Utils {
public static function trim(_arg1:String, _arg2:Boolean=false):String{
var _local5:int;
var _local6:int;
var _local7:int;
if (_arg1 == ""){
return ("");
};
var _local3:Array = [" ", "\n", "\r", "\t"];
var _local4:String = _arg1;
if (_arg2){
_local5 = 0;
while ((((_local5 < _local3.length)) && ((_local4.indexOf(_local3[_local5]) > -1)))) {
_local4 = _local4.split(_local3[_local5]).join("");
_local5++;
};
} else {
_local6 = 0;
while ((((_local6 < _local4.length)) && ((_local3.indexOf(_local4.charAt(_local6)) > -1)))) {
_local6++;
};
_local4 = _local4.substr(_local6);
_local7 = (_local4.length - 1);
while ((((_local7 >= 0)) && ((_local3.indexOf(_local4.charAt(_local7)) > -1)))) {
_local7--;
};
_local4 = _local4.substring(0, (_local7 + 1));
};
return (_local4);
}
public static function generateHash(_arg1:String):int{
var _local4:int;
var _local5:int;
var _local2 = 1;
var _local3:int;
if (((!((_arg1 == null))) && (!((_arg1 == ""))))){
_local2 = 0;
_local4 = (_arg1.length - 1);
while (_local4 >= 0) {
_local5 = _arg1.charCodeAt(_local4);
_local2 = ((((_local2 << 6) & 268435455) + _local5) + (_local5 << 14));
_local3 = (_local2 & 266338304);
if (_local3 != 0){
_local2 = (_local2 ^ (_local3 >> 21));
};
_local4--;
};
};
return (_local2);
}
public static function generate32bitRandom():int{
return (Math.round((Math.random() * 2147483647)));
}
public static function validateAccount(_arg1:String):Boolean{
var _local2:RegExp = /^UA-[0-9]*-[0-9]*$/;
return (_local2.test(_arg1));
}
}
}//package com.google.analytics.core
Section 36
//Cookie (com.google.analytics.data.Cookie)
package com.google.analytics.data {
public interface Cookie {
function fromSharedObject(_arg1:Object):void;
function toURLString():String;
function get creation():Date;
function toSharedObject():Object;
function isExpired():Boolean;
function set creation(_arg1:Date):void;
function set expiration(_arg1:Date):void;
function get expiration():Date;
}
}//package com.google.analytics.data
Section 37
//UTMA (com.google.analytics.data.UTMA)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMA extends UTMCookie {
private var _sessionId:Number;
private var _domainHash:Number;
private var _firstTime:Number;
private var _currentTime:Number;
private var _lastTime:Number;
private var _sessionCount:Number;
public function UTMA(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:Number=NaN, _arg6:Number=NaN){
super("utma", "__utma", ["domainHash", "sessionId", "firstTime", "lastTime", "currentTime", "sessionCount"], (Timespan.twoyears * 1000));
this.domainHash = _arg1;
this.sessionId = _arg2;
this.firstTime = _arg3;
this.lastTime = _arg4;
this.currentTime = _arg5;
this.sessionCount = _arg6;
}
public function get lastTime():Number{
return (_lastTime);
}
public function set lastTime(_arg1:Number):void{
_lastTime = _arg1;
update();
}
public function set currentTime(_arg1:Number):void{
_currentTime = _arg1;
update();
}
public function get sessionId():Number{
return (_sessionId);
}
public function get sessionCount():Number{
return (_sessionCount);
}
public function get firstTime():Number{
return (_firstTime);
}
public function get currentTime():Number{
return (_currentTime);
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function set sessionId(_arg1:Number):void{
_sessionId = _arg1;
update();
}
public function set sessionCount(_arg1:Number):void{
_sessionCount = _arg1;
update();
}
public function get domainHash():Number{
return (_domainHash);
}
public function set firstTime(_arg1:Number):void{
_firstTime = _arg1;
update();
}
}
}//package com.google.analytics.data
Section 38
//UTMB (com.google.analytics.data.UTMB)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMB extends UTMCookie {
private var _trackCount:Number;
private var _lastTime:Number;
private var _domainHash:Number;
private var _token:Number;
public static var defaultTimespan:Number = Timespan.thirtyminutes;
public function UTMB(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN){
super("utmb", "__utmb", ["domainHash", "trackCount", "token", "lastTime"], (defaultTimespan * 1000));
this.domainHash = _arg1;
this.trackCount = _arg2;
this.token = _arg3;
this.lastTime = _arg4;
}
public function set token(_arg1:Number):void{
_token = _arg1;
update();
}
public function set trackCount(_arg1:Number):void{
_trackCount = _arg1;
update();
}
public function get lastTime():Number{
return (_lastTime);
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function set lastTime(_arg1:Number):void{
_lastTime = _arg1;
update();
}
public function get domainHash():Number{
return (_domainHash);
}
public function get token():Number{
return (_token);
}
public function get trackCount():Number{
return (_trackCount);
}
}
}//package com.google.analytics.data
Section 39
//UTMC (com.google.analytics.data.UTMC)
package com.google.analytics.data {
public class UTMC extends UTMCookie {
private var _domainHash:Number;
public function UTMC(_arg1:Number=NaN){
super("utmc", "__utmc", ["domainHash"]);
this.domainHash = _arg1;
}
public function get domainHash():Number{
return (_domainHash);
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
}
}//package com.google.analytics.data
Section 40
//UTMCookie (com.google.analytics.data.UTMCookie)
package com.google.analytics.data {
import com.google.analytics.core.*;
public class UTMCookie implements Cookie {
protected var inURL:String;
protected var name:String;
private var _creation:Date;
private var _expiration:Date;
public var proxy:Buffer;
protected var fields:Array;
private var _timespan:Number;
public function UTMCookie(_arg1:String, _arg2:String, _arg3:Array, _arg4:Number=0){
this.name = _arg1;
this.inURL = _arg2;
this.fields = _arg3;
_timestamp(_arg4);
}
public function isEmpty():Boolean{
var _local2:String;
var _local1:int;
var _local3:int;
while (_local3 < fields.length) {
_local2 = fields[_local3];
if ((((this[_local2] is Number)) && (isNaN(this[_local2])))){
_local1++;
} else {
if ((((this[_local2] is String)) && ((this[_local2] == "")))){
_local1++;
};
};
_local3++;
};
if (_local1 == fields.length){
return (true);
};
return (false);
}
public function resetTimestamp(_arg1:Number=NaN):void{
if (!isNaN(_arg1)){
_timespan = _arg1;
};
_creation = null;
_expiration = null;
_timestamp(_timespan);
}
protected function update():void{
resetTimestamp();
if (proxy){
proxy.update(name, toSharedObject());
};
}
public function reset():void{
var _local1:String;
var _local2:int;
while (_local2 < fields.length) {
_local1 = fields[_local2];
if ((this[_local1] is Number)){
this[_local1] = NaN;
} else {
if ((this[_local1] is String)){
this[_local1] = "";
};
};
_local2++;
};
resetTimestamp();
update();
}
public function fromSharedObject(_arg1:Object):void{
var _local2:String;
var _local3:int = fields.length;
var _local4:int;
while (_local4 < _local3) {
_local2 = fields[_local4];
if (_arg1[_local2]){
this[_local2] = _arg1[_local2];
};
_local4++;
};
if (_arg1.creation){
this.creation = _arg1.creation;
};
if (_arg1.expiration){
this.expiration = _arg1.expiration;
};
}
private function _timestamp(_arg1:Number):void{
creation = new Date();
_timespan = _arg1;
if (_arg1 > 0){
expiration = new Date((creation.valueOf() + _arg1));
};
}
public function isExpired():Boolean{
var _local1:Date = new Date();
var _local2:Number = (expiration.valueOf() - _local1.valueOf());
if (_local2 <= 0){
return (true);
};
return (false);
}
public function set expiration(_arg1:Date):void{
_expiration = _arg1;
}
public function get creation():Date{
return (_creation);
}
public function valueOf():String{
var _local2:String;
var _local3:*;
var _local4:Array;
var _local1:Array = [];
var _local5 = "";
var _local6:int;
while (_local6 < fields.length) {
_local2 = fields[_local6];
_local3 = this[_local2];
if ((_local3 is String)){
if (_local3 == ""){
_local3 = "-";
_local1.push(_local3);
} else {
_local1.push(_local3);
};
} else {
if ((_local3 is Number)){
if (_local3 == 0){
_local1.push(_local3);
} else {
if (isNaN(_local3)){
_local3 = "-";
_local1.push(_local3);
} else {
_local1.push(_local3);
};
};
};
};
_local6++;
};
if (isEmpty()){
return ("-");
};
return (("" + _local1.join(".")));
}
public function toURLString():String{
return (((inURL + "=") + valueOf()));
}
public function get expiration():Date{
if (_expiration){
return (_expiration);
};
return (new Date((new Date().valueOf() + 1000)));
}
public function toSharedObject():Object{
var _local2:String;
var _local3:*;
var _local1:Object = {};
var _local4:int;
for (;_local4 < fields.length;_local4++) {
_local2 = fields[_local4];
_local3 = this[_local2];
if ((_local3 is String)){
_local1[_local2] = _local3;
} else {
if (_local3 == 0){
_local1[_local2] = _local3;
} else {
if (isNaN(_local3)){
continue;
} else {
_local1[_local2] = _local3;
};
};
};
};
_local1.creation = creation;
_local1.expiration = expiration;
return (_local1);
}
public function toString(_arg1:Boolean=false):String{
var _local3:String;
var _local4:*;
var _local2:Array = [];
var _local5:int = fields.length;
var _local6:int;
for (;_local6 < _local5;_local6++) {
_local3 = fields[_local6];
_local4 = this[_local3];
if ((_local4 is String)){
_local2.push((((_local3 + ": \"") + _local4) + "\""));
} else {
if (_local4 == 0){
_local2.push(((_local3 + ": ") + _local4));
} else {
if (isNaN(_local4)){
continue;
} else {
_local2.push(((_local3 + ": ") + _local4));
};
};
};
};
var _local7 = (((name.toUpperCase() + " {") + _local2.join(", ")) + "}");
if (_arg1){
_local7 = (_local7 + (((" creation:" + creation) + ", expiration:") + expiration));
};
return (_local7);
}
public function set creation(_arg1:Date):void{
_creation = _arg1;
}
}
}//package com.google.analytics.data
Section 41
//UTMK (com.google.analytics.data.UTMK)
package com.google.analytics.data {
public class UTMK extends UTMCookie {
private var _hash:Number;
public function UTMK(_arg1:Number=NaN){
super("utmk", "__utmk", ["hash"]);
this.hash = _arg1;
}
public function set hash(_arg1:Number):void{
_hash = _arg1;
update();
}
public function get hash():Number{
return (_hash);
}
}
}//package com.google.analytics.data
Section 42
//UTMV (com.google.analytics.data.UTMV)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMV extends UTMCookie {
private var _domainHash:Number;
private var _value:String;
public function UTMV(_arg1:Number=NaN, _arg2:String=""){
super("utmv", "__utmv", ["domainHash", "value"], (Timespan.twoyears * 1000));
this.domainHash = _arg1;
this.value = _arg2;
}
public function get value():String{
return (_value);
}
public function get domainHash():Number{
return (_domainHash);
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function set value(_arg1:String):void{
_value = _arg1;
update();
}
}
}//package com.google.analytics.data
Section 43
//UTMX (com.google.analytics.data.UTMX)
package com.google.analytics.data {
public class UTMX extends UTMCookie {
private var _value:String;
public function UTMX(){
super("utmx", "__utmx", ["value"], 0);
_value = "-";
}
public function get value():String{
return (_value);
}
public function set value(_arg1:String):void{
_value = _arg1;
}
}
}//package com.google.analytics.data
Section 44
//UTMZ (com.google.analytics.data.UTMZ)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMZ extends UTMCookie {
private var _campaignTracking:String;
private var _campaignCreation:Number;
private var _responseCount:Number;
private var _domainHash:Number;
private var _campaignSessions:Number;
public static var defaultTimespan:Number = Timespan.sixmonths;
public function UTMZ(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:String=""){
super("utmz", "__utmz", ["domainHash", "campaignCreation", "campaignSessions", "responseCount", "campaignTracking"], (defaultTimespan * 1000));
this.domainHash = _arg1;
this.campaignCreation = _arg2;
this.campaignSessions = _arg3;
this.responseCount = _arg4;
this.campaignTracking = _arg5;
}
public function set responseCount(_arg1:Number):void{
_responseCount = _arg1;
update();
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function set campaignCreation(_arg1:Number):void{
_campaignCreation = _arg1;
update();
}
public function get campaignTracking():String{
return (_campaignTracking);
}
public function get campaignSessions():Number{
return (_campaignSessions);
}
public function get domainHash():Number{
return (_domainHash);
}
public function get responseCount():Number{
return (_responseCount);
}
public function get campaignCreation():Number{
return (_campaignCreation);
}
public function set campaignSessions(_arg1:Number):void{
_campaignSessions = _arg1;
update();
}
public function set campaignTracking(_arg1:String):void{
_campaignTracking = _arg1;
update();
}
}
}//package com.google.analytics.data
Section 45
//X10 (com.google.analytics.data.X10)
package com.google.analytics.data {
public class X10 {
private var _delimEnd:String;// = ")"
private var _minimum:int;
private var _delimSet:String;// = "*"
private var _escapeChar:String;// = "'"
private var _delimBegin:String;// = "("
private var _delimNumValue:String;// = "!"
private var _key:String;// = "k"
private var _set:Array;
private var _hasData:int;
private var _escapeCharMap:Object;
private var _projectData:Object;
private var _value:String;// = "v"
public function X10(){
_set = [_key, _value];
super();
_projectData = {};
_escapeCharMap = {};
_escapeCharMap[_escapeChar] = "'0";
_escapeCharMap[_delimEnd] = "'1";
_escapeCharMap[_delimSet] = "'2";
_escapeCharMap[_delimNumValue] = "'3";
_minimum = 1;
}
private function _setInternal(_arg1:Number, _arg2:String, _arg3:Number, _arg4:String):void{
if (!hasProject(_arg1)){
_projectData[_arg1] = {};
};
if (_projectData[_arg1][_arg2] == undefined){
_projectData[_arg1][_arg2] = [];
};
_projectData[_arg1][_arg2][_arg3] = _arg4;
_hasData = (_hasData + 1);
}
private function _renderProject(_arg1:Object):String{
var _local4:int;
var _local5:Array;
var _local2 = "";
var _local3:Boolean;
var _local6:int = _set.length;
_local4 = 0;
while (_local4 < _local6) {
_local5 = _arg1[_set[_local4]];
if (_local5){
if (_local3){
_local2 = (_local2 + _set[_local4]);
};
_local2 = (_local2 + _renderDataType(_local5));
_local3 = false;
} else {
_local3 = true;
};
_local4++;
};
return (_local2);
}
public function hasProject(_arg1:Number):Boolean{
return (_projectData[_arg1]);
}
public function clearKey(_arg1:Number):void{
_clearInternal(_arg1, _key);
}
private function _renderDataType(_arg1:Array):String{
var _local3:String;
var _local4:int;
var _local2:Array = [];
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg1[_local4] != undefined){
_local3 = "";
if (((!((_local4 == _minimum))) && ((_arg1[(_local4 - 1)] == undefined)))){
_local3 = (_local3 + _local4.toString());
_local3 = (_local3 + _delimNumValue);
};
_local3 = (_local3 + _escapeExtensibleValue(_arg1[_local4]));
_local2.push(_local3);
};
_local4++;
};
return (((_delimBegin + _local2.join(_delimSet)) + _delimEnd));
}
public function getKey(_arg1:Number, _arg2:Number):String{
return ((_getInternal(_arg1, _key, _arg2) as String));
}
public function hasData():Boolean{
return ((_hasData > 0));
}
public function renderMergedUrlString(_arg1:X10=null):String{
var _local3:String;
if (!_arg1){
return (renderUrlString());
};
var _local2:Array = [_arg1.renderUrlString()];
for (_local3 in _projectData) {
if (((hasProject(Number(_local3))) && (!(_arg1.hasProject(Number(_local3)))))){
_local2.push((_local3 + _renderProject(_projectData[_local3])));
};
};
return (_local2.join(""));
}
public function setValue(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
if (((((!((Math.round(_arg3) == _arg3))) || (isNaN(_arg3)))) || ((_arg3 == Infinity)))){
return (false);
};
_setInternal(_arg1, _value, _arg2, _arg3.toString());
return (true);
}
public function renderUrlString():String{
var _local2:String;
var _local1:Array = [];
for (_local2 in _projectData) {
if (hasProject(Number(_local2))){
_local1.push((_local2 + _renderProject(_projectData[_local2])));
};
};
return (_local1.join(""));
}
private function _getInternal(_arg1:Number, _arg2:String, _arg3:Number):Object{
if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){
return (_projectData[_arg1][_arg2][_arg3]);
};
return (undefined);
}
public function setKey(_arg1:Number, _arg2:Number, _arg3:String):Boolean{
_setInternal(_arg1, _key, _arg2, _arg3);
return (true);
}
public function clearValue(_arg1:Number):void{
_clearInternal(_arg1, _value);
}
private function _clearInternal(_arg1:Number, _arg2:String):void{
var _local3:Boolean;
var _local4:int;
var _local5:int;
if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){
_projectData[_arg1][_arg2] = undefined;
_local3 = true;
_local5 = _set.length;
_local4 = 0;
while (_local4 < _local5) {
if (_projectData[_arg1][_set[_local4]] != undefined){
_local3 = false;
break;
};
_local4++;
};
if (_local3){
_projectData[_arg1] = undefined;
_hasData = (_hasData - 1);
};
};
}
public function getValue(_arg1:Number, _arg2:Number){
var _local3:* = _getInternal(_arg1, _value, _arg2);
if (_local3 == null){
return (null);
};
return (Number(_local3));
}
private function _escapeExtensibleValue(_arg1:String):String{
var _local3:int;
var _local4:String;
var _local5:String;
var _local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1.charAt(_local3);
_local5 = _escapeCharMap[_local4];
if (_local5){
_local2 = (_local2 + _local5);
} else {
_local2 = (_local2 + _local4);
};
_local3++;
};
return (_local2);
}
}
}//package com.google.analytics.data
Section 46
//_Style (com.google.analytics.debug._Style)
package com.google.analytics.debug {
import flash.text.*;
import flash.net.*;
public class _Style {
public var failureColor:uint;
public var borderColor:uint;
public var backgroundColor:uint;
private var _sheet:StyleSheet;
public var roundedCorner:uint;
public var warningColor:uint;
public var infoColor:uint;
public var alertColor:uint;
public var successColor:uint;
private var _loader:URLLoader;
private var _defaultSheet:String;
public function _Style(){
_sheet = new StyleSheet();
_loader = new URLLoader();
_init();
}
private function _parseSheet(_arg1:String):void{
_sheet.parseCSS(_arg1);
}
public function get sheet():StyleSheet{
return (_sheet);
}
private function _init():void{
_defaultSheet = "";
_defaultSheet = (_defaultSheet + "a{text-decoration: underline;}\n");
_defaultSheet = (_defaultSheet + ".uiLabel{color: #000000;font-family: Arial;font-size: 12;margin-left: 2;margin-right: 2;}\n");
_defaultSheet = (_defaultSheet + ".uiWarning{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlert{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiInfo{color: #000000;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiSuccess{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiFailure{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlertAction{color: #ffffff;text-align: center;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlertTitle{color: #ffffff;font-family: Arial;font-size: 16;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + "\n");
roundedCorner = 6;
backgroundColor = 0xCCCCCC;
borderColor = 0x555555;
infoColor = 16777113;
alertColor = 0xFFCC00;
warningColor = 0xCC0000;
successColor = 0xFF00;
failureColor = 0xFF0000;
_parseSheet(_defaultSheet);
}
}
}//package com.google.analytics.debug
Section 47
//Alert (com.google.analytics.debug.Alert)
package com.google.analytics.debug {
import flash.events.*;
public class Alert extends Label {
public var autoClose:Boolean;// = true
public var actionOnNextLine:Boolean;// = true
private var _actions:Array;
public function Alert(_arg1:String, _arg2:Array, _arg3:String="uiAlert", _arg4:uint=0, _arg5:Align=null, _arg6:Boolean=false, _arg7:Boolean=true){
if (_arg4 == 0){
_arg4 = Style.alertColor;
};
if (_arg5 == null){
_arg5 = Align.center;
};
super(_arg1, _arg3, _arg4, _arg5, _arg6);
this.selectable = true;
super.mouseChildren = true;
this.buttonMode = true;
this.mouseEnabled = true;
this.useHandCursor = true;
this.actionOnNextLine = _arg7;
_actions = [];
var _local8:int;
while (_local8 < _arg2.length) {
_arg2[_local8].container = this;
_actions.push(_arg2[_local8]);
_local8++;
};
}
private function _defineActions():void{
var _local3:AlertAction;
var _local1 = "";
if (actionOnNextLine){
_local1 = (_local1 + "\n");
} else {
_local1 = (_local1 + " |");
};
_local1 = (_local1 + " ");
var _local2:Array = [];
var _local4:int;
while (_local4 < _actions.length) {
_local3 = _actions[_local4];
_local2.push((((("<a href=\"event:" + _local3.activator) + "\">") + _local3.name) + "</a>"));
_local4++;
};
_local1 = (_local1 + _local2.join(" | "));
appendText(_local1, "uiAlertAction");
}
protected function isValidAction(_arg1:String):Boolean{
var _local2:int;
while (_local2 < _actions.length) {
if (_arg1 == _actions[_local2].activator){
return (true);
};
_local2++;
};
return (false);
}
override protected function layout():void{
super.layout();
_defineActions();
}
protected function getAction(_arg1:String):AlertAction{
var _local2:int;
while (_local2 < _actions.length) {
if (_arg1 == _actions[_local2].activator){
return (_actions[_local2]);
};
_local2++;
};
return (null);
}
protected function spaces(_arg1:int):String{
var _local2 = "";
var _local3 = " ";
var _local4:int;
while (_local4 < (_arg1 + 1)) {
_local2 = (_local2 + _local3);
_local4++;
};
return (_local2);
}
override public function onLink(_arg1:TextEvent):void{
var _local2:AlertAction;
if (isValidAction(_arg1.text)){
_local2 = getAction(_arg1.text);
if (_local2){
_local2.execute();
};
};
if (autoClose){
close();
};
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.google.analytics.debug
Section 48
//AlertAction (com.google.analytics.debug.AlertAction)
package com.google.analytics.debug {
public class AlertAction {
public var container:Alert;
private var _callback;
public var activator:String;
public var name:String;
public function AlertAction(_arg1:String, _arg2:String, _arg3){
this.name = _arg1;
this.activator = _arg2;
_callback = _arg3;
}
public function execute():void{
if (_callback){
if ((_callback is Function)){
(_callback as Function)();
} else {
if ((_callback is String)){
var _local1 = container;
_local1[_callback]();
};
};
};
}
}
}//package com.google.analytics.debug
Section 49
//Align (com.google.analytics.debug.Align)
package com.google.analytics.debug {
public class Align {
private var _value:int;
private var _name:String;
public static const bottomRight:Align = new Align(18, "bottomRight");
;
public static const right:Align = new Align(16, "right");
;
public static const left:Align = new Align(32, "left");
;
public static const topRight:Align = new Align(17, "topRight");
;
public static const bottom:Align = new Align(2, "bottom");
;
public static const bottomLeft:Align = new Align(34, "bottomLeft");
;
public static const topLeft:Align = new Align(33, "topLeft");
;
public static const center:Align = new Align(0x0100, "center");
;
public static const none:Align = new Align(0, "none");
;
public static const top:Align = new Align(1, "top");
;
public function Align(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.debug
Section 50
//Background (com.google.analytics.debug.Background)
package com.google.analytics.debug {
import flash.display.*;
public class Background {
public static function drawRounded(_arg1, _arg2:Graphics, _arg3:uint=0, _arg4:uint=0):void{
var _local5:uint;
var _local6:uint;
var _local7:uint = Style.roundedCorner;
if ((((_arg3 > 0)) && ((_arg4 > 0)))){
_local5 = _arg3;
_local6 = _arg4;
} else {
_local5 = _arg1.width;
_local6 = _arg1.height;
};
if (((_arg1.stickToEdge) && (!((_arg1.alignement == Align.none))))){
switch (_arg1.alignement){
case Align.top:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, _local7);
break;
case Align.topLeft:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, 0, _local7);
break;
case Align.topRight:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, 0);
break;
case Align.bottom:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, _local7, 0, 0);
break;
case Align.bottomLeft:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, 0);
break;
case Align.bottomRight:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, 0, 0);
break;
case Align.left:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, _local7);
break;
case Align.right:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, _local7, 0);
break;
case Align.center:
_arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7);
break;
};
} else {
_arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7);
};
}
}
}//package com.google.analytics.debug
Section 51
//Debug (com.google.analytics.debug.Debug)
package com.google.analytics.debug {
import flash.events.*;
import flash.ui.*;
public class Debug extends Label {
private var _lines:Array;
private var _preferredForcedWidth:uint;// = 540
private var _linediff:int;// = 0
public var maxLines:uint;// = 16
public static var count:uint;
public function Debug(_arg1:uint=0, _arg2:Align=null, _arg3:Boolean=false){
if (_arg2 == null){
_arg2 = Align.bottom;
};
super("", "uiLabel", _arg1, _arg2, _arg3);
this.name = ("Debug" + count++);
_lines = [];
selectable = true;
addEventListener(KeyboardEvent.KEY_DOWN, onKey);
}
public function writeBold(_arg1:String):void{
write(_arg1, true);
}
private function _getLinesToDisplay(_arg1:int=0):Array{
var _local2:Array;
var _local3:uint;
var _local4:uint;
if ((_lines.length - 1) > maxLines){
if ((_linediff <= 0)){
_linediff = (_linediff + _arg1);
} else {
if ((((_linediff > 0)) && ((_arg1 < 0)))){
_linediff = (_linediff + _arg1);
};
};
_local3 = ((_lines.length - maxLines) + _linediff);
_local4 = (_local3 + maxLines);
_local2 = _lines.slice(_local3, _local4);
} else {
_local2 = _lines;
};
return (_local2);
}
private function onKey(_arg1:KeyboardEvent=null):void{
var _local2:Array;
switch (_arg1.keyCode){
case Keyboard.DOWN:
_local2 = _getLinesToDisplay(1);
break;
case Keyboard.UP:
_local2 = _getLinesToDisplay(-1);
break;
default:
_local2 = null;
};
if (_local2 == null){
return;
};
text = _local2.join("\n");
}
override public function get forcedWidth():uint{
if (this.parent){
if (UISprite(this.parent).forcedWidth > _preferredForcedWidth){
return (_preferredForcedWidth);
};
return (UISprite(this.parent).forcedWidth);
//unresolved jump
};
return (super.forcedWidth);
}
public function write(_arg1:String, _arg2:Boolean=false):void{
var _local3:Array;
if (_arg1.indexOf("") > -1){
_local3 = _arg1.split("\n");
} else {
_local3 = [_arg1];
};
var _local4 = "";
var _local5 = "";
if (_arg2){
_local4 = "<b>";
_local5 = "</b>";
};
var _local6:int;
while (_local6 < _local3.length) {
_lines.push(((_local4 + _local3[_local6]) + _local5));
_local6++;
};
var _local7:Array = _getLinesToDisplay();
text = _local7.join("\n");
}
public function close():void{
dispose();
}
override protected function dispose():void{
removeEventListener(KeyboardEvent.KEY_DOWN, onKey);
super.dispose();
}
}
}//package com.google.analytics.debug
Section 52
//DebugConfiguration (com.google.analytics.debug.DebugConfiguration)
package com.google.analytics.debug {
import flash.net.*;
import flash.utils.*;
import com.google.analytics.core.*;
public class DebugConfiguration {
public var showHideKey:Number;// = 32
private var _mode:VisualDebugMode;
private var _verbose:Boolean;// = false
public var destroyKey:Number;// = 8
public var GIFRequests:Boolean;// = false
public var showInfos:Boolean;// = true
public var infoTimeout:Number;// = 1000
public var minimizedOnStart:Boolean;// = false
private var _active:Boolean;// = false
public var traceOutput:Boolean;// = false
public var layout:ILayout;
public var warningTimeout:Number;// = 1500
public var javascript:Boolean;// = false
public var showWarnings:Boolean;// = true
private var _visualInitialized:Boolean;// = false
public function DebugConfiguration(){
_mode = VisualDebugMode.basic;
super();
}
public function get verbose():Boolean{
return (_verbose);
}
public function set verbose(_arg1:Boolean):void{
_verbose = _arg1;
}
public function set mode(_arg1):void{
if ((_arg1 is String)){
switch (_arg1){
case "geek":
_arg1 = VisualDebugMode.geek;
break;
case "advanced":
_arg1 = VisualDebugMode.advanced;
break;
case "basic":
default:
_arg1 = VisualDebugMode.basic;
};
};
_mode = _arg1;
}
public function success(_arg1:String):void{
if (layout){
layout.createSuccessAlert(_arg1);
};
if (traceOutput){
trace((("[+] " + _arg1) + " !!"));
};
}
public function get active():Boolean{
return (_active);
}
private function _initializeVisual():void{
if (layout){
layout.init();
_visualInitialized = true;
};
}
private function _destroyVisual():void{
if (((layout) && (_visualInitialized))){
layout.destroy();
};
}
public function warning(_arg1:String, _arg2:VisualDebugMode=null):void{
if (_filter(_arg2)){
return;
};
if (((layout) && (showWarnings))){
layout.createWarning(_arg1);
};
if (traceOutput){
trace((("## " + _arg1) + " ##"));
};
}
private function _filter(_arg1:VisualDebugMode=null):Boolean{
return (((_arg1) && ((int(_arg1) >= int(this.mode)))));
}
public function failure(_arg1:String):void{
if (layout){
layout.createFailureAlert(_arg1);
};
if (traceOutput){
trace((("[-] " + _arg1) + " !!"));
};
}
public function get mode(){
return (_mode);
}
public function set active(_arg1:Boolean):void{
_active = _arg1;
if (_active){
_initializeVisual();
} else {
_destroyVisual();
};
}
protected function trace(_arg1:String):void{
var _local7:Array;
var _local8:int;
var _local2:Array = [];
var _local3 = "";
var _local4 = "";
if (this.mode == VisualDebugMode.geek){
_local3 = (getTimer() + " - ");
_local4 = (new Array(_local3.length).join(" ") + " ");
};
if (_arg1.indexOf("\n") > -1){
_local7 = _arg1.split("\n");
_local8 = 0;
while (_local8 < _local7.length) {
if (_local7[_local8] == ""){
} else {
if (_local8 == 0){
_local2.push((_local3 + _local7[_local8]));
} else {
_local2.push((_local4 + _local7[_local8]));
};
};
_local8++;
};
} else {
_local2.push((_local3 + _arg1));
};
var _local5:int = _local2.length;
var _local6:int;
while (_local6 < _local5) {
trace(_local2[_local6]);
_local6++;
};
}
public function alert(_arg1:String):void{
if (layout){
layout.createAlert(_arg1);
};
if (traceOutput){
trace((("!! " + _arg1) + " !!"));
};
}
public function info(_arg1:String, _arg2:VisualDebugMode=null):void{
if (_filter(_arg2)){
return;
};
if (((layout) && (showInfos))){
layout.createInfo(_arg1);
};
if (traceOutput){
trace(_arg1);
};
}
public function alertGifRequest(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void{
if (layout){
layout.createGIFRequestAlert(_arg1, _arg2, _arg3);
};
if (traceOutput){
trace(((">> " + _arg1) + " <<"));
};
}
}
}//package com.google.analytics.debug
Section 53
//FailureAlert (com.google.analytics.debug.FailureAlert)
package com.google.analytics.debug {
public class FailureAlert extends Alert {
public function FailureAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){
var _local4:Align = Align.bottomLeft;
var _local5:Boolean;
var _local6:Boolean;
if (_arg1.verbose){
_arg2 = ((("<u><span class=\"uiAlertTitle\">Failure</span>" + spaces(18)) + "</u>\n\n") + _arg2);
_local4 = Align.center;
_local5 = false;
_local6 = true;
};
super(_arg2, _arg3, "uiFailure", Style.failureColor, _local4, _local5, _local6);
}
}
}//package com.google.analytics.debug
Section 54
//GIFRequestAlert (com.google.analytics.debug.GIFRequestAlert)
package com.google.analytics.debug {
public class GIFRequestAlert extends Alert {
public function GIFRequestAlert(_arg1:String, _arg2:Array){
super(_arg1, _arg2);
}
}
}//package com.google.analytics.debug
Section 55
//ILayout (com.google.analytics.debug.ILayout)
package com.google.analytics.debug {
import flash.display.*;
import flash.net.*;
import com.google.analytics.core.*;
public interface ILayout {
function createAlert(_arg1:String):void;
function addToStage(_arg1:DisplayObject):void;
function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void;
function createWarning(_arg1:String):void;
function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void;
function createInfo(_arg1:String):void;
function createFailureAlert(_arg1:String):void;
function addToPanel(_arg1:String, _arg2:DisplayObject):void;
function init():void;
function createSuccessAlert(_arg1:String):void;
function createVisualDebug():void;
function destroy():void;
function bringToFront(_arg1:DisplayObject):void;
function isAvailable():Boolean;
}
}//package com.google.analytics.debug
Section 56
//Info (com.google.analytics.debug.Info)
package com.google.analytics.debug {
import flash.events.*;
import flash.utils.*;
public class Info extends Label {
private var _timer:Timer;
public function Info(_arg1:String="", _arg2:uint=3000){
super(_arg1, "uiInfo", Style.infoColor, Align.top, true);
if (_arg2 > 0){
_timer = new Timer(_arg2, 1);
_timer.start();
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true);
};
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
override public function onLink(_arg1:TextEvent):void{
switch (_arg1.text){
case "hide":
close();
break;
};
}
public function onComplete(_arg1:TimerEvent):void{
close();
}
}
}//package com.google.analytics.debug
Section 57
//Label (com.google.analytics.debug.Label)
package com.google.analytics.debug {
import flash.display.*;
import flash.text.*;
import flash.events.*;
public class Label extends UISprite {
private var _color:uint;
private var _background:Shape;
private var _textField:TextField;
public var stickToEdge:Boolean;
private var _text:String;
protected var selectable:Boolean;
private var _tag:String;
public static var count:uint = 0;
public function Label(_arg1:String="", _arg2:String="uiLabel", _arg3:uint=0, _arg4:Align=null, _arg5:Boolean=false){
this.name = ("Label" + count++);
selectable = false;
_background = new Shape();
_textField = new TextField();
_text = _arg1;
_tag = _arg2;
if (_arg4 == null){
_arg4 = Align.none;
};
this.alignement = _arg4;
this.stickToEdge = _arg5;
if (_arg3 == 0){
_arg3 = Style.backgroundColor;
};
_color = _arg3;
_textField.addEventListener(TextEvent.LINK, onLink);
}
public function get tag():String{
return (_tag);
}
private function _draw():void{
var _local1:Graphics = _background.graphics;
_local1.clear();
_local1.beginFill(_color);
var _local2:uint = _textField.width;
var _local3:uint = _textField.height;
if (forcedWidth > 0){
_local2 = forcedWidth;
};
Background.drawRounded(this, _local1, _local2, _local3);
_local1.endFill();
}
public function get text():String{
return (_textField.text);
}
public function appendText(_arg1:String, _arg2:String=""):void{
if (_arg1 == ""){
return;
};
if (_arg2 == ""){
_arg2 = tag;
};
_textField.htmlText = (_textField.htmlText + (((("<span class=\"" + _arg2) + "\">") + _arg1) + "</span>"));
_text = (_text + _arg1);
_draw();
resize();
}
public function set text(_arg1:String):void{
if (_arg1 == ""){
_arg1 = _text;
};
_textField.htmlText = (((("<span class=\"" + tag) + "\">") + _arg1) + "</span>");
_text = _arg1;
_draw();
resize();
}
override protected function layout():void{
_textField.type = TextFieldType.DYNAMIC;
_textField.autoSize = TextFieldAutoSize.LEFT;
_textField.background = false;
_textField.selectable = selectable;
_textField.multiline = true;
_textField.styleSheet = Style.sheet;
this.text = _text;
addChild(_background);
addChild(_textField);
}
public function set tag(_arg1:String):void{
_tag = _arg1;
text = "";
}
public function onLink(_arg1:TextEvent):void{
}
override protected function dispose():void{
_textField.removeEventListener(TextEvent.LINK, onLink);
super.dispose();
}
}
}//package com.google.analytics.debug
Section 58
//Layout (com.google.analytics.debug.Layout)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.google.analytics.core.*;
import com.google.analytics.*;
public class Layout implements ILayout {
private var _display:DisplayObject;
private var _infoQueue:Array;
private var _maxCharPerLine:int;// = 85
private var _hasInfo:Boolean;
private var _warningQueue:Array;
private var _hasDebug:Boolean;
private var _hasWarning:Boolean;
private var _mainPanel:Panel;
private var _GRAlertQueue:Array;
private var _debug:DebugConfiguration;
public var visualDebug:Debug;
private var _hasGRAlert:Boolean;
public function Layout(_arg1:DebugConfiguration, _arg2:DisplayObject){
_display = _arg2;
_debug = _arg1;
_hasWarning = false;
_hasInfo = false;
_hasDebug = false;
_hasGRAlert = false;
_warningQueue = [];
_infoQueue = [];
_GRAlertQueue = [];
}
private function onKey(_arg1:KeyboardEvent=null):void{
switch (_arg1.keyCode){
case _debug.showHideKey:
_mainPanel.visible = !(_mainPanel.visible);
break;
case _debug.destroyKey:
destroy();
break;
};
}
public function createWarning(_arg1:String):void{
if (((_hasWarning) || (!(isAvailable())))){
_warningQueue.push(_arg1);
return;
};
_arg1 = _filterMaxChars(_arg1);
_hasWarning = true;
var _local2:Warning = new Warning(_arg1, _debug.warningTimeout);
addToPanel("analytics", _local2);
_local2.addEventListener(Event.REMOVED_FROM_STAGE, _clearWarning, false, 0, true);
if (_hasDebug){
visualDebug.writeBold(_arg1);
};
}
public function bringToFront(_arg1:DisplayObject):void{
_display.stage.setChildIndex(_arg1, (_display.stage.numChildren - 1));
}
public function createFailureAlert(_arg1:String):void{
var _local2:AlertAction;
if (_debug.verbose){
_arg1 = _filterMaxChars(_arg1);
_local2 = new AlertAction("Close", "close", "close");
} else {
_local2 = new AlertAction("X", "close", "close");
};
var _local3:Alert = new FailureAlert(_debug, _arg1, [_local2]);
addToPanel("analytics", _local3);
if (_hasDebug){
if (_debug.verbose){
_arg1 = _arg1.split("\n").join("");
_arg1 = _filterMaxChars(_arg1, 66);
};
visualDebug.writeBold(_arg1);
};
}
public function init():void{
var _local1 = 10;
var _local2:uint = (_display.stage.stageWidth - (_local1 * 2));
var _local3:uint = (_display.stage.stageHeight - (_local1 * 2));
var _local4:Panel = new Panel("analytics", _local2, _local3);
_local4.alignement = Align.top;
_local4.stickToEdge = false;
_local4.title = ("Google Analytics v" + GATracker.version);
_mainPanel = _local4;
addToStage(_local4);
bringToFront(_local4);
if (_debug.minimizedOnStart){
_mainPanel.onToggle();
};
createVisualDebug();
_display.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey, false, 0, true);
}
public function addToPanel(_arg1:String, _arg2:DisplayObject):void{
var _local4:Panel;
var _local3:DisplayObject = _display.stage.getChildByName(_arg1);
if (_local3){
_local4 = (_local3 as Panel);
_local4.addData(_arg2);
} else {
trace((("panel \"" + _arg1) + "\" not found"));
};
}
private function _clearInfo(_arg1:Event):void{
_hasInfo = false;
if (_infoQueue.length > 0){
createInfo(_infoQueue.shift());
};
}
private function _filterMaxChars(_arg1:String, _arg2:int=0):String{
var _local6:String;
var _local3 = "\n";
var _local4:Array = [];
var _local5:Array = _arg1.split(_local3);
if (_arg2 == 0){
_arg2 = _maxCharPerLine;
};
var _local7:int;
while (_local7 < _local5.length) {
_local6 = _local5[_local7];
while (_local6.length > _arg2) {
_local4.push(_local6.substr(0, _arg2));
_local6 = _local6.substring(_arg2);
};
_local4.push(_local6);
_local7++;
};
return (_local4.join(_local3));
}
private function _clearGRAlert(_arg1:Event):void{
_hasGRAlert = false;
if (_GRAlertQueue.length > 0){
createGIFRequestAlert.apply(this, _GRAlertQueue.shift());
};
}
public function createSuccessAlert(_arg1:String):void{
var _local2:AlertAction;
if (_debug.verbose){
_arg1 = _filterMaxChars(_arg1);
_local2 = new AlertAction("Close", "close", "close");
} else {
_local2 = new AlertAction("X", "close", "close");
};
var _local3:Alert = new SuccessAlert(_debug, _arg1, [_local2]);
addToPanel("analytics", _local3);
if (_hasDebug){
if (_debug.verbose){
_arg1 = _arg1.split("\n").join("");
_arg1 = _filterMaxChars(_arg1, 66);
};
visualDebug.writeBold(_arg1);
};
}
public function isAvailable():Boolean{
return (!((_display.stage == null)));
}
public function createAlert(_arg1:String):void{
_arg1 = _filterMaxChars(_arg1);
var _local2:Alert = new Alert(_arg1, [new AlertAction("Close", "close", "close")]);
addToPanel("analytics", _local2);
if (_hasDebug){
visualDebug.writeBold(_arg1);
};
}
public function createInfo(_arg1:String):void{
if (((_hasInfo) || (!(isAvailable())))){
_infoQueue.push(_arg1);
return;
};
_arg1 = _filterMaxChars(_arg1);
_hasInfo = true;
var _local2:Info = new Info(_arg1, _debug.infoTimeout);
addToPanel("analytics", _local2);
_local2.addEventListener(Event.REMOVED_FROM_STAGE, _clearInfo, false, 0, true);
if (_hasDebug){
visualDebug.write(_arg1);
};
}
public function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void{
var message = _arg1;
var request = _arg2;
var ref = _arg3;
if (_hasGRAlert){
_GRAlertQueue.push([message, request, ref]);
return;
};
_hasGRAlert = true;
var f:Function = function ():void{
ref.sendRequest(request);
};
message = _filterMaxChars(message);
var gra:GIFRequestAlert = new GIFRequestAlert(message, [new AlertAction("OK", "ok", f), new AlertAction("Cancel", "cancel", "close")]);
addToPanel("analytics", gra);
gra.addEventListener(Event.REMOVED_FROM_STAGE, _clearGRAlert, false, 0, true);
if (_hasDebug){
if (_debug.verbose){
message = message.split("\n").join("");
message = _filterMaxChars(message, 66);
};
visualDebug.write(message);
};
}
public function createVisualDebug():void{
if (!visualDebug){
visualDebug = new Debug();
visualDebug.alignement = Align.bottom;
visualDebug.stickToEdge = true;
addToPanel("analytics", visualDebug);
_hasDebug = true;
};
}
public function addToStage(_arg1:DisplayObject):void{
_display.stage.addChild(_arg1);
}
private function _clearWarning(_arg1:Event):void{
_hasWarning = false;
if (_warningQueue.length > 0){
createWarning(_warningQueue.shift());
};
}
public function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void{
var _local4:Panel = new Panel(_arg1, _arg2, _arg3);
_local4.alignement = Align.center;
_local4.stickToEdge = false;
addToStage(_local4);
bringToFront(_local4);
}
public function destroy():void{
_mainPanel.close();
_debug.layout = null;
}
}
}//package com.google.analytics.debug
Section 59
//Margin (com.google.analytics.debug.Margin)
package com.google.analytics.debug {
public class Margin {
public var top:int;
public var left:int;
public var bottom:int;
public var right:int;
public function Margin(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0){
this.top = _arg1;
this.bottom = _arg2;
this.left = _arg3;
this.right = _arg4;
}
}
}//package com.google.analytics.debug
Section 60
//Panel (com.google.analytics.debug.Panel)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
public class Panel extends UISprite {
private var _savedH:uint;
private var _data:UISprite;
private var _mask:Sprite;
private var _background:Shape;
private var _savedW:uint;
private var _stickToEdge:Boolean;
private var _border:Shape;
private var _borderColor:uint;
protected var baseAlpha:Number;
private var _backgroundColor:uint;
private var _title:Label;
private var _colapsed:Boolean;
private var _name:String;
public function Panel(_arg1:String, _arg2:uint, _arg3:uint, _arg4:uint=0, _arg5:uint=0, _arg6:Number=0.3, _arg7:Align=null, _arg8:Boolean=false){
_name = _arg1;
this.name = _arg1;
this.mouseEnabled = false;
_colapsed = false;
forcedWidth = _arg2;
forcedHeight = _arg3;
this.baseAlpha = _arg6;
_background = new Shape();
_data = new UISprite();
_data.forcedWidth = _arg2;
_data.forcedHeight = _arg3;
_data.mouseEnabled = false;
_title = new Label(_arg1, "uiLabel", 0xFFFFFF, Align.topLeft, _arg8);
_title.buttonMode = true;
_title.margin.top = 0.6;
_title.margin.left = 0.6;
_title.addEventListener(MouseEvent.CLICK, onToggle);
_title.mouseChildren = false;
_border = new Shape();
_mask = new Sprite();
_mask.useHandCursor = false;
_mask.mouseEnabled = false;
_mask.mouseChildren = false;
if (_arg7 == null){
_arg7 = Align.none;
};
this.alignement = _arg7;
this.stickToEdge = _arg8;
if (_arg4 == 0){
_arg4 = Style.backgroundColor;
};
_backgroundColor = _arg4;
if (_arg5 == 0){
_arg5 = Style.borderColor;
};
_borderColor = _arg5;
}
public function get stickToEdge():Boolean{
return (_stickToEdge);
}
public function onToggle(_arg1:MouseEvent=null):void{
if (_colapsed){
_data.visible = true;
} else {
_data.visible = false;
};
_colapsed = !(_colapsed);
_update();
resize();
}
public function set stickToEdge(_arg1:Boolean):void{
_stickToEdge = _arg1;
_title.stickToEdge = _arg1;
}
override protected function dispose():void{
_title.removeEventListener(MouseEvent.CLICK, onToggle);
super.dispose();
}
private function _draw():void{
var _local1:uint;
var _local2:uint;
if (((_savedW) && (_savedH))){
forcedWidth = _savedW;
forcedHeight = _savedH;
};
if (!_colapsed){
_local1 = forcedWidth;
_local2 = forcedHeight;
} else {
_local1 = _title.width;
_local2 = _title.height;
_savedW = forcedWidth;
_savedH = forcedHeight;
forcedWidth = _local1;
forcedHeight = _local2;
};
var _local3:Graphics = _background.graphics;
_local3.clear();
_local3.beginFill(_backgroundColor);
Background.drawRounded(this, _local3, _local1, _local2);
_local3.endFill();
var _local4:Graphics = _data.graphics;
_local4.clear();
_local4.beginFill(_backgroundColor, 0);
Background.drawRounded(this, _local4, _local1, _local2);
_local4.endFill();
var _local5:Graphics = _border.graphics;
_local5.clear();
_local5.lineStyle(0.1, _borderColor);
Background.drawRounded(this, _local5, _local1, _local2);
_local5.endFill();
var _local6:Graphics = _mask.graphics;
_local6.clear();
_local6.beginFill(_backgroundColor);
Background.drawRounded(this, _local6, (_local1 + 1), (_local2 + 1));
_local6.endFill();
}
public function get title():String{
return (_title.text);
}
private function _update():void{
_draw();
if (baseAlpha < 1){
_background.alpha = baseAlpha;
_border.alpha = baseAlpha;
};
}
public function addData(_arg1:DisplayObject):void{
_data.addChild(_arg1);
}
override protected function layout():void{
_update();
addChild(_background);
addChild(_data);
addChild(_title);
addChild(_border);
addChild(_mask);
mask = _mask;
}
public function set title(_arg1:String):void{
_title.text = _arg1;
}
public function close():void{
dispose();
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.google.analytics.debug
Section 61
//Style (com.google.analytics.debug.Style)
package com.google.analytics.debug {
public const Style:_Style = new _Style();
}//package com.google.analytics.debug
Section 62
//SuccessAlert (com.google.analytics.debug.SuccessAlert)
package com.google.analytics.debug {
public class SuccessAlert extends Alert {
public function SuccessAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){
var _local4:Align = Align.bottomLeft;
var _local5:Boolean;
var _local6:Boolean;
if (_arg1.verbose){
_arg2 = ((("<u><span class=\"uiAlertTitle\">Success</span>" + spaces(18)) + "</u>\n\n") + _arg2);
_local4 = Align.center;
_local5 = false;
_local6 = true;
};
super(_arg2, _arg3, "uiSuccess", Style.successColor, _local4, _local5, _local6);
}
}
}//package com.google.analytics.debug
Section 63
//UISprite (com.google.analytics.debug.UISprite)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
public class UISprite extends Sprite {
private var _forcedWidth:uint;
public var margin:Margin;
protected var alignTarget:DisplayObject;
protected var listenResize:Boolean;
public var alignement:Align;
private var _forcedHeight:uint;
public function UISprite(_arg1:DisplayObject=null){
listenResize = false;
alignement = Align.none;
this.alignTarget = _arg1;
margin = new Margin();
addEventListener(Event.ADDED_TO_STAGE, _onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage);
}
public function get forcedHeight():uint{
if (_forcedHeight){
return (_forcedHeight);
};
return (height);
}
private function _onAddedToStage(_arg1:Event):void{
layout();
resize();
}
protected function dispose():void{
var _local1:DisplayObject;
var _local2:int;
while (_local2 < numChildren) {
_local1 = getChildAt(_local2);
if (_local1){
removeChild(_local1);
};
_local2++;
};
}
public function set forcedHeight(_arg1:uint):void{
_forcedHeight = _arg1;
}
public function set forcedWidth(_arg1:uint):void{
_forcedWidth = _arg1;
}
protected function layout():void{
}
public function get forcedWidth():uint{
if (_forcedWidth){
return (_forcedWidth);
};
return (width);
}
public function alignTo(_arg1:Align, _arg2:DisplayObject=null):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:UISprite;
if (_arg2 == null){
if ((parent is Stage)){
_arg2 = this.stage;
} else {
_arg2 = parent;
};
};
if (_arg2 == this.stage){
if (this.stage == null){
return;
};
_local3 = this.stage.stageHeight;
_local4 = this.stage.stageWidth;
_local5 = 0;
_local6 = 0;
} else {
_local7 = (_arg2 as UISprite);
if (_local7.forcedHeight){
_local3 = _local7.forcedHeight;
} else {
_local3 = _local7.height;
};
if (_local7.forcedWidth){
_local4 = _local7.forcedWidth;
} else {
_local4 = _local7.width;
};
_local5 = 0;
_local6 = 0;
};
switch (_arg1){
case Align.top:
x = ((_local4 / 2) - (forcedWidth / 2));
y = (_local6 + margin.top);
break;
case Align.bottom:
x = ((_local4 / 2) - (forcedWidth / 2));
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
case Align.left:
x = (_local5 + margin.left);
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.right:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.center:
x = ((_local4 / 2) - (forcedWidth / 2));
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.topLeft:
x = (_local5 + margin.left);
y = (_local6 + margin.top);
break;
case Align.topRight:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = (_local6 + margin.top);
break;
case Align.bottomLeft:
x = (_local5 + margin.left);
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
case Align.bottomRight:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
};
if (((!(listenResize)) && (!((_arg1 == Align.none))))){
_arg2.addEventListener(Event.RESIZE, onResize, false, 0, true);
listenResize = true;
};
this.alignement = _arg1;
this.alignTarget = _arg2;
}
private function _onRemovedFromStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _onAddedToStage);
removeEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage);
dispose();
}
public function resize():void{
if (alignement != Align.none){
alignTo(alignement, alignTarget);
};
}
protected function onResize(_arg1:Event):void{
resize();
}
}
}//package com.google.analytics.debug
Section 64
//Warning (com.google.analytics.debug.Warning)
package com.google.analytics.debug {
import flash.events.*;
import flash.utils.*;
public class Warning extends Label {
private var _timer:Timer;
public function Warning(_arg1:String="", _arg2:uint=3000){
super(_arg1, "uiWarning", Style.warningColor, Align.top, false);
margin.top = 32;
if (_arg2 > 0){
_timer = new Timer(_arg2, 1);
_timer.start();
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true);
};
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
override public function onLink(_arg1:TextEvent):void{
switch (_arg1.text){
case "hide":
close();
break;
};
}
public function onComplete(_arg1:TimerEvent):void{
close();
}
}
}//package com.google.analytics.debug
Section 65
//VisualDebugMode (com.google.analytics.debug.VisualDebugMode)
package com.google.analytics.debug {
public class VisualDebugMode {
private var _value:int;
private var _name:String;
public static const advanced:VisualDebugMode = new VisualDebugMode(1, "advanced");
;
public static const geek:VisualDebugMode = new VisualDebugMode(2, "geek");
;
public static const basic:VisualDebugMode = new VisualDebugMode(0, "basic");
;
public function VisualDebugMode(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.debug
Section 66
//Item (com.google.analytics.ecommerce.Item)
package com.google.analytics.ecommerce {
import com.google.analytics.utils.*;
public class Item {
private var _price:String;
private var _id:String;
private var _sku:String;
private var _category:String;
private var _quantity:String;
private var _name:String;
public function Item(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String){
this._id = _arg1;
this._sku = _arg2;
this._name = _arg3;
this._category = _arg4;
this._price = _arg5;
this._quantity = _arg6;
}
public function set sku(_arg1:String):void{
_sku = _arg1;
}
public function get price():String{
return (_price);
}
public function get name():String{
return (_name);
}
public function get quantity():String{
return (_quantity);
}
public function set name(_arg1:String):void{
_name = _arg1;
}
public function set price(_arg1:String):void{
_price = _arg1;
}
public function get id():String{
return (_id);
}
public function get sku():String{
return (_sku);
}
public function set quantity(_arg1:String):void{
_quantity = _arg1;
}
public function toGifParams():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
_local1.post = ["utmt", "utmtid", "utmipc", "utmipn", "utmiva", "utmipr", "utmiqt"];
_local1.utmt = "item";
_local1.utmtid = _id;
_local1.utmipc = _sku;
_local1.utmipn = _name;
_local1.utmiva = _category;
_local1.utmipr = _price;
_local1.utmiqt = _quantity;
return (_local1);
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function set category(_arg1:String):void{
_category = _arg1;
}
public function get category():String{
return (_category);
}
}
}//package com.google.analytics.ecommerce
Section 67
//Transaction (com.google.analytics.ecommerce.Transaction)
package com.google.analytics.ecommerce {
import com.google.analytics.utils.*;
public class Transaction {
private var _items:Array;
private var _total:String;
private var _vars:Variables;
private var _shipping:String;
private var _city:String;
private var _state:String;
private var _country:String;
private var _tax:String;
private var _affiliation:String;
private var _id:String;
public function Transaction(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String, _arg7:String, _arg8:String){
this._id = _arg1;
this._affiliation = _arg2;
this._total = _arg3;
this._tax = _arg4;
this._shipping = _arg5;
this._city = _arg6;
this._state = _arg7;
this._country = _arg8;
_items = new Array();
}
public function get total():String{
return (_total);
}
public function getItemFromArray(_arg1:Number):Item{
return (_items[_arg1]);
}
public function set total(_arg1:String):void{
_total = _arg1;
}
public function getItem(_arg1:String):Item{
var _local2:Number;
_local2 = 0;
while (_local2 < _items.length) {
if (_items[_local2].sku == _arg1){
return (_items[_local2]);
};
_local2++;
};
return (null);
}
public function getItemsLength():Number{
return (_items.length);
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{
var _local6:Item;
_local6 = getItem(_arg1);
if (_local6 == null){
_local6 = new Item(_id, _arg1, _arg2, _arg3, _arg4, _arg5);
_items.push(_local6);
} else {
_local6.name = _arg2;
_local6.category = _arg3;
_local6.price = _arg4;
_local6.quantity = _arg5;
};
}
public function set shipping(_arg1:String):void{
_shipping = _arg1;
}
public function get country():String{
return (_country);
}
public function get state():String{
return (_state);
}
public function set tax(_arg1:String):void{
_tax = _arg1;
}
public function set affiliation(_arg1:String):void{
_affiliation = _arg1;
}
public function set state(_arg1:String):void{
_state = _arg1;
}
public function get id():String{
return (_id);
}
public function get tax():String{
return (_tax);
}
public function toGifParams():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
_local1.utmt = "tran";
_local1.utmtid = id;
_local1.utmtst = affiliation;
_local1.utmtto = total;
_local1.utmttx = tax;
_local1.utmtsp = shipping;
_local1.utmtci = city;
_local1.utmtrg = state;
_local1.utmtco = country;
_local1.post = ["utmtid", "utmtst", "utmtto", "utmttx", "utmtsp", "utmtci", "utmtrg", "utmtco"];
return (_local1);
}
public function get affiliation():String{
return (_affiliation);
}
public function get city():String{
return (_city);
}
public function get shipping():String{
return (_shipping);
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function set city(_arg1:String):void{
_city = _arg1;
}
public function set country(_arg1:String):void{
_country = _arg1;
}
}
}//package com.google.analytics.ecommerce
Section 68
//AnalyticsEvent (com.google.analytics.events.AnalyticsEvent)
package com.google.analytics.events {
import flash.events.*;
import com.google.analytics.*;
public class AnalyticsEvent extends Event {
public var tracker:AnalyticsTracker;
public static const READY:String = "ready";
public function AnalyticsEvent(_arg1:String, _arg2:AnalyticsTracker, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.tracker = _arg2;
}
override public function clone():Event{
return (new AnalyticsEvent(type, tracker, bubbles, cancelable));
}
}
}//package com.google.analytics.events
Section 69
//AdSenseGlobals (com.google.analytics.external.AdSenseGlobals)
package com.google.analytics.external {
import com.google.analytics.debug.*;
public class AdSenseGlobals extends JavascriptProxy {
private var _gaGlobalVerified:Boolean;// = false
public static var gaGlobal_js:XML = <script>
<![CDATA[
function()
{
try
{
gaGlobal
}
catch(e)
{
gaGlobal = {} ;
}
}
]]>
</script>
;
public function AdSenseGlobals(_arg1:DebugConfiguration){
super(_arg1);
}
public function set vid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.vid", _arg1);
}
public function get hid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.hid"));
}
public function set hid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.hid", _arg1);
}
public function get dh():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.dh"));
}
public function get sid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.sid"));
}
public function get vid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.vid"));
}
private function _verify():void{
if (!_gaGlobalVerified){
executeBlock(gaGlobal_js);
_gaGlobalVerified = true;
};
}
public function set sid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.sid", _arg1);
}
public function get gaGlobal():Object{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal"));
}
}
}//package com.google.analytics.external
Section 70
//HTMLDOM (com.google.analytics.external.HTMLDOM)
package com.google.analytics.external {
import com.google.analytics.debug.*;
public class HTMLDOM extends JavascriptProxy {
private var _referrer:String;
private var _language:String;
private var _host:String;
private var _pathname:String;
private var _location:String;
private var _search:String;
private var _characterSet:String;
private var _title:String;
private var _protocol:String;
private var _colorDepth:String;
public static var cache_properties_js:XML = <script>
<![CDATA[
function()
{
var obj = {};
obj.host = document.location.host;
obj.language = navigator.language ? navigator.language : navigator.browserLanguage;
obj.characterSet = document.characterSet ? document.characterSet : document.charset;
obj.colorDepth = window.screen.colorDepth;
obj.location = document.location.toString();
obj.pathname = document.location.pathname;
obj.protocol = document.location.protocol;
obj.search = document.location.search;
obj.referrer = document.referrer;
obj.title = document.title;
return obj;
}
]]>
</script>
;
public function HTMLDOM(_arg1:DebugConfiguration){
super(_arg1);
}
public function get search():String{
if (_search){
return (_search);
};
if (!isAvailable()){
return (null);
};
_search = getProperty("document.location.search");
return (_search);
}
public function get location():String{
if (_location){
return (_location);
};
if (!isAvailable()){
return (null);
};
_location = getPropertyString("document.location");
return (_location);
}
public function get pathname():String{
if (_pathname){
return (_pathname);
};
if (!isAvailable()){
return (null);
};
_pathname = getProperty("document.location.pathname");
return (_pathname);
}
public function cacheProperties():void{
if (!isAvailable()){
return;
};
var _local1:Object = call(cache_properties_js);
if (_local1){
_host = _local1.host;
_language = _local1.language;
_characterSet = _local1.characterSet;
_colorDepth = _local1.colorDepth;
_location = _local1.location;
_pathname = _local1.pathname;
_protocol = _local1.protocol;
_search = _local1.search;
_referrer = _local1.referrer;
_title = _local1.title;
};
}
public function get language():String{
if (_language){
return (_language);
};
if (!isAvailable()){
return (null);
};
var _local1:String = getProperty("navigator.language");
if (_local1 == null){
_local1 = getProperty("navigator.browserLanguage");
};
_language = _local1;
return (_language);
}
public function get colorDepth():String{
if (_colorDepth){
return (_colorDepth);
};
if (!isAvailable()){
return (null);
};
_colorDepth = getProperty("window.screen.colorDepth");
return (_colorDepth);
}
public function get referrer():String{
if (_referrer){
return (_referrer);
};
if (!isAvailable()){
return (null);
};
_referrer = getProperty("document.referrer");
return (_referrer);
}
public function get protocol():String{
if (_protocol){
return (_protocol);
};
if (!isAvailable()){
return (null);
};
_protocol = getProperty("document.location.protocol");
return (_protocol);
}
public function get host():String{
if (_host){
return (_host);
};
if (!isAvailable()){
return (null);
};
_host = getProperty("document.location.host");
return (_host);
}
public function get characterSet():String{
if (_characterSet){
return (_characterSet);
};
if (!isAvailable()){
return (null);
};
var _local1:String = getProperty("document.characterSet");
if (_local1 == null){
_local1 = getProperty("document.charset");
};
_characterSet = _local1;
return (_characterSet);
}
public function get title():String{
if (_title){
return (_title);
};
if (!isAvailable()){
return (null);
};
_title = getProperty("document.title");
return (_title);
}
}
}//package com.google.analytics.external
Section 71
//JavascriptProxy (com.google.analytics.external.JavascriptProxy)
package com.google.analytics.external {
import flash.system.*;
import com.google.analytics.debug.*;
import flash.external.*;
public class JavascriptProxy {
private var _notAvailableWarning:Boolean;// = true
private var _debug:DebugConfiguration;
public static var setProperty_js:XML = <script>
<![CDATA[
function( path , value )
{
var paths;
var prop;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
prop = paths.pop() ;
}
else
{
paths = [];
prop = path;
}
var target = window ;
var len = paths.length ;
for( var i = 0 ; i < len ; i++ )
{
target = target[ paths[i] ] ;
}
target[ prop ] = value ;
}
]]>
</script>
;
public static var hasProperty_js:XML = <script>
<![CDATA[
function( path )
{
var paths;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
}
else
{
paths = [path];
}
var target = window ;
var len = paths.length ;
for( var i = 0 ; i < len ; i++ )
{
target = target[ paths[i] ] ;
}
if( target )
{
return true;
}
else
{
return false;
}
}
]]>
</script>
;
public static var setPropertyRef_js:XML = <script>
<![CDATA[
function( path , target )
{
var paths;
var prop;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
prop = paths.pop() ;
}
else
{
paths = [];
prop = path;
}
alert( "paths:"+paths.length+", prop:"+prop );
var targets;
var name;
if( target.indexOf(".") > 0 )
{
targets = target.split(".");
name = targets.pop();
}
else
{
targets = [];
name = target;
}
alert( "targets:"+targets.length+", name:"+name );
var root = window;
var len = paths.length;
for( var i = 0 ; i < len ; i++ )
{
root = root[ paths[i] ] ;
}
var ref = window;
var depth = targets.length;
for( var j = 0 ; j < depth ; j++ )
{
ref = ref[ targets[j] ] ;
}
root[ prop ] = ref[name] ;
}
]]>
</script>
;
public function JavascriptProxy(_arg1:DebugConfiguration){
_debug = _arg1;
}
public function getProperty(_arg1:String){
return (call((_arg1 + ".valueOf")));
}
public function hasProperty(_arg1:String):Boolean{
return (call(hasProperty_js, _arg1));
}
public function setProperty(_arg1:String, _arg2):void{
call(setProperty_js, _arg1, _arg2);
}
public function executeBlock(_arg1:String):void{
var data = _arg1;
if (isAvailable()){
try {
ExternalInterface.call(data);
} catch(e:SecurityError) {
if (_debug.javascript){
_debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML.");
};
} catch(e:Error) {
if (_debug.javascript){
_debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message));
};
};
};
}
public function getPropertyString(_arg1:String):String{
return (call((_arg1 + ".toString")));
}
public function setPropertyByReference(_arg1:String, _arg2:String):void{
call(setPropertyRef_js, _arg1, _arg2);
}
public function call(_arg1:String, ... _args){
var output:String;
var functionName = _arg1;
var args = _args;
if (isAvailable()){
try {
if (((_debug.javascript) && (_debug.verbose))){
output = "";
output = ("Flash->JS: " + functionName);
output = (output + "( ");
if (args.length > 0){
output = (output + args.join(","));
};
output = (output + " )");
_debug.info(output);
};
args.unshift(functionName);
return (ExternalInterface.call.apply(ExternalInterface, args));
} catch(e:SecurityError) {
if (_debug.javascript){
_debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML.");
};
} catch(e:Error) {
if (_debug.javascript){
_debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message));
};
};
};
return (null);
}
public function isAvailable():Boolean{
var _local1:Boolean = ExternalInterface.available;
if (((_local1) && ((Capabilities.playerType == "External")))){
_local1 = false;
};
if (((((!(_local1)) && (_debug.javascript))) && (_notAvailableWarning))){
_debug.warning("ExternalInterface is not available.");
_notAvailableWarning = false;
};
return (_local1);
}
}
}//package com.google.analytics.external
Section 72
//Environment (com.google.analytics.utils.Environment)
package com.google.analytics.utils {
import flash.system.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
public class Environment {
private var _dom:HTMLDOM;
private var _appName:String;
private var _debug:DebugConfiguration;
private var _appVersion:Version;
private var _url:String;
private var _protocol:Protocols;
private var _userAgent:UserAgent;
public function Environment(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:DebugConfiguration=null, _arg5:HTMLDOM=null){
var _local6:Version;
super();
if (_arg2 == ""){
if (isAIR()){
_arg2 = "AIR";
} else {
_arg2 = "Flash";
};
};
if (_arg3 == ""){
_local6 = flashVersion;
} else {
_local6 = Version.fromString(_arg3);
};
_url = _arg1;
_appName = _arg2;
_appVersion = _local6;
_debug = _arg4;
_dom = _arg5;
}
public function isAIR():Boolean{
return ((((playerType == "Desktop")) && ((Security.sandboxType.toString() == "application"))));
}
public function get screenWidth():Number{
return (Capabilities.screenResolutionX);
}
public function get playerType():String{
return (Capabilities.playerType);
}
public function get locationSearch():String{
var _local1:String = _dom.search;
if (_local1){
return (_local1);
};
return ("");
}
public function get protocol():Protocols{
if (!_protocol){
_findProtocol();
};
return (_protocol);
}
public function get flashVersion():Version{
var _local1:Version = Version.fromString(Capabilities.version.split(" ")[1], ",");
return (_local1);
}
public function get userAgent():UserAgent{
if (!_userAgent){
_userAgent = new UserAgent(this, appName, appVersion.toString(4));
};
return (_userAgent);
}
public function get languageEncoding():String{
var _local1:String;
if (System.useCodePage){
_local1 = _dom.characterSet;
if (_local1){
return (_local1);
};
return ("-");
};
return ("UTF-8");
}
public function get appName():String{
return (_appName);
}
public function get screenColorDepth():String{
var _local1:String;
switch (Capabilities.screenColor){
case "bw":
_local1 = "1";
break;
case "gray":
_local1 = "2";
break;
case "color":
default:
_local1 = "24";
};
var _local2:String = _dom.colorDepth;
if (_local2){
_local1 = _local2;
};
return (_local1);
}
private function _findProtocol():void{
var _local4:String;
var _local5:String;
var _local1:Protocols = Protocols.none;
if (_url != ""){
_local4 = _url.toLowerCase();
_local5 = _local4.substr(0, 5);
switch (_local5){
case "file:":
_local1 = Protocols.file;
break;
case "http:":
_local1 = Protocols.HTTP;
break;
case "https":
if (_local4.charAt(5) == ":"){
_local1 = Protocols.HTTPS;
};
break;
default:
_protocol = Protocols.none;
};
};
var _local2:String = _dom.protocol;
var _local3:String = (_local1.toString() + ":").toLowerCase();
if (((((_local2) && (!((_local2 == _local3))))) && (_debug))){
_debug.warning(((("Protocol mismatch: SWF=" + _local3) + ", DOM=") + _local2));
};
_protocol = _local1;
}
public function get locationSWFPath():String{
return (_url);
}
public function get platform():String{
var _local1:String = Capabilities.manufacturer;
return (_local1.split("Adobe ")[1]);
}
public function get operatingSystem():String{
return (Capabilities.os);
}
public function set appName(_arg1:String):void{
_appName = _arg1;
userAgent.applicationProduct = _arg1;
}
function set url(_arg1:String):void{
_url = _arg1;
}
public function get referrer():String{
var _local1:String = _dom.referrer;
if (_local1){
return (_local1);
};
if (protocol == Protocols.file){
return ("localhost");
};
return ("");
}
public function isInHTML():Boolean{
return ((Capabilities.playerType == "PlugIn"));
}
public function get language():String{
var _local1:String = _dom.language;
var _local2:String = Capabilities.language;
if (_local1){
if ((((_local1.length > _local2.length)) && ((_local1.substr(0, _local2.length) == _local2)))){
_local2 = _local1;
};
};
return (_local2);
}
public function get domainName():String{
var _local1:String;
var _local2:String;
var _local3:int;
if ((((protocol == Protocols.HTTP)) || ((protocol == Protocols.HTTPS)))){
_local1 = _url.toLowerCase();
if (protocol == Protocols.HTTP){
_local2 = _local1.split("http://").join("");
} else {
if (protocol == Protocols.HTTPS){
_local2 = _local1.split("https://").join("");
};
};
_local3 = _local2.indexOf("/");
if (_local3 > -1){
_local2 = _local2.substring(0, _local3);
};
return (_local2);
};
if (protocol == Protocols.file){
return ("localhost");
};
return ("");
}
public function set userAgent(_arg1:UserAgent):void{
_userAgent = _arg1;
}
public function set appVersion(_arg1:Version):void{
_appVersion = _arg1;
userAgent.applicationVersion = _arg1.toString(4);
}
public function get screenHeight():Number{
return (Capabilities.screenResolutionY);
}
public function get locationPath():String{
var _local1:String = _dom.pathname;
if (_local1){
return (_local1);
};
return ("");
}
public function get documentTitle():String{
var _local1:String = _dom.title;
if (_local1){
return (_local1);
};
return ("");
}
public function get appVersion():Version{
return (_appVersion);
}
}
}//package com.google.analytics.utils
Section 73
//Protocols (com.google.analytics.utils.Protocols)
package com.google.analytics.utils {
public class Protocols {
private var _value:int;
private var _name:String;
public static const none:Protocols = new Protocols(0, "none");
;
public static const HTTPS:Protocols = new Protocols(3, "HTTPS");
;
public static const file:Protocols = new Protocols(1, "file");
;
public static const HTTP:Protocols = new Protocols(2, "HTTP");
;
public function Protocols(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.utils
Section 74
//Timespan (com.google.analytics.utils.Timespan)
package com.google.analytics.utils {
public class Timespan {
public static var sixmonths:Number = 15768000;
public static var twoyears:Number = 63072000;
public static var thirtyminutes:Number = 1800;
}
}//package com.google.analytics.utils
Section 75
//URL (com.google.analytics.utils.URL)
package com.google.analytics.utils {
public class URL {
private var _url:String;
public function URL(_arg1:String=""){
_url = _arg1.toLowerCase();
}
public function get domain():String{
var _local1:Array;
if (((!((hostName == ""))) && ((hostName.indexOf(".") > -1)))){
_local1 = hostName.split(".");
switch (_local1.length){
case 2:
return (hostName);
case 3:
if (_local1[1] == "co"){
return (hostName);
};
_local1.shift();
return (_local1.join("."));
case 4:
_local1.shift();
return (_local1.join("."));
};
};
return ("");
}
public function get path():String{
var _local1:String = _url;
if (_local1.indexOf("://") > -1){
_local1 = _local1.split("://")[1];
};
if (_local1.indexOf(hostName) == 0){
_local1 = _local1.substr(hostName.length);
};
if (_local1.indexOf("?") > -1){
_local1 = _local1.split("?")[0];
};
if (_local1.charAt(0) != "/"){
_local1 = ("/" + _local1);
};
return (_local1);
}
public function get protocol():Protocols{
var _local1:String = _url.split("://")[0];
switch (_local1){
case "file":
return (Protocols.file);
case "http":
return (Protocols.HTTP);
case "https":
return (Protocols.HTTPS);
default:
return (Protocols.none);
};
}
public function get hostName():String{
var _local1:String = _url;
if (_local1.indexOf("://") > -1){
_local1 = _local1.split("://")[1];
};
if (_local1.indexOf("/") > -1){
_local1 = _local1.split("/")[0];
};
if (_local1.indexOf("?") > -1){
_local1 = _local1.split("?")[0];
};
if ((((protocol == Protocols.file)) || ((protocol == Protocols.none)))){
return ("");
};
return (_local1);
}
public function get subDomain():String{
if (((!((domain == ""))) && (!((domain == hostName))))){
return (hostName.split(("." + domain)).join(""));
};
return ("");
}
public function get search():String{
var _local1:String = _url;
if (_local1.indexOf("://") > -1){
_local1 = _local1.split("://")[1];
};
if (_local1.indexOf(hostName) == 0){
_local1 = _local1.substr(hostName.length);
};
if (_local1.indexOf("?") > -1){
_local1 = _local1.split("?")[1];
} else {
_local1 = "";
};
return (_local1);
}
}
}//package com.google.analytics.utils
Section 76
//UserAgent (com.google.analytics.utils.UserAgent)
package com.google.analytics.utils {
import flash.system.*;
import com.google.analytics.core.*;
public class UserAgent {
private var _localInfo:Environment;
private var _applicationProduct:String;
private var _version:Version;
public static var minimal:Boolean = false;
public function UserAgent(_arg1:Environment, _arg2:String="", _arg3:String=""){
_localInfo = _arg1;
applicationProduct = _arg2;
_version = Version.fromString(_arg3);
}
public function get tamarinProductToken():String{
if (UserAgent.minimal){
return ("");
};
if (System.vmVersion){
return (("Tamarin/" + Utils.trim(System.vmVersion, true)));
};
return ("");
}
public function get applicationVersion():String{
return (_version.toString(2));
}
public function get vendorProductToken():String{
var _local1 = "";
if (_localInfo.isAIR()){
_local1 = (_local1 + "AIR");
} else {
_local1 = (_local1 + "FlashPlayer");
};
_local1 = (_local1 + "/");
_local1 = (_local1 + _version.toString(3));
return (_local1);
}
public function toString():String{
var _local1 = "";
_local1 = (_local1 + applicationProductToken);
if (applicationComment != ""){
_local1 = (_local1 + (" " + applicationComment));
};
if (tamarinProductToken != ""){
_local1 = (_local1 + (" " + tamarinProductToken));
};
if (vendorProductToken != ""){
_local1 = (_local1 + (" " + vendorProductToken));
};
return (_local1);
}
public function get applicationComment():String{
var _local1:Array = [];
_local1.push(_localInfo.platform);
_local1.push(_localInfo.playerType);
if (!UserAgent.minimal){
_local1.push(_localInfo.operatingSystem);
_local1.push(_localInfo.language);
};
if (Capabilities.isDebugger){
_local1.push("DEBUG");
};
if (_local1.length > 0){
return ((("(" + _local1.join("; ")) + ")"));
};
return ("");
}
public function set applicationVersion(_arg1:String):void{
_version = Version.fromString(_arg1);
}
public function get applicationProductToken():String{
var _local1:String = applicationProduct;
if (applicationVersion != ""){
_local1 = (_local1 + ("/" + applicationVersion));
};
return (_local1);
}
public function set applicationProduct(_arg1:String):void{
_applicationProduct = _arg1;
}
public function get applicationProduct():String{
return (_applicationProduct);
}
}
}//package com.google.analytics.utils
Section 77
//Variables (com.google.analytics.utils.Variables)
package com.google.analytics.utils {
import flash.net.*;
public dynamic class Variables {
public var post:Array;
public var URIencode:Boolean;
public var pre:Array;
public var sort:Boolean;// = true
public function Variables(_arg1:String=null, _arg2:Array=null, _arg3:Array=null){
pre = [];
post = [];
super();
if (_arg1){
decode(_arg1);
};
if (_arg2){
this.pre = _arg2;
};
if (_arg3){
this.post = _arg3;
};
}
private function _join(_arg1:Variables):void{
var _local2:String;
if (!_arg1){
return;
};
for (_local2 in _arg1) {
this[_local2] = _arg1[_local2];
};
}
public function join(... _args):void{
var _local2:int = _args.length;
var _local3:int;
while (_local3 < _local2) {
if (!(_args[_local3] is Variables)){
} else {
_join(_args[_local3]);
};
_local3++;
};
}
public function toString():String{
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:String;
var _local1:Array = [];
for (_local3 in this) {
_local2 = this[_local3];
if (URIencode){
_local2 = encodeURI(_local2);
};
_local1.push(((_local3 + "=") + _local2));
};
if (sort){
_local1.sort();
};
if (pre.length > 0){
pre.reverse();
_local5 = 0;
while (_local5 < pre.length) {
_local7 = pre[_local5];
_local6 = 0;
while (_local6 < _local1.length) {
_local4 = _local1[_local6];
if (_local4.indexOf(_local7) == 0){
_local1.unshift(_local1.splice(_local6, 1)[0]);
};
_local6++;
};
_local5++;
};
pre.reverse();
};
if (post.length > 0){
_local5 = 0;
while (_local5 < post.length) {
_local8 = post[_local5];
_local6 = 0;
while (_local6 < _local1.length) {
_local4 = _local1[_local6];
if (_local4.indexOf(_local8) == 0){
_local1.push(_local1.splice(_local6, 1)[0]);
};
_local6++;
};
_local5++;
};
};
return (_local1.join("&"));
}
public function decode(_arg1:String):void{
var _local2:Array;
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:Array;
if (_arg1 == ""){
return;
};
if (_arg1.charAt(0) == "?"){
_arg1 = _arg1.substr(1, _arg1.length);
};
if (_arg1.indexOf("&") > -1){
_local2 = _arg1.split("&");
} else {
_local2 = [_arg1];
};
var _local7:int;
while (_local7 < _local2.length) {
_local3 = _local2[_local7];
if (_local3.indexOf("=") > -1){
_local6 = _local3.split("=");
_local4 = _local6[0];
_local5 = decodeURI(_local6[1]);
this[_local4] = _local5;
};
_local7++;
};
}
public function toURLVariables():URLVariables{
var _local2:String;
var _local1:URLVariables = new URLVariables();
for (_local2 in this) {
_local1[_local2] = this[_local2];
};
return (_local1);
}
}
}//package com.google.analytics.utils
Section 78
//Version (com.google.analytics.utils.Version)
package com.google.analytics.utils {
public class Version {
private var _revision:uint;
private var _maxBuild:uint;// = 0xFF
private var _maxMinor:uint;// = 15
private var _maxMajor:uint;// = 15
private var _separator:String;// = "."
private var _maxRevision:uint;// = 0xFFFF
private var _build:uint;
private var _major:uint;
private var _minor:uint;
public function Version(_arg1:uint=0, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0){
var _local5:Version;
super();
if ((((((((_arg1 > _maxMajor)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){
_local5 = Version.fromNumber(_arg1);
_arg1 = _local5.major;
_arg2 = _local5.minor;
_arg3 = _local5.build;
_arg4 = _local5.revision;
};
this.major = _arg1;
this.minor = _arg2;
this.build = _arg3;
this.revision = _arg4;
}
public function toString(_arg1:int=0):String{
var _local2:Array;
if ((((_arg1 <= 0)) || ((_arg1 > 4)))){
_arg1 = getFields();
};
switch (_arg1){
case 1:
_local2 = [major];
break;
case 2:
_local2 = [major, minor];
break;
case 3:
_local2 = [major, minor, build];
break;
case 4:
default:
_local2 = [major, minor, build, revision];
};
return (_local2.join(_separator));
}
public function set revision(_arg1:uint):void{
_revision = Math.min(_arg1, _maxRevision);
}
public function get revision():uint{
return (_revision);
}
public function set build(_arg1:uint):void{
_build = Math.min(_arg1, _maxBuild);
}
public function set minor(_arg1:uint):void{
_minor = Math.min(_arg1, _maxMinor);
}
public function get build():uint{
return (_build);
}
public function set major(_arg1:uint):void{
_major = Math.min(_arg1, _maxMajor);
}
public function get minor():uint{
return (_minor);
}
private function getFields():int{
var _local1 = 4;
if (revision == 0){
_local1--;
};
if ((((_local1 == 3)) && ((build == 0)))){
_local1--;
};
if ((((_local1 == 2)) && ((minor == 0)))){
_local1--;
};
return (_local1);
}
public function valueOf():uint{
return (((((major << 28) | (minor << 24)) | (build << 16)) | revision));
}
public function get major():uint{
return (_major);
}
public function equals(_arg1):Boolean{
if (!(_arg1 is Version)){
return (false);
};
if ((((((((_arg1.major == major)) && ((_arg1.minor == minor)))) && ((_arg1.build == build)))) && ((_arg1.revision == revision)))){
return (true);
};
return (false);
}
public static function fromString(_arg1:String="", _arg2:String="."):Version{
var _local4:Array;
var _local3:Version = new (Version);
if ((((_arg1 == "")) || ((_arg1 == null)))){
return (_local3);
};
if (_arg1.indexOf(_arg2) > -1){
_local4 = _arg1.split(_arg2);
_local3.major = parseInt(_local4[0]);
_local3.minor = parseInt(_local4[1]);
_local3.build = parseInt(_local4[2]);
_local3.revision = parseInt(_local4[3]);
} else {
_local3.major = parseInt(_arg1);
};
return (_local3);
}
public static function fromNumber(_arg1:Number=0):Version{
var _local2:Version = new (Version);
if (((((((((((isNaN(_arg1)) || ((_arg1 == 0)))) || ((_arg1 < 0)))) || ((_arg1 == Number.MAX_VALUE)))) || ((_arg1 == Number.POSITIVE_INFINITY)))) || ((_arg1 == Number.NEGATIVE_INFINITY)))){
return (_local2);
};
_local2.major = (_arg1 >>> 28);
_local2.minor = ((_arg1 & 251658240) >>> 24);
_local2.build = ((_arg1 & 0xFF0000) >>> 16);
_local2.revision = (_arg1 & 0xFFFF);
return (_local2);
}
}
}//package com.google.analytics.utils
Section 79
//Bridge (com.google.analytics.v4.Bridge)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
public class Bridge implements GoogleAnalyticsAPI {
private var _debug:DebugConfiguration;
private var _proxy:JavascriptProxy;
private var _jsContainer:String;// = "_GATracker"
private var _hasGATracker:Boolean;// = false
private var _account:String;
private static var _linkTrackingObject_js:XML = <script>
<![CDATA[
function( container , target )
{
var targets ;
var name ;
if( target.indexOf(".") > 0 )
{
targets = target.split(".");
name = targets.pop();
}
else
{
targets = [];
name = target;
}
var ref = window;
var depth = targets.length;
for( var j = 0 ; j < depth ; j++ )
{
ref = ref[ targets[j] ] ;
}
window[container][target] = ref[name] ;
}
]]>
</script>
;
private static var _createTrackingObject_js:XML = <script>
<![CDATA[
function( acct )
{
_GATracker[acct] = _gat._getTracker(acct);
}
]]>
</script>
;
private static var _injectTrackingObject_js:XML = <script>
<![CDATA[
function()
{
try
{
_GATracker
}
catch(e)
{
_GATracker = {};
}
}
]]>
</script>
;
private static var _checkGAJS_js:XML = <script>
<![CDATA[
function()
{
if( _gat && _gat._getTracker )
{
return true;
}
return false;
}
]]>
</script>
;
private static var _checkValidTrackingObject_js:XML = <script>
<![CDATA[
function(acct)
{
if( _GATracker[acct] && (_GATracker[acct]._getAccount) )
{
return true ;
}
else
{
return false;
}
}
]]>
</script>
;
public function Bridge(_arg1:String, _arg2:DebugConfiguration, _arg3:JavascriptProxy){
var _local4:String;
var _local5:String;
var _local6:String;
super();
_account = _arg1;
_debug = _arg2;
_proxy = _arg3;
if (!_checkGAJS()){
_local4 = "";
_local4 = (_local4 + "ga.js not found, be sure to check if\n");
_local4 = (_local4 + "<script src=\"http://www.google-analytics.com/ga.js\"></script>\n");
_local4 = (_local4 + "is included in the HTML.");
_debug.warning(_local4);
throw (new Error(_local4));
};
if (!_hasGATracker){
if (((_debug.javascript) && (_debug.verbose))){
_local5 = "";
_local5 = (_local5 + "The Google Analytics tracking code was not found on the container page\n");
_local5 = (_local5 + "we create it");
_debug.info(_local5, VisualDebugMode.advanced);
};
_injectTrackingObject();
};
if (Utils.validateAccount(_arg1)){
_createTrackingObject(_arg1);
} else {
if (_checkTrackingObject(_arg1)){
_linkTrackingObject(_arg1);
} else {
_local6 = "";
_local6 = (_local6 + (("JS Object \"" + _arg1) + "\" doesn't exist in DOM\n"));
_local6 = (_local6 + "Bridge object not created.");
_debug.warning(_local6);
throw (new Error(_local6));
};
};
}
public function link(_arg1:String, _arg2:Boolean=false):void{
_debug.info((((("link( " + _arg1) + ", ") + _arg2) + " )"));
_call("_link", _arg1, _arg2);
}
public function addOrganic(_arg1:String, _arg2:String):void{
_debug.info((("addOrganic( " + [_arg1, _arg2].join(", ")) + " )"));
_call("_addOrganic", _arg1);
}
public function setAllowLinker(_arg1:Boolean):void{
_debug.info((("setAllowLinker( " + _arg1) + " )"));
_call("_setAllowLinker", _arg1);
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
_debug.info((((("getLinkerUrl(" + _arg1) + ", ") + _arg2) + ")"));
return (_call("_getLinkerUrl", _arg1, _arg2));
}
private function _linkTrackingObject(_arg1:String):void{
_proxy.call(_linkTrackingObject_js, _jsContainer, _arg1);
}
public function setClientInfo(_arg1:Boolean):void{
_debug.info((("setClientInfo( " + _arg1) + " )"));
_call("_setClientInfo", _arg1);
}
public function trackTrans():void{
_debug.info("trackTrans()");
_call("_trackTrans");
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
var _local5 = 2;
if (((_arg3) && (!((_arg3 == ""))))){
_local5 = 3;
};
if ((((_local5 == 3)) && (!(isNaN(_arg4))))){
_local5 = 4;
};
switch (_local5){
case 4:
_debug.info((("trackEvent( " + [_arg1, _arg2, _arg3, _arg4].join(", ")) + " )"));
return (_call("_trackEvent", _arg1, _arg2, _arg3, _arg4));
case 3:
_debug.info((("trackEvent( " + [_arg1, _arg2, _arg3].join(", ")) + " )"));
return (_call("_trackEvent", _arg1, _arg2, _arg3));
case 2:
default:
_debug.info((("trackEvent( " + [_arg1, _arg2].join(", ")) + " )"));
return (_call("_trackEvent", _arg1, _arg2));
};
}
public function setCookieTimeout(_arg1:int):void{
_debug.info((("setCookieTimeout( " + _arg1) + " )"));
_call("_setCookieTimeout", _arg1);
}
public function trackPageview(_arg1:String=""):void{
_debug.info((("trackPageview( " + _arg1) + " )"));
_call("_trackPageview", _arg1);
}
private function _checkValidTrackingObject(_arg1:String):Boolean{
return (_proxy.call(_checkValidTrackingObject_js, _arg1));
}
private function _checkGAJS():Boolean{
return (_proxy.call(_checkGAJS_js));
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
_debug.warning((((("linkByPost( " + _arg1) + ", ") + _arg2) + " ) not implemented"));
}
public function getClientInfo():Boolean{
_debug.info("getClientInfo()");
return (_call("_getClientInfo"));
}
private function _call(_arg1:String, ... _args){
_args.unshift(((((("window." + _jsContainer) + "[\"") + _account) + "\"].") + _arg1));
return (_proxy.call.apply(_proxy, _args));
}
public function hasGAJS():Boolean{
return (_checkGAJS());
}
private function _checkTrackingObject(_arg1:String):Boolean{
var _local2:Boolean = _proxy.hasProperty(_arg1);
var _local3:Boolean = _proxy.hasProperty((_arg1 + "._getAccount"));
return (((_local2) && (_local3)));
}
public function resetSession():void{
_debug.warning("resetSession() not implemented");
}
public function getDetectTitle():Boolean{
_debug.info("getDetectTitle()");
return (_call("_getDetectTitle"));
}
public function setCampNameKey(_arg1:String):void{
_debug.info((("setCampNameKey( " + _arg1) + " )"));
_call("_setCampNameKey", _arg1);
}
public function setDetectFlash(_arg1:Boolean):void{
_debug.info((("setDetectFlash( " + _arg1) + " )"));
_call("_setDetectFlash", _arg1);
}
public function createEventTracker(_arg1:String):EventTracker{
_debug.info((("createEventTracker( " + _arg1) + " )"));
return (new EventTracker(_arg1, this));
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
_debug.info((("addItem( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6].join(", ")) + " )"));
_call("_addItem", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
public function clearIgnoredOrganic():void{
_debug.info("clearIgnoredOrganic()");
_call("_clearIgnoreOrganic");
}
public function setVar(_arg1:String):void{
_debug.info((("setVar( " + _arg1) + " )"));
_call("_setVar", _arg1);
}
public function setDomainName(_arg1:String):void{
_debug.info((("setDomainName( " + _arg1) + " )"));
_call("_setDomainName", _arg1);
}
public function hasTrackingAccount(_arg1:String):Boolean{
if (Utils.validateAccount(_arg1)){
return (_checkValidTrackingObject(_arg1));
};
return (_checkTrackingObject(_arg1));
}
public function setCampSourceKey(_arg1:String):void{
_debug.info((("setCampSourceKey( " + _arg1) + " )"));
_call("_setCampSourceKey", _arg1);
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void{
_debug.info((("addTrans( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8].join(", ")) + " )"));
_call("_addTrans", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function setCampContentKey(_arg1:String):void{
_debug.info((("setCampContentKey( " + _arg1) + " )"));
_call("_setCampContentKey", _arg1);
}
public function setLocalServerMode():void{
_debug.info("setLocalServerMode()");
_call("_setLocalServerMode");
}
public function getLocalGifPath():String{
_debug.info("getLocalGifPath()");
return (_call("_getLocalGifPath"));
}
public function clearIgnoredRef():void{
_debug.info("clearIgnoredRef()");
_call("_clearIgnoreRef");
}
public function setAllowAnchor(_arg1:Boolean):void{
_debug.info((("setAllowAnchor( " + _arg1) + " )"));
_call("_setAllowAnchor", _arg1);
}
public function setLocalGifPath(_arg1:String):void{
_debug.info((("setLocalGifPath( " + _arg1) + " )"));
_call("_setLocalGifPath", _arg1);
}
public function getVersion():String{
_debug.info("getVersion()");
return (_call("_getVersion"));
}
private function _injectTrackingObject():void{
_proxy.executeBlock(_injectTrackingObject_js);
_hasGATracker = true;
}
public function setCookiePath(_arg1:String):void{
_debug.info((("setCookiePath( " + _arg1) + " )"));
_call("_setCookiePath", _arg1);
}
public function setSampleRate(_arg1:Number):void{
_debug.info((("setSampleRate( " + _arg1) + " )"));
_call("_setSampleRate", _arg1);
}
public function setAllowHash(_arg1:Boolean):void{
_debug.info((("setAllowHash( " + _arg1) + " )"));
_call("_setAllowHash", _arg1);
}
public function addIgnoredOrganic(_arg1:String):void{
_debug.info((("addIgnoredOrganic( " + _arg1) + " )"));
_call("_addIgnoredOrganic", _arg1);
}
public function setCampNOKey(_arg1:String):void{
_debug.info((("setCampNOKey( " + _arg1) + " )"));
_call("_setCampNOKey", _arg1);
}
public function cookiePathCopy(_arg1:String):void{
_debug.info((("cookiePathCopy( " + _arg1) + " )"));
_call("_cookiePathCopy", _arg1);
}
public function setLocalRemoteServerMode():void{
_debug.info("setLocalRemoteServerMode()");
_call("_setLocalRemoteServerMode");
}
public function getServiceMode():ServerOperationMode{
_debug.info("getServiceMode()");
return (_call("_getServiceMode"));
}
public function setDetectTitle(_arg1:Boolean):void{
_debug.info((("setDetectTitle( " + _arg1) + " )"));
_call("_setDetectTitle", _arg1);
}
private function _createTrackingObject(_arg1:String):void{
_proxy.call(_createTrackingObject_js, _arg1);
}
public function setCampaignTrack(_arg1:Boolean):void{
_debug.info((("setCampaignTrack( " + _arg1) + " )"));
_call("_setCampaignTrack", _arg1);
}
public function clearOrganic():void{
_debug.info("clearOrganic()");
_call("_clearOrganic");
}
public function setCampTermKey(_arg1:String):void{
_debug.info((("setCampTermKey( " + _arg1) + " )"));
_call("_setCampTermKey", _arg1);
}
public function getDetectFlash():Boolean{
_debug.info("getDetectFlash()");
return (_call("_getDetectFlash"));
}
public function setCampMediumKey(_arg1:String):void{
_debug.info((("setCampMediumKey( " + _arg1) + " )"));
_call("_setCampMediumKey", _arg1);
}
public function addIgnoredRef(_arg1:String):void{
_debug.info((("addIgnoredRef( " + _arg1) + " )"));
_call("_addIgnoredRef", _arg1);
}
public function setSessionTimeout(_arg1:int):void{
_debug.info((("setSessionTimeout( " + _arg1) + " )"));
_call("_setSessionTimeout", _arg1);
}
public function setRemoteServerMode():void{
_debug.info("setRemoteServerMode()");
_call("_setRemoteServerMode");
}
public function getAccount():String{
_debug.info("getAccount()");
return (_call("_getAccount"));
}
}
}//package com.google.analytics.v4
Section 80
//Configuration (com.google.analytics.v4.Configuration)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.utils.*;
import com.google.analytics.campaign.*;
public class Configuration {
public var serverMode:ServerOperationMode;
public var detectFlash:Boolean;// = true
public var hasSiteOverlay:Boolean;// = false
public var allowLocalTracking:Boolean;// = true
public var secureRemoteGIFpath:String;// = "https://ssl.google-analytics.com/__utm.gif"
private var _version:String;// = "4.3as"
public var allowDomainHash:Boolean;// = true
public var detectClientInfo:Boolean;// = true
public var idleLoop:Number;// = 30
public var isTrackOutboundSubdomains:Boolean;// = false
public var cookiePath:String;// = "/"
public var transactionFieldDelim:String;// = "|"
private var _organic:Organic;
private var _cookieName:String;// = "analytics"
public var campaignKey:CampaignKey;
public var google:String;// = "google"
public var googleCsePath:String;// = "cse"
public var bucketCapacity:Number;// = 10
private var _sampleRate:Number;// = 1
public var remoteGIFpath:String;// = "http://www.google-analytics.com/__utm.gif"
public var googleSearchParam:String;// = "q"
public var allowLinker:Boolean;// = false
public var maxOutboundLinkExamined:Number;// = 1000
private var _debug:DebugConfiguration;
public var allowAnchor:Boolean;// = false
private var _domain:Domain;
private var _trackingLimitPerSession:int;// = 500
public var tokenCliff:int;// = 10
public var sessionTimeout:Number;
public var idleTimeout:Number;// = 60
public var campaignTracking:Boolean;// = true
public var domainName:String;// = ""
public var detectTitle:Boolean;// = true
public var tokenRate:Number;// = 0.2
public var conversionTimeout:Number;
public var localGIFpath:String;// = "/__utm.gif"
public function Configuration(_arg1:DebugConfiguration=null){
_organic = new Organic();
conversionTimeout = Timespan.sixmonths;
sessionTimeout = Timespan.thirtyminutes;
campaignKey = new CampaignKey();
serverMode = ServerOperationMode.remote;
super();
_debug = _arg1;
_domain = new Domain(DomainNameMode.auto, "", _debug);
serverMode = ServerOperationMode.remote;
_initOrganicSources();
}
public function get organic():Organic{
return (_organic);
}
public function get cookieName():String{
return (_cookieName);
}
public function get trackingLimitPerSession():int{
return (_trackingLimitPerSession);
}
private function _initOrganicSources():void{
addOrganicSource(google, googleSearchParam);
addOrganicSource("yahoo", "p");
addOrganicSource("msn", "q");
addOrganicSource("aol", "query");
addOrganicSource("aol", "encquery");
addOrganicSource("lycos", "query");
addOrganicSource("ask", "q");
addOrganicSource("altavista", "q");
addOrganicSource("netscape", "query");
addOrganicSource("cnn", "query");
addOrganicSource("looksmart", "qt");
addOrganicSource("about", "terms");
addOrganicSource("mamma", "query");
addOrganicSource("alltheweb", "q");
addOrganicSource("gigablast", "q");
addOrganicSource("voila", "rdata");
addOrganicSource("virgilio", "qs");
addOrganicSource("live", "q");
addOrganicSource("baidu", "wd");
addOrganicSource("alice", "qs");
addOrganicSource("yandex", "text");
addOrganicSource("najdi", "q");
addOrganicSource("aol", "q");
addOrganicSource("club-internet", "q");
addOrganicSource("mama", "query");
addOrganicSource("seznam", "q");
addOrganicSource("search", "q");
addOrganicSource("wp", "szukaj");
addOrganicSource("onet", "qt");
addOrganicSource("netsprint", "q");
addOrganicSource("google.interia", "q");
addOrganicSource("szukacz", "q");
addOrganicSource("yam", "k");
addOrganicSource("pchome", "q");
addOrganicSource("kvasir", "searchExpr");
addOrganicSource("sesam", "q");
addOrganicSource("ozu", "q");
addOrganicSource("terra", "query");
addOrganicSource("nostrum", "query");
addOrganicSource("mynet", "q");
addOrganicSource("ekolay", "q");
addOrganicSource("search.ilse", "search_for");
}
public function get sampleRate():Number{
return (_sampleRate);
}
public function addOrganicSource(_arg1:String, _arg2:String):void{
var engine = _arg1;
var keyword = _arg2;
try {
_organic.addSource(engine, keyword);
} catch(e:Error) {
if (((_debug) && (_debug.active))){
_debug.warning(e.message);
};
};
}
public function get domain():Domain{
return (_domain);
}
public function set sampleRate(_arg1:Number):void{
if (_arg1 <= 0){
_arg1 = 0.1;
};
if (_arg1 > 1){
_arg1 = 1;
};
_arg1 = Number(_arg1.toFixed(2));
_sampleRate = _arg1;
}
public function get version():String{
return (_version);
}
}
}//package com.google.analytics.v4
Section 81
//GoogleAnalyticsAPI (com.google.analytics.v4.GoogleAnalyticsAPI)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
public interface GoogleAnalyticsAPI {
function setCampSourceKey(_arg1:String):void;
function setDetectTitle(_arg1:Boolean):void;
function setLocalRemoteServerMode():void;
function resetSession():void;
function setLocalServerMode():void;
function setCampContentKey(_arg1:String):void;
function addOrganic(_arg1:String, _arg2:String):void;
function setDetectFlash(_arg1:Boolean):void;
function setAllowLinker(_arg1:Boolean):void;
function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean;
function setCampTermKey(_arg1:String):void;
function setCampNameKey(_arg1:String):void;
function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String;
function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void;
function clearIgnoredRef():void;
function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void;
function getDetectFlash():Boolean;
function setCampaignTrack(_arg1:Boolean):void;
function createEventTracker(_arg1:String):EventTracker;
function setCookieTimeout(_arg1:int):void;
function setAllowAnchor(_arg1:Boolean):void;
function trackTrans():void;
function clearOrganic():void;
function trackPageview(_arg1:String=""):void;
function setLocalGifPath(_arg1:String):void;
function getVersion():String;
function getLocalGifPath():String;
function getServiceMode():ServerOperationMode;
function setVar(_arg1:String):void;
function clearIgnoredOrganic():void;
function setCampMediumKey(_arg1:String):void;
function addIgnoredRef(_arg1:String):void;
function setClientInfo(_arg1:Boolean):void;
function setCookiePath(_arg1:String):void;
function setSampleRate(_arg1:Number):void;
function setSessionTimeout(_arg1:int):void;
function setRemoteServerMode():void;
function setDomainName(_arg1:String):void;
function addIgnoredOrganic(_arg1:String):void;
function setAllowHash(_arg1:Boolean):void;
function getAccount():String;
function linkByPost(_arg1:Object, _arg2:Boolean=false):void;
function link(_arg1:String, _arg2:Boolean=false):void;
function setCampNOKey(_arg1:String):void;
function getClientInfo():Boolean;
function cookiePathCopy(_arg1:String):void;
function getDetectTitle():Boolean;
}
}//package com.google.analytics.v4
Section 82
//Tracker (com.google.analytics.v4.Tracker)
package com.google.analytics.v4 {
import flash.net.*;
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.data.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
import com.google.analytics.ecommerce.*;
import com.google.analytics.campaign.*;
public class Tracker implements GoogleAnalyticsAPI {
private const EVENT_TRACKER_LABEL_KEY_NUM:int = 3;
private const EVENT_TRACKER_VALUE_VALUE_NUM:int = 1;
private const EVENT_TRACKER_PROJECT_ID:int = 5;
private const EVENT_TRACKER_OBJECT_NAME_KEY_NUM:int = 1;
private const EVENT_TRACKER_TYPE_KEY_NUM:int = 2;
private var _adSense:AdSenseGlobals;
private var _eventTracker:X10;
private var _noSessionInformation:Boolean;// = false
private var _browserInfo:BrowserInfo;
private var _debug:DebugConfiguration;
private var _isNewVisitor:Boolean;// = false
private var _buffer:Buffer;
private var _config:Configuration;
private var _x10Module:X10;
private var _campaign:CampaignManager;
private var _formatedReferrer:String;
private var _timeStamp:Number;
private var _info:Environment;
private var _domainHash:Number;
private var _campaignInfo:CampaignInfo;
private var _gifRequest:GIFRequest;
private var _hasInitData:Boolean;// = false
private var _ecom:Ecommerce;
private var _account:String;
public function Tracker(_arg1:String, _arg2:Configuration, _arg3:DebugConfiguration, _arg4:Environment, _arg5:Buffer, _arg6:GIFRequest, _arg7:AdSenseGlobals, _arg8:Ecommerce){
var _local9:String;
super();
_account = _arg1;
_config = _arg2;
_debug = _arg3;
_info = _arg4;
_buffer = _arg5;
_gifRequest = _arg6;
_adSense = _arg7;
_ecom = _arg8;
if (!Utils.validateAccount(_arg1)){
_local9 = (("Account \"" + _arg1) + "\" is not valid.");
_debug.warning(_local9);
throw (new Error(_local9));
};
}
private function _doTracking():Boolean{
if (((((!((_info.protocol == Protocols.file))) && (!((_info.protocol == Protocols.none))))) && (_isNotGoogleSearch()))){
return (true);
};
if (_config.allowLocalTracking){
return (true);
};
return (false);
}
public function addOrganic(_arg1:String, _arg2:String):void{
_debug.info((("addOrganic( " + [_arg1, _arg2].join(", ")) + " )"));
_config.organic.addSource(_arg1, _arg2);
}
public function setAllowLinker(_arg1:Boolean):void{
_config.allowLinker = _arg1;
_debug.info((("setAllowLinker( " + _config.allowLinker) + " )"));
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
_initData();
_debug.info((((("getLinkerUrl( " + _arg1) + ", ") + _arg2.toString()) + " )"));
return (_buffer.getLinkerUrl(_arg1, _arg2));
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
_initData();
var _local5:Boolean;
var _local6 = 2;
if (((!((_arg1 == ""))) && (!((_arg2 == ""))))){
_eventTracker.clearKey(EVENT_TRACKER_PROJECT_ID);
_eventTracker.clearValue(EVENT_TRACKER_PROJECT_ID);
_local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_OBJECT_NAME_KEY_NUM, _arg1);
_local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_TYPE_KEY_NUM, _arg2);
if (_arg3){
_local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_LABEL_KEY_NUM, _arg3);
_local6 = 3;
};
if (!isNaN(_arg4)){
_local5 = _eventTracker.setValue(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_VALUE_VALUE_NUM, _arg4);
_local6 = 4;
};
if (_local5){
_debug.info(((("valid event tracking call\ncategory: " + _arg1) + "\naction: ") + _arg2), VisualDebugMode.geek);
_sendXEvent(_eventTracker);
};
} else {
_debug.warning(((("event tracking call is not valid, failed!\ncategory: " + _arg1) + "\naction: ") + _arg2), VisualDebugMode.geek);
_local5 = false;
};
switch (_local6){
case 4:
_debug.info((("trackEvent( " + [_arg1, _arg2, _arg3, _arg4].join(", ")) + " )"));
break;
case 3:
_debug.info((("trackEvent( " + [_arg1, _arg2, _arg3].join(", ")) + " )"));
break;
case 2:
default:
_debug.info((("trackEvent( " + [_arg1, _arg2].join(", ")) + " )"));
};
return (_local5);
}
public function trackPageview(_arg1:String=""):void{
_debug.info((("trackPageview( " + _arg1) + " )"));
if (_doTracking()){
_initData();
_trackMetrics(_arg1);
_noSessionInformation = false;
} else {
_debug.warning((("trackPageview( " + _arg1) + " ) failed"));
};
}
public function setCookieTimeout(_arg1:int):void{
_config.conversionTimeout = _arg1;
_debug.info((("setCookieTimeout( " + _config.conversionTimeout) + " )"));
}
public function trackTrans():void{
var _local1:Number;
var _local2:Number;
var _local4:Transaction;
_initData();
var _local3:Array = new Array();
if (_takeSample()){
_local1 = 0;
while (_local1 < _ecom.getTransLength()) {
_local4 = _ecom.getTransFromArray(_local1);
_local3.push(_local4.toGifParams());
_local2 = 0;
while (_local2 < _local4.getItemsLength()) {
_local3.push(_local4.getItemFromArray(_local2).toGifParams());
_local2++;
};
_local1++;
};
_local1 = 0;
while (_local1 < _local3.length) {
_gifRequest.send(_account, _local3[_local1]);
_local1++;
};
};
}
public function setClientInfo(_arg1:Boolean):void{
_config.detectClientInfo = _arg1;
_debug.info((("setClientInfo( " + _config.detectClientInfo) + " )"));
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
_debug.warning("linkByPost not implemented in AS3 mode");
}
private function _initData():void{
var _local1:String;
var _local2:String;
if (!_hasInitData){
_updateDomainName();
_domainHash = _getDomainHash();
_timeStamp = Math.round((new Date().getTime() / 1000));
if (_debug.verbose){
_local1 = "";
_local1 = (_local1 + "_initData 0");
_local1 = (_local1 + ("\ndomain name: " + _config.domainName));
_local1 = (_local1 + ("\ndomain hash: " + _domainHash));
_local1 = (_local1 + (((("\ntimestamp: " + _timeStamp) + " (") + new Date((_timeStamp * 1000))) + ")"));
_debug.info(_local1, VisualDebugMode.geek);
};
};
if (_doTracking()){
_handleCookie();
};
if (!_hasInitData){
if (_doTracking()){
_formatedReferrer = _formatReferrer();
_browserInfo = new BrowserInfo(_config, _info);
_debug.info(("browserInfo: " + _browserInfo.toURLString()), VisualDebugMode.advanced);
if (_config.campaignTracking){
_campaign = new CampaignManager(_config, _debug, _buffer, _domainHash, _formatedReferrer, _timeStamp);
_campaignInfo = _campaign.getCampaignInformation(_info.locationSearch, _noSessionInformation);
_debug.info(("campaignInfo: " + _campaignInfo.toURLString()), VisualDebugMode.advanced);
_debug.info(("Search: " + _info.locationSearch));
_debug.info(("CampaignTrackig: " + _buffer.utmz.campaignTracking));
};
};
_x10Module = new X10();
_eventTracker = new X10();
_hasInitData = true;
};
if (_config.hasSiteOverlay){
_debug.warning("Site Overlay is not supported");
};
if (_debug.verbose){
_local2 = "";
_local2 = (_local2 + "_initData (misc)");
_local2 = (_local2 + ("\nflash version: " + _info.flashVersion.toString(4)));
_local2 = (_local2 + ("\nprotocol: " + _info.protocol));
_local2 = (_local2 + (("\ndefault domain name (auto): \"" + _info.domainName) + "\""));
_local2 = (_local2 + ("\nlanguage: " + _info.language));
_local2 = (_local2 + ("\ndomain hash: " + _getDomainHash()));
_local2 = (_local2 + ("\nuser-agent: " + _info.userAgent));
_debug.info(_local2, VisualDebugMode.geek);
};
}
public function getDetectTitle():Boolean{
_debug.info("getDetectTitle()");
return (_config.detectTitle);
}
public function resetSession():void{
_debug.info("resetSession()");
_buffer.resetCurrentSession();
}
public function getClientInfo():Boolean{
_debug.info("getClientInfo()");
return (_config.detectClientInfo);
}
private function _sendXEvent(_arg1:X10=null):void{
var _local2:Variables;
var _local3:EventInfo;
var _local4:Variables;
var _local5:Variables;
if (_takeSample()){
_local2 = new Variables();
_local2.URIencode = true;
_local3 = new EventInfo(true, _x10Module, _arg1);
_local4 = _local3.toVariables();
_local5 = _renderMetricsSearchVariables();
_local2.join(_local4, _local5);
_gifRequest.send(_account, _local2, false, true);
};
}
public function setDetectFlash(_arg1:Boolean):void{
_config.detectFlash = _arg1;
_debug.info((("setDetectFlash( " + _config.detectFlash) + " )"));
}
public function setCampNameKey(_arg1:String):void{
_config.campaignKey.UCCN = _arg1;
var _local2 = (("setCampNameKey( " + _config.campaignKey.UCCN) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCCN]"));
} else {
_debug.info(_local2);
};
}
private function _formatReferrer():String{
var _local2:String;
var _local3:URL;
var _local4:URL;
var _local1:String = _info.referrer;
if ((((_local1 == "")) || ((_local1 == "localhost")))){
_local1 = "-";
} else {
_local2 = _info.domainName;
_local3 = new URL(_local1);
_local4 = new URL(("http://" + _local2));
if (_local3.hostName == _local2){
return ("-");
};
if (_local4.domain == _local3.domain){
if (_local4.subDomain != _local3.subDomain){
_local1 = "0";
};
};
if ((((_local1.charAt(0) == "[")) && (_local1.charAt((_local1.length - 1))))){
_local1 = "-";
};
};
_debug.info(("formated referrer: " + _local1), VisualDebugMode.advanced);
return (_local1);
}
private function _visitCode():Number{
if (_debug.verbose){
_debug.info(("visitCode: " + _buffer.utma.sessionId), VisualDebugMode.geek);
};
return (_buffer.utma.sessionId);
}
public function createEventTracker(_arg1:String):EventTracker{
_debug.info((("createEventTracker( " + _arg1) + " )"));
return (new EventTracker(_arg1, this));
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
var _local7:Transaction;
_local7 = _ecom.getTransaction(_arg1);
if (_local7 == null){
_local7 = _ecom.addTransaction(_arg1, "", "", "", "", "", "", "");
};
_local7.addItem(_arg2, _arg3, _arg4, _arg5.toString(), _arg6.toString());
if (_debug.active){
_debug.info((("addItem( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6].join(", ")) + " )"));
};
}
public function clearIgnoredOrganic():void{
_debug.info("clearIgnoredOrganic()");
_config.organic.clearIgnoredKeywords();
}
public function setVar(_arg1:String):void{
var _local2:Variables;
if (((!((_arg1 == ""))) && (_isNotGoogleSearch()))){
_initData();
_buffer.utmv.domainHash = _domainHash;
_buffer.utmv.value = encodeURI(_arg1);
if (_debug.verbose){
_debug.info(_buffer.utmv.toString(), VisualDebugMode.geek);
};
_debug.info((("setVar( " + _arg1) + " )"));
if (_takeSample()){
_local2 = new Variables();
_local2.utmt = "var";
_gifRequest.send(_account, _local2);
};
} else {
_debug.warning((("setVar \"" + _arg1) + "\" is ignored"));
};
}
public function setDomainName(_arg1:String):void{
if (_arg1 == "auto"){
_config.domain.mode = DomainNameMode.auto;
} else {
if (_arg1 == "none"){
_config.domain.mode = DomainNameMode.none;
} else {
_config.domain.mode = DomainNameMode.custom;
_config.domain.name = _arg1;
};
};
_updateDomainName();
_debug.info((("setDomainName( " + _config.domainName) + " )"));
}
private function _updateDomainName():void{
var _local1:String;
if (_config.domain.mode == DomainNameMode.auto){
_local1 = _info.domainName;
if (_local1.substring(0, 4) == "www."){
_local1 = _local1.substring(4);
};
_config.domain.name = _local1;
};
_config.domainName = _config.domain.name.toLowerCase();
_debug.info(("domain name: " + _config.domainName), VisualDebugMode.advanced);
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void{
_ecom.addTransaction(_arg1, _arg2, _arg3.toString(), _arg4.toString(), _arg5.toString(), _arg6, _arg7, _arg8);
if (_debug.active){
_debug.info((("addTrans( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8].join(", ")) + " );"));
};
}
private function _renderMetricsSearchVariables(_arg1:String=""):Variables{
var _local4:Variables;
var _local2:Variables = new Variables();
_local2.URIencode = true;
var _local3:DocumentInfo = new DocumentInfo(_config, _info, _formatedReferrer, _arg1, _adSense);
_debug.info(("docInfo: " + _local3.toURLString()), VisualDebugMode.geek);
if (_config.campaignTracking){
_local4 = _campaignInfo.toVariables();
};
var _local5:Variables = _browserInfo.toVariables();
_local2.join(_local3.toVariables(), _local5, _local4);
return (_local2);
}
public function setCampContentKey(_arg1:String):void{
_config.campaignKey.UCCT = _arg1;
var _local2 = (("setCampContentKey( " + _config.campaignKey.UCCT) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCCT]"));
} else {
_debug.info(_local2);
};
}
private function _handleCookie():void{
var _local1:String;
var _local2:String;
var _local3:Array;
var _local4:String;
if (_config.allowLinker){
};
_buffer.createSO();
if (((_buffer.hasUTMA()) && (!(_buffer.utma.isEmpty())))){
if (((!(_buffer.hasUTMB())) || (!(_buffer.hasUTMC())))){
_buffer.updateUTMA(_timeStamp);
_noSessionInformation = true;
};
if (_debug.verbose){
_debug.info(("from cookie " + _buffer.utma.toString()), VisualDebugMode.geek);
};
} else {
_debug.info("create a new utma", VisualDebugMode.advanced);
_buffer.utma.domainHash = _domainHash;
_buffer.utma.sessionId = _getUniqueSessionId();
_buffer.utma.firstTime = _timeStamp;
_buffer.utma.lastTime = _timeStamp;
_buffer.utma.currentTime = _timeStamp;
_buffer.utma.sessionCount = 1;
if (_debug.verbose){
_debug.info(_buffer.utma.toString(), VisualDebugMode.geek);
};
_noSessionInformation = true;
_isNewVisitor = true;
};
if (((_adSense.gaGlobal) && ((_adSense.dh == String(_domainHash))))){
if (_adSense.sid){
_buffer.utma.currentTime = Number(_adSense.sid);
if (_debug.verbose){
_local1 = "";
_local1 = (_local1 + "AdSense sid found\n");
_local1 = (_local1 + (((("Override currentTime(" + _buffer.utma.currentTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")"));
_debug.info(_local1, VisualDebugMode.geek);
};
};
if (_isNewVisitor){
if (_adSense.sid){
_buffer.utma.lastTime = Number(_adSense.sid);
if (_debug.verbose){
_local2 = "";
_local2 = (_local2 + "AdSense sid found (new visitor)\n");
_local2 = (_local2 + (((("Override lastTime(" + _buffer.utma.lastTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")"));
_debug.info(_local2, VisualDebugMode.geek);
};
};
if (_adSense.vid){
_local3 = _adSense.vid.split(".");
_buffer.utma.sessionId = Number(_local3[0]);
_buffer.utma.firstTime = Number(_local3[1]);
if (_debug.verbose){
_local4 = "";
_local4 = (_local4 + "AdSense vid found (new visitor)\n");
_local4 = (_local4 + (((("Override sessionId(" + _buffer.utma.sessionId) + ") from AdSense vid(") + Number(_local3[0])) + ")\n"));
_local4 = (_local4 + (((("Override firstTime(" + _buffer.utma.firstTime) + ") from AdSense vid(") + Number(_local3[1])) + ")"));
_debug.info(_local4, VisualDebugMode.geek);
};
};
if (_debug.verbose){
_debug.info(("AdSense modified : " + _buffer.utma.toString()), VisualDebugMode.geek);
};
};
};
_buffer.utmb.domainHash = _domainHash;
if (isNaN(_buffer.utmb.trackCount)){
_buffer.utmb.trackCount = 0;
};
if (isNaN(_buffer.utmb.token)){
_buffer.utmb.token = _config.tokenCliff;
};
if (isNaN(_buffer.utmb.lastTime)){
_buffer.utmb.lastTime = _buffer.utma.currentTime;
};
_buffer.utmc.domainHash = _domainHash;
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.advanced);
_debug.info(_buffer.utmc.toString(), VisualDebugMode.advanced);
};
}
public function setLocalServerMode():void{
_config.serverMode = ServerOperationMode.local;
_debug.info("setLocalServerMode()");
}
public function clearIgnoredRef():void{
_debug.info("clearIgnoredRef()");
_config.organic.clearIgnoredReferrals();
}
public function setCampSourceKey(_arg1:String):void{
_config.campaignKey.UCSR = _arg1;
var _local2 = (("setCampSourceKey( " + _config.campaignKey.UCSR) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCSR]"));
} else {
_debug.info(_local2);
};
}
public function getLocalGifPath():String{
_debug.info("getLocalGifPath()");
return (_config.localGIFpath);
}
public function setLocalGifPath(_arg1:String):void{
_config.localGIFpath = _arg1;
_debug.info((("setLocalGifPath( " + _config.localGIFpath) + " )"));
}
public function getVersion():String{
_debug.info("getVersion()");
return (_config.version);
}
public function setAllowAnchor(_arg1:Boolean):void{
_config.allowAnchor = _arg1;
_debug.info((("setAllowAnchor( " + _config.allowAnchor) + " )"));
}
private function _isNotGoogleSearch():Boolean{
var _local1:String = _config.domainName;
var _local2 = (_local1.indexOf("www.google.") < 0);
var _local3 = (_local1.indexOf(".google.") < 0);
var _local4 = (_local1.indexOf("google.") < 0);
var _local5 = (_local1.indexOf("google.org") > -1);
return (((((((((_local2) || (_local3))) || (_local4))) || (!((_config.cookiePath == "/"))))) || (_local5)));
}
public function setSampleRate(_arg1:Number):void{
if (_arg1 < 0){
_debug.warning("sample rate can not be negative, ignoring value.");
} else {
_config.sampleRate = _arg1;
};
_debug.info((("setSampleRate( " + _config.sampleRate) + " )"));
}
private function _takeSample():Boolean{
if (_debug.verbose){
_debug.info((((("takeSample: (" + (_visitCode() % 10000)) + ") < (") + (_config.sampleRate * 10000)) + ")"), VisualDebugMode.geek);
};
return (((_visitCode() % 10000) < (_config.sampleRate * 10000)));
}
public function setCookiePath(_arg1:String):void{
_config.cookiePath = _arg1;
_debug.info((("setCookiePath( " + _config.cookiePath) + " )"));
}
public function setAllowHash(_arg1:Boolean):void{
_config.allowDomainHash = _arg1;
_debug.info((("setAllowHash( " + _config.allowDomainHash) + " )"));
}
private function _generateUserDataHash():Number{
var _local1 = "";
_local1 = (_local1 + _info.appName);
_local1 = (_local1 + _info.appVersion);
_local1 = (_local1 + _info.language);
_local1 = (_local1 + _info.platform);
_local1 = (_local1 + _info.userAgent.toString());
_local1 = (_local1 + (((_info.screenWidth + "x") + _info.screenHeight) + _info.screenColorDepth));
_local1 = (_local1 + _info.referrer);
return (Utils.generateHash(_local1));
}
public function setCampNOKey(_arg1:String):void{
_config.campaignKey.UCNO = _arg1;
var _local2 = (("setCampNOKey( " + _config.campaignKey.UCNO) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCNO]"));
} else {
_debug.info(_local2);
};
}
public function addIgnoredOrganic(_arg1:String):void{
_debug.info((("addIgnoredOrganic( " + _arg1) + " )"));
_config.organic.addIgnoredKeyword(_arg1);
}
public function setLocalRemoteServerMode():void{
_config.serverMode = ServerOperationMode.both;
_debug.info("setLocalRemoteServerMode()");
}
public function cookiePathCopy(_arg1:String):void{
_debug.warning((("cookiePathCopy( " + _arg1) + " ) not implemented"));
}
public function setDetectTitle(_arg1:Boolean):void{
_config.detectTitle = _arg1;
_debug.info((("setDetectTitle( " + _config.detectTitle) + " )"));
}
public function setCampTermKey(_arg1:String):void{
_config.campaignKey.UCTR = _arg1;
var _local2 = (("setCampTermKey( " + _config.campaignKey.UCTR) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCTR]"));
} else {
_debug.info(_local2);
};
}
public function getServiceMode():ServerOperationMode{
_debug.info("getServiceMode()");
return (_config.serverMode);
}
private function _trackMetrics(_arg1:String=""):void{
var _local2:Variables;
var _local3:Variables;
var _local4:Variables;
var _local5:EventInfo;
if (_takeSample()){
_local2 = new Variables();
_local2.URIencode = true;
if (((_x10Module) && (_x10Module.hasData()))){
_local5 = new EventInfo(false, _x10Module);
_local3 = _local5.toVariables();
};
_local4 = _renderMetricsSearchVariables(_arg1);
_local2.join(_local3, _local4);
_gifRequest.send(_account, _local2);
};
}
public function setCampaignTrack(_arg1:Boolean):void{
_config.campaignTracking = _arg1;
_debug.info((("setCampaignTrack( " + _config.campaignTracking) + " )"));
}
public function addIgnoredRef(_arg1:String):void{
_debug.info((("addIgnoredRef( " + _arg1) + " )"));
_config.organic.addIgnoredReferral(_arg1);
}
public function clearOrganic():void{
_debug.info("clearOrganic()");
_config.organic.clearEngines();
}
public function getDetectFlash():Boolean{
_debug.info("getDetectFlash()");
return (_config.detectFlash);
}
public function setCampMediumKey(_arg1:String):void{
_config.campaignKey.UCMD = _arg1;
var _local2 = (("setCampMediumKey( " + _config.campaignKey.UCMD) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCMD]"));
} else {
_debug.info(_local2);
};
}
private function _getUniqueSessionId():Number{
var _local1:Number = ((Utils.generate32bitRandom() ^ _generateUserDataHash()) * 2147483647);
_debug.info(("Session ID: " + _local1), VisualDebugMode.geek);
return (_local1);
}
private function _getDomainHash():Number{
if (((((!(_config.domainName)) || ((_config.domainName == "")))) || ((_config.domain.mode == DomainNameMode.none)))){
_config.domainName = "";
return (1);
};
_updateDomainName();
if (_config.allowDomainHash){
return (Utils.generateHash(_config.domainName));
};
return (1);
}
public function setSessionTimeout(_arg1:int):void{
_config.sessionTimeout = _arg1;
_debug.info((("setSessionTimeout( " + _config.sessionTimeout) + " )"));
}
public function getAccount():String{
_debug.info("getAccount()");
return (_account);
}
public function link(_arg1:String, _arg2:Boolean=false):void{
var targetUrl = _arg1;
var useHash = _arg2;
_initData();
var out:String = _buffer.getLinkerUrl(targetUrl, useHash);
var request:URLRequest = new URLRequest(out);
_debug.info((("link( " + [targetUrl, useHash].join(",")) + " )"));
try {
navigateToURL(request, "_top");
} catch(e:Error) {
_debug.warning(("An error occured in link() msg: " + e.message));
};
}
public function setRemoteServerMode():void{
_config.serverMode = ServerOperationMode.remote;
_debug.info("setRemoteServerMode()");
}
}
}//package com.google.analytics.v4
Section 83
//AnalyticsTracker (com.google.analytics.AnalyticsTracker)
package com.google.analytics {
import flash.events.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
public interface AnalyticsTracker extends GoogleAnalyticsAPI, IEventDispatcher {
function set account(_arg1:String):void;
function get config():Configuration;
function get mode():String;
function set config(_arg1:Configuration):void;
function set mode(_arg1:String):void;
function set debug(_arg1:DebugConfiguration):void;
function get visualDebug():Boolean;
function get account():String;
function set visualDebug(_arg1:Boolean):void;
function isReady():Boolean;
function get debug():DebugConfiguration;
}
}//package com.google.analytics
Section 84
//API (com.google.analytics.API)
package com.google.analytics {
import com.google.analytics.utils.*;
public class API {
public static var version:Version = new Version();
version.major = 1;
version.minor = 0;
version.build = 1;
version.revision = "$Rev: 319 $ ".split(" ")[1];
}
}//package com.google.analytics
Section 85
//GATracker (com.google.analytics.GATracker)
package com.google.analytics {
import flash.display.*;
import flash.events.*;
import com.google.analytics.core.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
import com.google.analytics.events.*;
public class GATracker implements AnalyticsTracker {
private var _adSense:AdSenseGlobals;
private var _env:Environment;
private var _visualDebug:Boolean;
private var _idleTimer:IdleTimer;
private var _debug:DebugConfiguration;
private var _buffer:Buffer;
private var _config:Configuration;
private var _mode:String;
private var _display:DisplayObject;
private var _jsproxy:JavascriptProxy;
private var _dom:HTMLDOM;
private var _eventDispatcher:EventDispatcher;
private var _ready:Boolean;// = false
private var _gifRequest:GIFRequest;
private var _ecom:Ecommerce;
private var _account:String;
private var _tracker:GoogleAnalyticsAPI;
public static var version:Version = API.version;
public static var autobuild:Boolean = true;
public function GATracker(_arg1:DisplayObject, _arg2:String, _arg3:String="AS3", _arg4:Boolean=false, _arg5:Configuration=null, _arg6:DebugConfiguration=null){
_display = _arg1;
_eventDispatcher = new EventDispatcher(this);
_tracker = new TrackerCache();
this.account = _arg2;
this.mode = _arg3;
this.visualDebug = _arg4;
if (!_arg6){
this.debug = new DebugConfiguration();
};
if (!_arg5){
this.config = new Configuration(_arg6);
};
if (autobuild){
_factory();
};
}
public function link(_arg1:String, _arg2:Boolean=false):void{
_tracker.link(_arg1, _arg2);
}
public function addOrganic(_arg1:String, _arg2:String):void{
_tracker.addOrganic(_arg1, _arg2);
}
public function setAllowLinker(_arg1:Boolean):void{
_tracker.setAllowLinker(_arg1);
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
var category = _arg1;
var action = _arg2;
var label = _arg3;
var value = _arg4;
var b:Boolean;
try {
b = _tracker.trackEvent(category, action, label, value);
} catch(e:Error) {
b = false;
};
return (b);
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
return (_tracker.getLinkerUrl(_arg1, _arg2));
}
public function setCookieTimeout(_arg1:int):void{
_tracker.setCookieTimeout(_arg1);
}
public function trackTrans():void{
_tracker.trackTrans();
}
public function getClientInfo():Boolean{
return (_tracker.getClientInfo());
}
public function trackPageview(_arg1:String=""):void{
_tracker.trackPageview(_arg1);
}
public function setClientInfo(_arg1:Boolean):void{
_tracker.setClientInfo(_arg1);
}
public function get account():String{
return (_account);
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
_tracker.linkByPost(_arg1, _arg2);
}
public function getDetectTitle():Boolean{
return (_tracker.getDetectTitle());
}
public function dispatchEvent(_arg1:Event):Boolean{
return (_eventDispatcher.dispatchEvent(_arg1));
}
public function get config():Configuration{
return (_config);
}
public function set mode(_arg1:String):void{
_mode = _arg1;
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public function setDetectFlash(_arg1:Boolean):void{
_tracker.setDetectFlash(_arg1);
}
public function resetSession():void{
_tracker.resetSession();
}
public function setCampNameKey(_arg1:String):void{
_tracker.setCampNameKey(_arg1);
}
public function get debug():DebugConfiguration{
return (_debug);
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
_tracker.addItem(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
private function _bridgeFactory():GoogleAnalyticsAPI{
debug.info(((("GATracker (Bridge) v" + version) + "\naccount: ") + account));
return (new Bridge(account, _debug, _jsproxy));
}
public function clearIgnoredOrganic():void{
_tracker.clearIgnoredOrganic();
}
public function set account(_arg1:String):void{
_account = _arg1;
}
public function setVar(_arg1:String):void{
_tracker.setVar(_arg1);
}
public function build():void{
if (!isReady()){
_factory();
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
_eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function setDomainName(_arg1:String):void{
_tracker.setDomainName(_arg1);
}
public function createEventTracker(_arg1:String):EventTracker{
return (_tracker.createEventTracker(_arg1));
}
public function setCampSourceKey(_arg1:String):void{
_tracker.setCampSourceKey(_arg1);
}
public function set config(_arg1:Configuration):void{
_config = _arg1;
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void{
_tracker.addTrans(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function setCampContentKey(_arg1:String):void{
_tracker.setCampContentKey(_arg1);
}
public function willTrigger(_arg1:String):Boolean{
return (_eventDispatcher.willTrigger(_arg1));
}
public function setLocalServerMode():void{
_tracker.setLocalServerMode();
}
public function isReady():Boolean{
return (_ready);
}
public function getLocalGifPath():String{
return (_tracker.getLocalGifPath());
}
public function setAllowAnchor(_arg1:Boolean):void{
_tracker.setAllowAnchor(_arg1);
}
public function clearIgnoredRef():void{
_tracker.clearIgnoredRef();
}
public function get mode():String{
return (_mode);
}
public function set debug(_arg1:DebugConfiguration):void{
_debug = _arg1;
}
public function setLocalGifPath(_arg1:String):void{
_tracker.setLocalGifPath(_arg1);
}
public function getVersion():String{
return (_tracker.getVersion());
}
public function setSampleRate(_arg1:Number):void{
_tracker.setSampleRate(_arg1);
}
public function setCookiePath(_arg1:String):void{
_tracker.setCookiePath(_arg1);
}
public function setAllowHash(_arg1:Boolean):void{
_tracker.setAllowHash(_arg1);
}
public function addIgnoredOrganic(_arg1:String):void{
_tracker.addIgnoredOrganic(_arg1);
}
public function setLocalRemoteServerMode():void{
_tracker.setLocalRemoteServerMode();
}
public function cookiePathCopy(_arg1:String):void{
_tracker.cookiePathCopy(_arg1);
}
private function _factory():void{
var _local1:GoogleAnalyticsAPI;
_jsproxy = new JavascriptProxy(debug);
if (visualDebug){
debug.layout = new Layout(debug, _display);
debug.active = visualDebug;
};
var _local2:TrackerCache = (_tracker as TrackerCache);
switch (mode){
case TrackerMode.BRIDGE:
_local1 = _bridgeFactory();
break;
case TrackerMode.AS3:
default:
_local1 = _trackerFactory();
};
if (!_local2.isEmpty()){
_local2.tracker = _local1;
_local2.flush();
};
_tracker = _local1;
_ready = true;
dispatchEvent(new AnalyticsEvent(AnalyticsEvent.READY, this));
}
public function setCampTermKey(_arg1:String):void{
_tracker.setCampTermKey(_arg1);
}
private function _trackerFactory():GoogleAnalyticsAPI{
debug.info(((("GATracker (AS3) v" + version) + "\naccount: ") + account));
_adSense = new AdSenseGlobals(debug);
_dom = new HTMLDOM(debug);
_dom.cacheProperties();
_env = new Environment("", "", "", debug, _dom);
_buffer = new Buffer(config, debug, false);
_gifRequest = new GIFRequest(config, debug, _buffer, _env);
_idleTimer = new IdleTimer(config, debug, _display, _buffer);
_ecom = new Ecommerce(_debug);
_env.url = _display.stage.loaderInfo.url;
return (new Tracker(account, config, debug, _env, _buffer, _gifRequest, _adSense, _ecom));
}
public function setCampNOKey(_arg1:String):void{
_tracker.setCampNOKey(_arg1);
}
public function setDetectTitle(_arg1:Boolean):void{
_tracker.setDetectTitle(_arg1);
}
public function clearOrganic():void{
_tracker.clearOrganic();
}
public function setCampaignTrack(_arg1:Boolean):void{
_tracker.setCampaignTrack(_arg1);
}
public function addIgnoredRef(_arg1:String):void{
_tracker.addIgnoredRef(_arg1);
}
public function getServiceMode():ServerOperationMode{
return (_tracker.getServiceMode());
}
public function set visualDebug(_arg1:Boolean):void{
_visualDebug = _arg1;
}
public function setCampMediumKey(_arg1:String):void{
_tracker.setCampMediumKey(_arg1);
}
public function getDetectFlash():Boolean{
return (_tracker.getDetectFlash());
}
public function get visualDebug():Boolean{
return (_visualDebug);
}
public function hasEventListener(_arg1:String):Boolean{
return (_eventDispatcher.hasEventListener(_arg1));
}
public function getAccount():String{
return (_tracker.getAccount());
}
public function setSessionTimeout(_arg1:int):void{
_tracker.setSessionTimeout(_arg1);
}
public function setRemoteServerMode():void{
_tracker.setRemoteServerMode();
}
}
var _local1:* = ServerOperationMode;
return (_local1);
}//package com.google.analytics
Section 86
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent)
package com.kongregate.as3.client.events {
import flash.events.*;
public class KongregateEvent extends Event {
public static const COMPLETE:String = "component_api_available";
public function KongregateEvent(_arg1:String){
super(_arg1);
}
}
}//package com.kongregate.as3.client.events
Section 87
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService)
package com.kongregate.as3.client.services {
import flash.events.*;
public class AbstractShadowService extends EventDispatcher {
protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{
trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4));
}
}
}//package com.kongregate.as3.client.services
Section 88
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow)
package com.kongregate.as3.client.services {
public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices {
private var mode:String;
public function HighScoreServiceShadow(){
mode = "";
}
public function submit(_arg1:Number, _arg2:String=null):void{
alert("IHighScoreServices", "submit", arguments);
}
public function connect():Boolean{
alert("IKongregateServices", "connect");
return (true);
}
public function requestList(_arg1:Function):void{
alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]"));
_arg1({success:false});
}
public function setMode(_arg1:String):void{
alert("IHighScoreServices", "setMode", arguments);
this.mode = _arg1;
}
}
}//package com.kongregate.as3.client.services
Section 89
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices)
package com.kongregate.as3.client.services {
public interface IHighScoreServices {
function setMode(_arg1:String):void;
function submit(_arg1:Number, _arg2:String=null):void;
function requestList(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 90
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices)
package com.kongregate.as3.client.services {
import flash.events.*;
public interface IKongregateServices extends IEventDispatcher {
function getPlayerInfo(_arg1:Function):void;
function connect(_arg1:Number=-1):Boolean;
}
}//package com.kongregate.as3.client.services
Section 91
//IStatServices (com.kongregate.as3.client.services.IStatServices)
package com.kongregate.as3.client.services {
public interface IStatServices {
function submitArray(_arg1:Array):void;
function submit(_arg1:String, _arg2:Number):void;
}
}//package com.kongregate.as3.client.services
Section 92
//IUserServices (com.kongregate.as3.client.services.IUserServices)
package com.kongregate.as3.client.services {
public interface IUserServices {
function getName():String;
function getPlayerInfo(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 93
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow)
package com.kongregate.as3.client.services {
public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices {
public function getName():String{
alert("IKongregateServices", "getName");
return ("Guest");
}
public function connect(_arg1:Number=-1):Boolean{
alert("IKongregateServices", "connect", arguments);
return (true);
}
public function getPlayerInfo(_arg1:Function):void{
alert("IKongregateServices", "getPlayerInfo");
_arg1(new Object());
}
}
}//package com.kongregate.as3.client.services
Section 94
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow)
package com.kongregate.as3.client.services {
public class StatServiceShadow extends AbstractShadowService implements IStatServices {
public function submitArray(_arg1:Array):void{
alert("IStatServices", "submitArray", arguments);
}
public function submit(_arg1:String, _arg2:Number):void{
alert("IStatServices", "submitStat", arguments);
}
}
}//package com.kongregate.as3.client.services
Section 95
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow)
package com.kongregate.as3.client.services {
public class UserServiceShadow extends AbstractShadowService implements IUserServices {
public function getName():String{
alert("UserService", "getName");
return ("Guest");
}
public function getPlayerInfo(_arg1:Function):void{
alert("UserService", "getPlayerInfo");
_arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""});
}
}
}//package com.kongregate.as3.client.services
Section 96
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap)
package com.kongregate.as3.client {
import flash.display.*;
import flash.events.*;
public interface IAPIBootstrap {
function init(_arg1:Event=null, _arg2:Stage=null):void;
function hideLog():void;
function showLog(_arg1:int=0):void;
}
}//package com.kongregate.as3.client
Section 97
//KongregateAPI (com.kongregate.as3.client.KongregateAPI)
package com.kongregate.as3.client {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.kongregate.as3.client.services.*;
import flash.utils.*;
import flash.system.*;
import com.kongregate.as3.client.events.*;
import flash.errors.*;
public class KongregateAPI extends Sprite {
private const VERSION:Number = 1;
private var loader:Loader;
private var loadedDomain:ApplicationDomain;
private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices";
private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices";
private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices";
private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices";
private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf";
private static var _connected:Boolean;
private static var kUser:IUserServices;
private static var _loaded:Boolean;
private static var kServices:IKongregateServices;
private static var kScores:IHighScoreServices;
private static var mInstance:KongregateAPI;
private static var kStats:IStatServices;
private static var kAPI:IAPIBootstrap;
public function KongregateAPI(){
if (mInstance != null){
throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access."));
};
mInstance = this;
this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
public function get loaded():Boolean{
return (_loaded);
}
public function get connected():Boolean{
return (_connected);
}
private function alertConnected(_arg1:TimerEvent=null):void{
var _local2:KongregateEvent;
var _local3:Boolean;
_local2 = new KongregateEvent(KongregateEvent.COMPLETE);
_local3 = this.dispatchEvent(_local2);
}
private function init(_arg1:Event):void{
var _local2:Object;
var _local3:String;
var _local4:URLRequest;
var _local5:LoaderContext;
this.removeEventListener(Event.ADDED_TO_STAGE, init);
_loaded = false;
_connected = false;
_local2 = LoaderInfo(root.loaderInfo).parameters;
_local3 = _local2.api_path;
if (_local3 == null){
trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded.");
createShadowServices();
return;
};
Security.allowDomain("*.kongregate.com");
Security.allowDomain("kongregatetrunk.com");
_local4 = new URLRequest(_local3);
_local5 = new LoaderContext(false);
_local5.applicationDomain = ApplicationDomain.currentDomain;
_local5.securityDomain = SecurityDomain.currentDomain;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(_local4, _local5);
}
public function get api():IAPIBootstrap{
return (kAPI);
}
private function loadComplete(_arg1:Event):void{
getServices();
}
public function get scores():IHighScoreServices{
return (kScores);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
throw (new IOError(("API file not found. " + _arg1)));
}
public function get services():IKongregateServices{
return (kServices);
}
public function get stats():IStatServices{
return (kStats);
}
private function createShadowServices():void{
var _local1:Timer;
trace(">>> Kongregate Shadow Services instantiated for local development..");
kServices = new KongregateServiceShadow();
kScores = new HighScoreServiceShadow();
kStats = new StatServiceShadow();
kUser = new UserServiceShadow();
_local1 = new Timer(200, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected);
_local1.start();
_connected = true;
}
public function get user():IUserServices{
return (kUser);
}
private function getServices():void{
var _local1:ApplicationDomain;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = ApplicationDomain.currentDomain;
kAPI = IAPIBootstrap(loader.getChildAt(0));
this.addChild(loader);
_local2 = _local1.getDefinition(CLASS_SERVICES);
trace(_local2);
kServices = _local2.getInstance();
_local3 = _local1.getDefinition(CLASS_SCORES);
kScores = _local3.getInstance();
_local4 = _local1.getDefinition(CLASS_STATS);
kStats = _local4.getInstance();
_local5 = _local1.getDefinition(CLASS_USER);
kUser = _local5.getInstance();
kServices.connect(VERSION);
_loaded = true;
_connected = true;
alertConnected();
}
public static function getInstance():KongregateAPI{
if (!mInstance){
throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it."));
};
return (mInstance);
}
}
}//package com.kongregate.as3.client
Section 98
//FadeInStateCommand (cotogames.carmack.core.commands.FadeInStateCommand)
package cotogames.carmack.core.commands {
import cotogames.carmack.core.*;
import cotogames.carmack.core.states.*;
public class FadeInStateCommand extends Command {
private var state:CoreState;
public function FadeInStateCommand(_arg1:CoreState){
this.state = _arg1;
}
override public function execute():void{
GameManager.Instance.clearStates();
GameManager.Instance.pushState(state);
GameManager.Instance.pushState(new FadeInCoreState());
}
}
}//package cotogames.carmack.core.commands
Section 99
//CoreState (cotogames.carmack.core.states.CoreState)
package cotogames.carmack.core.states {
import flash.events.*;
public class CoreState {
public var name:String;
public function keyDown(_arg1:KeyboardEvent):void{
}
public function draw():void{
}
public function mouseDown(_arg1:MouseEvent):void{
}
public function update(_arg1:Number):void{
}
public function keyUp(_arg1:KeyboardEvent):void{
}
public function mouseMove(_arg1:MouseEvent):void{
}
public function prepare():void{
}
}
}//package cotogames.carmack.core.states
Section 100
//EndingState (cotogames.carmack.core.states.EndingState)
package cotogames.carmack.core.states {
import flash.display.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.core.commands.*;
public class EndingState extends CoreState {
public var how2:Boolean;// = false
public var currentTime:Number;// = 0
public var playedSecondSound:Boolean;// = false
public var playedFirstSound:Boolean;// = false
public var mc:MovieClip;
public var how:Boolean;// = false
public var playedThirdSound:Boolean;// = false
public static const THIRD_TOP:int = 0;
public static const FIRST_TOP:int = 0;
public static const FIRST_FADING_START:Number = 0.8;
public static const CLOSED_PICTURE_COLOR:int = 0x454545;
public static const SECOND_HEIGHT:int = 284;
public static const FADING_TIME:Number = 2;
public static const EXIT_TIME:Number = 17;
public static const SECOND_WIDTH:int = 234;
public static const FIRST_LEFT:int = 0;
public static const THIRD_HEIGHT:int = 450;
public static const SECOND_FADING_START:Number = 5;
public static const SECOND_TOP:int = 166;
public static const SECOND_LEFT:int = 0;
public static const THIRD_FADING_START:Number = 9.2;
public static const THIRD_WIDTH:int = 310;
public static const FIRST_HEIGHT:int = 161;
public static const FIRST_WIDTH:int = 234;
public static const THIRD_LEFT:int = 240;
public function EndingState(){
this.name = "Ending state";
MusicManager.play(ResourceManager.MenuMusicTrack);
}
override public function draw():void{
var _local2:Class;
var _local3:FadeOutCoreState;
if (how == false){
_local2 = MenuBitmapResources.EndingGraphicsClass;
mc = (new (_local2) as MovieClip);
mc.name = "intro";
GameManager.global_root.addChild(mc);
how = true;
};
var _local1:MovieClip = ((mc.getChildAt(0) as Loader).content as MovieClip);
if (_local1 != null){
if ((((((_local1.currentFrame == _local1.totalFrames)) && (!((_local1.currentFrame == 0))))) && ((how2 == false)))){
trace("FUCK!!!", mc.currentFrame, mc.totalFrames);
_local3 = new FadeOutCoreState();
_local3.command = new FadeInStateCommand(new GameFinishState());
GameManager.Instance.pushState(_local3);
how2 = true;
};
};
}
}
}//package cotogames.carmack.core.states
Section 101
//EraseProgressState (cotogames.carmack.core.states.EraseProgressState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.core.commands.*;
public class EraseProgressState extends CoreState {
public var left:int;
public var noLeftTop:Point;
public var yesField:TextField;
public var top:int;
public var noTextLeftTop:Point;
public var enlargeItem:Boolean;// = true
public var currentTime:Number;// = 0
public var yesLeftTop:Point;
public var margin:int;// = 38
public var rectangle:Shape;
public var ct:ColorTransform;
public var messageField:TextField;
public var gameOverField:TextField;
public var selectedGameOverOption:int;// = 1
public var noField:TextField;
public var yesTextLeftTop:Point;
public static const ITEM_ENLARGMENT:int = 4;
public static const ITEM_ENLARGMENT_TIME:Number = 0.3;
public static var WIDTH:int = 246;
public static var HEIGHT:int = 130;
public static var NEW_TEXT_APPEARENCE_TIME1:Number = 1.6;
public function EraseProgressState(){
var _local1:GameManager = GameManager.Instance;
ct = new ColorTransform(1, 1, 1, 0.64);
this.name = "Erase progress state";
left = ((_local1.width / 2) - (WIDTH / 2));
top = ((_local1.height / 2) - (HEIGHT / 2));
rectangle = new Shape();
rectangle.graphics.beginFill(0);
rectangle.graphics.drawRect(0, 0, GameManager.Instance.width, GameManager.Instance.height);
rectangle.graphics.endFill();
gameOverField = new TextField();
gameOverField.text = "Erase progress";
gameOverField.wordWrap = true;
gameOverField.width = WIDTH;
gameOverField.height = HEIGHT;
gameOverField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedFormat());
gameOverField.embedFonts = true;
messageField = new TextField();
messageField.text = "Are you sure?";
messageField.width = WIDTH;
messageField.height = 40;
messageField.setTextFormat(CommonTextFormats.getIngameMenuItemFormat());
messageField.embedFonts = true;
yesField = new TextField();
yesField.text = "Yes";
yesField.width = (WIDTH - (margin * 2));
yesField.height = 40;
yesField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
yesField.embedFonts = true;
yesLeftTop = new Point(((left + margin) - 56), ((top + 95) - (yesField.textHeight / 2)));
yesTextLeftTop = new Point(((yesLeftTop.x + (yesField.width / 2)) - (yesField.textWidth / 2)), ((yesLeftTop.y + (yesField.height / 2)) - yesField.textHeight));
noField = new TextField();
noField.text = "No";
noField.width = (WIDTH - (margin * 2));
noField.height = 40;
noField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
noField.embedFonts = true;
noLeftTop = new Point(((left + margin) + 63), ((top + 95) - (noField.textHeight / 2)));
noTextLeftTop = new Point(((noLeftTop.x + (noField.width / 2)) - (noField.textWidth / 2)), ((noLeftTop.y + (noField.height / 2)) - noField.textHeight));
}
override public function draw():void{
var _local6:TextFormat;
var _local1:GameManager = GameManager.Instance;
GameManager.Instance.backBuffer.draw(rectangle, null, ct);
var _local2:Shape = GraphicUtils.generateRoundedRectangle(0, 0, WIDTH, HEIGHT, 16737894, 18);
var _local3:Matrix = new Matrix();
_local3.translate(left, top);
_local1.backBuffer.draw(_local2, _local3, ct);
_local3 = new Matrix();
_local3.translate(left, (top + 12));
_local1.backBuffer.draw(gameOverField, _local3);
_local3 = new Matrix();
_local3.translate(left, (top + 46));
_local1.backBuffer.draw(messageField, _local3);
var _local4:int;
var _local5:Number = (currentTime / ITEM_ENLARGMENT_TIME);
if (enlargeItem){
_local4 = (_local5 * ITEM_ENLARGMENT);
} else {
_local4 = (ITEM_ENLARGMENT - (_local5 * ITEM_ENLARGMENT));
};
if (_local5 >= 1){
currentTime = 0;
enlargeItem = !(enlargeItem);
};
_local4 = 0;
if (selectedGameOverOption == 0){
_local6 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local6.size + _local4);
} else {
_local6 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
yesField.setTextFormat(_local6);
yesField.embedFonts = true;
_local3 = new Matrix();
var _local7:int = ((top + 95) - (yesField.textHeight / 2));
_local3.translate(((left + margin) - 56), _local7);
_local1.backBuffer.draw(yesField, _local3);
if (selectedGameOverOption == 1){
_local6 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local6.size + _local4);
} else {
_local6 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
noField.setTextFormat(_local6);
noField.embedFonts = true;
_local3 = new Matrix();
var _local8:int = ((top + 95) - (noField.textHeight / 2));
_local3.translate(((left + margin) + 63), _local8);
_local1.backBuffer.draw(noField, _local3);
}
override public function update(_arg1:Number):void{
currentTime = (currentTime + _arg1);
var _local2:GameManager = GameManager.Instance;
}
public function makeAction(_arg1:int):void{
var _local2:FadeOutCoreState;
if (_arg1 == 0){
GameManager.Instance.clearSaveData(null);
_local2 = new FadeOutCoreState();
_local2.command = new FadeInStateCommand(new SelectLevelState());
GameManager.Instance.pushState(_local2);
} else {
GameManager.Instance.popState();
};
}
override public function mouseMove(_arg1:MouseEvent):void{
if ((((((((_arg1.stageX > yesTextLeftTop.x)) && ((_arg1.stageY > yesTextLeftTop.y)))) && ((_arg1.stageX < (yesTextLeftTop.x + yesField.textWidth))))) && ((_arg1.stageY < (yesTextLeftTop.y + yesField.textHeight))))){
if (selectedGameOverOption == 0){
return;
};
ResourceManager.ClickFX.play();
selectedGameOverOption = 0;
};
if ((((((((_arg1.stageX > noTextLeftTop.x)) && ((_arg1.stageY > noTextLeftTop.y)))) && ((_arg1.stageX < (noTextLeftTop.x + noField.textWidth))))) && ((_arg1.stageY < (noTextLeftTop.y + noField.textHeight))))){
if (selectedGameOverOption == 1){
return;
};
ResourceManager.ClickFX.play();
selectedGameOverOption = 1;
};
}
override public function keyDown(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 13)) || ((_arg1.keyCode == 32)))){
ResourceManager.ClickFX.play();
makeAction(selectedGameOverOption);
};
if (_arg1.keyCode == 37){
ResourceManager.ClickFX.play();
if (selectedGameOverOption > 0){
selectedGameOverOption--;
};
};
if (_arg1.keyCode == 39){
ResourceManager.ClickFX.play();
if (selectedGameOverOption < 1){
selectedGameOverOption++;
};
};
}
override public function mouseDown(_arg1:MouseEvent):void{
if ((((((((_arg1.stageX > yesTextLeftTop.x)) && ((_arg1.stageY > yesTextLeftTop.y)))) && ((_arg1.stageX < (yesTextLeftTop.x + yesField.textWidth))))) && ((_arg1.stageY < (yesTextLeftTop.y + yesField.textHeight))))){
ResourceManager.ClickFX.play();
selectedGameOverOption = 0;
makeAction(0);
};
if ((((((((_arg1.stageX > noTextLeftTop.x)) && ((_arg1.stageY > noTextLeftTop.y)))) && ((_arg1.stageX < (noTextLeftTop.x + noField.textWidth))))) && ((_arg1.stageY < (noTextLeftTop.y + noField.textHeight))))){
ResourceManager.ClickFX.play();
selectedGameOverOption = 1;
makeAction(1);
};
}
}
}//package cotogames.carmack.core.states
Section 102
//FadeInCoreState (cotogames.carmack.core.states.FadeInCoreState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import cotogames.carmack.core.*;
public class FadeInCoreState extends CoreState {
public var fadingInTime:Number;// = 0
public static var DURATION_FADE_IN:Number = 0.7;
public function FadeInCoreState(){
this.name = "Fade in state";
}
override public function update(_arg1:Number):void{
fadingInTime = (fadingInTime + _arg1);
}
override public function draw():void{
var _local1:Number = (fadingInTime / DURATION_FADE_IN);
if (_local1 > 1){
_local1 = 1;
GameManager.Instance.popState();
};
var _local2:Number = (1 - _local1);
var _local3:Shape = new Shape();
_local3.graphics.beginFill(0);
_local3.graphics.drawRect(0, 0, GameManager.Instance.width, GameManager.Instance.height);
_local3.graphics.endFill();
var _local4:ColorTransform = new ColorTransform();
_local4.alphaMultiplier = _local2;
GameManager.Instance.backBuffer.draw(_local3, null, _local4);
}
}
}//package cotogames.carmack.core.states
Section 103
//FadeOutCoreState (cotogames.carmack.core.states.FadeOutCoreState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import cotogames.carmack.core.*;
public class FadeOutCoreState extends CoreState {
public var fadingInTime:Number;// = 0
public var command:Command;// = null
public static var DURATION_FADE_OUT:Number = 0.7;
public function FadeOutCoreState(){
this.name = "Fade out state";
}
override public function draw():void{
var _local1:Number = (fadingInTime / DURATION_FADE_OUT);
if (_local1 > 1){
_local1 = 1;
GameManager.Instance.backBuffer.fillRect(GameManager.Instance.backBuffer.rect, 0);
if (command != null){
command.execute();
};
};
var _local2:Shape = new Shape();
_local2.graphics.beginFill(0);
_local2.graphics.drawRect(0, 0, GameManager.Instance.width, GameManager.Instance.height);
_local2.graphics.endFill();
var _local3:ColorTransform = new ColorTransform();
_local3.alphaMultiplier = _local1;
GameManager.Instance.backBuffer.draw(_local2, null, _local3);
}
override public function update(_arg1:Number):void{
fadingInTime = (fadingInTime + _arg1);
}
}
}//package cotogames.carmack.core.states
Section 104
//GameFinishState (cotogames.carmack.core.states.GameFinishState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.gamestates.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.core.commands.*;
import cotogames.carmack.menus.*;
import com.gamezhero.api.as3.*;
public class GameFinishState extends CoreState {
public var youWonField:TextField;
public var anykeyField:TextField;
public var robotsKilledValueField:TextField;
public var how:Boolean;// = false
public var backgroundShape:Shape;
public var summaryValueField:TextField;
private var overallSummary:int;// = 0
public var statsField:TextField;
public var mc:MovieClip;
public var summaryField:TextField;
public var currentTime:Number;// = 0
public var timeField:TextField;
public var robotsAvoidedField:TextField;
public var showAnyKey:Boolean;// = false
public var robotsAvoidedValueField:TextField;
public var robotsKilledField:TextField;
public var timeValueField:TextField;
public static const TOP:int = 76;
public static const WIDTH:int = 300;
public static const ANY_KEY_INTERVAL:Number = 0.5;
public function GameFinishState(){
var _local2:LevelData;
super();
var _local1:BitmapData = GameManager.Instance.backBuffer;
var _local3:Number = 0;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
while (_local7 < GameManager.Instance.levelsData.length) {
_local2 = LevelData(GameManager.Instance.levelsData[_local7]);
_local3 = (_local3 + _local2.time);
_local4 = (_local4 + _local2.timePoints);
_local5 = (_local5 + _local2.robotsDestroyed);
_local6 = (_local6 + _local2.robotsAvoided);
overallSummary = (overallSummary + _local2.summary);
_local7++;
};
}
override public function draw():void{
var _local3:Matrix;
var _local4:Object;
var _local1:GameManager = GameManager.Instance;
var _local2:BitmapData = GameManager.Instance.backBuffer;
if (how == false){
GameManager.inGame.inGame = false;
mc = new MovieClip();
_local4 = {border:{width:6, color:0xFFFFFF, alpha:100}, background:{topColor:0x999999, bottomColor:0x666666, topAlpha:100, bottomAlpha:100, cornerRadius:15}, language:"ENG"};
GamezheroApi.score(mc, "158197164155171206155212165089154194159217170151147169168198202158170166171165159209165169216157135149165164171", overallSummary, 125, 75, submitAction, mainMenuAction, errorAction, _local4);
GameManager.global_root.addChild(mc);
trace(">>>", GameManager.global_root);
how = true;
};
}
override public function update(_arg1:Number):void{
currentTime = (currentTime + _arg1);
if (currentTime > ANY_KEY_INTERVAL){
currentTime = (currentTime - ANY_KEY_INTERVAL);
showAnyKey = !(showAnyKey);
};
}
private function mainMenuAction():void{
trace("YORE CODE AFTER MAIN MENU ACTION");
submitAction();
}
private function errorAction():void{
trace("YORE CODE AFTER ERROR ACTION");
submitAction();
}
private function submitAction():void{
GameManager.inGame.inGame = true;
trace("YORE CODE AFTER SUBMIT ACTION");
ResourceManager.ExitFX.play();
var fadeOutState:FadeOutCoreState = new FadeOutCoreState();
fadeOutState.command = new FadeInStateCommand(new MainMenuCoreState());
GameManager.Instance.pushState(fadeOutState);
try {
GameManager.global_root.removeChild(GameManager.global_root.getChildByName("intro"));
} catch(e:Error) {
};
}
override public function keyDown(_arg1:KeyboardEvent):void{
}
override public function mouseDown(_arg1:MouseEvent):void{
}
}
}//package cotogames.carmack.core.states
Section 105
//GameOverCoreState (cotogames.carmack.core.states.GameOverCoreState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.core.commands.*;
import flash.filters.*;
import com.gamezhero.api.as3.*;
public class GameOverCoreState extends CoreState {
public var moreGamesFieldLeftTop:Point;
public var menuShape:Shape;
public var retryLeftTop:Point;
public var left:int;
public var cTransform:ColorTransform;
public var top:int;
public var retryTextLeftTop:Point;
public var moreGamesFieldTop:Point;
public var quitTextLeftTop:Point;
public var enlargeItem:Boolean;// = true
public var currentTime:Number;// = 0
public var fadingInTime:Number;// = 0
public var margin:int;// = 10
public var rectangle:Shape;
public var ct:ColorTransform;
public var retryField:TextField;
public var messageField:TextField;
public var gameOverField:TextField;
public var moreGamesField:TextField;
public var selectedGameOverOption:int;// = 0
public var quitField:TextField;
public var quitLeftTop:Point;
public static const ITEM_ENLARGMENT_TIME:Number = 0.3;
public static const ITEM_ENLARGMENT:int = 4;
public static var FADE_OUT_TIME:Number = 0.8;
public static var WIDTH:int = 270;
public static var HEIGHT:int = 210;
public static var FADE_OUT_PERCENT:Number = 0.64;
public static var NEW_TEXT_APPEARENCE_TIME1:Number = 1.6;
public function GameOverCoreState(){
cTransform = new ColorTransform();
super();
var _local1:GameManager = GameManager.Instance;
left = ((_local1.width / 2) - (WIDTH / 2));
top = ((_local1.height / 2) - (HEIGHT / 2));
rectangle = new Shape();
rectangle.graphics.beginFill(0);
rectangle.graphics.drawRect(0, 0, GameManager.Instance.width, GameManager.Instance.height);
rectangle.graphics.endFill();
menuShape = new Shape();
menuShape.filters = [new GlowFilter(0)];
menuShape.graphics.lineStyle(6, 0xFFFFFF, 1);
menuShape.graphics.beginFill(0xFF0000);
menuShape.graphics.drawRoundRect(0, 0, WIDTH, HEIGHT, 18, 18);
menuShape.graphics.endFill();
ct = new ColorTransform(1, 1, 1, 0.64);
gameOverField = new TextField();
gameOverField.text = "You Dead!";
gameOverField.wordWrap = true;
gameOverField.width = WIDTH;
gameOverField.height = HEIGHT;
gameOverField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedFormat());
gameOverField.embedFonts = true;
messageField = new TextField();
messageField.text = "It happens. Try again.";
messageField.width = WIDTH;
messageField.height = 40;
messageField.setTextFormat(CommonTextFormats.getIngameMenuItemFormat());
messageField.embedFonts = true;
retryField = new TextField();
retryField.text = "Restart Level";
retryField.width = (WIDTH - (margin * 2));
retryField.height = 40;
retryField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
retryField.embedFonts = true;
retryLeftTop = new Point((left + margin), (top + 95));
retryTextLeftTop = new Point(((retryLeftTop.x + (retryField.width / 2)) - (retryField.textWidth / 2)), retryLeftTop.y);
quitField = new TextField();
quitField.text = "Quit";
quitField.width = (WIDTH - (margin * 2));
quitField.height = 40;
quitField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
quitField.embedFonts = true;
quitLeftTop = new Point((left + margin), (top + 125));
quitTextLeftTop = new Point(((quitLeftTop.x + (quitField.width / 2)) - (quitField.textWidth / 2)), quitLeftTop.y);
moreGamesField = new TextField();
moreGamesField.text = "More Games";
moreGamesField.width = (WIDTH - (margin * 2));
moreGamesField.height = 40;
moreGamesField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
moreGamesField.embedFonts = true;
moreGamesFieldTop = new Point((left + margin), (top + 155));
moreGamesFieldLeftTop = new Point(((moreGamesFieldTop.x + (moreGamesField.width / 2)) - (moreGamesField.textWidth / 2)), moreGamesFieldTop.y);
}
override public function keyDown(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 13)) || ((_arg1.keyCode == 32)))){
makeAction(selectedGameOverOption);
};
if (_arg1.keyCode == 38){
ResourceManager.ClickFX.play();
if (selectedGameOverOption > 0){
selectedGameOverOption--;
};
};
if (_arg1.keyCode == 40){
ResourceManager.ClickFX.play();
if (selectedGameOverOption < 2){
selectedGameOverOption++;
};
};
}
override public function update(_arg1:Number):void{
fadingInTime = (fadingInTime + _arg1);
currentTime = (currentTime + _arg1);
var _local2:GameManager = GameManager.Instance;
_local2.currentLevel.updateGraphics(_arg1);
}
protected function makeAction(_arg1:int):void{
var _local2:FadeOutCoreState;
var _local3:FadeOutCoreState;
if (_arg1 == 0){
_local2 = new FadeOutCoreState();
_local2.command = new StartLevelCommand(GameManager.Instance.currentLevelNumber);
GameManager.Instance.pushState(_local2);
};
if (_arg1 == 1){
_local3 = new FadeOutCoreState();
_local3.command = new FadeInStateCommand(new MainMenuCoreState());
MusicManager.play(ResourceManager.MenuMusicTrack);
GameManager.Instance.changeState(_local3);
};
if (_arg1 == 2){
GamezheroApi.linkMoreGames();
};
}
override public function mouseDown(_arg1:MouseEvent):void{
if ((((((((_arg1.stageX > retryTextLeftTop.x)) && ((_arg1.stageY > retryTextLeftTop.y)))) && ((_arg1.stageX < (retryTextLeftTop.x + retryField.textWidth))))) && ((_arg1.stageY < (retryTextLeftTop.y + retryField.textHeight))))){
ResourceManager.ClickFX.play();
selectedGameOverOption = 0;
makeAction(0);
};
if ((((((((_arg1.stageX > quitTextLeftTop.x)) && ((_arg1.stageY > quitTextLeftTop.y)))) && ((_arg1.stageX < (quitTextLeftTop.x + quitField.textWidth))))) && ((_arg1.stageY < (quitTextLeftTop.y + quitField.textHeight))))){
ResourceManager.ClickFX.play();
selectedGameOverOption = 1;
makeAction(1);
};
if ((((((((_arg1.stageX > moreGamesFieldLeftTop.x)) && ((_arg1.stageY > moreGamesFieldLeftTop.y)))) && ((_arg1.stageX < (moreGamesFieldLeftTop.x + moreGamesField.textWidth))))) && ((_arg1.stageY < (moreGamesFieldLeftTop.y + moreGamesField.textHeight))))){
ResourceManager.ClickFX.play();
selectedGameOverOption = 2;
makeAction(2);
};
}
override public function mouseMove(_arg1:MouseEvent):void{
if ((((((((_arg1.stageX > retryTextLeftTop.x)) && ((_arg1.stageY > retryTextLeftTop.y)))) && ((_arg1.stageX < (retryTextLeftTop.x + retryField.textWidth))))) && ((_arg1.stageY < (retryTextLeftTop.y + retryField.textHeight))))){
if (selectedGameOverOption == 0){
return;
};
ResourceManager.ClickFX.play();
selectedGameOverOption = 0;
};
if ((((((((_arg1.stageX > quitTextLeftTop.x)) && ((_arg1.stageY > quitTextLeftTop.y)))) && ((_arg1.stageX < (quitTextLeftTop.x + quitField.textWidth))))) && ((_arg1.stageY < (quitTextLeftTop.y + quitField.textHeight))))){
if (selectedGameOverOption == 1){
return;
};
ResourceManager.ClickFX.play();
selectedGameOverOption = 1;
};
if ((((((((_arg1.stageX > moreGamesFieldLeftTop.x)) && ((_arg1.stageY > moreGamesFieldLeftTop.y)))) && ((_arg1.stageX < (moreGamesFieldLeftTop.x + moreGamesField.textWidth))))) && ((_arg1.stageY < (moreGamesFieldLeftTop.y + moreGamesField.textHeight))))){
if (selectedGameOverOption == 2){
return;
};
ResourceManager.ClickFX.play();
selectedGameOverOption = 2;
};
}
override public function draw():void{
var _local4:Matrix;
var _local5:int;
var _local6:Number;
var _local7:TextFormat;
var _local8:int;
var _local9:int;
var _local10:int;
var _local1:GameManager = GameManager.Instance;
var _local2:Number = (fadingInTime / FADE_OUT_TIME);
if (_local2 > 1){
_local2 = 1;
};
var _local3:Number = (FADE_OUT_PERCENT * _local2);
cTransform.alphaMultiplier = _local3;
GameManager.Instance.backBuffer.draw(rectangle, null, cTransform);
if (_local2 >= 1){
_local4 = new Matrix();
_local4.translate(left, top);
_local1.backBuffer.draw(menuShape, _local4, ct);
_local4 = new Matrix();
_local4.translate(left, (top + 10));
_local1.backBuffer.draw(gameOverField, _local4);
_local4 = new Matrix();
_local4.translate(left, (top + 40));
_local1.backBuffer.draw(messageField, _local4);
_local5 = 0;
_local6 = (currentTime / ITEM_ENLARGMENT_TIME);
if (enlargeItem){
_local5 = (_local6 * ITEM_ENLARGMENT);
} else {
_local5 = (ITEM_ENLARGMENT - (_local6 * ITEM_ENLARGMENT));
};
_local5 = 0;
if (_local6 >= 1){
currentTime = 0;
enlargeItem = !(enlargeItem);
};
if (selectedGameOverOption == 0){
_local7 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local7.size + _local5);
} else {
_local7 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
retryField.setTextFormat(_local7);
retryField.embedFonts = true;
_local4 = new Matrix();
_local8 = ((top + 95) - (retryField.textHeight / 2));
_local4.translate((left + margin), (top + 95));
_local1.backBuffer.draw(retryField, _local4);
if (selectedGameOverOption == 1){
_local7 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local7.size + _local5);
} else {
_local7 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
quitField.setTextFormat(_local7);
quitField.embedFonts = true;
_local4 = new Matrix();
_local9 = ((top + 95) - (quitField.textHeight / 2));
_local4.translate((left + margin), (top + 125));
_local1.backBuffer.draw(quitField, _local4);
if (selectedGameOverOption == 2){
_local7 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local7.size + _local5);
} else {
_local7 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
moreGamesField.setTextFormat(_local7);
moreGamesField.embedFonts = true;
_local4 = new Matrix();
_local10 = ((top + 95) - (moreGamesField.textHeight / 2));
_local4.translate((left + margin), (top + 155));
_local1.backBuffer.draw(moreGamesField, _local4);
};
}
}
}//package cotogames.carmack.core.states
Section 106
//LevelCompleteCoreState (cotogames.carmack.core.states.LevelCompleteCoreState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.gamestates.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.core.commands.*;
import flash.filters.*;
import com.gamezhero.api.as3.*;
public class LevelCompleteCoreState extends CoreState {
public var moreGameTextLeftTop:Point;
protected var menuShape:Shape;
public var left:int;
public var submitScoreLeftTop:Point;
public var leftMargin:int;// = 22
public var selectedLevelCompleteOption:int;// = 0
public var statMargin:int;// = 24
public var robotsKilled:int;// = 0
public var submitScoreTextLeftTop:Point;
public var fadingInTime:Number;// = 0
public var totalTime:Number;// = 0
public var restartField:TextField;
public var margin:int;
public var summary:int;// = 0
public var restartLeftTop:Point;
public var submitScoreField:TextField;
public var nextField:TextField;
public var restartTextLeftTop:Point;
public var moreGameField:TextField;
public var top:int;
public var enlargeItem:Boolean;// = true
public var currentTime:Number;// = 0
public var moreGameLeftTop:Point;
public var topMargin:int;// = 48
public var someTimeFlag:Boolean;// = false
public var robotsNotKilled:int;// = 0
public var rightMargin:int;// = 70
public var nextLeftTop:Point;
public var totalTimePoints:int;// = 0
public var nextTextLeftTop:Point;
public var currentSomeTime:Number;// = 0
public static const ITEM_ENLARGMENT_TIME:Number = 0.3;
public static const ITEM_ENLARGMENT:int = 4;
public static var FADE_OUT_TIME:Number = 0.8;
public static var NEW_TEXT_APPEARENCE_TIME5:Number = 2.2;
public static var SOME_TIME:Number = 0.1;
public static var WIDTH:int = 280;
public static var HEIGHT:int = 280;
public static var FADE_OUT_PERCENT:Number = 0.64;
public static var NEW_TEXT_APPEARENCE_TIME1:Number = 1;
public static var NEW_TEXT_APPEARENCE_TIME2:Number = 1.3;
public static var NEW_TEXT_APPEARENCE_TIME4:Number = 1.9;
public static var NEW_TEXT_APPEARENCE_TIME3:Number = 1.6;
public function LevelCompleteCoreState(){
var ld:*;
super();
var overallSummary:Number = 0;
var i:int;
while (i < GameManager.Instance.levelsData.length) {
ld = LevelData(GameManager.Instance.levelsData[i]);
trace((">>" + ld.summary));
overallSummary = (overallSummary + ld.summary);
i = (i + 1);
};
try {
if (GameManager.kong.connected){
GameManager.kong.stats.submit("Top Score", overallSummary);
};
} catch(e:Error) {
};
this.name = "Level complete state";
var mng:GameManager = GameManager.Instance;
robotsKilled = GameManager.Instance.currentLevel.robotsKilled;
robotsNotKilled = GameManager.Instance.getCurrentLevelRobotsCount();
totalTime = GameManager.Instance.currentLevel.walkthroughTime;
totalTimePoints = ((1 - (totalTime / mng.currentLevel.estimatedTime)) * mng.currentLevel.points);
if (totalTimePoints < 0){
totalTimePoints = 0;
};
summary = (totalTimePoints + (robotsKilled * Constants.ROBOT_KILLED_POINTS));
summary = (summary + (robotsNotKilled * Constants.ROBOT_AVOIDED_POINTS));
var levelToSave:LevelData = (mng.levelsData[mng.currentLevelNumber] as LevelData);
if (levelToSave.summary < summary){
mng.completeLevel(mng.currentLevelNumber, totalTime, totalTimePoints, robotsKilled, robotsNotKilled, summary);
};
menuShape = new Shape();
menuShape.filters = [new GlowFilter(0)];
menuShape.graphics.lineStyle(6, 0xFFFFFF, 1);
menuShape.graphics.beginFill(0);
menuShape.graphics.drawRoundRect(0, 0, WIDTH, HEIGHT, 18, 18);
menuShape.graphics.endFill();
left = ((mng.width / 2) - (WIDTH / 2));
top = ((mng.height / 2) - (HEIGHT / 2));
margin = ((((10 + top) + topMargin) + (statMargin * 5)) - 20);
nextField = new TextField();
nextField.text = "Continue";
nextField.width = WIDTH;
nextField.height = 40;
nextField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
nextField.embedFonts = true;
nextLeftTop = new Point(left, (margin - (nextField.textHeight / 2)));
nextTextLeftTop = new Point(((nextLeftTop.x + (nextField.width / 2)) - (nextField.textWidth / 2)), nextLeftTop.y);
restartField = new TextField();
restartField.text = "Retry";
restartField.width = WIDTH;
restartField.height = 40;
restartField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
restartField.embedFonts = true;
restartLeftTop = new Point(left, ((margin - (restartField.textHeight / 2)) + 30));
restartTextLeftTop = new Point(((restartLeftTop.x + (restartField.width / 2)) - (restartField.textWidth / 2)), restartLeftTop.y);
moreGameField = new TextField();
moreGameField.text = "More games";
moreGameField.width = WIDTH;
moreGameField.height = 40;
moreGameField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
moreGameField.embedFonts = true;
moreGameLeftTop = new Point(left, ((margin - (moreGameField.textHeight / 2)) + 60));
moreGameTextLeftTop = new Point(((moreGameLeftTop.x + (moreGameField.width / 2)) - (moreGameField.textWidth / 2)), moreGameLeftTop.y);
submitScoreField = new TextField();
submitScoreField.text = "Submit Score";
submitScoreField.width = WIDTH;
submitScoreField.height = 40;
submitScoreField.setTextFormat(CommonTextFormats.getIngameMenuItemDeselectedSmallFormat());
submitScoreField.embedFonts = true;
submitScoreLeftTop = new Point(left, ((margin - (submitScoreField.textHeight / 2)) + 90));
submitScoreTextLeftTop = new Point(((submitScoreLeftTop.x + (submitScoreField.width / 2)) - (submitScoreField.textWidth / 2)), submitScoreLeftTop.y);
}
override public function mouseMove(_arg1:MouseEvent):void{
if ((((((((_arg1.stageX > nextTextLeftTop.x)) && ((_arg1.stageY > nextTextLeftTop.y)))) && ((_arg1.stageX < (nextTextLeftTop.x + nextField.textWidth))))) && ((_arg1.stageY < (nextTextLeftTop.y + nextField.textHeight))))){
if (selectedLevelCompleteOption == 0){
return;
};
ResourceManager.ClickFX.play();
selectedLevelCompleteOption = 0;
};
if ((((((((_arg1.stageX > restartTextLeftTop.x)) && ((_arg1.stageY > restartTextLeftTop.y)))) && ((_arg1.stageX < (restartTextLeftTop.x + restartField.textWidth))))) && ((_arg1.stageY < (restartTextLeftTop.y + restartField.textHeight))))){
if (selectedLevelCompleteOption == 1){
return;
};
ResourceManager.ClickFX.play();
selectedLevelCompleteOption = 1;
};
if ((((((((_arg1.stageX > moreGameTextLeftTop.x)) && ((_arg1.stageY > moreGameTextLeftTop.y)))) && ((_arg1.stageX < (moreGameTextLeftTop.x + moreGameField.textWidth))))) && ((_arg1.stageY < (moreGameTextLeftTop.y + moreGameField.textHeight))))){
if (selectedLevelCompleteOption == 2){
return;
};
ResourceManager.ClickFX.play();
selectedLevelCompleteOption = 2;
};
if ((((((((_arg1.stageX > submitScoreTextLeftTop.x)) && ((_arg1.stageY > submitScoreTextLeftTop.y)))) && ((_arg1.stageX < (submitScoreTextLeftTop.x + submitScoreField.textWidth))))) && ((_arg1.stageY < (submitScoreTextLeftTop.y + submitScoreField.textHeight))))){
if (selectedLevelCompleteOption == 3){
return;
};
ResourceManager.ClickFX.play();
selectedLevelCompleteOption = 3;
};
}
override public function keyDown(_arg1:KeyboardEvent):void{
if ((((fadingInTime > FADE_OUT_TIME)) && ((fadingInTime <= NEW_TEXT_APPEARENCE_TIME5)))){
return;
};
if ((((_arg1.keyCode == 13)) || ((_arg1.keyCode == 32)))){
makeAction(selectedLevelCompleteOption);
};
if (_arg1.keyCode == 38){
if (selectedLevelCompleteOption > 0){
ResourceManager.ClickFX.play();
selectedLevelCompleteOption--;
};
};
if (_arg1.keyCode == 40){
if (selectedLevelCompleteOption < 3){
ResourceManager.ClickFX.play();
selectedLevelCompleteOption++;
};
};
}
override public function update(_arg1:Number):void{
fadingInTime = (fadingInTime + _arg1);
if (fadingInTime > NEW_TEXT_APPEARENCE_TIME5){
currentTime = (currentTime + _arg1);
};
var _local2:GameManager = GameManager.Instance;
_local2.currentLevel.updateGraphics(_arg1);
}
override public function draw():void{
var _local6:ColorTransform;
var _local7:Matrix;
var _local8:TextFormat;
var _local9:TextField;
var _local10:Matrix;
var _local11:int;
var _local12:Number;
var _local13:TextFormat;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
var _local1:GameManager = GameManager.Instance;
var _local2:Number = (fadingInTime / FADE_OUT_TIME);
if (_local2 > 1){
_local2 = 1;
};
var _local3:Number = (FADE_OUT_PERCENT * _local2);
var _local4:Shape = new Shape();
_local4.graphics.beginFill(0);
_local4.graphics.drawRect(0, 0, GameManager.Instance.width, GameManager.Instance.height);
_local4.graphics.endFill();
var _local5:ColorTransform = new ColorTransform();
_local5.alphaMultiplier = _local3;
GameManager.Instance.backBuffer.draw(_local4, null, _local5);
if (_local2 >= 1){
_local6 = new ColorTransform(1, 1, 1, 0.64);
_local7 = new Matrix();
_local7.translate(left, top);
_local1.backBuffer.draw(menuShape, _local7, _local6);
_local8 = CommonTextFormats.getIngameMenuItemDeselectedFormat();
_local9 = new TextField();
_local9.text = "Level complete!";
_local9.textColor = 0xFFFFFF;
_local9.width = WIDTH;
_local9.height = 40;
_local9.setTextFormat(_local8);
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate(left, (top + 12));
_local1.backBuffer.draw(_local9, _local10);
if (fadingInTime > NEW_TEXT_APPEARENCE_TIME1){
_local9 = new TextField();
_local9.text = "Total time";
_local9.textColor = 0xFFFFFF;
_local9.autoSize = TextFieldAutoSize.CENTER;
_local9.wordWrap = true;
_local9.width = (WIDTH - 12);
_local9.height = 40;
_local9.setTextFormat(CommonTextFormats.getDefaultTextFormat());
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate((left + leftMargin), (top + topMargin));
_local1.backBuffer.draw(_local9, _local10);
_local9 = new TextField();
_local9.text = TimeFormat.formatTime(totalTime);
_local9.textColor = 0xFFFFFF;
_local9.autoSize = TextFieldAutoSize.RIGHT;
_local9.wordWrap = true;
_local9.width = 100;
_local9.height = 40;
_local9.setTextFormat(CommonTextFormats.getDefaultTextFormat());
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate(((left + WIDTH) - rightMargin), (top + topMargin));
_local1.backBuffer.draw(_local9, _local10);
};
if (fadingInTime > NEW_TEXT_APPEARENCE_TIME2){
_local9 = new TextField();
_local9.text = "Robots killed";
_local9.textColor = 0xFFFFFF;
_local9.autoSize = TextFieldAutoSize.CENTER;
_local9.wordWrap = true;
_local9.width = (WIDTH - 12);
_local9.height = 40;
_local9.setTextFormat(CommonTextFormats.getDefaultTextFormat());
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate((left + leftMargin), ((top + topMargin) + statMargin));
_local1.backBuffer.draw(_local9, _local10);
_local9 = new TextField();
_local9.text = (robotsKilled + " x 100");
_local9.textColor = 0xFFFFFF;
_local9.autoSize = TextFieldAutoSize.RIGHT;
_local9.wordWrap = true;
_local9.width = 100;
_local9.height = 40;
_local9.setTextFormat(CommonTextFormats.getDefaultTextFormat());
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate(((left + WIDTH) - rightMargin), ((top + topMargin) + statMargin));
_local1.backBuffer.draw(_local9, _local10);
};
if (fadingInTime > NEW_TEXT_APPEARENCE_TIME3){
_local9 = new TextField();
_local9.text = "Robots avoided";
_local9.textColor = 0xFFFFFF;
_local9.autoSize = TextFieldAutoSize.CENTER;
_local9.wordWrap = true;
_local9.width = (WIDTH - 12);
_local9.height = 40;
_local9.setTextFormat(CommonTextFormats.getDefaultTextFormat());
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate((left + leftMargin), ((top + topMargin) + (statMargin * 2)));
_local1.backBuffer.draw(_local9, _local10);
_local9 = new TextField();
_local9.text = (robotsNotKilled + " x 250");
_local9.textColor = 0xFFFFFF;
_local9.autoSize = TextFieldAutoSize.RIGHT;
_local9.wordWrap = true;
_local9.width = 100;
_local9.height = 40;
_local9.setTextFormat(CommonTextFormats.getDefaultTextFormat());
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate(((left + WIDTH) - rightMargin), ((top + topMargin) + (statMargin * 2)));
_local1.backBuffer.draw(_local9, _local10);
};
if (fadingInTime > NEW_TEXT_APPEARENCE_TIME4){
_local9 = new TextField();
_local9.text = "Summary";
_local9.textColor = 0xFFFFFF;
_local9.autoSize = TextFieldAutoSize.CENTER;
_local9.wordWrap = true;
_local9.width = (WIDTH - 12);
_local9.height = 40;
_local9.setTextFormat(CommonTextFormats.getDefaultTextFormat());
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate((left + leftMargin), ((top + topMargin) + (statMargin * 3)));
_local1.backBuffer.draw(_local9, _local10);
_local9 = new TextField();
_local9.text = (summary + "pt");
_local9.textColor = 0xFFFFFF;
_local9.autoSize = TextFieldAutoSize.RIGHT;
_local9.wordWrap = true;
_local9.width = 100;
_local9.height = 40;
_local9.setTextFormat(CommonTextFormats.getDefaultTextFormat());
_local9.embedFonts = true;
_local10 = new Matrix();
_local10.translate(((left + WIDTH) - rightMargin), ((top + topMargin) + (statMargin * 3)));
_local1.backBuffer.draw(_local9, _local10);
};
if (fadingInTime > NEW_TEXT_APPEARENCE_TIME5){
_local11 = 0;
_local12 = (currentTime / ITEM_ENLARGMENT_TIME);
if (enlargeItem){
_local11 = (_local12 * ITEM_ENLARGMENT);
} else {
_local11 = (ITEM_ENLARGMENT - (_local12 * ITEM_ENLARGMENT));
};
_local11 = 0;
if (_local12 >= 1){
currentTime = 0;
enlargeItem = !(enlargeItem);
};
if (selectedLevelCompleteOption == 0){
_local13 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local13.size + _local11);
} else {
_local13 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
nextField.setTextFormat(_local13);
nextField.embedFonts = true;
_local7 = new Matrix();
_local14 = (margin - (nextField.textHeight / 2));
_local7.translate(left, _local14);
_local1.backBuffer.draw(nextField, _local7);
if (selectedLevelCompleteOption == 1){
_local13 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local13.size + _local11);
} else {
_local13 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
restartField.setTextFormat(_local13);
restartField.embedFonts = true;
_local7 = new Matrix();
_local15 = ((margin - (restartField.textHeight / 2)) + 30);
_local7.translate(left, _local15);
_local1.backBuffer.draw(restartField, _local7);
if (selectedLevelCompleteOption == 2){
_local13 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local13.size + _local11);
} else {
_local13 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
moreGameField.setTextFormat(_local13);
moreGameField.embedFonts = true;
_local7 = new Matrix();
_local16 = ((margin - (moreGameField.textHeight / 2)) + 60);
_local7.translate(left, _local16);
_local1.backBuffer.draw(moreGameField, _local7);
if (selectedLevelCompleteOption == 3){
_local13 = CommonTextFormats.getIngameMenuItemSelectedSmallFormat();
CommonTextFormats.getIngameMenuItemSelectedSmallFormat().size = (_local13.size + _local11);
} else {
_local13 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat();
};
submitScoreField.setTextFormat(_local13);
submitScoreField.embedFonts = true;
_local7 = new Matrix();
_local17 = ((margin - (submitScoreField.textHeight / 2)) + 90);
_local7.translate(left, _local17);
_local1.backBuffer.draw(submitScoreField, _local7);
};
};
}
override public function keyUp(_arg1:KeyboardEvent):void{
if ((((fadingInTime > FADE_OUT_TIME)) && ((fadingInTime <= NEW_TEXT_APPEARENCE_TIME5)))){
fadingInTime = NEW_TEXT_APPEARENCE_TIME5;
return;
};
}
override public function mouseDown(_arg1:MouseEvent):void{
if ((((((((_arg1.stageX > nextTextLeftTop.x)) && ((_arg1.stageY > nextTextLeftTop.y)))) && ((_arg1.stageX < (nextTextLeftTop.x + nextField.textWidth))))) && ((_arg1.stageY < (nextTextLeftTop.y + nextField.textHeight))))){
selectedLevelCompleteOption = 0;
makeAction(0);
};
if ((((((((_arg1.stageX > restartTextLeftTop.x)) && ((_arg1.stageY > restartTextLeftTop.y)))) && ((_arg1.stageX < (restartTextLeftTop.x + restartField.textWidth))))) && ((_arg1.stageY < (restartTextLeftTop.y + restartField.textHeight))))){
selectedLevelCompleteOption = 1;
makeAction(1);
};
if ((((((((_arg1.stageX > moreGameTextLeftTop.x)) && ((_arg1.stageY > moreGameTextLeftTop.y)))) && ((_arg1.stageX < (moreGameTextLeftTop.x + moreGameField.textWidth))))) && ((_arg1.stageY < (moreGameTextLeftTop.y + moreGameField.textHeight))))){
selectedLevelCompleteOption = 2;
makeAction(2);
};
if ((((((((_arg1.stageX > submitScoreTextLeftTop.x)) && ((_arg1.stageY > submitScoreTextLeftTop.y)))) && ((_arg1.stageX < (submitScoreTextLeftTop.x + submitScoreField.textWidth))))) && ((_arg1.stageY < (submitScoreTextLeftTop.y + submitScoreField.textHeight))))){
selectedLevelCompleteOption = 2;
makeAction(3);
};
}
protected function makeAction(_arg1:int):void{
var _local2:FadeOutCoreState;
var _local3:FadeOutCoreState;
if (_arg1 == 0){
_local2 = new FadeOutCoreState();
if (GameManager.Instance.currentLevelNumber < 19){
_local2.command = new StartLevelCommand((GameManager.Instance.currentLevelNumber + 1));
} else {
MusicManager.stop();
_local2.command = new FadeInStateCommand(new EndingState());
};
GameManager.Instance.pushState(_local2);
};
if (_arg1 == 1){
_local3 = new FadeOutCoreState();
_local3.command = new StartLevelCommand(GameManager.Instance.currentLevelNumber);
GameManager.Instance.pushState(_local3);
};
if (_arg1 == 2){
GamezheroApi.linkMoreGames();
};
if (_arg1 == 3){
_local2 = new FadeOutCoreState();
_local2.command = new FadeInStateCommand(new GameFinishState());
GameManager.Instance.pushState(_local2);
};
}
}
}//package cotogames.carmack.core.states
Section 107
//MainMenuCoreState (cotogames.carmack.core.states.MainMenuCoreState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.core.commands.*;
import cotogames.carmack.menus.*;
import cotogames.carmack.objects.*;
import flash.filters.*;
import com.gamezhero.api.as3.*;
public class MainMenuCoreState extends CoreState {
public var z:MovieClip;
public var textFields:Array;// = null
protected var left:int;// = 0
public var menuShape:Shape;
protected var top:int;// = 0
public var selectedItem:int;// = 0
public var menuItems:Array;// = null
public var enlargeItem:Boolean;// = true
public var currentTime:Number;// = 0
public var ct:ColorTransform;
public var twitter:MovieClip;
public static const ITEM_ENLARGMENT_TIME:Number = 0.36;
public static const ITEM_ENLARGMENT:int = 5;
public static var MENU_WIDTH:int = 200;
public static var MENU_HEIGHT:int = 180;
public static var MENU_CENTER_TOP:int = 240;
public static var MENU_CENTER_LEFT:int = 425;
public static var ITEM_MARGIN:int = 25;
public function MainMenuCoreState(){
var _local4:TextField;
var _local8:MenuItem;
super();
this.name = "Main menu core state";
this.left = ((MENU_CENTER_LEFT - (MENU_WIDTH / 2)) - 10);
this.top = ((MENU_CENTER_TOP - (MENU_HEIGHT / 2)) - 20);
var _local1:TextFormat = CommonTextFormats.getMainMenuSelectedTextFormat();
var _local2:TextFormat = CommonTextFormats.getMainMenuTextFormat();
var _local3 = 27;
ITEM_MARGIN = 30;
menuItems = new Array();
menuItems.push(new MenuItem("Start Game", left, (top + _local3), _local1, _local2));
menuItems.push(new MenuItem("Select Level", left, ((top + _local3) + ITEM_MARGIN), _local1, _local2));
menuItems.push(new MenuItem("How To Play", left, ((top + _local3) + (ITEM_MARGIN * 2)), _local1, _local2));
menuItems.push(new MenuItem("Top Score ", left, ((top + _local3) + (ITEM_MARGIN * 3)), _local1, _local2));
menuItems.push(new MenuItem("More Games", left, ((top + _local3) + (ITEM_MARGIN * 4)), _local1, _local2));
textFields = new Array();
var _local5:int;
while (_local5 < menuItems.length) {
_local8 = (menuItems[_local5] as MenuItem);
_local4 = new TextField();
_local4.text = _local8.text;
_local4.width = MENU_WIDTH;
_local4.embedFonts = true;
_local4.setTextFormat(_local8.generalTextFormat);
textFields.push(_local4);
_local8.leftTop = new Point(((_local8.left + (MENU_WIDTH / 2)) - (_local4.textWidth / 2)), (_local8.top - (_local4.textHeight / 2)));
_local8.rightBottom = new Point(((_local8.left + (MENU_WIDTH / 2)) + (_local4.textWidth / 2)), (_local8.top + (_local4.textHeight / 2)));
_local5++;
};
menuShape = new Shape();
menuShape.filters = [new GlowFilter(0)];
menuShape.graphics.lineStyle(6, 0xFFFFFF, 1);
menuShape.graphics.beginFill(0x666666);
menuShape.graphics.drawRoundRect(-15, 0, (MENU_WIDTH + 30), MENU_HEIGHT, 18, 18);
menuShape.graphics.endFill();
ct = new ColorTransform(1, 1, 1, 0.86);
var _local6:Class = MenuBitmapResources.ZorroClass;
z = new (_local6);
_local6 = MenuBitmapResources.TwitterClass;
twitter = new (_local6);
z.x = ((550 - 70) - 10);
z.y = ((450 - 70) - 10);
twitter.x = 10;
twitter.y = ((450 - 71) - 10);
var _local7:* = (z.getChildAt(0) as Loader).content;
trace(">>>", _local7, ((z.getChildAt(0) as Loader).content as MovieClip));
GameManager.global_root.addChild(z);
GameManager.global_root.addChild(twitter);
z.addEventListener(Event.COMPLETE, zOnStage);
twitter.addEventListener(Event.COMPLETE, twitterOnStage);
}
private function zOnStage(_arg1:Event=null):void{
var _local2:* = (z.getChildAt(0) as Loader).getChildAt(0);
var _local3:* = _local2.getChildAt(0);
trace("ON STAGE >>", _local3);
_local3.addEventListener(MouseEvent.CLICK, zClick);
}
override public function draw():void{
var _local3:TextFormat;
var _local4:TextField;
var _local5:Matrix;
var _local9:MenuItem;
var _local10:int;
var _local11:TextFormat;
var _local1:BitmapData = GameManager.Instance.backBuffer;
var _local2:GraphicsResource = MenuBitmapResources.MenuBackgroundGraphics;
_local1.copyPixels(_local2.bitmap, _local2.bitmap.rect, new Point(0, 0));
_local5 = new Matrix();
_local5.translate(left, top);
_local1.draw(menuShape, _local5, ct);
var _local6:Number = (currentTime / ITEM_ENLARGMENT_TIME);
var _local7:int;
if (enlargeItem){
_local7 = (_local6 * ITEM_ENLARGMENT);
} else {
_local7 = (ITEM_ENLARGMENT - (_local6 * ITEM_ENLARGMENT));
};
_local7 = 0;
if (_local6 >= 1){
currentTime = 0;
enlargeItem = !(enlargeItem);
};
var _local8:int;
while (_local8 < menuItems.length) {
_local9 = (menuItems[_local8] as MenuItem);
_local4 = (textFields[_local8] as TextField);
if (selectedItem == _local8){
_local11 = CommonTextFormats.getMainMenuSelectedTextFormat();
CommonTextFormats.getMainMenuSelectedTextFormat().size = (_local11.size + _local7);
_local4.setTextFormat(_local11);
} else {
_local4.setTextFormat(_local9.generalTextFormat);
};
_local5 = new Matrix();
_local10 = (_local9.top - (_local4.textHeight / 2));
_local5.translate(_local9.left, _local10);
_local1.draw(_local4, _local5);
_local8++;
};
}
override public function update(_arg1:Number):void{
currentTime = (currentTime + _arg1);
}
override public function mouseMove(_arg1:MouseEvent):void{
var _local3:MenuItem;
var _local2:int;
while (_local2 < menuItems.length) {
if (_local2 == selectedItem){
} else {
_local3 = (menuItems[_local2] as MenuItem);
if ((((((((_arg1.stageX > _local3.leftTop.x)) && ((_arg1.stageY > _local3.leftTop.y)))) && ((_arg1.stageX < _local3.rightBottom.x)))) && ((_arg1.stageY < _local3.rightBottom.y)))){
ResourceManager.ClickFX.play();
selectedItem = _local2;
break;
};
};
_local2++;
};
}
private function zTwitter(_arg1:Event=null):void{
trace("zClick");
GamezheroApi.linkTwitter();
}
override public function mouseDown(_arg1:MouseEvent):void{
var _local3:MenuItem;
var _local2:int;
while (_local2 < menuItems.length) {
_local3 = (menuItems[_local2] as MenuItem);
if ((((((((_arg1.stageX > _local3.leftTop.x)) && ((_arg1.stageY > _local3.leftTop.y)))) && ((_arg1.stageX < _local3.rightBottom.x)))) && ((_arg1.stageY < _local3.rightBottom.y)))){
makeAction(_local2);
return;
};
_local2++;
};
}
override public function keyDown(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 13)) || ((_arg1.keyCode == 32)))){
makeAction(selectedItem);
};
if (_arg1.keyCode == 38){
ResourceManager.ClickFX.play();
if (selectedItem > 0){
selectedItem--;
} else {
selectedItem = 2;
};
};
if (_arg1.keyCode == 40){
ResourceManager.ClickFX.play();
if (selectedItem < (menuItems.length - 1)){
selectedItem++;
} else {
selectedItem = 0;
};
};
}
private function twitterOnStage(_arg1:Event=null):void{
var _local2:* = (twitter.getChildAt(0) as Loader).getChildAt(0);
var _local3:* = _local2.getChildAt(0);
trace("ON STAGE >>", _local3);
_local3.addEventListener(MouseEvent.CLICK, zTwitter);
}
private function zClick(_arg1:Event=null):void{
trace("zClick");
GamezheroApi.linkZorroLogo();
}
protected function makeAction(_arg1:int):void{
var _local2:FadeOutCoreState;
switch (_arg1){
case 0:
ResourceManager.ExitFX.play();
_local2 = new FadeOutCoreState();
_local2.command = new StartLevelCommand(0);
GameManager.Instance.pushState(_local2);
break;
case 1:
ResourceManager.ClickFX.play();
_local2 = new FadeOutCoreState();
_local2.command = new FadeInStateCommand(new SelectLevelState());
GameManager.Instance.pushState(_local2);
break;
case 2:
ResourceManager.ClickFX.play();
GameManager.Instance.pushState(new ManualState());
break;
case 3:
GamezheroApi.linkTopScore();
break;
case 4:
GamezheroApi.linkMoreGames();
break;
};
}
}
}//package cotogames.carmack.core.states
Section 108
//ManualState (cotogames.carmack.core.states.ManualState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class ManualState extends CoreState {
public var backgroundShape:Shape;
public function ManualState(){
this.name = "Manual State";
var _local1:BitmapData = GameManager.Instance.backBuffer;
backgroundShape = new Shape();
backgroundShape.graphics.beginFill(0x666666);
backgroundShape.graphics.drawRect(0, 0, _local1.width, _local1.height);
backgroundShape.graphics.endFill();
}
override public function keyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 27){
ResourceManager.ClickFX.play();
GameManager.Instance.popState();
};
}
override public function draw():void{
var _local1:BitmapData = GameManager.Instance.backBuffer;
var _local2:GraphicsResource = MenuBitmapResources.ManualGraphics;
_local2.copyToBackBuffer(_local1, new Point());
}
override public function mouseDown(_arg1:MouseEvent):void{
ResourceManager.ClickFX.play();
GameManager.Instance.popState();
}
}
}//package cotogames.carmack.core.states
Section 109
//MenuCoreState (cotogames.carmack.core.states.MenuCoreState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.gamestates.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.core.commands.*;
import cotogames.carmack.menus.*;
import flash.filters.*;
import com.gamezhero.api.as3.*;
public class MenuCoreState extends CoreState {
public var textFields:Array;// = null
protected var left:int;// = 0
protected var menuShape:Shape;
protected var top:int;// = 0
public var menuItems:Array;// = null
public var enlargeItem:Boolean;// = true
public var currentTime:Number;// = 0
protected var fadingShape:Shape;
public var selectedMenuOption:int;// = 0
protected var ct:ColorTransform;
public static const WIDTH:int = 230;
public static const HEIGHT:int = 210;
public static const ITEM_MARGIN:int = 30;
public static const ITEM_ENLARGMENT:int = 5;
public static const ITEM_ENLARGMENT_TIME:Number = 0.4;
public function MenuCoreState(){
var _local5:TextField;
var _local7:MenuItem;
super();
this.name = "Menu state";
var _local1:GameManager = GameManager.Instance;
this.left = ((_local1.width / 2) - (WIDTH / 2));
this.top = ((_local1.height / 2) - (HEIGHT / 2));
var _local2:TextFormat = CommonTextFormats.getIngameMenuItemSelectedFormat();
var _local3:TextFormat = CommonTextFormats.getIngameMenuItemDeselectedFormat();
var _local4:int = ((top + 33) + 10);
menuItems = new Array();
menuItems.push(new MenuItem("Continue", left, _local4, _local2, _local3));
menuItems.push(new MenuItem("Restart", left, (_local4 + ITEM_MARGIN), _local2, _local3));
menuItems.push(new MenuItem("Manual", left, (_local4 + (ITEM_MARGIN * 2)), _local2, _local3));
menuItems.push(new MenuItem("Quit", left, (_local4 + (ITEM_MARGIN * 3)), _local2, _local3));
menuItems.push(new MenuItem("More Games", left, (_local4 + (ITEM_MARGIN * 4)), _local2, _local3));
textFields = new Array();
var _local6:int;
while (_local6 < menuItems.length) {
_local7 = (menuItems[_local6] as MenuItem);
_local5 = new TextField();
_local5.text = _local7.text;
_local5.width = WIDTH;
_local5.embedFonts = true;
_local5.setTextFormat(_local7.generalTextFormat);
textFields.push(_local5);
_local7.leftTop = new Point(((_local7.left + (WIDTH / 2)) - (_local5.textWidth / 2)), (_local7.top - (_local5.textHeight / 2)));
_local7.rightBottom = new Point(((_local7.left + (WIDTH / 2)) + (_local5.textWidth / 2)), (_local7.top + (_local5.textHeight / 2)));
_local6++;
};
fadingShape = new Shape();
fadingShape.graphics.beginFill(0);
fadingShape.graphics.drawRect(0, 0, _local1.backBuffer.width, _local1.backBuffer.height);
_local1.backBuffer.draw(fadingShape, null, ct);
menuShape = new Shape();
menuShape.filters = [new GlowFilter(0)];
menuShape.graphics.lineStyle(6, 0xFFFFFF, 1);
menuShape.graphics.beginFill(0x666666);
menuShape.graphics.beginFill(0xAAAAAA);
menuShape.graphics.drawRoundRect(0, 0, WIDTH, HEIGHT, 18, 18);
menuShape.graphics.endFill();
ct = new ColorTransform(1, 1, 1, 0.8);
}
override public function draw():void{
var _local6:MenuItem;
var _local7:TextField;
var _local8:int;
var _local9:TextFormat;
var _local1:GameManager = GameManager.Instance;
_local1.backBuffer.draw(fadingShape, null, ct);
var _local2:Matrix = new Matrix();
_local2.translate(left, top);
_local1.backBuffer.draw(menuShape, _local2, ct);
var _local3:Number = (currentTime / ITEM_ENLARGMENT_TIME);
var _local4:int;
if (enlargeItem){
_local4 = (_local3 * ITEM_ENLARGMENT);
} else {
_local4 = (ITEM_ENLARGMENT - (_local3 * ITEM_ENLARGMENT));
};
_local4 = 0;
if (_local3 >= 1){
currentTime = 0;
enlargeItem = !(enlargeItem);
};
var _local5:int;
while (_local5 < menuItems.length) {
_local6 = (menuItems[_local5] as MenuItem);
_local7 = (textFields[_local5] as TextField);
if (selectedMenuOption == _local5){
_local9 = CommonTextFormats.getIngameMenuItemSelectedFormat();
CommonTextFormats.getIngameMenuItemSelectedFormat().size = (_local9.size + _local4);
_local9.color = 65382;
_local7.setTextFormat(_local9);
} else {
_local7.setTextFormat(_local6.generalTextFormat);
};
_local2 = new Matrix();
_local8 = (_local6.top - (_local7.textHeight / 2));
_local2.translate(_local6.left, _local8);
_local1.backBuffer.draw(_local7, _local2);
_local5++;
};
}
override public function mouseMove(_arg1:MouseEvent):void{
var _local3:MenuItem;
var _local2:int;
while (_local2 < menuItems.length) {
if (_local2 == selectedMenuOption){
} else {
_local3 = (menuItems[_local2] as MenuItem);
if ((((((((_arg1.stageX > _local3.leftTop.x)) && ((_arg1.stageY > _local3.leftTop.y)))) && ((_arg1.stageX < _local3.rightBottom.x)))) && ((_arg1.stageY < _local3.rightBottom.y)))){
ResourceManager.ClickFX.play();
selectedMenuOption = _local2;
break;
};
};
_local2++;
};
}
override public function update(_arg1:Number):void{
currentTime = (currentTime + _arg1);
}
protected function makeAction(_arg1:int):void{
var _local2:FadeOutCoreState;
var _local3:FadeOutCoreState;
if (_arg1 == 0){
ResourceManager.ClickFX.play();
GameManager.Instance.popState();
};
if (_arg1 == 1){
ResourceManager.ClickFX.play();
_local2 = new FadeOutCoreState();
_local2.command = new StartLevelCommand(GameManager.Instance.currentLevelNumber);
GameManager.Instance.popState();
GameManager.Instance.pushState(_local2);
};
if (_arg1 == 2){
ResourceManager.ClickFX.play();
GameManager.Instance.pushState(new ManualState());
};
if (_arg1 == 3){
_local3 = new FadeOutCoreState();
_local3.command = new FadeInStateCommand(new MainMenuCoreState());
MusicManager.play(ResourceManager.MenuMusicTrack);
GameManager.Instance.pushState(_local3);
};
if (_arg1 == 4){
GamezheroApi.linkMoreGames();
};
}
override public function mouseDown(_arg1:MouseEvent):void{
var _local3:MenuItem;
var _local2:int;
while (_local2 < menuItems.length) {
_local3 = (menuItems[_local2] as MenuItem);
if ((((((((_arg1.stageX > _local3.leftTop.x)) && ((_arg1.stageY > _local3.leftTop.y)))) && ((_arg1.stageX < _local3.rightBottom.x)))) && ((_arg1.stageY < _local3.rightBottom.y)))){
ResourceManager.ClickFX.play();
makeAction(_local2);
return;
};
_local2++;
};
}
override public function keyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 27){
ResourceManager.ClickFX.play();
GameManager.Instance.popState();
};
if ((((_arg1.keyCode == 13)) || ((_arg1.keyCode == 32)))){
makeAction(selectedMenuOption);
};
if (_arg1.keyCode == 38){
ResourceManager.ClickFX.play();
if (selectedMenuOption > 0){
selectedMenuOption--;
} else {
selectedMenuOption = 4;
};
};
if (_arg1.keyCode == 40){
ResourceManager.ClickFX.play();
if (selectedMenuOption < 4){
selectedMenuOption++;
} else {
selectedMenuOption = 0;
};
};
}
}
}//package cotogames.carmack.core.states
Section 110
//PlayCoreState (cotogames.carmack.core.states.PlayCoreState)
package cotogames.carmack.core.states {
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.utils.*;
import flash.filters.*;
public class PlayCoreState extends CoreState {
public var inputAllowed:Boolean;// = true
public function PlayCoreState(){
this.name = "Gameplay state";
}
override public function keyDown(_arg1:KeyboardEvent):void{
var _local2:FadeOutCoreState;
var _local3:LevelEvent;
if (_arg1.keyCode == 27){
ResourceManager.ClickFX.play();
GameManager.Instance.pushState(new MenuCoreState());
};
if (((!(inputAllowed)) || ((GameManager.Instance.timeToWait > 0)))){
return;
};
if (_arg1.keyCode == 82){
_local2 = new FadeOutCoreState();
_local2.command = new StartLevelCommand(GameManager.Instance.currentLevelNumber);
GameManager.Instance.pushState(_local2);
};
if (_arg1.keyCode == 37){
if (GameManager.Instance.carmack.direction != GameObject.DIRECTION_LEFT){
GameManager.Instance.carmack.graphics = ResourceManager.RoboLeftGraphics;
GameManager.Instance.carmack.direction = GameObject.DIRECTION_LEFT;
} else {
if (!GameManager.Instance.currentLevel.canMove(GameManager.Instance.carmack.position, GameObject.DIRECTION_LEFT)){
return;
};
GameManager.Instance.carmack.nextCommand = PlayerCommands.MOVE_LEFT;
inputAllowed = false;
};
};
if (_arg1.keyCode == 38){
if (GameManager.Instance.carmack.direction != GameObject.DIRECTION_UP){
GameManager.Instance.carmack.graphics = ResourceManager.RoboUpGraphics;
GameManager.Instance.carmack.direction = GameObject.DIRECTION_UP;
} else {
if (!GameManager.Instance.currentLevel.canMove(GameManager.Instance.carmack.position, GameObject.DIRECTION_UP)){
return;
};
GameManager.Instance.carmack.nextCommand = PlayerCommands.MOVE_UP;
inputAllowed = false;
};
};
if (_arg1.keyCode == 39){
if (GameManager.Instance.carmack.direction != GameObject.DIRECTION_RIGHT){
GameManager.Instance.carmack.graphics = ResourceManager.RoboRightGraphics;
GameManager.Instance.carmack.direction = GameObject.DIRECTION_RIGHT;
} else {
if (!GameManager.Instance.currentLevel.canMove(GameManager.Instance.carmack.position, GameObject.DIRECTION_RIGHT)){
return;
};
GameManager.Instance.carmack.nextCommand = PlayerCommands.MOVE_RIGHT;
inputAllowed = false;
};
};
if (_arg1.keyCode == 40){
if (GameManager.Instance.carmack.direction != GameObject.DIRECTION_DOWN){
GameManager.Instance.carmack.graphics = ResourceManager.RoboDownGraphics;
GameManager.Instance.carmack.direction = GameObject.DIRECTION_DOWN;
} else {
if (!GameManager.Instance.currentLevel.canMove(GameManager.Instance.carmack.position, GameObject.DIRECTION_DOWN)){
return;
};
GameManager.Instance.carmack.nextCommand = PlayerCommands.MOVE_DOWN;
inputAllowed = false;
};
};
if (_arg1.keyCode == 90){
if (!GameManager.Instance.carmack.gunOn){
ResourceManager.BeepFX.play();
return;
};
switch (GameManager.Instance.carmack.direction){
case GameObject.DIRECTION_DOWN:
GameManager.Instance.carmack.nextCommand = PlayerCommands.SHOOT_DOWN;
break;
case GameObject.DIRECTION_UP:
GameManager.Instance.carmack.nextCommand = PlayerCommands.SHOOT_UP;
break;
case GameObject.DIRECTION_LEFT:
GameManager.Instance.carmack.nextCommand = PlayerCommands.SHOOT_LEFT;
break;
case GameObject.DIRECTION_RIGHT:
GameManager.Instance.carmack.nextCommand = PlayerCommands.SHOOT_RIGHT;
break;
};
inputAllowed = false;
};
if (_arg1.keyCode == 32){
GameManager.Instance.carmack.nextCommand = PlayerCommands.WAIT;
inputAllowed = false;
};
if (_arg1.keyCode == 88){
_local3 = GameManager.Instance.currentLevel.interactionPossible(GameManager.Instance.carmack.position, GameManager.Instance.carmack.direction);
if (_local3 != null){
GameManager.Instance.timeToWait = 1;
_local3.execute();
} else {
ResourceManager.BeepFX.play();
};
};
}
override public function update(_arg1:Number):void{
var _local3:int;
var _local4:GameObject;
var _local5:GameObject;
var _local2:GameManager = GameManager.Instance;
_local2.currentLevel.updateGraphics(_arg1);
if (_local2.carmack.gunOn){
ResourceManager.GunOnGraphics.update(_arg1);
};
if (_local2.timeToWait > 0){
_local2.timeWaited = (_local2.timeWaited + _arg1);
if (_local2.timeWaited > _local2.timeToWait){
_local2.timeToWait = 0;
_local2.timeWaited = 0;
} else {
return;
};
};
if (inputAllowed){
_local3 = 0;
while (_local3 < _local2.gameObjectsToMove.length) {
_local4 = (_local2.gameObjectsToMove.getItemAt(_local3) as GameObject);
_local4.updateIdle(_arg1);
_local3++;
};
};
if (!inputAllowed){
if (_local2.movingObject != null){
if (_local2.movingObject.moved){
_local2.movingObject = null;
} else {
_local2.movingObject.update(_arg1);
if (!_local2.movingObject.inuse){
_local2.movingObject = null;
};
};
};
if (_local2.movingObject == null){
_local3 = 0;
while (_local3 < _local2.gameObjectsToMove.length) {
_local5 = (_local2.gameObjectsToMove.getItemAt(_local3) as GameObject);
if (((!(_local5.moved)) && (!(_local5.inactive)))){
_local2.movingObject = _local5;
_local2.movingObject.oldPosition = _local2.movingObject.position.clone();
_local2.movingObject.timeMoved = 0;
};
_local3++;
};
if (_local2.movingObject == null){
inputAllowed = true;
_local3 = 0;
while (_local3 < _local2.gameObjectsToMove.length) {
_local5 = (_local2.gameObjectsToMove.getItemAt(_local3) as GameObject);
_local5.moved = false;
_local3++;
};
if ((((((_local2.movingObject == null)) && (_local2.currentLevel.canExit))) && (_local2.currentLevel.isLevelComplete()))){
_local2.pushState(new LevelCompleteCoreState());
};
};
};
};
}
override public function draw():void{
var _local6:GameObject;
var _local7:GraphicsResource;
var _local8:GraphicsResource;
var _local9:TextFormat;
var _local10:TextField;
var _local11:Matrix;
var _local1:GameManager = GameManager.Instance;
_local1.backBuffer.fillRect(_local1.backBuffer.rect, _local1.clearColor);
_local1.currentLevel.draw(_local1.backBuffer);
var _local2:int;
while (_local2 < _local1.gameObjectsToMove.length) {
_local6 = (_local1.gameObjectsToMove.getItemAt(_local2) as GameObject);
if (_local6.inuse){
if (((inputAllowed) && (_local6.idleAnimationOn))){
_local6.copyToBackBufferIdle(_local1.backBuffer);
} else {
_local6.copyToBackBuffer(_local1.backBuffer);
};
};
_local2++;
};
if (_local1.carmack.gunOn){
_local7 = ResourceManager.GunOnGraphics;
_local7.copyToBackBuffer(_local1.backBuffer, new Point(0, 0));
} else {
_local8 = ResourceManager.GunOffGraphics;
_local8.copyToBackBuffer(_local1.backBuffer, new Point(0, 0));
};
var _local3:Array = [new GlowFilter(0x666666, 1, 4, 4, 0xFF, 1)];
var _local4:TextField = new TextField();
_local4.filters = _local3;
_local4.text = ((("Level " + (_local1.currentLevelNumber + 1)) + ": ") + _local1.currentLevel.name);
_local4.textColor = 0xFFFFFF;
_local4.autoSize = TextFieldAutoSize.LEFT;
_local4.wordWrap = true;
_local4.width = 300;
_local4.height = 40;
_local4.setTextFormat(CommonTextFormats.getIntroTextFormat());
_local4.embedFonts = true;
var _local5:Matrix = new Matrix();
_local5.translate(54, 0);
GameManager.Instance.backBuffer.draw(_local4, _local5);
_local4 = new TextField();
_local4.filters = _local3;
_local4.text = ("Time: " + TimeFormat.formatTime(_local1.currentLevel.walkthroughTime));
_local4.textColor = 0xFFFFFF;
_local4.autoSize = TextFieldAutoSize.LEFT;
_local4.wordWrap = true;
_local4.width = 300;
_local4.height = 40;
_local4.setTextFormat(CommonTextFormats.getIntroTextFormat());
_local4.embedFonts = true;
_local5 = new Matrix();
_local5.translate(54, 10);
GameManager.Instance.backBuffer.draw(_local4, _local5);
_local4 = new TextField();
_local4.filters = _local3;
_local4.text = ("Gun: " + (_local1.carmack.gunOn) ? "ready" : "recharging...");
_local4.textColor = 0xFFFFFF;
_local4.autoSize = TextFieldAutoSize.LEFT;
_local4.wordWrap = true;
_local4.width = 300;
_local4.height = 40;
_local4.setTextFormat(CommonTextFormats.getIntroTextFormat());
_local4.embedFonts = true;
_local5 = new Matrix();
_local5.translate(54, 20);
GameManager.Instance.backBuffer.draw(_local4, _local5);
if (((!((_local1.currentLevel.introText == null))) && (!((_local1.currentLevel.introText == ""))))){
_local9 = CommonTextFormats.getIntroTextFormat2();
_local10 = new TextField();
_local10.filters = _local3;
_local10.text = _local1.currentLevel.introText;
_local10.textColor = 0xFF00;
_local10.autoSize = TextFieldAutoSize.CENTER;
_local10.wordWrap = true;
_local10.width = 325;
_local10.height = 100;
_local10.defaultTextFormat = _local9;
_local10.setTextFormat(_local9);
_local10.embedFonts = true;
_local11 = new Matrix();
_local11.translate(225, 0);
GameManager.Instance.backBuffer.draw(_local10, _local11);
};
}
}
}//package cotogames.carmack.core.states
Section 111
//SelectLevelState (cotogames.carmack.core.states.SelectLevelState)
package cotogames.carmack.core.states {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import cotogames.carmack.core.*;
import cotogames.carmack.gamestates.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.core.commands.*;
import cotogames.carmack.menus.*;
public class SelectLevelState extends CoreState {
protected var gameRobotsAvoidedField:TextField;
protected var gameSummaryField:TextField;
protected var levelTimeField:TextField;
protected var levelRobotsAvoidedField:TextField;
protected var levelSummaryField:TextField;
public var levelCenters:Array;
protected var gameRobotsDestroyedField:TextField;
protected var backgroundShape:Shape;
public var selectedLevel:int;// = 0
protected var levelRobotsDestroyedField:TextField;
protected var gameStatisticsField:TextField;
protected var gameTimeField:TextField;
public var levelNameTextField:TextField;
public var currentTime:Number;// = 0
public var enlargeItem:Boolean;// = false
public var levels:Array;
protected var tf:TextFormat;
protected var levelStatisticsField:TextField;
protected var selectLevelField:TextField;
protected var rectangle:Shape;
public static const LEVEL_SELECTED_COLOR:int = 16764108;
public static const ITEM_ENLARGMENT:int = 7;
public static const LEVELS_VERTICAL_MARGIN:int = 60;
public static const LEVELS_RADIUS:int = 20;
public static const LEVEL_BRIDGE_WIDTH:int = 2;
public static const LEVELS_TOP:int = 105;
public static const ITEM_ENLARGMENT_TIME:Number = 0.4;
public static const LEVEL_CLOSED_COLOR:int = 0x343434;
public static const LEVELS_LEFT:int = 35;
public static const LEVELS_HORIZONTAL_MARGIN:int = 60;
public static const LEVEL_DESELECTED_COLOR:int = 0xCCCCCC;
public function SelectLevelState(){
var _local3:LevelData;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
levelCenters = new Array();
levelNameTextField = new TextField();
super();
var _local1:GameManager = GameManager.Instance;
this.name = "Select level state";
this.levels = LevelBuilder.getLevels();
var _local2:BitmapData = GameManager.Instance.backBuffer;
rectangle = new Shape();
rectangle.graphics.beginFill(0xFFFFFF);
rectangle.graphics.drawRect(20, 45, 510, 5);
rectangle.graphics.endFill();
backgroundShape = new Shape();
backgroundShape.graphics.beginFill(0x666666);
backgroundShape.graphics.drawRect(0, 0, _local2.width, _local2.height);
backgroundShape.graphics.endFill();
var _local4:Number = 0;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
while (_local9 < levels.length) {
_local3 = LevelData(_local1.levelsData[_local9]);
_local11 = (_local9 / 5);
_local12 = (_local9 % 5);
if ((_local11 % 2) == 0){
_local13 = ((LEVELS_LEFT + (_local12 * LEVELS_HORIZONTAL_MARGIN)) + (LEVELS_RADIUS / 2));
} else {
_local13 = (((LEVELS_LEFT + (LEVELS_HORIZONTAL_MARGIN * 4)) - (_local12 * LEVELS_HORIZONTAL_MARGIN)) + (LEVELS_RADIUS / 2));
};
_local14 = ((LEVELS_TOP + (_local11 * LEVELS_VERTICAL_MARGIN)) + (LEVELS_RADIUS / 2));
levelCenters.push(new Point(_local13, _local14));
_local4 = (_local4 + _local3.time);
_local5 = (_local5 + _local3.timePoints);
_local6 = (_local6 + _local3.robotsDestroyed);
_local7 = (_local7 + _local3.robotsAvoided);
_local8 = (_local8 + _local3.summary);
_local9++;
};
selectLevelField = new TextField();
selectLevelField.text = "Select level";
selectLevelField.width = 400;
selectLevelField.embedFonts = true;
tf = CommonTextFormats.getIngameMenuItemDeselectedFormat();
tf.align = TextFormatAlign.LEFT;
selectLevelField.setTextFormat(tf);
var _local10:TextFormat = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat2();
_local10.size = 8;
_local10.align = TextFormatAlign.LEFT;
tf = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat2();
tf.size = 8;
tf.align = TextFormatAlign.LEFT;
levelStatisticsField = new TextField();
levelStatisticsField.text = "Level statistics";
levelStatisticsField.width = 200;
levelStatisticsField.embedFonts = true;
levelStatisticsField.setTextFormat(_local10);
gameStatisticsField = new TextField();
gameStatisticsField.text = "Game statistics";
gameStatisticsField.width = 200;
gameStatisticsField.embedFonts = true;
gameStatisticsField.setTextFormat(_local10);
levelTimeField = new TextField();
levelTimeField.text = "Total time: ";
levelTimeField.width = 200;
levelTimeField.embedFonts = true;
levelTimeField.setTextFormat(tf);
gameTimeField = new TextField();
gameTimeField.text = ("Total time: " + TimeFormat.formatTime(_local4));
gameTimeField.width = 200;
gameTimeField.embedFonts = true;
gameTimeField.setTextFormat(tf);
levelRobotsDestroyedField = new TextField();
levelRobotsDestroyedField.text = "Robots destroyed: ";
levelRobotsDestroyedField.width = 200;
levelRobotsDestroyedField.embedFonts = true;
levelRobotsDestroyedField.setTextFormat(tf);
gameRobotsDestroyedField = new TextField();
gameRobotsDestroyedField.text = (("Robots destroyed: " + _local6) + " x 100pt");
gameRobotsDestroyedField.width = 200;
gameRobotsDestroyedField.embedFonts = true;
gameRobotsDestroyedField.setTextFormat(tf);
levelRobotsAvoidedField = new TextField();
levelRobotsAvoidedField.text = "Robots avoided: ";
levelRobotsAvoidedField.width = 200;
levelRobotsAvoidedField.embedFonts = true;
levelRobotsAvoidedField.setTextFormat(tf);
gameRobotsAvoidedField = new TextField();
gameRobotsAvoidedField.text = (("Robots avoided: " + _local7) + " x 250pt");
gameRobotsAvoidedField.width = 200;
gameRobotsAvoidedField.embedFonts = true;
gameRobotsAvoidedField.setTextFormat(tf);
levelSummaryField = new TextField();
levelSummaryField.text = "Summary: 50s";
levelSummaryField.width = 200;
levelSummaryField.embedFonts = true;
levelSummaryField.setTextFormat(tf);
gameSummaryField = new TextField();
gameSummaryField.text = (("Summary: " + _local8) + "pt");
gameSummaryField.width = 200;
gameSummaryField.embedFonts = true;
gameSummaryField.setTextFormat(tf);
updateLevelInfo();
}
public function printHelp():void{
var _local2:TextField;
var _local3:TextFormat;
var _local4:Matrix;
var _local1:BitmapData = GameManager.Instance.backBuffer;
_local2 = new TextField();
_local2.text = "[Enter] or [Mouse] to start";
_local2.width = 200;
_local2.embedFonts = true;
_local3 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat2();
_local3.size = 8;
_local3.align = TextFormatAlign.LEFT;
_local2.setTextFormat(_local3);
var _local5 = 380;
_local4 = new Matrix();
_local4.translate((100 + 25), _local5);
_local1.draw(_local2, _local4);
_local2 = new TextField();
_local2.text = "[Esc] to exit";
_local2.width = 200;
_local2.embedFonts = true;
_local3 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat2();
_local3.size = 8;
_local3.align = TextFormatAlign.LEFT;
_local2.setTextFormat(_local3);
_local4 = new Matrix();
_local4.translate((100 + 25), (_local5 + 15));
_local1.draw(_local2, _local4);
_local2 = new TextField();
_local2.text = "[E] to erase progress";
_local2.width = 200;
_local2.embedFonts = true;
_local3 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat2();
_local3.size = 8;
_local3.align = TextFormatAlign.LEFT;
_local2.setTextFormat(_local3);
_local4 = new Matrix();
_local4.translate((100 + 25), (_local5 + 30));
_local1.draw(_local2, _local4);
}
public function updateLevelInfo():void{
var _local1:String = levels[selectedLevel];
levelNameTextField.text = (((selectedLevel + 1) + ". ") + _local1);
var _local2:LevelData = (GameManager.Instance.levelsData[selectedLevel] as LevelData);
if (_local2.completed){
levelTimeField.text = ("Total time: " + TimeFormat.formatTime(_local2.time));
levelTimeField.setTextFormat(tf);
levelRobotsDestroyedField.text = (("Robots destroyed: " + _local2.robotsDestroyed) + " x 100pt");
levelRobotsDestroyedField.setTextFormat(tf);
levelRobotsAvoidedField.text = (("Robots avoided: " + _local2.robotsAvoided) + " x 250pt");
levelRobotsAvoidedField.setTextFormat(tf);
levelSummaryField.text = (("Summary: " + _local2.summary) + "pt");
levelSummaryField.setTextFormat(tf);
} else {
levelTimeField.text = "Total time: ?";
levelTimeField.setTextFormat(tf);
levelRobotsDestroyedField.text = "Robots destroyed: ?";
levelRobotsDestroyedField.setTextFormat(tf);
levelRobotsAvoidedField.text = "Robots avoided: ?";
levelRobotsAvoidedField.setTextFormat(tf);
levelSummaryField.text = "Summary: ?";
levelSummaryField.setTextFormat(tf);
};
}
override public function mouseMove(_arg1:MouseEvent):void{
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local2:int;
while (_local2 < levelCenters.length) {
_local3 = (levelCenters[_local2] as Point);
_local4 = (_arg1.stageX - _local3.x);
_local5 = (_arg1.stageY - _local3.y);
if (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))) <= LEVELS_RADIUS){
trace(("Qwe " + _arg1.stageX));
if (!levelOpen(_local2)){
trace("not open");
return;
};
if (selectedLevel == _local2){
return;
};
selectedLevel = _local2;
updateLevelInfo();
currentTime = 0;
enlargeItem = false;
ResourceManager.ClickFX.play();
return;
};
_local2++;
};
}
override public function keyDown(_arg1:KeyboardEvent):void{
var _local4:FadeOutCoreState;
var _local5:FadeOutCoreState;
var _local6:MainMenuCoreState;
var _local2:int = (selectedLevel / 5);
var _local3:int = (selectedLevel % 5);
trace(("key " + _arg1.keyCode));
trace(((("row = " + _local2) + " col = ") + _local3));
if ((((_arg1.keyCode == 13)) || ((_arg1.keyCode == 32)))){
ResourceManager.ExitFX.play();
_local4 = new FadeOutCoreState();
_local4.command = new StartLevelCommand(selectedLevel);
GameManager.Instance.pushState(_local4);
};
if (_arg1.keyCode == 69){
ResourceManager.ClickFX.play();
GameManager.Instance.pushState(new EraseProgressState());
};
if (_arg1.keyCode == 27){
ResourceManager.ClickFX.play();
_local5 = new FadeOutCoreState();
_local6 = new MainMenuCoreState();
_local6.selectedItem = 1;
_local5.command = new FadeInStateCommand(_local6);
GameManager.Instance.pushState(_local5);
};
if (_arg1.keyCode == 37){
if ((_local2 % 2) == 0){
if (_local3 > 0){
selectedLevel--;
updateLevelInfo();
ResourceManager.ClickFX.play();
currentTime = 0;
enlargeItem = false;
};
} else {
if (_local3 < 4){
if (!nextLevelOpen()){
return;
};
selectedLevel++;
updateLevelInfo();
ResourceManager.ClickFX.play();
currentTime = 0;
enlargeItem = false;
};
};
};
if (_arg1.keyCode == 38){
if (selectedLevel > 0){
selectedLevel--;
updateLevelInfo();
ResourceManager.ClickFX.play();
currentTime = 0;
enlargeItem = false;
};
};
if (_arg1.keyCode == 39){
if ((_local2 % 2) == 0){
if (_local3 < 4){
if (!nextLevelOpen()){
return;
};
selectedLevel++;
updateLevelInfo();
ResourceManager.ClickFX.play();
currentTime = 0;
enlargeItem = false;
};
} else {
if (_local3 > 0){
selectedLevel--;
updateLevelInfo();
ResourceManager.ClickFX.play();
currentTime = 0;
enlargeItem = false;
};
};
};
if (_arg1.keyCode == 40){
if (selectedLevel < 19){
if (!nextLevelOpen()){
return;
};
selectedLevel++;
updateLevelInfo();
currentTime = 0;
enlargeItem = false;
ResourceManager.ClickFX.play();
};
};
}
public function nextLevelOpen():Boolean{
var _local1:LevelData;
var _local2:GameManager;
if (selectedLevel < 19){
_local2 = GameManager.Instance;
_local1 = LevelData(_local2.levelsData[(selectedLevel + 1)]);
if (_local1.open == 1){
return (true);
};
};
ResourceManager.BeepFX.play();
return (false);
}
public function printGameStatistics():void{
var _local2:Matrix;
var _local1:BitmapData = GameManager.Instance.backBuffer;
var _local3 = 195;
_local2 = new Matrix();
_local2.translate(340, _local3);
_local1.draw(gameStatisticsField, _local2);
_local2 = new Matrix();
_local2.translate(340, (_local3 + 25));
_local1.draw(gameTimeField, _local2);
_local2 = new Matrix();
_local2.translate(340, (_local3 + 45));
_local1.draw(gameRobotsDestroyedField, _local2);
_local2 = new Matrix();
_local2.translate(340, (_local3 + 65));
_local1.draw(gameRobotsAvoidedField, _local2);
_local2 = new Matrix();
_local2.translate(340, (_local3 + 85));
_local1.draw(gameSummaryField, _local2);
}
override public function draw():void{
var _local3:TextField;
var _local4:TextFormat;
var _local5:Matrix;
var _local7:LevelData;
var _local8:int;
var _local9:int;
var _local10:Shape;
var _local11:Point;
var _local12:LevelData;
var _local13:Number;
var _local14:int;
var _local1:GameManager = GameManager.Instance;
var _local2:BitmapData = GameManager.Instance.backBuffer;
_local2.draw(backgroundShape);
_local5 = new Matrix();
_local5.translate(25, 10);
_local2.draw(selectLevelField, _local5);
_local2.draw(rectangle);
levelNameTextField.width = 400;
levelNameTextField.embedFonts = true;
_local4 = CommonTextFormats.getIngameMenuItemDeselectedSmallFormat2();
_local4.size = 16;
_local4.align = TextFormatAlign.LEFT;
levelNameTextField.setTextFormat(_local4);
_local5 = new Matrix();
_local5.translate(23, 60);
_local2.draw(levelNameTextField, _local5);
printLevelStatistics();
printGameStatistics();
printHelp();
var _local6:int;
while (_local6 < levels.length) {
_local7 = LevelData(_local1.levelsData[_local6]);
_local8 = (_local6 / 5);
_local9 = (_local6 % 5);
_local10 = new Shape();
_local11 = (levelCenters[_local6] as Point);
if (_local6 < 19){
_local12 = LevelData(_local1.levelsData[(_local6 + 1)]);
if (_local9 < 4){
if (_local12.open == 1){
_local10.graphics.beginFill(LEVEL_DESELECTED_COLOR);
} else {
_local10.graphics.beginFill(LEVEL_CLOSED_COLOR);
};
if ((_local8 % 2) == 0){
_local10.graphics.drawRect(_local11.x, (_local11.y - (LEVEL_BRIDGE_WIDTH / 2)), LEVELS_HORIZONTAL_MARGIN, LEVEL_BRIDGE_WIDTH);
} else {
_local10.graphics.drawRect((_local11.x - LEVELS_HORIZONTAL_MARGIN), (_local11.y - (LEVEL_BRIDGE_WIDTH / 2)), LEVELS_HORIZONTAL_MARGIN, LEVEL_BRIDGE_WIDTH);
};
_local10.graphics.endFill();
};
if (_local9 == 4){
if (_local12.open == 1){
_local10.graphics.beginFill(LEVEL_DESELECTED_COLOR);
} else {
_local10.graphics.beginFill(LEVEL_CLOSED_COLOR);
};
_local10.graphics.drawRect((_local11.x - (LEVEL_BRIDGE_WIDTH / 2)), _local11.y, LEVEL_BRIDGE_WIDTH, LEVELS_VERTICAL_MARGIN);
_local10.graphics.endFill();
};
};
if (selectedLevel == _local6){
_local10.graphics.beginFill(LEVEL_SELECTED_COLOR);
} else {
if (_local7.open == 1){
_local10.graphics.beginFill(LEVEL_DESELECTED_COLOR);
} else {
_local10.graphics.beginFill(LEVEL_CLOSED_COLOR);
};
};
if (selectedLevel == _local6){
_local13 = (currentTime / ITEM_ENLARGMENT_TIME);
_local14 = 0;
if (enlargeItem){
_local14 = (_local13 * ITEM_ENLARGMENT);
} else {
_local14 = (ITEM_ENLARGMENT - (_local13 * ITEM_ENLARGMENT));
};
if (_local13 >= 1){
currentTime = 0;
enlargeItem = !(enlargeItem);
};
_local10.graphics.beginFill(LEVEL_SELECTED_COLOR);
_local10.graphics.drawCircle(_local11.x, _local11.y, (LEVELS_RADIUS + _local14));
_local10.graphics.endFill();
};
if (_local7.open == 1){
_local10.graphics.beginFill(LEVEL_DESELECTED_COLOR);
} else {
_local10.graphics.beginFill(LEVEL_CLOSED_COLOR);
};
_local10.graphics.drawCircle(_local11.x, _local11.y, LEVELS_RADIUS);
_local10.graphics.endFill();
_local2.draw(_local10);
_local6++;
};
}
override public function update(_arg1:Number):void{
currentTime = (currentTime + _arg1);
}
public function printLevelStatistics():void{
var _local2:Matrix;
var _local1:BitmapData = GameManager.Instance.backBuffer;
var _local3 = 63;
_local2 = new Matrix();
_local2.translate(340, _local3);
_local1.draw(levelStatisticsField, _local2);
_local2 = new Matrix();
_local2.translate(340, (_local3 + 25));
_local1.draw(levelTimeField, _local2);
_local2 = new Matrix();
_local2.translate(340, (_local3 + 45));
_local1.draw(levelRobotsDestroyedField, _local2);
_local2 = new Matrix();
_local2.translate(340, (_local3 + 65));
_local1.draw(levelRobotsAvoidedField, _local2);
_local2 = new Matrix();
_local2.translate(340, (_local3 + 85));
_local1.draw(levelSummaryField, _local2);
}
override public function mouseDown(_arg1:MouseEvent):void{
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:FadeOutCoreState;
var _local2:int;
while (_local2 < levelCenters.length) {
_local3 = (levelCenters[_local2] as Point);
_local4 = (_arg1.stageX - _local3.x);
_local5 = (_arg1.stageY - _local3.y);
if (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))) <= LEVELS_RADIUS){
if (!levelOpen(_local2)){
return;
};
selectedLevel = _local2;
ResourceManager.ExitFX.play();
_local6 = new FadeOutCoreState();
_local6.command = new StartLevelCommand(selectedLevel);
GameManager.Instance.pushState(_local6);
return;
};
_local2++;
};
}
public function levelOpen(_arg1:int):Boolean{
var _local2:LevelData;
var _local3:GameManager;
if (_arg1 < 20){
_local3 = GameManager.Instance;
_local2 = LevelData(_local3.levelsData[_arg1]);
if (_local2.open == 1){
return (true);
};
};
return (false);
}
}
}//package cotogames.carmack.core.states
Section 112
//GameManager (cotogames.carmack.core.GameManager)
package cotogames.carmack.core {
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import mx.core.*;
import flash.events.*;
import flash.net.*;
import cotogames.carmack.core.states.*;
import com.kongregate.as3.client.*;
import flash.utils.*;
import mx.collections.*;
import cotogames.carmack.gamestates.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.objects.*;
public class GameManager {
public var timeWaited:Number;// = 0
public var newGameObjects:ArrayCollection;
protected var stateStack:Array;
public var backBuffer:BitmapData;
public var currentLevel:Level;
public var clearColor:uint;// = 0
public var height:int;
public var movingObject:GameObject;
public var currentLevelNumber:int;// = 0
public var levelsData:Array;
public var timeToWait:Number;// = 0
public var removedGameObjects:ArrayCollection;
public var width:int;
public var gameObjectsToMove:ArrayCollection;
public var carmack:Carmack;
public var initialized:Boolean;// = false
public var musicOn:Boolean;// = false
public var lastFrame:Date;
public static const SAVE_NAME:String = "ODatDFdat";
protected static var instance:GameManager = null;
public static var inGame;
public static var kong:KongregateAPI;
public static var global_root:Stage;
public function GameManager(){
lastFrame = new Date();
gameObjectsToMove = new ArrayCollection();
newGameObjects = new ArrayCollection();
removedGameObjects = new ArrayCollection();
stateStack = new Array();
super();
if (instance != null){
throw (new Error("Only one Singleton instance should be instantiated"));
};
this.width = Application.application.width;
this.height = Application.application.height;
backBuffer = new BitmapData(width, height, false);
}
public function getCurrentLevelRobotsCount():int{
var _local3:GameObject;
var _local1:int;
var _local2:int;
while (_local2 < gameObjectsToMove.length) {
_local3 = (gameObjectsToMove.getItemAt(_local2) as GameObject);
if ((_local3 is Welder)){
_local1++;
};
_local2++;
};
return (_local1);
}
public function removeGameObject(_arg1:GameObject):void{
removedGameObjects.addItem(_arg1);
}
public function loadCurrentLevel():void{
var _local1:GameObject;
MusicManager.play(ResourceManager.LevelMusicTrack);
GraphicUtils.resetAcidGraphics();
gameObjectsToMove = new ArrayCollection();
movingObject = null;
currentLevel = LevelBuilder.buildLevelByNumber(currentLevelNumber);
for each (_local1 in currentLevel.gameObjects) {
_local1.startupGameObject(_local1.position, _local1.speed);
};
carmack = currentLevel.playerObject;
carmack.startupGameObject(currentLevel.startPosition);
lastFrame = new Date();
if (!musicOn){
musicOn = true;
};
}
protected function removeDeletedGameObjects():void{
var _local1:GameObject;
var _local2:int;
for each (_local1 in removedGameObjects) {
_local2 = 0;
_local2 = 0;
while (_local2 < gameObjectsToMove.length) {
if (gameObjectsToMove.getItemAt(_local2) == _local1){
gameObjectsToMove.removeItemAt(_local2);
break;
};
_local2++;
};
};
removedGameObjects.removeAll();
}
public function pushState(_arg1:CoreState):void{
var _local3:CoreState;
stateStack.push(_arg1);
var _local2:int;
while (_local2 < stateStack.length) {
_local3 = (stateStack[_local2] as CoreState);
_local2++;
};
}
protected function insertNewGameObjects():void{
var _local1:GameObject;
var _local2:int;
var _local3:GameObject;
for each (_local1 in newGameObjects) {
_local2 = 0;
while (_local2 < gameObjectsToMove.length) {
_local3 = (gameObjectsToMove.getItemAt(_local2) as GameObject);
if (_local3.speed <= _local1.speed){
break;
};
_local2++;
};
gameObjectsToMove.addItemAt(_local1, _local2);
};
newGameObjects.removeAll();
}
public function keyDown(_arg1:KeyboardEvent):void{
var _local2:CoreState = (stateStack[(stateStack.length - 1)] as CoreState);
_local2.keyDown(_arg1);
}
public function mouseMove(_arg1:MouseEvent):void{
var _local2:CoreState = (stateStack[(stateStack.length - 1)] as CoreState);
_local2.mouseMove(_arg1);
}
public function clearStates():void{
stateStack = new Array();
}
public function clearSaveData(_arg1:SharedObject):void{
var _local2:LevelData;
var _local4:SharedObject;
levelsData = new Array();
var _local3:int;
while (_local3 < 20) {
_local2 = new LevelData();
if (_local3 == 0){
_local2.open = 1;
};
levelsData.push(_local2);
_local3++;
};
if (_arg1 != null){
_local4 = _arg1;
} else {
_local4 = SharedObject.getLocal(GameManager.SAVE_NAME);
};
_local4.clear();
_local2 = new LevelData(1);
_local4.data.level0 = _local2.save();
_local2 = new LevelData();
var _local5:String = _local2.save();
_local4.data.level1 = _local5;
_local4.data.level2 = _local5;
_local4.data.level3 = _local5;
_local4.data.level4 = _local5;
_local4.data.level5 = _local5;
_local4.data.level6 = _local5;
_local4.data.level7 = _local5;
_local4.data.level8 = _local5;
_local4.data.level9 = _local5;
_local4.data.level10 = _local5;
_local4.data.level11 = _local5;
_local4.data.level12 = _local5;
_local4.data.level13 = _local5;
_local4.data.level14 = _local5;
_local4.data.level15 = _local5;
_local4.data.level16 = _local5;
_local4.data.level17 = _local5;
_local4.data.level18 = _local5;
_local4.data.level19 = _local5;
_local4.data.saved = 1;
trace("saving");
_local4.flush();
}
public function popState():void{
var _local2:CoreState;
stateStack.pop();
var _local1:int;
while (_local1 < stateStack.length) {
_local2 = (stateStack[_local1] as CoreState);
_local1++;
};
}
public function changeState(_arg1:CoreState):void{
var _local3:CoreState;
stateStack.pop();
stateStack.push(_arg1);
var _local2:int;
while (_local2 < stateStack.length) {
_local3 = (stateStack[_local2] as CoreState);
_local2++;
};
_arg1.prepare();
}
public function completeLevel(_arg1:int, _arg2:Number, _arg3:Number, _arg4:int, _arg5:int, _arg6:int):void{
var _local7:LevelData;
_local7 = (levelsData[_arg1] as LevelData);
_local7.open = 1;
_local7.completed = 1;
_local7.time = _arg2;
_local7.timePoints = _arg3;
_local7.robotsDestroyed = _arg4;
_local7.robotsAvoided = _arg5;
_local7.summary = _arg6;
saveLevelData(_arg1, _local7);
if (_arg1 < 19){
_local7 = (levelsData[(_arg1 + 1)] as LevelData);
_local7.open = 1;
saveLevelData((_arg1 + 1), _local7);
};
}
public function reset():void{
}
public function saveLevelData(_arg1:int, _arg2:LevelData):void{
var _local3:SharedObject;
_local3 = SharedObject.getLocal(GameManager.SAVE_NAME);
switch (_arg1){
case 0:
_local3.data.level0 = _arg2.save();
break;
case 1:
_local3.data.level1 = _arg2.save();
break;
case 2:
_local3.data.level2 = _arg2.save();
break;
case 3:
_local3.data.level3 = _arg2.save();
break;
case 4:
_local3.data.level4 = _arg2.save();
break;
case 5:
_local3.data.level5 = _arg2.save();
break;
case 6:
_local3.data.level6 = _arg2.save();
break;
case 7:
_local3.data.level7 = _arg2.save();
break;
case 8:
_local3.data.level8 = _arg2.save();
break;
case 9:
_local3.data.level9 = _arg2.save();
break;
case 10:
_local3.data.level10 = _arg2.save();
break;
case 11:
_local3.data.level11 = _arg2.save();
break;
case 12:
_local3.data.level12 = _arg2.save();
break;
case 13:
_local3.data.level13 = _arg2.save();
break;
case 14:
_local3.data.level14 = _arg2.save();
break;
case 15:
_local3.data.level15 = _arg2.save();
break;
case 16:
_local3.data.level16 = _arg2.save();
break;
case 17:
_local3.data.level17 = _arg2.save();
break;
case 18:
_local3.data.level18 = _arg2.save();
break;
case 19:
_local3.data.level19 = _arg2.save();
break;
};
_local3.flush();
}
public function addGameObject(_arg1:GameObject):void{
newGameObjects.addItem(_arg1);
}
public function shutdown():void{
}
public function keyUp(_arg1:KeyboardEvent):void{
var _local2:CoreState = (stateStack[(stateStack.length - 1)] as CoreState);
_local2.keyUp(_arg1);
}
public function mouseDown(_arg1:MouseEvent):void{
var _local2:CoreState = (stateStack[(stateStack.length - 1)] as CoreState);
_local2.mouseDown(_arg1);
}
public function initSaveData():void{
var _local1:LevelData;
var _local2:int;
var _local3:SharedObject;
levelsData = new Array();
_local3 = SharedObject.getLocal(GameManager.SAVE_NAME);
if (_local3.data.saved != null){
trace(_local3.size);
trace(LevelData.load(_local3.data.level0).toString());
trace(LevelData.load(_local3.data.level1).toString());
levelsData.push(LevelData.load(_local3.data.level0));
levelsData.push(LevelData.load(_local3.data.level1));
levelsData.push(LevelData.load(_local3.data.level2));
levelsData.push(LevelData.load(_local3.data.level3));
levelsData.push(LevelData.load(_local3.data.level4));
levelsData.push(LevelData.load(_local3.data.level5));
levelsData.push(LevelData.load(_local3.data.level6));
levelsData.push(LevelData.load(_local3.data.level7));
levelsData.push(LevelData.load(_local3.data.level8));
levelsData.push(LevelData.load(_local3.data.level9));
levelsData.push(LevelData.load(_local3.data.level10));
levelsData.push(LevelData.load(_local3.data.level11));
levelsData.push(LevelData.load(_local3.data.level12));
levelsData.push(LevelData.load(_local3.data.level13));
levelsData.push(LevelData.load(_local3.data.level14));
levelsData.push(LevelData.load(_local3.data.level15));
levelsData.push(LevelData.load(_local3.data.level16));
levelsData.push(LevelData.load(_local3.data.level17));
levelsData.push(LevelData.load(_local3.data.level18));
levelsData.push(LevelData.load(_local3.data.level19));
return;
};
clearSaveData(_local3);
}
public function enterFrame():void{
var _local5:CoreState;
backBuffer.fillRect(backBuffer.rect, clearColor);
var _local1:Date = new Date();
var _local2:Number = ((_local1.getTime() - lastFrame.getTime()) / 1000);
lastFrame = _local1;
if (currentLevel != null){
currentLevel.walkthroughTime = (currentLevel.walkthroughTime + _local2);
};
removeDeletedGameObjects();
insertNewGameObjects();
var _local3:CoreState = (stateStack[(stateStack.length - 1)] as CoreState);
_local3.update(_local2);
var _local4:int;
while (_local4 < stateStack.length) {
_local5 = (stateStack[_local4] as CoreState);
_local5.draw();
_local4++;
};
}
public static function get Instance():GameManager{
if (instance == null){
instance = new (GameManager);
};
return (instance);
}
}
}//package cotogames.carmack.core
Section 113
//GameObject (cotogames.carmack.core.GameObject)
package cotogames.carmack.core {
import flash.display.*;
import flash.geom.*;
public class GameObject {
public var idleAnimationCountdown:Number;// = 0
public var inuse:Boolean;// = false
public var direction:int;// = 1
public var speed:int;// = 10
public var graphics:GraphicsResource;// = null
public var idleAnimationOn:Boolean;// = false
public var idleAnimationTimer:Number;// = -1
public var nextCommand:int;
public var id:String;// = "Generic object"
public var position:Point;
public var inactive:Boolean;// = false
public var timeMoved:Number;// = 0
public var oldPosition:Point;
public var moved:Boolean;// = false
public var idleGraphics:GraphicsResource;// = null
public static const DIRECTION_LEFT:int = 2;
public static const DIRECTION_DOWN:int = 1;
public static const IDLE_ANIMATION_TIME_MIN:Number = 3;
public static const IDLE_ANIMATION_TIME:Number = 18;
public static const DIRECTION_UP:int = 0;
public static const DIRECTION_RIGHT:int = 4;
public function GameObject(){
position = new Point(0, 0);
oldPosition = new Point(0, 0);
nextCommand = PlayerCommands.NONE;
super();
}
public function update(_arg1:Number):void{
if (graphics != null){
graphics.update(_arg1);
};
}
public function copyToBackBuffer(_arg1:BitmapData):void{
if (!inuse){
return;
};
var _local2:Number = (position.x * Level.TILE_SIZE);
var _local3:Number = ((position.y * Level.TILE_SIZE) - 10);
var _local4:Point = new Point(_local2, _local3);
graphics.copyToBackBuffer(_arg1, _local4);
}
public function shutdown():void{
if (inuse){
this.inuse = false;
GameManager.Instance.removeGameObject(this);
};
}
public function startupGameObject(_arg1:Point, _arg2:int=0):void{
if (!inuse){
this.speed = _arg2;
this.position = _arg1.clone();
GameManager.Instance.addGameObject(this);
this.inuse = true;
};
}
public function copyToBackBufferIdle(_arg1:BitmapData):void{
if (!inuse){
return;
};
if (idleGraphics == null){
return;
};
var _local2:Number = (position.x * Level.TILE_SIZE);
var _local3:Number = ((position.y * Level.TILE_SIZE) - 10);
var _local4:Point = new Point(_local2, _local3);
idleGraphics.copyToBackBuffer(_arg1, _local4);
}
public function updateIdle(_arg1:Number):void{
if (idleGraphics == null){
return;
};
if (idleAnimationOn){
if (idleGraphics.frameCount == (idleGraphics.currentFrame + 1)){
idleAnimationOn = false;
idleAnimationTimer = -1;
idleAnimationCountdown = 0;
idleGraphics.reset();
} else {
idleGraphics.update(_arg1);
};
} else {
if (idleAnimationTimer == -1){
idleAnimationTimer = (IDLE_ANIMATION_TIME_MIN + (Math.random() * IDLE_ANIMATION_TIME));
};
idleAnimationCountdown = (idleAnimationCountdown + _arg1);
if (idleAnimationCountdown >= idleAnimationTimer){
idleAnimationOn = true;
};
};
}
}
}//package cotogames.carmack.core
Section 114
//GraphicsResource (cotogames.carmack.core.GraphicsResource)
package cotogames.carmack.core {
import flash.display.*;
import flash.geom.*;
public class GraphicsResource {
public var frameWidth:Number;
public var frameCount:int;
public var bitmap:BitmapData;// = null
public var frameInterval:Number;
public var currentFrame:int;
public var playOnce:Boolean;
public var bitmapAlpha:BitmapData;// = null
public var elapsed:Number;
public var supressAlpha:Boolean;// = false
public function GraphicsResource(_arg1:DisplayObject=null, _arg2:int=0, _arg3:Number=0, _arg4:Boolean=true, _arg5:Boolean=false){
this.supressAlpha = _arg5;
if (_arg1 != null){
bitmap = createBitmapData(_arg1);
if (!_arg5){
bitmapAlpha = createAlphaBitmapData(_arg1);
};
if (_arg2 == 0){
this.frameWidth = bitmap.width;
} else {
this.frameWidth = _arg2;
};
this.frameCount = (bitmap.width / _arg2);
};
this.frameInterval = _arg3;
this.playOnce = _arg4;
this.currentFrame = 0;
this.elapsed = 0;
}
public function reset():void{
elapsed = 0;
currentFrame = 0;
}
public function update(_arg1:Number):void{
if (frameCount == 1){
return;
};
elapsed = (elapsed + _arg1);
var _local2:int;
if (elapsed > frameInterval){
_local2 = (elapsed / frameInterval);
elapsed = (elapsed - ((elapsed / frameInterval) * frameInterval));
};
if (frameCount > 1){
currentFrame = (currentFrame + _local2);
if (currentFrame >= frameCount){
if (!playOnce){
currentFrame = (currentFrame % frameCount);
} else {
currentFrame = (frameCount - 1);
};
};
};
}
public function clone():GraphicsResource{
var _local1:GraphicsResource = new GraphicsResource();
_local1.bitmap = this.bitmap;
_local1.bitmapAlpha = this.bitmapAlpha;
_local1.playOnce = this.playOnce;
_local1.supressAlpha = this.supressAlpha;
_local1.frameCount = this.frameCount;
_local1.frameWidth = this.frameWidth;
_local1.frameInterval = this.frameInterval;
return (_local1);
}
protected function createBitmapData(_arg1:DisplayObject):BitmapData{
var _local2:BitmapData = new BitmapData(_arg1.width, _arg1.height);
_local2.draw(_arg1);
return (_local2);
}
public function copyToBackBuffer(_arg1:BitmapData, _arg2:Point):void{
var _local3:Rectangle = new Rectangle((currentFrame * frameWidth), 0, frameWidth, bitmap.height);
if (!supressAlpha){
_arg1.copyPixels(bitmap, _local3, _arg2, bitmapAlpha, new Point((currentFrame * frameWidth), 0), true);
} else {
_arg1.copyPixels(bitmap, _local3, _arg2);
};
}
protected function createAlphaBitmapData(_arg1:DisplayObject):BitmapData{
var _local2:BitmapData = new BitmapData(_arg1.width, _arg1.height);
_local2.draw(_arg1, null, null, BlendMode.ALPHA);
return (_local2);
}
}
}//package cotogames.carmack.core
Section 115
//Level (cotogames.carmack.core.Level)
package cotogames.carmack.core {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import mx.collections.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.objects.*;
public class Level {
public var playerObject:Carmack;// = null
public var introMargin:int;// = 100
public var gameObjects:Array;
public var tiles:Array;
public var walkthroughTime:Number;// = 0
public var name:String;
public var canExit:Boolean;// = true
public var graphicsToUpdate:Array;
public var finishPosition:Point;
public var robotsKilled:int;// = 0
public var estimatedTime:Number;// = 0
public var points:int;// = 0
public var startPosition:Point;
public var introText:String;// = ""
public var levelEvents:ArrayCollection;
public static const TILE_SIZE:int = 50;
public static const HORIZONTAL_TILES:int = 11;
public static const VERTICAL_TILES:int = 9;
public function Level(){
levelEvents = new ArrayCollection();
graphicsToUpdate = new Array();
gameObjects = new Array();
super();
}
public function canMove(_arg1:Point, _arg2:int):Boolean{
var _local4:Tile;
var _local5:Tile;
var _local6:Tile;
var _local7:Tile;
var _local3:Tile = tiles[_arg1.x][_arg1.y];
switch (_arg2){
case GameObject.DIRECTION_DOWN:
trace("south corner?");
if ((_arg1.y + 1) >= Level.VERTICAL_TILES){
return (false);
};
_local4 = tiles[_arg1.x][(_arg1.y + 1)];
if (_local4.movable == false){
return (false);
};
if (checkBumpChar(_local4)){
return (false);
};
if (((((!((_local4.wallTop == Tile.WALL_NONE))) && (!((_local4.wallTop == Tile.WALL_SLIDING_DOWN))))) && (!((_local4.wallTop == Tile.WALL_DESTROID))))){
return (false);
};
return (true);
case GameObject.DIRECTION_RIGHT:
if ((_arg1.x + 1) >= Level.HORIZONTAL_TILES){
return (false);
};
_local5 = tiles[(_arg1.x + 1)][_arg1.y];
if (_local5.movable == false){
return (false);
};
if (checkBumpChar(_local5)){
return (false);
};
if (((((!((_local5.wallLeft == Tile.WALL_NONE))) && (!((_local5.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local5.wallLeft == Tile.WALL_DESTROID))))){
return (false);
};
return (true);
case GameObject.DIRECTION_LEFT:
if ((_arg1.x - 1) < 0){
return (false);
};
if (((((!((_local3.wallLeft == Tile.WALL_NONE))) && (!((_local3.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local3.wallLeft == Tile.WALL_DESTROID))))){
return (false);
};
_local6 = tiles[(_arg1.x - 1)][_arg1.y];
if (_local6.movable == false){
return (false);
};
if (checkBumpChar(_local6)){
return (false);
};
return (true);
case GameObject.DIRECTION_UP:
if ((_arg1.y - 1) < 0){
return (false);
};
if (((((!((_local3.wallTop == Tile.WALL_NONE))) && (!((_local3.wallTop == Tile.WALL_SLIDING_DOWN))))) && (!((_local3.wallTop == Tile.WALL_DESTROID))))){
return (false);
};
_local7 = tiles[_arg1.x][(_arg1.y - 1)];
if (_local7.movable == false){
return (false);
};
if (checkBumpChar(_local7)){
return (false);
};
return (true);
};
return (false);
}
public function canDie(_arg1:int, _arg2:int):Boolean{
if (tiles[_arg1][_arg2].isDeadly){
return (true);
};
return (false);
}
public function isLevelComplete():Boolean{
if ((((Math.floor(playerObject.position.x) == Math.floor(finishPosition.x))) && ((Math.floor(playerObject.position.y) == Math.floor(finishPosition.y))))){
return (true);
};
return (false);
}
public function checkBumpChar(_arg1:Tile):Boolean{
if (_arg1.attachedGameObject == null){
return (false);
};
if (((!((_arg1.attachedGameObject is Carmack))) && (!((_arg1.attachedGameObject is Welder))))){
return (true);
};
return (false);
}
public function draw(_arg1:BitmapData):void{
var _local3:int;
var _local4:Point;
var _local5:Tile;
var _local6:int;
var _local7:Decoration;
var _local8:GraphicsResource;
var _local9:Point;
var _local10:GraphicsResource;
var _local11:Point;
var _local12:Tile;
var _local13:GraphicsResource;
var _local14:Point;
var _local2:int;
while (_local2 < Level.HORIZONTAL_TILES) {
_local3 = 0;
while (_local3 < Level.VERTICAL_TILES) {
_local4 = new Point((_local2 * Level.TILE_SIZE), (_local3 * Level.TILE_SIZE));
_local5 = tiles[_local2][_local3];
_local5.graphics.copyToBackBuffer(_arg1, _local4);
_local6 = 0;
while (_local6 < _local5.decorations.length) {
_local7 = (_local5.decorations[_local6] as Decoration);
_local7.draw(_arg1);
_local6++;
};
if (_local5.wallTop != Tile.WALL_NONE){
if (_local5.wallTop == Tile.WALL_GENERIC){
_local8 = WallBitmapResources.HorizontalWallGraphics;
} else {
if (_local5.wallTop == Tile.WALL_DESTROYABLE){
_local8 = WallBitmapResources.HorizontalWallDestroyableGraphics;
} else {
if (_local5.wallTop == Tile.WALL_SLIDING){
_local8 = ResourceManager.TopSlidingWallGraphics;
} else {
if (_local5.wallTop == Tile.WALL_SLIDING_DOWN){
_local8 = GameManager.Instance.currentLevel.graphicsToUpdate[_local5.currentAnimationIndex];
} else {
if (_local5.wallTop == Tile.WALL_DESTROID){
_local8 = GameManager.Instance.currentLevel.graphicsToUpdate[_local5.currentAnimationIndex];
} else {
_local8 = WallBitmapResources.HorizontalWallGraphics;
};
};
};
};
};
_local9 = new Point(((_local2 * Level.TILE_SIZE) - 2), ((_local3 * Level.TILE_SIZE) - 16));
_local8.copyToBackBuffer(_arg1, _local9);
};
if (_local5.wallLeft != Tile.WALL_NONE){
if (_local5.wallLeft == Tile.WALL_GENERIC){
_local12 = tiles[_local2][(_local3 + 1)];
if (_local12.movable){
_local10 = ResourceManager.RightWallGraphics;
} else {
_local10 = WallBitmapResources.VerticalWallAltGraphics;
};
} else {
if (_local5.wallLeft == Tile.WALL_DESTROYABLE){
_local10 = ResourceManager.LeftWallDestroyableGraphics;
} else {
if (_local5.wallLeft == Tile.WALL_SLIDING){
_local10 = WallBitmapResources.VerticalWallSlidingGraphics;
} else {
if (_local5.wallLeft == Tile.WALL_SLIDING_DOWN){
_local10 = GameManager.Instance.currentLevel.graphicsToUpdate[_local5.currentAnimationIndex];
} else {
if (_local5.wallLeft == Tile.WALL_DESTROID){
_local10 = GameManager.Instance.currentLevel.graphicsToUpdate[_local5.currentAnimationIndex];
} else {
_local10 = ResourceManager.RightWallGraphics;
};
};
};
};
};
_local11 = new Point((((_local2 * Level.TILE_SIZE) - (_local10.frameWidth / 2)) + 3), (((_local3 + 1) * Level.TILE_SIZE) - _local10.bitmap.height));
_local10.copyToBackBuffer(_arg1, _local11);
};
if (((!((_local5.wallLeft == Tile.WALL_NONE))) && (!((_local5.wallTop == Tile.WALL_NONE))))){
if (((!((_local5.wallLeft == Tile.WALL_DESTROYABLE))) && (!((_local5.wallLeft == Tile.WALL_DESTROID))))){
_local13 = ResourceManager.WallVerticalPartGraphics;
_local14 = new Point((((_local2 * Level.TILE_SIZE) - (_local10.bitmap.width / 2)) + 3), ((((_local3 + 1) * Level.TILE_SIZE) - ResourceManager.RightWallGraphics.bitmap.height) + 3));
_local13.copyToBackBuffer(_arg1, _local14);
};
};
_local3++;
};
_local2++;
};
}
public function seekShootingTarget(_arg1:Point, _arg2:int):GameObject{
var _local5:Tile;
var _local6:int;
var _local7:Tile;
var _local3:int = _arg1.x;
var _local4:int = _arg1.y;
if (_arg2 == GameObject.DIRECTION_RIGHT){
_local5 = tiles[_local3][_local4];
_local6 = (_local3 + 1);
while (_local6 < (Level.HORIZONTAL_TILES - 1)) {
_local7 = tiles[_local6][_local4];
if (((((!((_local7.wallLeft == Tile.WALL_NONE))) && (!((_local7.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local7.wallLeft == Tile.WALL_DESTROID))))){
return (null);
};
if (_local7.attachedGameObject != null){
return (_local7.attachedGameObject);
};
_local6++;
};
};
if (_arg2 == GameObject.DIRECTION_LEFT){
_local5 = tiles[_local3][_local4];
if (((((!((_local5.wallLeft == Tile.WALL_NONE))) && (!((_local5.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local5.wallLeft == Tile.WALL_DESTROID))))){
return (null);
};
_local6 = (_local3 - 1);
while (_local6 >= 0) {
_local7 = tiles[_local6][_local4];
if (_local7.attachedGameObject != null){
return (_local7.attachedGameObject);
};
if (((((!((_local7.wallLeft == Tile.WALL_NONE))) && (!((_local7.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local7.wallLeft == Tile.WALL_DESTROID))))){
return (null);
};
_local6--;
};
};
if (_arg2 == GameObject.DIRECTION_DOWN){
_local6 = (_local4 + 1);
while (_local6 < Level.VERTICAL_TILES) {
_local7 = tiles[_local3][_local6];
if (((((!((_local7.wallTop == Tile.WALL_NONE))) && (!((_local7.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local7.wallLeft == Tile.WALL_DESTROID))))){
return (null);
};
if (_local7.attachedGameObject != null){
return (_local7.attachedGameObject);
};
_local6++;
};
};
if (_arg2 == GameObject.DIRECTION_UP){
_local5 = tiles[_local3][_local4];
if (_local5.wallTop){
return (null);
};
_local6 = (_local4 - 1);
while (_local6 >= 0) {
_local7 = tiles[_local3][_local6];
if (_local7.attachedGameObject != null){
return (_local7.attachedGameObject);
};
if (((((!((_local7.wallTop == Tile.WALL_NONE))) && (!((_local7.wallTop == Tile.WALL_SLIDING_DOWN))))) && (!((_local7.wallTop == Tile.WALL_DESTROID))))){
return (null);
};
_local6--;
};
};
return (null);
}
public function detachGameObject(_arg1:GameObject):void{
var _local2:Point = _arg1.position;
var _local3:Tile = tiles[_local2.x][_local2.y];
if (_local3.attachedGameObject == _arg1){
_local3.attachedGameObject = null;
};
}
public function attachGameObject(_arg1:GameObject):void{
var _local2:Point = _arg1.position;
var _local3:Tile = tiles[_local2.x][_local2.y];
_local3.attachedGameObject = _arg1;
}
public function interactionPossible(_arg1:Point, _arg2:int):LevelEvent{
var _local5:Tile;
var _local3:int = _arg1.x;
var _local4:int = _arg1.y;
if ((((_arg2 == GameObject.DIRECTION_DOWN)) && (((_local4 + 1) < Level.VERTICAL_TILES)))){
_local5 = tiles[_local3][(_local4 + 1)];
if (_local5.levelEventID != -1){
return (levelEvents[_local5.levelEventID]);
};
};
if ((((_arg2 == GameObject.DIRECTION_UP)) && (((_local4 - 1) >= 0)))){
_local5 = tiles[_local3][(_local4 - 1)];
if (_local5.levelEventID != -1){
return (levelEvents[_local5.levelEventID]);
};
};
if ((((_arg2 == GameObject.DIRECTION_LEFT)) && (((_local3 - 1) >= 0)))){
_local5 = tiles[(_local3 - 1)][_local4];
if (_local5.levelEventID != -1){
return (levelEvents[_local5.levelEventID]);
};
};
if ((((_arg2 == GameObject.DIRECTION_RIGHT)) && (((_local3 + 1) > Level.HORIZONTAL_TILES)))){
_local5 = tiles[(_local3 + 1)][_local4];
if (_local5.levelEventID != -1){
return (levelEvents[_local5.levelEventID]);
};
};
return (null);
}
public function updateGraphics(_arg1:Number):void{
var _local2:GraphicsResource;
for each (_local2 in graphicsToUpdate) {
_local2.update(_arg1);
};
}
public function findShootingHit(_arg1:Point, _arg2:int):GameObject{
var _local6:int;
var _local7:Tile;
var _local8:GraphicsResource;
var _local9:GraphicsResource;
var _local10:GraphicsResource;
var _local11:GraphicsResource;
var _local12:GraphicsResource;
var _local13:GraphicsResource;
var _local3:int = _arg1.x;
var _local4:int = _arg1.y;
var _local5:Tile = tiles[_local3][_local4];
if (_arg2 == GameObject.DIRECTION_RIGHT){
_local6 = (_local3 + 1);
while (_local6 < (Level.HORIZONTAL_TILES - 1)) {
_local7 = tiles[_local6][_local4];
if (_local7.wallLeft == Tile.WALL_DESTROYABLE){
_local7.wallLeft = Tile.WALL_DESTROID;
GameManager.Instance.timeToWait = 1;
_local8 = WallBitmapResources.VerticalWallBreakingGraphics.clone();
GameManager.Instance.currentLevel.graphicsToUpdate.push(_local8);
_local7.currentAnimationIndex = (GameManager.Instance.currentLevel.graphicsToUpdate.length - 1);
return (null);
};
if (((((!((_local7.wallLeft == Tile.WALL_NONE))) && (!((_local7.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local7.wallLeft == Tile.WALL_DESTROID))))){
return (null);
};
if (_local7.attachedGameObject != null){
return (_local7.attachedGameObject);
};
_local6++;
};
};
if (_arg2 == GameObject.DIRECTION_LEFT){
_local5 = tiles[_local3][_local4];
if (_local5.wallLeft == Tile.WALL_DESTROYABLE){
_local5.wallLeft = Tile.WALL_DESTROID;
GameManager.Instance.timeToWait = 1;
_local9 = WallBitmapResources.VerticalWallBreakingGraphics.clone();
GameManager.Instance.currentLevel.graphicsToUpdate.push(_local9);
_local5.currentAnimationIndex = (GameManager.Instance.currentLevel.graphicsToUpdate.length - 1);
return (null);
};
if (((((!((_local5.wallLeft == Tile.WALL_NONE))) && (!((_local5.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local5.wallLeft == Tile.WALL_DESTROID))))){
return (null);
};
_local6 = (_local3 - 1);
while (_local6 >= 0) {
_local7 = tiles[_local6][_local4];
if (_local7.attachedGameObject != null){
return (_local7.attachedGameObject);
};
if (_local7.wallLeft == Tile.WALL_DESTROYABLE){
_local7.wallLeft = Tile.WALL_DESTROID;
GameManager.Instance.timeToWait = 1;
_local10 = WallBitmapResources.VerticalWallBreakingGraphics.clone();
GameManager.Instance.currentLevel.graphicsToUpdate.push(_local10);
_local7.currentAnimationIndex = (GameManager.Instance.currentLevel.graphicsToUpdate.length - 1);
return (null);
};
if (((((!((_local7.wallLeft == Tile.WALL_NONE))) && (!((_local7.wallLeft == Tile.WALL_SLIDING_DOWN))))) && (!((_local7.wallLeft == Tile.WALL_DESTROID))))){
return (null);
};
_local6--;
};
};
if (_arg2 == GameObject.DIRECTION_DOWN){
_local6 = (_local4 + 1);
while (_local6 < Level.VERTICAL_TILES) {
_local7 = tiles[_local3][_local6];
if (_local7.wallTop == Tile.WALL_DESTROYABLE){
_local7.wallTop = Tile.WALL_DESTROID;
GameManager.Instance.timeToWait = 1;
_local11 = WallBitmapResources.HorizontalWallBreakingGraphics.clone();
GameManager.Instance.currentLevel.graphicsToUpdate.push(_local11);
_local7.currentAnimationIndex = (GameManager.Instance.currentLevel.graphicsToUpdate.length - 1);
return (null);
};
if (((((!((_local7.wallTop == Tile.WALL_NONE))) && (!((_local7.wallTop == Tile.WALL_SLIDING_DOWN))))) && (!((_local7.wallTop == Tile.WALL_DESTROID))))){
return (null);
};
if (_local7.attachedGameObject != null){
return (_local7.attachedGameObject);
};
_local6++;
};
};
if (_arg2 == GameObject.DIRECTION_UP){
if (_local5.wallTop == Tile.WALL_DESTROYABLE){
_local5.wallTop = Tile.WALL_DESTROID;
GameManager.Instance.timeToWait = 1;
_local12 = WallBitmapResources.HorizontalWallBreakingGraphics.clone();
GameManager.Instance.currentLevel.graphicsToUpdate.push(_local12);
_local5.currentAnimationIndex = (GameManager.Instance.currentLevel.graphicsToUpdate.length - 1);
return (null);
};
if (_local5.wallTop){
return (null);
};
_local6 = (_local4 - 1);
while (_local6 >= 0) {
_local7 = tiles[_local3][_local6];
trace(((("shoooting at [" + _local3) + ", ") + "i]"));
if (_local7.attachedGameObject != null){
trace(("found " + _local7.attachedGameObject.id));
return (_local7.attachedGameObject);
};
trace("nothing to shoot");
if (_local7.wallTop == Tile.WALL_DESTROYABLE){
_local7.wallTop = Tile.WALL_DESTROID;
GameManager.Instance.timeToWait = 1;
_local13 = WallBitmapResources.HorizontalWallBreakingGraphics.clone();
GameManager.Instance.currentLevel.graphicsToUpdate.push(_local13);
_local7.currentAnimationIndex = (GameManager.Instance.currentLevel.graphicsToUpdate.length - 1);
return (null);
};
if (((((!((_local7.wallTop == Tile.WALL_NONE))) && (!((_local7.wallTop == Tile.WALL_SLIDING_DOWN))))) && (!((_local7.wallTop == Tile.WALL_DESTROID))))){
return (null);
};
_local6--;
};
};
return (null);
}
}
}//package cotogames.carmack.core
Section 116
//LevelData (cotogames.carmack.core.LevelData)
package cotogames.carmack.core {
public class LevelData {
public var summary:Number;// = 0
public var open:int;// = 0
public var robotsAvoided:Number;// = 0
public var time:Number;// = 0
public var timePoints:Number;// = 0
public var completed:int;// = 0
public var robotsDestroyed:Number;// = 0
public function LevelData(_arg1:int=0){
this.open = _arg1;
}
public function clone():LevelData{
var _local1:LevelData = new LevelData();
_local1.completed = completed;
_local1.open = open;
_local1.robotsAvoided = robotsAvoided;
_local1.robotsDestroyed = robotsDestroyed;
_local1.summary = summary;
_local1.time = time;
_local1.timePoints = timePoints;
return (_local1);
}
public function save():String{
return (((((((((((((open + "|") + completed) + "|") + time) + "|") + timePoints) + "|") + robotsDestroyed) + "|") + robotsAvoided) + "|") + summary));
}
public function toString():String{
return ((((((("[Opened: " + open) + ", complete: ") + completed) + ", points: ") + summary) + "pt]"));
}
public static function load(_arg1:String):LevelData{
var _local2:LevelData = new (LevelData);
var _local3:Array = _arg1.split("|");
_local2.open = _local3[0];
_local2.completed = _local3[1];
_local2.time = _local3[2];
_local2.timePoints = _local3[3];
_local2.robotsDestroyed = _local3[4];
_local2.robotsAvoided = _local3[5];
_local2.summary = _local3[6];
return (_local2);
}
}
}//package cotogames.carmack.core
Section 117
//MusicManager (cotogames.carmack.core.MusicManager)
package cotogames.carmack.core {
import flash.media.*;
public class MusicManager {
public static var currentChannel:SoundChannel = null;
public static var currentMusic:Sound = null;
public static var soundTransform:SoundTransform = new SoundTransform();
public static function changeVolume(_arg1:Number):void{
if (currentChannel == null){
return;
};
currentChannel.soundTransform.volume = _arg1;
}
public static function stop():void{
if (currentChannel != null){
currentChannel.stop();
};
}
public static function play(_arg1:Sound, _arg2:int=0x7D00):void{
if (currentChannel != null){
currentChannel.stop();
};
soundTransform.volume = 0.2;
currentMusic = _arg1;
currentChannel = currentMusic.play(0, _arg2, soundTransform);
}
}
}//package cotogames.carmack.core
Section 118
//GameState (cotogames.carmack.gamestates.GameState)
package cotogames.carmack.gamestates {
import flash.display.*;
import flash.events.*;
public class GameState {
public static var quakeOn:Boolean = false;
public static var currentGameState:GameState = null;
public function keyDown(_arg1:KeyboardEvent):void{
}
public function mouseMove(_arg1:MouseEvent):void{
}
public function mouseDown(_arg1:MouseEvent):void{
}
public function update():void{
}
public function keyUp(_arg1:KeyboardEvent):void{
}
public function getBackBuffer():BitmapData{
return (null);
}
public function reset():void{
}
}
}//package cotogames.carmack.gamestates
Section 119
//AcidBathingLevel (cotogames.carmack.levels.AcidBathingLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.objects.*;
public class AcidBathingLevel {
public static function build():Level{
var _local14:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Acid Bathing";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true, true);
_local4[4].wallTop = Tile.WALL_GENERIC;
_local4[5] = new Tile(TileBitmapResources.AcidLeftBottomRightGraphics, true, true);
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallLeft = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[2].wallLeft = Tile.WALL_GENERIC;
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[3].wallTop = Tile.WALL_GENERIC;
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[4].wallLeft = Tile.WALL_GENERIC;
_local6[5] = new Tile(TileBitmapResources.AcidBottomLeftTopGraphics, true, true);
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[4].wallTop = Tile.WALL_GENERIC;
_local7[5] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true, true);
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(TileBitmapResources.OuterTopTileOpenDoorGraphics, false, false);
_local8[2] = new Tile(ResourceManager.MarkedTileGraphics);
_local8[2].wallLeft = Tile.WALL_GENERIC;
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[3].wallTop = Tile.WALL_GENERIC;
_local8[3].wallLeft = Tile.WALL_GENERIC;
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true, true);
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[4] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true, true);
_local9[5] = new Tile(TileBitmapResources.AcidBottomGraphics, true, true);
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[3].wallLeft = Tile.WALL_GENERIC;
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallLeft = Tile.WALL_GENERIC;
_local10[5] = new Tile(TileBitmapResources.AcidRightTopGraphics, true, true);
_local10[5].wallTop = Tile.WALL_GENERIC;
_local10[6] = new Tile(TileBitmapResources.AcidLeftBottomRightGraphics, true, true);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local9[5].decorations.push(new Decoration(TileBitmapResources.DecorationAcidLeftTopGraphics, new Point(7, 5), Decoration.LEFT_TOP));
_local9[5].decorations.push(new Decoration(TileBitmapResources.DecorationAcidRightTopGraphics, new Point(7, 5), Decoration.RIGHT_TOP));
_local10[5].decorations.push(new Decoration(TileBitmapResources.DecorationAcidLeftBottomGraphics, new Point(8, 5), Decoration.LEFT_BOTTOM));
_local1.graphicsToUpdate.push(TileBitmapResources.AcidTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomTopGraphics);
_local1.startPosition = new Point(3, 6);
_local1.finishPosition = new Point(6, 2);
var _local13:Welder = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidDownGraphics;
_local13.position = new Point(2, 3);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
_local14 = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(3, 5);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder4";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(4, 2);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder5";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidLeftGraphics;
_local16.position = new Point(5, 6);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder6";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(8, 3);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.introText = "This acid looks dangerous...";
_local1.estimatedTime = 120;
_local1.points = 500;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 120
//ANewThreatLevel (cotogames.carmack.levels.ANewThreatLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class ANewThreatLevel {
public static function build():Level{
var _local13:Welder;
var _local16:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "A New Threat";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[3].wallTop = Tile.WALL_GENERIC;
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallLeft = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallTop = Tile.WALL_GENERIC;
_local5[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[2].wallLeft = Tile.WALL_GENERIC;
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[4].wallTop = Tile.WALL_GENERIC;
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_GENERIC;
_local6[5].wallLeft = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[6].wallLeft = Tile.WALL_GENERIC;
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallTop = Tile.WALL_GENERIC;
_local7[3].wallLeft = Tile.WALL_GENERIC;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallTop = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[6].wallTop = Tile.WALL_GENERIC;
_local7[6].wallLeft = Tile.WALL_GENERIC;
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[2].wallLeft = Tile.WALL_GENERIC;
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[3].wallLeft = Tile.WALL_GENERIC;
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallTop = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[5].wallLeft = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[2].wallLeft = Tile.WALL_GENERIC;
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallTop = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.MarkedTileGraphics);
_local10[5].wallTop = Tile.WALL_GENERIC;
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[4] = new Tile(TileBitmapResources.OuterRightTileOpenDoor1Graphics, false, false);
_local11[5] = new Tile(TileBitmapResources.OuterRightTileOpenDoor2Graphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(3, 6);
_local1.finishPosition = new Point(8, 5);
_local13 = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidDownGraphics;
_local13.position = new Point(2, 3);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
var _local14:Welder = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(5, 2);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidLeftGraphics;
_local15.position = new Point(4, 6);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
_local16 = new Welder();
_local16.id = "welder4";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(7, 3);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder5";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(7, 5);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
var _local18:Turret = new Turret(GameObject.DIRECTION_LEFT, 3);
_local18.speed = 15;
_local18.position = new Point(8, 4);
_local1.gameObjects.push(_local18);
_local1.attachGameObject(_local18);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 140;
_local1.points = 800;
_local1.introText = (("Turrets kill everyone who stands in front of them." + "Luckily they need to recharge after each shot. Recharge time is different for each turret.") + "Turns to recharge are displayed on the turret.");
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 121
//BeCarefullLevel (cotogames.carmack.levels.BeCarefullLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class BeCarefullLevel {
public static function build():Level{
var _local13:Welder;
var _local16:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Be Carefull";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[3].wallTop = Tile.WALL_GENERIC;
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[5].wallTop = Tile.WALL_GENERIC;
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallTop = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallTop = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallTop = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[3].wallLeft = Tile.WALL_GENERIC;
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[4].wallLeft = Tile.WALL_GENERIC;
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.MarkedTileGraphics);
_local6[6].wallTop = Tile.WALL_GENERIC;
_local6[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallTop = Tile.WALL_GENERIC;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[4].wallTop = Tile.WALL_GENERIC;
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallLeft = Tile.WALL_DESTROYABLE;
_local7[6] = new Tile(TileBitmapResources.AcidBottomLeftTopGraphics, true, true);
_local7[6].wallLeft = Tile.WALL_GENERIC;
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(TileBitmapResources.OuterTopTileOpenDoorGraphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[2].wallLeft = Tile.WALL_GENERIC;
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[4].wallTop = Tile.WALL_GENERIC;
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[6] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true, true);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[3].wallTop = Tile.WALL_GENERIC;
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[6] = new Tile(TileBitmapResources.AcidBottomRightTopGraphics, true, true);
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallTop = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[5].wallLeft = Tile.WALL_GENERIC;
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallLeft = Tile.WALL_GENERIC;
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomLeftTopGraphics);
_local1.startPosition = new Point(6, 2);
_local1.finishPosition = new Point(4, 6);
_local13 = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidUpGraphics;
_local13.position = new Point(3, 4);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
var _local14:Welder = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidRightGraphics;
_local14.position = new Point(5, 2);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidUpGraphics;
_local15.position = new Point(6, 4);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
_local16 = new Welder();
_local16.id = "welder4";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidUpGraphics;
_local16.position = new Point(8, 6);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_DOWN;
_local1.playerObject.graphics = ResourceManager.RoboDownGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 600;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 122
//BlastThroughLevel (cotogames.carmack.levels.BlastThroughLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.objects.*;
public class BlastThroughLevel {
public static function build():Level{
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Blast Through";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local2[2] = new Tile(TileBitmapResources.OuterLeftTileOpenDoor1Graphics, false, false);
_local2[3] = new Tile(TileBitmapResources.OuterLeftTileOpenDoor2Graphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local3[2] = new Tile(TileBitmapResources.AcidBottomLeftTopGraphics, true, true);
_local3[3] = new Tile(ResourceManager.MarkedTileGraphics);
_local3[3].wallTop = Tile.WALL_GENERIC;
_local3[4] = new Tile(ResourceManager.Tile1Graphics);
_local3[5] = new Tile(ResourceManager.Tile6Graphics);
_local3[6] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true, true);
_local3[6].wallTop = Tile.WALL_GENERIC;
_local3[7] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local3[7].decorations.push(new Decoration(TileBitmapResources.DecorationAcidRightTopGraphics, new Point(1, 7), Decoration.RIGHT_TOP));
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local4[2] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true, true);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[3].wallTop = Tile.WALL_GENERIC;
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[4].wallTop = Tile.WALL_GENERIC;
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[5].wallTop = Tile.WALL_GENERIC;
_local4[6] = new Tile(ResourceManager.Tile6Graphics);
_local4[7] = new Tile(TileBitmapResources.AcidBottomRightTopGraphics, true, true);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(TileBitmapResources.AcidTopGraphics, true, true);
_local5[3] = new Tile(TileBitmapResources.AcidLeftGraphics, true, true);
_local5[3].wallLeft = Tile.WALL_GENERIC;
_local5[4] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local5[4].wallLeft = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallTop = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallLeft = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.Tile1Graphics);
_local5[7].wallLeft = Tile.WALL_GENERIC;
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(TileBitmapResources.AcidTopGraphics, true, true);
_local6[3] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local6[4] = new Tile(TileBitmapResources.AcidBottomGraphics, true, true);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.Tile1Graphics);
_local6[7].wallTop = Tile.WALL_GENERIC;
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(TileBitmapResources.AcidTopGraphics, true, true);
_local7[3] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local7[4] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local7[5] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local7[5].wallLeft = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[6].wallTop = Tile.WALL_GENERIC;
_local7[7] = new Tile(ResourceManager.Tile1Graphics);
_local7[7].wallLeft = Tile.WALL_GENERIC;
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(TileBitmapResources.AcidTopGraphics, true, true);
_local8[3] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local8[4] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local8[5] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true, true);
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[6].wallTop = Tile.WALL_GENERIC;
_local8[7] = new Tile(ResourceManager.Tile1Graphics);
_local8[7].wallTop = Tile.WALL_GENERIC;
_local8[7].wallLeft = Tile.WALL_GENERIC;
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(TileBitmapResources.AcidTopGraphics, true, true);
_local9[3] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local9[4] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true, true);
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[5].wallLeft = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[7] = new Tile(ResourceManager.Tile1Graphics);
_local9[7].wallTop = Tile.WALL_GENERIC;
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(TileBitmapResources.AcidTopGraphics, true, true);
_local10[3] = new Tile(TileBitmapResources.AcidBottomGraphics, true, true);
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallTop = Tile.WALL_GENERIC;
_local10[4].wallLeft = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallLeft = Tile.WALL_GENERIC;
_local10[7] = new Tile(ResourceManager.Tile1Graphics);
_local10[8] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local11[2] = new Tile(TileBitmapResources.AcidRightTopGraphics, true, true);
_local11[3] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true, true);
_local11[4] = new Tile(ResourceManager.Tile1Graphics);
_local11[4].wallTop = Tile.WALL_GENERIC;
_local11[5] = new Tile(ResourceManager.Tile1Graphics);
_local11[5].wallTop = Tile.WALL_GENERIC;
_local11[6] = new Tile(ResourceManager.Tile1Graphics);
_local11[6].wallTop = Tile.WALL_DESTROYABLE;
_local11[7] = new Tile(ResourceManager.Tile1Graphics);
_local11[7].wallTop = Tile.WALL_DESTROYABLE;
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterRightTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightTopGraphics);
_local1.startPosition = new Point(8, 7);
_local1.finishPosition = new Point(1, 3);
var _local13:Welder = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidDownGraphics;
_local13.position = new Point(2, 3);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
var _local14:Welder = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(1, 5);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidRightGraphics;
_local15.position = new Point(4, 7);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder4";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidRightGraphics;
_local16.position = new Point(5, 7);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Turret = new Turret(GameObject.DIRECTION_DOWN, 2);
_local17.speed = 15;
_local17.position = new Point(8, 4);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 700;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 123
//FinalLevel (cotogames.carmack.levels.FinalLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class FinalLevel {
public static function build():Level{
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Final Level";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local5[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[2] = new Tile(TileBitmapResources.Comp1Graphics, false, false);
_local7[3] = new Tile(TileBitmapResources.Comp2Graphics);
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[6] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[2] = new Tile(ResourceManager.OuterTopTileGraphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local9[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(5, 5);
_local1.finishPosition = new Point(1, 1);
var _local13:EventCompleteLevel = new EventCompleteLevel(_local1);
_local1.levelEvents.addItem(_local13);
_local7[2].levelEventID = 0;
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 20;
_local1.points = 100;
_local1.canExit = false;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 124
//HardToPassByLevel (cotogames.carmack.levels.HardToPassByLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class HardToPassByLevel {
public static function build():Level{
var _local14:Welder;
var _local19:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Hard To Pass By";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.Tile1Graphics);
_local3[3] = new Tile(ResourceManager.Tile1Graphics);
_local3[4] = new Tile(ResourceManager.Tile1Graphics);
_local3[5] = new Tile(ResourceManager.Tile1Graphics);
_local3[6] = new Tile(TileBitmapResources.AcidSingleGraphics, true, true);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[3].wallTop = Tile.WALL_GENERIC;
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[4].wallTop = Tile.WALL_DESTROYABLE;
_local4[4].wallLeft = Tile.WALL_GENERIC;
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[6].wallLeft = Tile.WALL_GENERIC;
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(TileBitmapResources.OuterTopTileOpenDoorGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[2].wallLeft = Tile.WALL_GENERIC;
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallTop = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallTop = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallLeft = Tile.WALL_GENERIC;
_local5[6].wallTop = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(TileBitmapResources.AcidLeftTopGraphics, true, true);
_local6[2].wallLeft = Tile.WALL_GENERIC;
_local6[3] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local6[3].wallLeft = Tile.WALL_GENERIC;
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[4].wallTop = Tile.WALL_GENERIC;
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallLeft = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[6].wallTop = Tile.WALL_GENERIC;
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(TileBitmapResources.AcidTopGraphics, true, true);
_local7[3] = new Tile(TileBitmapResources.AcidBottomGraphics, true, true);
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[4].wallTop = Tile.WALL_GENERIC;
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallTop = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(TileBitmapResources.AcidRightTopGraphics, true, true);
_local8[3] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true, true);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[4].wallTop = Tile.WALL_GENERIC;
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallLeft = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[6].wallTop = Tile.WALL_GENERIC;
_local8[6].wallLeft = Tile.WALL_GENERIC;
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopButtonNotPressedTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[2].wallLeft = Tile.WALL_GENERIC;
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[3].wallTop = Tile.WALL_GENERIC;
_local9[3].wallLeft = Tile.WALL_GENERIC;
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[6].wallTop = Tile.WALL_SLIDING;
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[3].wallLeft = Tile.WALL_GENERIC;
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[5].wallLeft = Tile.WALL_GENERIC;
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallTop = Tile.WALL_GENERIC;
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local11[2] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true, true);
_local11[2].wallLeft = Tile.WALL_GENERIC;
_local11[3] = new Tile(TileBitmapResources.AcidLeftRightGraphics, true, true);
_local11[3].wallLeft = Tile.WALL_GENERIC;
_local11[4] = new Tile(TileBitmapResources.AcidLeftBottomRightGraphics, true, true);
_local11[4].wallLeft = Tile.WALL_GENERIC;
_local11[5] = new Tile(ResourceManager.MarkedTileGraphics);
_local11[5].wallTop = Tile.WALL_GENERIC;
_local11[5].wallLeft = Tile.WALL_GENERIC;
_local11[6] = new Tile(ResourceManager.Tile1Graphics);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[4] = new Tile(TileBitmapResources.OuterRightTileOpenDoor1Graphics, false, false);
_local12[5] = new Tile(TileBitmapResources.OuterRightTileOpenDoor2Graphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(3, 2);
_local1.finishPosition = new Point(9, 5);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidSingleGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidTopGraphics);
var _local13:EventSlideWall = new EventSlideWall(_local1, _local9[6], _local9[1], new Point(7, 6), GameObject.DIRECTION_UP);
_local1.levelEvents.addItem(_local13);
_local9[1].levelEventID = 0;
_local14 = new Welder();
_local14.id = "welder1";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidRightGraphics;
_local14.position = new Point(2, 2);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder2";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidUpGraphics;
_local15.position = new Point(1, 5);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder4";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidUpGraphics;
_local16.position = new Point(3, 6);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder5";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidLeftGraphics;
_local17.position = new Point(7, 2);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
var _local18:Welder = new Welder();
_local18.id = "welder6";
_local18.speed = 2;
_local18.graphics = ResourceManager.DroidUpGraphics;
_local18.position = new Point(8, 5);
_local1.gameObjects.push(_local18);
_local1.attachGameObject(_local18);
_local19 = new Welder();
_local19.id = "welder7";
_local19.speed = 2;
_local19.graphics = ResourceManager.DroidUpGraphics;
_local19.position = new Point(9, 5);
_local1.gameObjects.push(_local19);
_local1.attachGameObject(_local19);
var _local20:Turret = new Turret(GameObject.DIRECTION_UP, 4);
_local20.speed = 15;
_local20.position = new Point(2, 6);
_local1.gameObjects.push(_local20);
_local1.attachGameObject(_local20);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_DOWN;
_local1.playerObject.graphics = ResourceManager.RoboDownGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 800;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 125
//IntroLevel (cotogames.carmack.levels.IntroLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class IntroLevel {
public static function build():Level{
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Introduction";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local5[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.OuterTopButtonNotPressedTileGraphics, false, false);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.OuterTopTileClosedDoorGraphics, false, false);
_local7[3] = new Tile(ResourceManager.MarkedTileGraphics);
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[6] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[2] = new Tile(ResourceManager.OuterTopTile2Graphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local9[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
var _local13:EventOpenDoor = new EventOpenDoor(_local1, _local6[2], _local7[2], GameObject.DIRECTION_UP);
_local1.levelEvents.addItem(_local13);
_local6[2].levelEventID = 0;
_local1.startPosition = new Point(5, 5);
_local1.finishPosition = new Point(5, 3);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.introText = (("To complete the level, stand on the marked tile when the door is open." + "LEFT, RIGHT, DOWN and UP to turn around and move.") + "X to press buttons on walls.");
_local1.estimatedTime = 40;
_local1.points = 100;
_local1.canExit = false;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 126
//Level12Level (cotogames.carmack.levels.Level12Level)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.objects.*;
public class Level12Level {
public static function build():Level{
var _local13:Welder;
var _local15:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Level #12";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.Tile1Graphics);
_local3[3] = new Tile(ResourceManager.Tile1Graphics);
_local3[3].wallTop = Tile.WALL_GENERIC;
_local3[4] = new Tile(ResourceManager.Tile1Graphics);
_local3[5] = new Tile(TileBitmapResources.AcidLeftTopGraphics, true, true);
_local3[5].wallTop = Tile.WALL_GENERIC;
_local3[6] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true, true);
_local4[4].wallLeft = Tile.WALL_GENERIC;
_local4[5] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local4[5].decorations.push(new Decoration(TileBitmapResources.DecorationAcidLeftTopGraphics, new Point(2, 5), Decoration.LEFT_TOP));
_local4[5].decorations.push(new Decoration(TileBitmapResources.DecorationAcidRightTopGraphics, new Point(2, 5), Decoration.RIGHT_TOP));
_local4[6] = new Tile(TileBitmapResources.AcidBottomGraphics, true, true);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallLeft = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[5] = new Tile(TileBitmapResources.AcidRightTopGraphics, true, true);
_local5[6] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true, true);
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(TileBitmapResources.AcidBottomLeftTopGraphics, true, true);
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true, true);
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallTop = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[3] = new Tile(TileBitmapResources.AcidRightTopGraphics, true, true);
_local8[3].decorations.push(new Decoration(TileBitmapResources.DecorationAcidLeftBottomGraphics, new Point(6, 3), Decoration.LEFT_BOTTOM));
_local8[4] = new Tile(TileBitmapResources.AcidLeftGraphics, true, true);
_local8[4].decorations.push(new Decoration(TileBitmapResources.DecorationAcidRightTopGraphics, new Point(6, 4), Decoration.RIGHT_TOP));
_local8[5] = new Tile(TileBitmapResources.AcidLeftGraphics, true, true);
_local8[6] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[3].wallLeft = Tile.WALL_GENERIC;
_local9[4] = new Tile(TileBitmapResources.AcidRightTopGraphics, true, true);
_local9[4].wallTop = Tile.WALL_GENERIC;
_local9[5] = new Tile(TileBitmapResources.AcidRightGraphics, true, true);
_local9[6] = new Tile(TileBitmapResources.AcidBottomGraphics, true, true);
_local9[6].decorations.push(new Decoration(TileBitmapResources.DecorationAcidRightTopGraphics, new Point(7, 6), Decoration.RIGHT_TOP));
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[6] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true, true);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local11[2] = new Tile(TileBitmapResources.AcidSingleGraphics, true, true);
_local11[3] = new Tile(ResourceManager.Tile1Graphics);
_local11[4] = new Tile(TileBitmapResources.AcidSingleGraphics, true, true);
_local11[5] = new Tile(ResourceManager.MarkedTileGraphics);
_local11[6] = new Tile(TileBitmapResources.AcidBottomRightTopGraphics, true, true);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[4] = new Tile(TileBitmapResources.OuterRightTileOpenDoor1Graphics, false, false);
_local12[5] = new Tile(TileBitmapResources.OuterRightTileOpenDoor2Graphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidSingleGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopGraphics);
_local1.startPosition = new Point(4, 6);
_local1.finishPosition = new Point(9, 5);
_local13 = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidDownGraphics;
_local13.position = new Point(1, 4);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
var _local14:Welder = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(3, 4);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
_local15 = new Welder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(4, 4);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder4";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(7, 3);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Turret = new Turret(GameObject.DIRECTION_LEFT, 5);
_local17.speed = 15;
_local17.position = new Point(8, 2);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 100;
_local1.points = 500;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 127
//LonelyTurretLevel (cotogames.carmack.levels.LonelyTurretLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class LonelyTurretLevel {
public static function build():Level{
var _local13:Welder;
var _local14:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Lonely Turret";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(TileBitmapResources.OuterTopTileOpenDoorGraphics, false, false);
_local5[2] = new Tile(ResourceManager.MarkedTileGraphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallLeft = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallTop = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallLeft = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallLeft = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[2].wallLeft = Tile.WALL_GENERIC;
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[3].wallTop = Tile.WALL_GENERIC;
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[6].wallTop = Tile.WALL_GENERIC;
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallLeft = Tile.WALL_GENERIC;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallTop = Tile.WALL_GENERIC;
_local7[5].wallLeft = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[4].wallTop = Tile.WALL_GENERIC;
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[2].wallLeft = Tile.WALL_GENERIC;
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallLeft = Tile.WALL_GENERIC;
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[6].wallTop = Tile.WALL_GENERIC;
_local9[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[3].wallTop = Tile.WALL_GENERIC;
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(7, 6);
_local1.finishPosition = new Point(3, 2);
_local13 = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidDownGraphics;
_local13.position = new Point(2, 5);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
_local14 = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(4, 5);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidRightGraphics;
_local15.position = new Point(4, 6);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder4";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(7, 2);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Turret = new Turret(GameObject.DIRECTION_DOWN, 2);
_local17.speed = 15;
_local17.position = new Point(5, 2);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 600;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 128
//MakeYourWayLevel (cotogames.carmack.levels.MakeYourWayLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class MakeYourWayLevel {
public static function build():Level{
var _local14:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Make Your Way";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[4] = new Tile(TileBitmapResources.OuterLeftTileOpenDoor1Graphics, false, false);
_local2[5] = new Tile(TileBitmapResources.OuterLeftTileOpenDoor2Graphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.Tile1Graphics);
_local3[3] = new Tile(ResourceManager.Tile1Graphics);
_local3[3].wallTop = Tile.WALL_GENERIC;
_local3[4] = new Tile(ResourceManager.Tile1Graphics);
_local3[5] = new Tile(ResourceManager.MarkedTileGraphics);
_local3[5].wallTop = Tile.WALL_GENERIC;
_local3[6] = new Tile(ResourceManager.Tile1Graphics);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[4].wallTop = Tile.WALL_GENERIC;
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[5].wallLeft = Tile.WALL_GENERIC;
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallLeft = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallTop = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallTop = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallTop = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[2].wallLeft = Tile.WALL_DESTROYABLE;
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[3].wallTop = Tile.WALL_DESTROYABLE;
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_DESTROYABLE;
_local6[5].wallLeft = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[6].wallLeft = Tile.WALL_GENERIC;
_local6[6].wallTop = Tile.WALL_GENERIC;
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[4].wallLeft = Tile.WALL_GENERIC;
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[3].wallTop = Tile.WALL_GENERIC;
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[4].wallLeft = Tile.WALL_GENERIC;
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallTop = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[6].wallTop = Tile.WALL_GENERIC;
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[2].wallLeft = Tile.WALL_DESTROYABLE;
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[3].wallTop = Tile.WALL_GENERIC;
_local9[3].wallLeft = Tile.WALL_GENERIC;
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[5].wallLeft = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[6].wallTop = Tile.WALL_GENERIC;
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallTop = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.Tile1Graphics);
_local11[3] = new Tile(ResourceManager.Tile1Graphics);
_local11[3].wallLeft = Tile.WALL_GENERIC;
_local11[4] = new Tile(ResourceManager.Tile1Graphics);
_local11[5] = new Tile(ResourceManager.Tile1Graphics);
_local11[5].wallTop = Tile.WALL_GENERIC;
_local11[5].wallLeft = Tile.WALL_GENERIC;
_local11[6] = new Tile(ResourceManager.Tile1Graphics);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(8, 6);
_local1.finishPosition = new Point(1, 5);
var _local13:Welder = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidRightGraphics;
_local13.position = new Point(5, 6);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
_local14 = new Welder();
_local14.id = "welder3";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(3, 5);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder4";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(4, 4);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder5";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(6, 4);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder6";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(8, 3);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
var _local18:Welder = new Welder();
_local18.id = "welder7";
_local18.speed = 2;
_local18.graphics = ResourceManager.DroidDownGraphics;
_local18.position = new Point(9, 4);
_local1.gameObjects.push(_local18);
_local1.attachGameObject(_local18);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 600;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 129
//MeetTheRobotsLevel (cotogames.carmack.levels.MeetTheRobotsLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class MeetTheRobotsLevel {
public static function build():Level{
var _local13:Welder;
var _local14:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Meet The Robots";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[7] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.Tile1Graphics);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileOpenDoorGraphics, false, false);
_local7[2] = new Tile(ResourceManager.MarkedTileGraphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.Tile1Graphics);
_local7[8] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[3].wallLeft = Tile.WALL_GENERIC;
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[4].wallTop = Tile.WALL_GENERIC;
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.Tile1Graphics);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[7] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(5, 7);
_local1.finishPosition = new Point(5, 2);
_local13 = new Welder();
_local13.id = "welder";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidDownGraphics;
_local13.position = new Point(4, 4);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
_local14 = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(6, 3);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.introText = ("Robots always move straight to you, trying a horizontall route before trying a vertical one." + "They are twice as fast as you. But fear not! Your gun can easily destroy them (Z button).");
_local1.estimatedTime = 80;
_local1.points = 200;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 130
//OpenTheDoorLevel (cotogames.carmack.levels.OpenTheDoorLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class OpenTheDoorLevel {
public static function build():Level{
var _local14:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Open The Door";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(TileBitmapResources.OuterLeftTileOpenDoor1Graphics, false, false);
_local3[3] = new Tile(TileBitmapResources.OuterLeftTileOpenDoor2Graphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.MarkedTileGraphics);
_local4[3].wallTop = Tile.WALL_GENERIC;
_local4[4] = new Tile(TileBitmapResources.AcidLeftTopGraphics, true, true);
_local4[5] = new Tile(TileBitmapResources.AcidLeftGraphics, true, true);
_local4[6] = new Tile(TileBitmapResources.AcidLeftGraphics, true, true);
_local4[7] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[2].wallLeft = Tile.WALL_SLIDING;
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[4] = new Tile(TileBitmapResources.AcidTopGraphics, true, true);
_local5[5] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local5[6] = new Tile(TileBitmapResources.AcidGraphics, true, true);
_local5[7] = new Tile(TileBitmapResources.AcidBottomGraphics, true, true);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[3].wallTop = Tile.WALL_GENERIC;
_local6[4] = new Tile(TileBitmapResources.AcidRightTopGraphics, true, true);
_local6[5] = new Tile(TileBitmapResources.AcidRightGraphics, true, true);
_local6[6] = new Tile(TileBitmapResources.AcidRightGraphics, true, true);
_local6[7] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true, true);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[2].wallLeft = Tile.WALL_GENERIC;
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallTop = Tile.WALL_GENERIC;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.Tile1Graphics);
_local7[8] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallTop = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.Tile1Graphics);
_local8[7].wallTop = Tile.WALL_GENERIC;
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopButtonNotPressedTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[2].wallLeft = Tile.WALL_GENERIC;
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[6].wallLeft = Tile.WALL_GENERIC;
_local9[7] = new Tile(ResourceManager.Tile1Graphics);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[2].wallLeft = Tile.WALL_GENERIC;
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallLeft = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[5].wallLeft = Tile.WALL_GENERIC;
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[7] = new Tile(ResourceManager.Tile1Graphics);
_local10[7].wallLeft = Tile.WALL_GENERIC;
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightTopGraphics);
_local1.startPosition = new Point(5, 7);
_local1.finishPosition = new Point(2, 3);
var _local13:EventSlideWall = new EventSlideWall(_local1, _local5[2], _local9[1], new Point(3, 2), GameObject.DIRECTION_LEFT);
_local1.levelEvents.addItem(_local13);
_local9[1].levelEventID = 0;
_local14 = new Welder();
_local14.id = "welder1";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(4, 2);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder2";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(5, 4);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder3";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(5, 5);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder3";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(8, 6);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
var _local18:Turret = new Turret(GameObject.DIRECTION_RIGHT, 4);
_local18.speed = 15;
_local18.position = new Point(2, 2);
_local1.gameObjects.push(_local18);
_local1.attachGameObject(_local18);
var _local19:Turret = new Turret(GameObject.DIRECTION_UP, 4);
_local19.speed = 15;
_local19.position = new Point(7, 4);
_local1.gameObjects.push(_local19);
_local1.attachGameObject(_local19);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 800;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 131
//RobotMazeLevel (cotogames.carmack.levels.RobotMazeLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class RobotMazeLevel {
public static function build():Level{
var _local14:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Robot Maze";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(TileBitmapResources.OuterLeftTileOpenDoor1Graphics, false, false);
_local3[4] = new Tile(TileBitmapResources.OuterLeftTileOpenDoor2Graphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[5].wallTop = Tile.WALL_GENERIC;
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallTop = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallTop = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallLeft = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallTop = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[3].wallLeft = Tile.WALL_GENERIC;
_local6[3].wallTop = Tile.WALL_GENERIC;
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopButtonNotPressedTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallTop = Tile.WALL_GENERIC;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[6].wallTop = Tile.WALL_GENERIC;
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallLeft = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[6].wallLeft = Tile.WALL_GENERIC;
_local8[6].wallTop = Tile.WALL_GENERIC;
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[2].wallLeft = Tile.WALL_GENERIC;
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallTop = Tile.WALL_GENERIC;
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_SLIDING;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[3].wallLeft = Tile.WALL_GENERIC;
_local10[4] = new Tile(ResourceManager.MarkedTileGraphics);
_local10[4].wallTop = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[5].wallLeft = Tile.WALL_GENERIC;
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallTop = Tile.WALL_GENERIC;
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(TileBitmapResources.OuterRightTileOpenDoor1Graphics, false, false);
_local11[4] = new Tile(TileBitmapResources.OuterRightTileOpenDoor2Graphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
var _local13:EventSlideWall = new EventSlideWall(_local1, _local9[5], _local7[1], new Point(7, 5), GameObject.DIRECTION_UP);
_local1.levelEvents.addItem(_local13);
_local7[1].levelEventID = 0;
_local1.startPosition = new Point(2, 4);
_local1.finishPosition = new Point(8, 4);
_local14 = new Welder();
_local14.id = "welder1";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(3, 2);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder2";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(2, 6);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder3";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(5, 3);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder4";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(6, 6);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_RIGHT;
_local1.playerObject.graphics = ResourceManager.RoboRightGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 100;
_local1.points = 400;
_local1.introText = ("Your gun needs one turn to recharge after each shot." + "Its status is displayed in the top left corner of the screen.");
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 132
//RustyStuffLevel (cotogames.carmack.levels.RustyStuffLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class RustyStuffLevel {
public static function build():Level{
var _local16:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Rusty Stuff";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[2].wallLeft = Tile.WALL_GENERIC;
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallTop = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallTop = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallTop = Tile.WALL_GENERIC;
_local5[5].wallLeft = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallTop = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[4].wallTop = Tile.WALL_GENERIC;
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallTop = Tile.WALL_GENERIC;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallLeft = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[6].wallTop = Tile.WALL_GENERIC;
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(TileBitmapResources.OuterTopTileOpenDoorGraphics, false, false);
_local8[2] = new Tile(ResourceManager.MarkedTileGraphics);
_local8[2].wallLeft = Tile.WALL_GENERIC;
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[3].wallLeft = Tile.WALL_GENERIC;
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[4].wallTop = Tile.WALL_GENERIC;
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallTop = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[6].wallLeft = Tile.WALL_GENERIC;
_local8[6].wallTop = Tile.WALL_GENERIC;
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[3].wallLeft = Tile.WALL_GENERIC;
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallTop = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[3].wallLeft = Tile.WALL_GENERIC;
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallLeft = Tile.WALL_GENERIC;
_local10[4].wallTop = Tile.WALL_DESTROYABLE;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallLeft = Tile.WALL_GENERIC;
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(4, 6);
_local1.finishPosition = new Point(6, 2);
var _local13:Welder = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidRightGraphics;
_local13.position = new Point(2, 6);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
var _local14:Welder = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(4, 3);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(5, 4);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
_local16 = new Welder();
_local16.id = "welder5";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(6, 3);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder4";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(6, 6);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 100;
_local1.points = 500;
_local1.introText = ("Some robots are faster, some are slower. Use it to your advantage!" + "Rusty walls can be destroyed with your gun.");
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 133
//StepUpLevel (cotogames.carmack.levels.StepUpLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class StepUpLevel {
public static function build():Level{
var _local16:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Step Up";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[2].wallLeft = Tile.WALL_GENERIC;
_local5[3] = new Tile(ResourceManager.TileWithButtonGraphics);
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallTop = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallTop = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[3].wallLeft = Tile.WALL_DESTROYABLE;
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallLeft = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[2].wallLeft = Tile.WALL_GENERIC;
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallLeft = Tile.WALL_DESTROYABLE;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[4].wallLeft = Tile.WALL_GENERIC;
_local7[4].wallTop = Tile.WALL_GENERIC;
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallLeft = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(TileBitmapResources.AcidBottomLeftTopGraphics, true, false);
_local8[2].wallLeft = Tile.WALL_GENERIC;
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[3].wallTop = Tile.WALL_GENERIC;
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallTop = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true, false);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[3].wallTop = Tile.WALL_GENERIC;
_local9[3].wallLeft = Tile.WALL_DESTROYABLE;
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.MarkedTileGraphics);
_local9[6].wallTop = Tile.WALL_GENERIC;
_local9[6].wallLeft = Tile.WALL_GENERIC;
_local9[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(TileBitmapResources.AcidBottomRightTopGraphics, true, false);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[3].wallTop = Tile.WALL_GENERIC;
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallTop = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallTop = Tile.WALL_SLIDING;
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomTopGraphics);
var _local13:EventTileSlideWall = new EventTileSlideWall(_local1, _local10[6], _local5[3], new Point(8, 6), GameObject.DIRECTION_UP);
_local1.levelEvents.addItem(_local13);
_local5[3].onStepEvent = _local13;
_local1.startPosition = new Point(2, 6);
_local1.finishPosition = new Point(7, 6);
var _local14:Welder = new Welder();
_local14.id = "welder1";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(2, 4);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder2";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(3, 5);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
_local16 = new Welder();
_local16.id = "welder3";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(4, 3);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder4";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(5, 3);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
var _local18:Welder = new Welder();
_local18.id = "welder5";
_local18.speed = 2;
_local18.graphics = ResourceManager.DroidLeftGraphics;
_local18.position = new Point(6, 6);
_local1.gameObjects.push(_local18);
_local1.attachGameObject(_local18);
var _local19:Welder = new Welder();
_local19.id = "welder6";
_local19.speed = 2;
_local19.graphics = ResourceManager.DroidDownGraphics;
_local19.position = new Point(7, 3);
_local1.gameObjects.push(_local19);
_local1.attachGameObject(_local19);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 650;
_local1.introText = "There is a button on the floor! Try standing on it.";
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 134
//SurpriseLevel (cotogames.carmack.levels.SurpriseLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.objects.*;
public class SurpriseLevel {
public static function build():Level{
var _local13:Welder;
var _local17:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Surprise";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallTop = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallLeft = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallTop = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallTop = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[4].wallTop = Tile.WALL_GENERIC;
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(TileBitmapResources.AcidLeftTopGraphics, true, true);
_local7[4] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local7[4].wallLeft = Tile.WALL_GENERIC;
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallTop = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[6].wallTop = Tile.WALL_GENERIC;
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[2].wallLeft = Tile.WALL_GENERIC;
_local8[3] = new Tile(TileBitmapResources.AcidRightTopGraphics, true, true);
_local8[3].wallTop = Tile.WALL_GENERIC;
_local8[4] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true, true);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallTop = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[6].wallLeft = Tile.WALL_GENERIC;
_local9[6].wallTop = Tile.WALL_GENERIC;
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.MarkedTileGraphics);
_local10[3].wallLeft = Tile.WALL_GENERIC;
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallTop = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[5].wallTop = Tile.WALL_GENERIC;
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(TileBitmapResources.OuterRightTileOpenDoor1Graphics, false, false);
_local11[3] = new Tile(TileBitmapResources.OuterRightTileOpenDoor2Graphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightBottomGraphics);
_local1.startPosition = new Point(2, 6);
_local1.finishPosition = new Point(8, 3);
_local13 = new SurpriseWelder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidDownGraphics;
_local13.position = new Point(2, 2);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
var _local14:Welder = new SurpriseWelder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(3, 4);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new SurpriseWelder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(4, 4);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new SurpriseWelder();
_local16.id = "welder4";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(5, 2);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
_local17 = new SurpriseWelder();
_local17.id = "welder5";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(6, 2);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
var _local18:Welder = new SurpriseWelder();
_local18.id = "welder6";
_local18.speed = 2;
_local18.graphics = ResourceManager.DroidLeftGraphics;
_local18.position = new Point(7, 6);
_local1.gameObjects.push(_local18);
_local1.attachGameObject(_local18);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 500;
_local1.introText = "Surprise!";
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 135
//TheEndOfTheRoadLevel (cotogames.carmack.levels.TheEndOfTheRoadLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.objects.*;
public class TheEndOfTheRoadLevel {
public static function build():Level{
var _local15:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "The End Of The Road";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.Tile1Graphics);
_local3[3] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true);
_local3[4] = new Tile(TileBitmapResources.AcidLeftRightGraphics, true);
_local3[5] = new Tile(TileBitmapResources.AcidLeftRightGraphics, true);
_local3[6] = new Tile(TileBitmapResources.AcidLeftRightGraphics, true);
_local3[7] = new Tile(TileBitmapResources.AcidLeftBottomRightGraphics, true);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[6].wallTop = Tile.WALL_SLIDING;
_local4[7] = new Tile(ResourceManager.Tile1Graphics);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.TileWithButtonGraphics);
_local5[3].wallLeft = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallLeft = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallLeft = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallLeft = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.Tile1Graphics);
_local5[7].wallLeft = Tile.WALL_GENERIC;
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true);
_local6[4] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true);
_local6[4].decorations.push(new Decoration(TileBitmapResources.DecorationAcidRightTopGraphics, new Point(4, 4), Decoration.RIGHT_TOP));
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.Tile1Graphics);
_local6[7].wallTop = Tile.WALL_GENERIC;
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallLeft = Tile.WALL_GENERIC;
_local7[4] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true);
_local7[4].wallTop = Tile.WALL_GENERIC;
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[5].wallTop = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.Tile1Graphics);
_local7[7].wallLeft = Tile.WALL_GENERIC;
_local7[7].wallTop = Tile.WALL_GENERIC;
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[3].wallTop = Tile.WALL_GENERIC;
_local8[4] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true);
_local8[4].wallTop = Tile.WALL_GENERIC;
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallTop = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[6].wallLeft = Tile.WALL_GENERIC;
_local8[7] = new Tile(ResourceManager.Tile1Graphics);
_local8[8] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[4] = new Tile(TileBitmapResources.AcidBottomTopGraphics, true);
_local9[4].wallTop = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[5].wallLeft = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[7] = new Tile(ResourceManager.Tile1Graphics);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(TileBitmapResources.AcidLeftTopGraphics, true);
_local10[3].wallTop = Tile.WALL_GENERIC;
_local10[3].wallLeft = Tile.WALL_GENERIC;
_local10[4] = new Tile(TileBitmapResources.AcidBottomGraphics, true);
_local10[4].decorations.push(new Decoration(TileBitmapResources.DecorationAcidLeftTopGraphics, new Point(8, 4), Decoration.LEFT_TOP));
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[5].wallTop = Tile.WALL_GENERIC;
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallLeft = Tile.WALL_GENERIC;
_local10[7] = new Tile(ResourceManager.Tile1Graphics);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(TileBitmapResources.OuterTopTileOpenDoorGraphics, false, false);
_local11[2] = new Tile(ResourceManager.MarkedTileGraphics);
_local11[2].wallLeft = Tile.WALL_DESTROYABLE;
_local11[3] = new Tile(TileBitmapResources.AcidRightTopGraphics, true);
_local11[3].wallTop = Tile.WALL_GENERIC;
_local11[4] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true);
_local11[5] = new Tile(ResourceManager.Tile1Graphics);
_local11[5].wallTop = Tile.WALL_GENERIC;
_local11[6] = new Tile(ResourceManager.Tile1Graphics);
_local11[6].wallLeft = Tile.WALL_GENERIC;
_local11[7] = new Tile(ResourceManager.Tile1Graphics);
_local11[7].wallTop = Tile.WALL_GENERIC;
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterRightTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
var _local13:EventTileSlideWall = new EventTileSlideWall(_local1, _local4[6], _local5[3], new Point(2, 6), GameObject.DIRECTION_UP);
_local1.levelEvents.addItem(_local13);
_local5[3].onStepEvent = _local13;
_local1.startPosition = new Point(6, 7);
_local1.finishPosition = new Point(9, 2);
var _local14:Welder = new Welder();
_local14.id = "welder1";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidLeftGraphics;
_local14.position = new Point(8, 7);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
_local15 = new Welder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(9, 6);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder2";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(6, 5);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder4";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(9, 2);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
var _local18:Welder = new Welder();
_local18.id = "welder5";
_local18.speed = 2;
_local18.graphics = ResourceManager.DroidRightGraphics;
_local18.position = new Point(2, 7);
_local1.gameObjects.push(_local18);
_local1.attachGameObject(_local18);
var _local19:Turret = new Turret(GameObject.DIRECTION_RIGHT, 5);
_local19.speed = 15;
_local19.position = new Point(1, 2);
_local1.gameObjects.push(_local19);
_local1.attachGameObject(_local19);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 800;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 136
//TheGatesLevel (cotogames.carmack.levels.TheGatesLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
import cotogames.carmack.objects.*;
public class TheGatesLevel {
public static function build():Level{
var _local16:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "The Gates";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.Tile1Graphics);
_local3[3] = new Tile(ResourceManager.Tile1Graphics);
_local3[4] = new Tile(ResourceManager.Tile1Graphics);
_local3[4].wallTop = Tile.WALL_GENERIC;
_local3[5] = new Tile(ResourceManager.Tile1Graphics);
_local3[5].wallTop = Tile.WALL_GENERIC;
_local3[6] = new Tile(ResourceManager.Tile1Graphics);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterTopButtonNotPressedTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.Tile1Graphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[3].wallLeft = Tile.WALL_GENERIC;
_local4[4] = new Tile(ResourceManager.Tile1Graphics);
_local4[5] = new Tile(ResourceManager.Tile1Graphics);
_local4[5].wallLeft = Tile.WALL_GENERIC;
_local4[6] = new Tile(ResourceManager.Tile1Graphics);
_local4[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallLeft = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallLeft = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallTop = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[4] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true, true);
_local6[4].wallLeft = Tile.WALL_GENERIC;
_local6[5] = new Tile(TileBitmapResources.AcidLeftBottomGraphics, true, true);
_local6[5].decorations.push(new Decoration(TileBitmapResources.DecorationAcidRightTopGraphics, new Point(4, 5), Decoration.RIGHT_TOP));
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallLeft = Tile.WALL_GENERIC;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[4].wallTop = Tile.WALL_GENERIC;
_local7[4].wallLeft = Tile.WALL_GENERIC;
_local7[5] = new Tile(TileBitmapResources.AcidBottomRightTopGraphics, true, true);
_local7[5].wallTop = Tile.WALL_GENERIC;
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[3].wallTop = Tile.WALL_GENERIC;
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[2].wallLeft = Tile.WALL_GENERIC;
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[3].wallLeft = Tile.WALL_GENERIC;
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallTop = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallLeft = Tile.WALL_GENERIC;
_local9[5].wallTop = Tile.WALL_SLIDING;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[6].wallLeft = Tile.WALL_GENERIC;
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.Tile1Graphics);
_local10[3] = new Tile(ResourceManager.Tile1Graphics);
_local10[3].wallTop = Tile.WALL_GENERIC;
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallTop = Tile.WALL_GENERIC;
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.Tile1Graphics);
_local11[2].wallLeft = Tile.WALL_GENERIC;
_local11[3] = new Tile(ResourceManager.Tile1Graphics);
_local11[4] = new Tile(ResourceManager.MarkedTileGraphics);
_local11[4].wallTop = Tile.WALL_GENERIC;
_local11[5] = new Tile(ResourceManager.Tile1Graphics);
_local11[5].wallTop = Tile.WALL_GENERIC;
_local11[6] = new Tile(ResourceManager.Tile1Graphics);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[3] = new Tile(TileBitmapResources.OuterRightTileOpenDoor1Graphics, false, false);
_local12[4] = new Tile(TileBitmapResources.OuterRightTileOpenDoor2Graphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
_local1.startPosition = new Point(2, 6);
_local1.finishPosition = new Point(9, 4);
var _local13:EventSlideWall = new EventSlideWall(_local1, _local9[5], _local4[1], new Point(7, 5), GameObject.DIRECTION_UP);
_local1.levelEvents.addItem(_local13);
_local4[1].levelEventID = 0;
var _local14:Welder = new Welder();
_local14.id = "welder1";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(2, 4);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder2";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(3, 3);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
_local16 = new Welder();
_local16.id = "welder3";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(3, 5);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder4";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(5, 4);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
var _local18:Welder = new Welder();
_local18.id = "welder1";
_local18.speed = 2;
_local18.graphics = ResourceManager.DroidDownGraphics;
_local18.position = new Point(7, 3);
_local1.gameObjects.push(_local18);
_local1.attachGameObject(_local18);
var _local19:Welder = new Welder();
_local19.id = "welder1";
_local19.speed = 2;
_local19.graphics = ResourceManager.DroidDownGraphics;
_local19.position = new Point(7, 5);
_local1.gameObjects.push(_local19);
_local1.attachGameObject(_local19);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.graphics = ResourceManager.RoboDownGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.estimatedTime = 100;
_local1.points = 800;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 137
//TheWallLevel (cotogames.carmack.levels.TheWallLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class TheWallLevel {
public static function build():Level{
var _local13:Welder;
var _local16:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "The Wall";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(TileBitmapResources.OuterTopTileOpenDoorGraphics, false, false);
_local4[2] = new Tile(ResourceManager.MarkedTileGraphics);
_local4[3] = new Tile(ResourceManager.Tile1Graphics);
_local4[4] = new Tile(ResourceManager.Tile6Graphics);
_local4[5] = new Tile(TileBitmapResources.AcidLeftTopRightGraphics, true);
_local4[5].wallTop = Tile.WALL_DESTROYABLE;
_local4[6] = new Tile(TileBitmapResources.AcidLeftBottomRightGraphics, true);
_local4[7] = new Tile(ResourceManager.Tile6Graphics);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(TileBitmapResources.AcidBottomLeftTopGraphics, true);
_local5[2].wallLeft = Tile.WALL_GENERIC;
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[3].wallTop = Tile.WALL_GENERIC;
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallLeft = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[5].wallLeft = Tile.WALL_GENERIC;
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[6].wallLeft = Tile.WALL_GENERIC;
_local5[7] = new Tile(ResourceManager.Tile1Graphics);
_local5[7].wallTop = Tile.WALL_GENERIC;
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local6[2] = new Tile(TileBitmapResources.AcidTopGraphics, true);
_local6[3] = new Tile(TileBitmapResources.AcidLeftGraphics, true);
_local6[3].wallLeft = Tile.WALL_GENERIC;
_local6[4] = new Tile(TileBitmapResources.AcidLeftBottomRightGraphics, true);
_local6[4].wallLeft = Tile.WALL_GENERIC;
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[6].wallLeft = Tile.WALL_GENERIC;
_local6[7] = new Tile(ResourceManager.Tile1Graphics);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(TileBitmapResources.AcidTopGraphics, true);
_local7[3] = new Tile(TileBitmapResources.AcidBottomGraphics, true);
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[4].wallTop = Tile.WALL_GENERIC;
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[7] = new Tile(ResourceManager.Tile1Graphics);
_local7[7].wallTop = Tile.WALL_GENERIC;
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local8[2] = new Tile(TileBitmapResources.AcidTopGraphics, true);
_local8[3] = new Tile(TileBitmapResources.AcidBottomGraphics, true);
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[4].wallTop = Tile.WALL_GENERIC;
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[5].wallTop = Tile.WALL_GENERIC;
_local8[5].wallLeft = Tile.WALL_GENERIC;
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[7] = new Tile(ResourceManager.Tile1Graphics);
_local8[8] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(TileBitmapResources.AcidTopGraphics, true);
_local9[3] = new Tile(TileBitmapResources.AcidBottomGraphics, true);
_local9[4] = new Tile(ResourceManager.Tile1Graphics);
_local9[4].wallTop = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[7] = new Tile(ResourceManager.Tile1Graphics);
_local9[7].wallTop = Tile.WALL_GENERIC;
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local10[2] = new Tile(TileBitmapResources.AcidRightTopGraphics, true);
_local10[3] = new Tile(TileBitmapResources.AcidRightBottomGraphics, true);
_local10[4] = new Tile(ResourceManager.Tile1Graphics);
_local10[4].wallTop = Tile.WALL_GENERIC;
_local10[5] = new Tile(ResourceManager.Tile1Graphics);
_local10[5].wallLeft = Tile.WALL_GENERIC;
_local10[6] = new Tile(ResourceManager.Tile1Graphics);
_local10[6].wallLeft = Tile.WALL_GENERIC;
_local10[7] = new Tile(ResourceManager.Tile1Graphics);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftBottomRightGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightBottomGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidRightTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidBottomLeftTopGraphics);
_local1.graphicsToUpdate.push(TileBitmapResources.AcidLeftTopRightGraphics);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(6, 7);
_local1.finishPosition = new Point(2, 2);
_local13 = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidRightGraphics;
_local13.position = new Point(4, 7);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
var _local14:Welder = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(7, 5);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder4";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(7, 4);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
_local16 = new Welder();
_local16.id = "welder5";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(3, 6);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
var _local17:Welder = new Welder();
_local17.id = "welder6i";
_local17.speed = 2;
_local17.graphics = ResourceManager.DroidDownGraphics;
_local17.position = new Point(2, 4);
_local1.gameObjects.push(_local17);
_local1.attachGameObject(_local17);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 120;
_local1.points = 650;
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 138
//WatchOutLevel (cotogames.carmack.levels.WatchOutLevel)
package cotogames.carmack.levels {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class WatchOutLevel {
public static function build():Level{
var _local14:Welder;
var _local1:Level = new Level();
_local1.tiles = new Array();
_local1.name = "Watch Out";
var _local2:Array = new Array();
_local2[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local2[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local3:Array = new Array();
_local3[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local3[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local4:Array = new Array();
_local4[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[1] = new Tile(ResourceManager.OuterLeftTopTileGraphics, false, false);
_local4[2] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local4[3] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local4[4] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local4[5] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local4[6] = new Tile(ResourceManager.OuterLeftTileGraphics, false, false);
_local4[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local4[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local5:Array = new Array();
_local5[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local5[2] = new Tile(ResourceManager.Tile1Graphics);
_local5[3] = new Tile(ResourceManager.Tile1Graphics);
_local5[4] = new Tile(ResourceManager.Tile1Graphics);
_local5[4].wallTop = Tile.WALL_GENERIC;
_local5[5] = new Tile(ResourceManager.Tile1Graphics);
_local5[6] = new Tile(ResourceManager.Tile1Graphics);
_local5[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local5[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local6:Array = new Array();
_local6[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local6[2] = new Tile(ResourceManager.Tile1Graphics);
_local6[2].wallLeft = Tile.WALL_GENERIC;
_local6[3] = new Tile(ResourceManager.Tile1Graphics);
_local6[4] = new Tile(ResourceManager.Tile1Graphics);
_local6[4].wallTop = Tile.WALL_GENERIC;
_local6[5] = new Tile(ResourceManager.Tile1Graphics);
_local6[5].wallTop = Tile.WALL_GENERIC;
_local6[5].wallLeft = Tile.WALL_GENERIC;
_local6[6] = new Tile(ResourceManager.Tile1Graphics);
_local6[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local6[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local7:Array = new Array();
_local7[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local7[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local7[2] = new Tile(ResourceManager.Tile1Graphics);
_local7[3] = new Tile(ResourceManager.Tile1Graphics);
_local7[3].wallLeft = Tile.WALL_GENERIC;
_local7[4] = new Tile(ResourceManager.Tile1Graphics);
_local7[5] = new Tile(ResourceManager.Tile1Graphics);
_local7[6] = new Tile(ResourceManager.Tile1Graphics);
_local7[6].wallLeft = Tile.WALL_GENERIC;
_local7[7] = new Tile(TileBitmapResources.OuterBottomTileOpenDoorGraphics, false, false);
_local7[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local8:Array = new Array();
_local8[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[1] = new Tile(ResourceManager.OuterTopTile2Graphics, false, false);
_local8[2] = new Tile(ResourceManager.Tile1Graphics);
_local8[2].wallLeft = Tile.WALL_GENERIC;
_local8[3] = new Tile(ResourceManager.Tile1Graphics);
_local8[3].wallTop = Tile.WALL_GENERIC;
_local8[4] = new Tile(ResourceManager.Tile1Graphics);
_local8[5] = new Tile(ResourceManager.Tile1Graphics);
_local8[6] = new Tile(ResourceManager.Tile1Graphics);
_local8[6].wallTop = Tile.WALL_GENERIC;
_local8[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local8[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local9:Array = new Array();
_local9[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[1] = new Tile(ResourceManager.OuterTopTileGraphics, false, false);
_local9[2] = new Tile(ResourceManager.Tile1Graphics);
_local9[3] = new Tile(ResourceManager.Tile1Graphics);
_local9[4] = new Tile(ResourceManager.MarkedTileGraphics);
_local9[4].wallLeft = Tile.WALL_GENERIC;
_local9[5] = new Tile(ResourceManager.Tile1Graphics);
_local9[5].wallTop = Tile.WALL_GENERIC;
_local9[6] = new Tile(ResourceManager.Tile1Graphics);
_local9[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local9[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local10:Array = new Array();
_local10[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[1] = new Tile(ResourceManager.OuterRightTopTileGraphics, false, false);
_local10[2] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local10[3] = new Tile(TileBitmapResources.OuterRightTileOpenDoor1Graphics, false, false);
_local10[4] = new Tile(TileBitmapResources.OuterRightTileOpenDoor2Graphics, false, false);
_local10[5] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local10[6] = new Tile(ResourceManager.OuterRightTileGraphics, false, false);
_local10[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local10[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local11:Array = new Array();
_local11[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[7] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local11[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
var _local12:Array = new Array();
_local12[0] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[1] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[2] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[3] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[4] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[5] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[6] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local12[7] = new Tile(ResourceManager.OuterTileGraphics);
_local12[8] = new Tile(ResourceManager.OuterTileGraphics, false, false);
_local1.tiles.push(_local2);
_local1.tiles.push(_local3);
_local1.tiles.push(_local4);
_local1.tiles.push(_local5);
_local1.tiles.push(_local6);
_local1.tiles.push(_local7);
_local1.tiles.push(_local8);
_local1.tiles.push(_local9);
_local1.tiles.push(_local10);
_local1.tiles.push(_local11);
_local1.tiles.push(_local12);
_local1.startPosition = new Point(5, 6);
_local1.finishPosition = new Point(7, 4);
var _local13:Welder = new Welder();
_local13.id = "welder1";
_local13.speed = 2;
_local13.graphics = ResourceManager.DroidDownGraphics;
_local13.position = new Point(3, 3);
_local1.gameObjects.push(_local13);
_local1.attachGameObject(_local13);
_local14 = new Welder();
_local14.id = "welder2";
_local14.speed = 2;
_local14.graphics = ResourceManager.DroidDownGraphics;
_local14.position = new Point(3, 5);
_local1.gameObjects.push(_local14);
_local1.attachGameObject(_local14);
var _local15:Welder = new Welder();
_local15.id = "welder3";
_local15.speed = 2;
_local15.graphics = ResourceManager.DroidDownGraphics;
_local15.position = new Point(6, 4);
_local1.gameObjects.push(_local15);
_local1.attachGameObject(_local15);
var _local16:Welder = new Welder();
_local16.id = "welder4";
_local16.speed = 2;
_local16.graphics = ResourceManager.DroidDownGraphics;
_local16.position = new Point(6, 2);
_local1.gameObjects.push(_local16);
_local1.attachGameObject(_local16);
_local1.playerObject = new Carmack();
_local1.playerObject.id = "carmack";
_local1.playerObject.direction = GameObject.DIRECTION_UP;
_local1.playerObject.graphics = ResourceManager.RoboUpGraphics;
_local1.attachGameObject(_local1.playerObject);
_local1.estimatedTime = 80;
_local1.points = 300;
_local1.introText = ("Sometimes it's better not to move. Press SPACE to wait." + "Quickly restart level with R button, if needed.");
return (_local1);
}
}
}//package cotogames.carmack.levels
Section 139
//MenuItem (cotogames.carmack.menus.MenuItem)
package cotogames.carmack.menus {
import flash.geom.*;
import flash.text.*;
public class MenuItem {
public var left:int;// = 0
public var generalTextFormat:TextFormat;// = null
public var text:String;
public var top:int;// = 0
public var rightBottom:Point;
public var leftTop:Point;
public var selectedTextFormat:TextFormat;// = null
public function MenuItem(_arg1:String, _arg2:int, _arg3:int, _arg4:TextFormat, _arg5:TextFormat){
this.text = _arg1;
this.left = _arg2;
this.top = _arg3;
this.selectedTextFormat = _arg4;
this.generalTextFormat = _arg5;
}
}
}//package cotogames.carmack.menus
Section 140
//Decoration (cotogames.carmack.objects.Decoration)
package cotogames.carmack.objects {
import flash.display.*;
import flash.geom.*;
import cotogames.carmack.core.*;
public class Decoration {
public var place:int;// = 0
public var graphics:GraphicsResource;// = null
public var tile:Point;
public static const LEFT_BOTTOM:int = 1;
public static const RIGHT_TOP:int = 2;
public static const LEFT_TOP:int = 0;
public static const RIGHT_BOTTOM:int = 3;
public function Decoration(_arg1:GraphicsResource, _arg2:Point, _arg3:int){
this.place = _arg3;
this.tile = _arg2;
this.graphics = _arg1;
}
public function draw(_arg1:BitmapData):void{
var _local2:Point;
switch (place){
case LEFT_TOP:
_local2 = new Point((tile.x * Level.TILE_SIZE), (tile.y * Level.TILE_SIZE));
break;
case LEFT_BOTTOM:
_local2 = new Point((tile.x * Level.TILE_SIZE), (((tile.y + 1) * Level.TILE_SIZE) - graphics.bitmap.height));
break;
case RIGHT_TOP:
_local2 = new Point((((tile.x + 1) * Level.TILE_SIZE) - graphics.bitmap.width), (tile.y * Level.TILE_SIZE));
break;
case RIGHT_BOTTOM:
_local2 = new Point((((tile.x + 1) * Level.TILE_SIZE) - graphics.bitmap.width), (((tile.y + 1) * Level.TILE_SIZE) - graphics.bitmap.height));
break;
};
graphics.copyToBackBuffer(_arg1, _local2);
}
}
}//package cotogames.carmack.objects
Section 141
//SurpriseWelder (cotogames.carmack.objects.SurpriseWelder)
package cotogames.carmack.objects {
import cotogames.carmack.core.*;
public class SurpriseWelder extends Welder {
override protected function setMoveDirection():void{
var _local1:Number = (GameManager.Instance.carmack.position.x - position.x);
var _local2:Number = (GameManager.Instance.carmack.position.y - position.y);
if (_local2 > 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_DOWN)){
nextCommand = PlayerCommands.MOVE_DOWN;
} else {
if (_local1 > 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_RIGHT)){
nextCommand = PlayerCommands.MOVE_RIGHT;
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
} else {
if (_local1 < 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_LEFT)){
nextCommand = PlayerCommands.MOVE_LEFT;
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
};
};
} else {
if (_local2 < 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_UP)){
nextCommand = PlayerCommands.MOVE_UP;
} else {
if (_local1 > 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_RIGHT)){
nextCommand = PlayerCommands.MOVE_RIGHT;
} else {
direction = GameObject.DIRECTION_UP;
nextCommand = PlayerCommands.NONE;
};
} else {
if (_local1 < 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_LEFT)){
nextCommand = PlayerCommands.MOVE_LEFT;
} else {
direction = GameObject.DIRECTION_UP;
nextCommand = PlayerCommands.NONE;
};
} else {
direction = GameObject.DIRECTION_UP;
nextCommand = PlayerCommands.NONE;
};
};
};
} else {
if (_local2 == 0){
if (_local1 > 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_RIGHT)){
nextCommand = PlayerCommands.MOVE_RIGHT;
} else {
direction = GameObject.DIRECTION_RIGHT;
nextCommand = PlayerCommands.NONE;
};
} else {
if (_local1 < 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_LEFT)){
nextCommand = PlayerCommands.MOVE_LEFT;
} else {
direction = GameObject.DIRECTION_LEFT;
nextCommand = PlayerCommands.NONE;
};
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
};
};
};
};
}
}
}//package cotogames.carmack.objects
Section 142
//MenuBitmapResources (cotogames.carmack.resources.MenuBitmapResources)
package cotogames.carmack.resources {
import cotogames.carmack.core.*;
public class MenuBitmapResources {
public static var TwitterClass:Class = MenuBitmapResources_TwitterClass;
public static var EndingGraphicsClass:Class = MenuBitmapResources_EndingGraphicsClass;
private static var MenuBackground:Class = MenuBitmapResources_MenuBackground;
public static var ManualGraphics:GraphicsResource = new GraphicsResource(new Manual(), 0, 0, true, true);
private static var Manual:Class = MenuBitmapResources_Manual;
public static var MenuBackgroundGraphics:GraphicsResource = new GraphicsResource(new MenuBackground(), 0, 0, true, true);
public static var ZorroClass:Class = MenuBitmapResources_ZorroClass;
}
}//package cotogames.carmack.resources
Section 143
//MenuBitmapResources_EndingGraphicsClass (cotogames.carmack.resources.MenuBitmapResources_EndingGraphicsClass)
package cotogames.carmack.resources {
import mx.core.*;
import flash.utils.*;
public class MenuBitmapResources_EndingGraphicsClass extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function MenuBitmapResources_EndingGraphicsClass(){
dataClass = MenuBitmapResources_EndingGraphicsClass_dataClass;
super();
initialWidth = (11000 / 20);
initialHeight = (9000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package cotogames.carmack.resources
Section 144
//MenuBitmapResources_EndingGraphicsClass_dataClass (cotogames.carmack.resources.MenuBitmapResources_EndingGraphicsClass_dataClass)
package cotogames.carmack.resources {
import mx.core.*;
public class MenuBitmapResources_EndingGraphicsClass_dataClass extends ByteArrayAsset {
}
}//package cotogames.carmack.resources
Section 145
//MenuBitmapResources_Manual (cotogames.carmack.resources.MenuBitmapResources_Manual)
package cotogames.carmack.resources {
import mx.core.*;
public class MenuBitmapResources_Manual extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 146
//MenuBitmapResources_MenuBackground (cotogames.carmack.resources.MenuBitmapResources_MenuBackground)
package cotogames.carmack.resources {
import mx.core.*;
public class MenuBitmapResources_MenuBackground extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 147
//MenuBitmapResources_TwitterClass (cotogames.carmack.resources.MenuBitmapResources_TwitterClass)
package cotogames.carmack.resources {
import mx.core.*;
import flash.utils.*;
public class MenuBitmapResources_TwitterClass extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function MenuBitmapResources_TwitterClass(){
dataClass = MenuBitmapResources_TwitterClass_dataClass;
super();
initialWidth = (2040 / 20);
initialHeight = (1420 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package cotogames.carmack.resources
Section 148
//MenuBitmapResources_TwitterClass_dataClass (cotogames.carmack.resources.MenuBitmapResources_TwitterClass_dataClass)
package cotogames.carmack.resources {
import mx.core.*;
public class MenuBitmapResources_TwitterClass_dataClass extends ByteArrayAsset {
}
}//package cotogames.carmack.resources
Section 149
//MenuBitmapResources_ZorroClass (cotogames.carmack.resources.MenuBitmapResources_ZorroClass)
package cotogames.carmack.resources {
import mx.core.*;
import flash.utils.*;
public class MenuBitmapResources_ZorroClass extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function MenuBitmapResources_ZorroClass(){
dataClass = MenuBitmapResources_ZorroClass_dataClass;
super();
initialWidth = (1400 / 20);
initialHeight = (1400 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package cotogames.carmack.resources
Section 150
//MenuBitmapResources_ZorroClass_dataClass (cotogames.carmack.resources.MenuBitmapResources_ZorroClass_dataClass)
package cotogames.carmack.resources {
import mx.core.*;
public class MenuBitmapResources_ZorroClass_dataClass extends ByteArrayAsset {
}
}//package cotogames.carmack.resources
Section 151
//RobotBitmapResources (cotogames.carmack.resources.RobotBitmapResources)
package cotogames.carmack.resources {
import cotogames.carmack.core.*;
public class RobotBitmapResources {
public static var RobotIdleGraphics:GraphicsResource = new GraphicsResource(new RobotIdle(), 50, 0.3, true);
private static var RobotIdle:Class = RobotBitmapResources_RobotIdle;
}
}//package cotogames.carmack.resources
Section 152
//RobotBitmapResources_RobotIdle (cotogames.carmack.resources.RobotBitmapResources_RobotIdle)
package cotogames.carmack.resources {
import mx.core.*;
public class RobotBitmapResources_RobotIdle extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 153
//TileBitmapResources (cotogames.carmack.resources.TileBitmapResources)
package cotogames.carmack.resources {
import cotogames.carmack.core.*;
public class TileBitmapResources {
private static var OuterTopTileOpenDoor:Class = TileBitmapResources_OuterTopTileOpenDoor;
private static var OuterRightTileOpenDoor1:Class = TileBitmapResources_OuterRightTileOpenDoor1;
private static var OuterRightTileOpenDoor2:Class = TileBitmapResources_OuterRightTileOpenDoor2;
public static var DecorationAcidLeftTopGraphics:GraphicsResource = new GraphicsResource(new DecorationAcidLeftTop(), 0, 0, true, true);
public static var DecorationAcidRightTopGraphics:GraphicsResource = new GraphicsResource(new DecorationAcidRightTop(), 0, 0, true, true);
public static var AcidBottomGraphics:GraphicsResource = new GraphicsResource(new AcidBottom(), 50, 0.5, false, true);
public static var OuterBottomTileOpenDoorGraphics:GraphicsResource = new GraphicsResource(new OuterBottomTileOpenDoor(), 0, 0, true, true);
public static var AcidLeftTopRightGraphics:GraphicsResource = new GraphicsResource(new AcidLeftTopRight(), 50, 0.5, false, true);
public static var DecorationAcidRightBottomGraphics:GraphicsResource = new GraphicsResource(new DecorationAcidRightBottom(), 0, 0, true, true);
private static var AcidBottomRightTop:Class = TileBitmapResources_AcidBottomRightTop;
private static var OuterLeftTileOpenDoor1:Class = TileBitmapResources_OuterLeftTileOpenDoor1;
private static var OuterLeftTileOpenDoor2:Class = TileBitmapResources_OuterLeftTileOpenDoor2;
public static var AcidLeftGraphics:GraphicsResource = new GraphicsResource(new AcidLeft(), 50, 0.5, false, true);
public static var AcidSingleGraphics:GraphicsResource = new GraphicsResource(new AcidSingle(), 50, 0.5, false, true);
public static var AcidLeftBottomRightGraphics:GraphicsResource = new GraphicsResource(new AcidLeftBottomRight(), 50, 0.5, false, true);
private static var AcidTop:Class = TileBitmapResources_AcidTop;
private static var AcidLeftTop:Class = TileBitmapResources_AcidLeftTop;
public static var AcidRightTopGraphics:GraphicsResource = new GraphicsResource(new AcidRightTop(), 50, 0.5, false, true);
private static var AcidBottomLeftTop:Class = TileBitmapResources_AcidBottomLeftTop;
public static var DecorationAcidLeftBottomGraphics:GraphicsResource = new GraphicsResource(new DecorationAcidLeftBottom(), 0, 0, true, true);
private static var AcidRight:Class = TileBitmapResources_AcidRight;
public static var OuterTopTileButtonPressedGraphics:GraphicsResource = new GraphicsResource(new OuterTopTileButtonPressed(), 0, 0, true, true);
public static var OuterTopWallSlidingGraphics:GraphicsResource = new GraphicsResource(new OuterTopWallSliding(), 50, 0.08, true);
private static var AcidRightBottom:Class = TileBitmapResources_AcidRightBottom;
private static var DecorationAcidLeftTop:Class = TileBitmapResources_DecorationAcidLeftTop;
private static var DecorationAcidRightTop:Class = TileBitmapResources_DecorationAcidRightTop;
private static var AcidBottom:Class = TileBitmapResources_AcidBottom;
private static var AcidLeftTopRight:Class = TileBitmapResources_AcidLeftTopRight;
private static var OuterBottomTileOpenDoor:Class = TileBitmapResources_OuterBottomTileOpenDoor;
public static var AcidBottomTopGraphics:GraphicsResource = new GraphicsResource(new AcidBottomTop(), 50, 0.5, false, true);
public static var AcidLeftBottomGraphics:GraphicsResource = new GraphicsResource(new AcidLeftBottom(), 50, 0.5, false, true);
private static var DecorationAcidRightBottom:Class = TileBitmapResources_DecorationAcidRightBottom;
private static var AcidLeft:Class = TileBitmapResources_AcidLeft;
private static var AcidSingle:Class = TileBitmapResources_AcidSingle;
public static var AcidGraphics:GraphicsResource = new GraphicsResource(new Acid(), 50, 0.5, false, true);
public static var Comp1Graphics:GraphicsResource = new GraphicsResource(new Comp1(), 0, 0, true, true);
public static var Comp2Graphics:GraphicsResource = new GraphicsResource(new Comp2(), 0, 0, true, true);
private static var AcidRightTop:Class = TileBitmapResources_AcidRightTop;
private static var AcidLeftBottomRight:Class = TileBitmapResources_AcidLeftBottomRight;
private static var DecorationAcidLeftBottom:Class = TileBitmapResources_DecorationAcidLeftBottom;
public static var AcidLeftRightGraphics:GraphicsResource = new GraphicsResource(new AcidLeftRight(), 50, 0.5, false, true);
public static var OuterTopTileOpenDoorGraphics:GraphicsResource = new GraphicsResource(new OuterTopTileOpenDoor(), 0, 0, true, true);
private static var OuterTopTileButtonPressed:Class = TileBitmapResources_OuterTopTileButtonPressed;
private static var OuterTopWallSliding:Class = TileBitmapResources_OuterTopWallSliding;
public static var OuterRightTileOpenDoor1Graphics:GraphicsResource = new GraphicsResource(new OuterRightTileOpenDoor1(), 0, 0, true, true);
public static var OuterRightTileOpenDoor2Graphics:GraphicsResource = new GraphicsResource(new OuterRightTileOpenDoor2(), 0, 0, true, true);
private static var AcidBottomTop:Class = TileBitmapResources_AcidBottomTop;
private static var AcidLeftBottom:Class = TileBitmapResources_AcidLeftBottom;
public static var AcidBottomRightTopGraphics:GraphicsResource = new GraphicsResource(new AcidBottomRightTop(), 50, 0.5, false, true);
public static var OuterLeftTileOpenDoor1Graphics:GraphicsResource = new GraphicsResource(new OuterLeftTileOpenDoor1(), 0, 0, true, true);
public static var OuterLeftTileOpenDoor2Graphics:GraphicsResource = new GraphicsResource(new OuterLeftTileOpenDoor2(), 0, 0, true, true);
public static var AcidLeftTopGraphics:GraphicsResource = new GraphicsResource(new AcidLeftTop(), 50, 0.5, false, true);
private static var Acid:Class = TileBitmapResources_Acid;
private static var Comp1:Class = TileBitmapResources_Comp1;
private static var Comp2:Class = TileBitmapResources_Comp2;
public static var AcidTopGraphics:GraphicsResource = new GraphicsResource(new AcidTop(), 50, 0.5, false, true);
public static var AcidBottomLeftTopGraphics:GraphicsResource = new GraphicsResource(new AcidBottomLeftTop(), 50, 0.5, false, true);
public static var AcidRightBottomGraphics:GraphicsResource = new GraphicsResource(new AcidRightBottom(), 50, 0.5, false, true);
private static var AcidLeftRight:Class = TileBitmapResources_AcidLeftRight;
public static var AcidRightGraphics:GraphicsResource = new GraphicsResource(new AcidRight(), 50, 0.5, false, true);
}
}//package cotogames.carmack.resources
Section 154
//TileBitmapResources_Acid (cotogames.carmack.resources.TileBitmapResources_Acid)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_Acid extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 155
//TileBitmapResources_AcidBottom (cotogames.carmack.resources.TileBitmapResources_AcidBottom)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidBottom extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 156
//TileBitmapResources_AcidBottomLeftTop (cotogames.carmack.resources.TileBitmapResources_AcidBottomLeftTop)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidBottomLeftTop extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 157
//TileBitmapResources_AcidBottomRightTop (cotogames.carmack.resources.TileBitmapResources_AcidBottomRightTop)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidBottomRightTop extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 158
//TileBitmapResources_AcidBottomTop (cotogames.carmack.resources.TileBitmapResources_AcidBottomTop)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidBottomTop extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 159
//TileBitmapResources_AcidLeft (cotogames.carmack.resources.TileBitmapResources_AcidLeft)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidLeft extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 160
//TileBitmapResources_AcidLeftBottom (cotogames.carmack.resources.TileBitmapResources_AcidLeftBottom)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidLeftBottom extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 161
//TileBitmapResources_AcidLeftBottomRight (cotogames.carmack.resources.TileBitmapResources_AcidLeftBottomRight)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidLeftBottomRight extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 162
//TileBitmapResources_AcidLeftRight (cotogames.carmack.resources.TileBitmapResources_AcidLeftRight)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidLeftRight extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 163
//TileBitmapResources_AcidLeftTop (cotogames.carmack.resources.TileBitmapResources_AcidLeftTop)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidLeftTop extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 164
//TileBitmapResources_AcidLeftTopRight (cotogames.carmack.resources.TileBitmapResources_AcidLeftTopRight)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidLeftTopRight extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 165
//TileBitmapResources_AcidRight (cotogames.carmack.resources.TileBitmapResources_AcidRight)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidRight extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 166
//TileBitmapResources_AcidRightBottom (cotogames.carmack.resources.TileBitmapResources_AcidRightBottom)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidRightBottom extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 167
//TileBitmapResources_AcidRightTop (cotogames.carmack.resources.TileBitmapResources_AcidRightTop)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidRightTop extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 168
//TileBitmapResources_AcidSingle (cotogames.carmack.resources.TileBitmapResources_AcidSingle)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidSingle extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 169
//TileBitmapResources_AcidTop (cotogames.carmack.resources.TileBitmapResources_AcidTop)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_AcidTop extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 170
//TileBitmapResources_Comp1 (cotogames.carmack.resources.TileBitmapResources_Comp1)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_Comp1 extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 171
//TileBitmapResources_Comp2 (cotogames.carmack.resources.TileBitmapResources_Comp2)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_Comp2 extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 172
//TileBitmapResources_DecorationAcidLeftBottom (cotogames.carmack.resources.TileBitmapResources_DecorationAcidLeftBottom)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_DecorationAcidLeftBottom extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 173
//TileBitmapResources_DecorationAcidLeftTop (cotogames.carmack.resources.TileBitmapResources_DecorationAcidLeftTop)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_DecorationAcidLeftTop extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 174
//TileBitmapResources_DecorationAcidRightBottom (cotogames.carmack.resources.TileBitmapResources_DecorationAcidRightBottom)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_DecorationAcidRightBottom extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 175
//TileBitmapResources_DecorationAcidRightTop (cotogames.carmack.resources.TileBitmapResources_DecorationAcidRightTop)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_DecorationAcidRightTop extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 176
//TileBitmapResources_OuterBottomTileOpenDoor (cotogames.carmack.resources.TileBitmapResources_OuterBottomTileOpenDoor)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_OuterBottomTileOpenDoor extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 177
//TileBitmapResources_OuterLeftTileOpenDoor1 (cotogames.carmack.resources.TileBitmapResources_OuterLeftTileOpenDoor1)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_OuterLeftTileOpenDoor1 extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 178
//TileBitmapResources_OuterLeftTileOpenDoor2 (cotogames.carmack.resources.TileBitmapResources_OuterLeftTileOpenDoor2)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_OuterLeftTileOpenDoor2 extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 179
//TileBitmapResources_OuterRightTileOpenDoor1 (cotogames.carmack.resources.TileBitmapResources_OuterRightTileOpenDoor1)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_OuterRightTileOpenDoor1 extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 180
//TileBitmapResources_OuterRightTileOpenDoor2 (cotogames.carmack.resources.TileBitmapResources_OuterRightTileOpenDoor2)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_OuterRightTileOpenDoor2 extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 181
//TileBitmapResources_OuterTopTileButtonPressed (cotogames.carmack.resources.TileBitmapResources_OuterTopTileButtonPressed)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_OuterTopTileButtonPressed extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 182
//TileBitmapResources_OuterTopTileOpenDoor (cotogames.carmack.resources.TileBitmapResources_OuterTopTileOpenDoor)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_OuterTopTileOpenDoor extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 183
//TileBitmapResources_OuterTopWallSliding (cotogames.carmack.resources.TileBitmapResources_OuterTopWallSliding)
package cotogames.carmack.resources {
import mx.core.*;
public class TileBitmapResources_OuterTopWallSliding extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 184
//WallBitmapResources (cotogames.carmack.resources.WallBitmapResources)
package cotogames.carmack.resources {
import cotogames.carmack.core.*;
public class WallBitmapResources {
private static var VerticalWall:Class = WallBitmapResources_VerticalWall;
private static var HorizontalWallDestroyable:Class = WallBitmapResources_HorizontalWallDestroyable;
public static var VerticalWallSlidingGraphics:GraphicsResource = new GraphicsResource(new VerticalWallSliding());
private static var VerticalWallAlt:Class = WallBitmapResources_VerticalWallAlt;
private static var VerticalWallSliding:Class = WallBitmapResources_VerticalWallSliding;
private static var VerticalWallSlidingDown:Class = WallBitmapResources_VerticalWallSlidingDown;
private static var HorizontalWallBreaking:Class = WallBitmapResources_HorizontalWallBreaking;
public static var VerticalWallBreakingGraphics:GraphicsResource = new GraphicsResource(new VerticalWallBreaking(), 10, 0.142, true);
public static var HorizontalWallGraphics:GraphicsResource = new GraphicsResource(new HorizontalWall());
private static var VerticalWallBreaking:Class = WallBitmapResources_VerticalWallBreaking;
public static var VerticalWallGraphics:GraphicsResource = new GraphicsResource(new VerticalWall());
private static var HorizontalWall:Class = WallBitmapResources_HorizontalWall;
public static var HorizontalWallDestroyableGraphics:GraphicsResource = new GraphicsResource(new HorizontalWallDestroyable());
public static var VerticalWallAltGraphics:GraphicsResource = new GraphicsResource(new VerticalWallAlt());
public static var VerticalWallSlidingDownGraphics:GraphicsResource = new GraphicsResource(new VerticalWallSlidingDown(), 10, 0.06, true);
public static var HorizontalWallBreakingGraphics:GraphicsResource = new GraphicsResource(new HorizontalWallBreaking(), 60, 0.142, true);
}
}//package cotogames.carmack.resources
Section 185
//WallBitmapResources_HorizontalWall (cotogames.carmack.resources.WallBitmapResources_HorizontalWall)
package cotogames.carmack.resources {
import mx.core.*;
public class WallBitmapResources_HorizontalWall extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 186
//WallBitmapResources_HorizontalWallBreaking (cotogames.carmack.resources.WallBitmapResources_HorizontalWallBreaking)
package cotogames.carmack.resources {
import mx.core.*;
public class WallBitmapResources_HorizontalWallBreaking extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 187
//WallBitmapResources_HorizontalWallDestroyable (cotogames.carmack.resources.WallBitmapResources_HorizontalWallDestroyable)
package cotogames.carmack.resources {
import mx.core.*;
public class WallBitmapResources_HorizontalWallDestroyable extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 188
//WallBitmapResources_VerticalWall (cotogames.carmack.resources.WallBitmapResources_VerticalWall)
package cotogames.carmack.resources {
import mx.core.*;
public class WallBitmapResources_VerticalWall extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 189
//WallBitmapResources_VerticalWallAlt (cotogames.carmack.resources.WallBitmapResources_VerticalWallAlt)
package cotogames.carmack.resources {
import mx.core.*;
public class WallBitmapResources_VerticalWallAlt extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 190
//WallBitmapResources_VerticalWallBreaking (cotogames.carmack.resources.WallBitmapResources_VerticalWallBreaking)
package cotogames.carmack.resources {
import mx.core.*;
public class WallBitmapResources_VerticalWallBreaking extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 191
//WallBitmapResources_VerticalWallSliding (cotogames.carmack.resources.WallBitmapResources_VerticalWallSliding)
package cotogames.carmack.resources {
import mx.core.*;
public class WallBitmapResources_VerticalWallSliding extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 192
//WallBitmapResources_VerticalWallSlidingDown (cotogames.carmack.resources.WallBitmapResources_VerticalWallSlidingDown)
package cotogames.carmack.resources {
import mx.core.*;
public class WallBitmapResources_VerticalWallSlidingDown extends BitmapAsset {
}
}//package cotogames.carmack.resources
Section 193
//CommonTextFormats (cotogames.carmack.utils.CommonTextFormats)
package cotogames.carmack.utils {
import flash.text.*;
public class CommonTextFormats {
public static function getIngameMenuItemDeselectedFormat2():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont2.fontName;
_local1.size = 8;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
public static function getNotSelectedMenuItemFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xCCCCCC;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 8;
return (_local1);
}
public static function getIngameMenuItemDeselectedSmallFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont2.fontName;
_local1.size = 16;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
public static function getIngameMenuItemSelectedSmallFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFF00;
_local1.font = ResourceManager.DefaultFont2.fontName;
_local1.size = 16;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
public static function getTitleTextFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 16;
return (_local1);
}
public static function getIntroTextFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 8;
return (_local1);
}
public static function getMainMenuSelectedTextFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFF00;
_local1.font = ResourceManager.DefaultFont2.fontName;
_local1.size = 16;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
public static function getDefaultTextFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 8;
return (_local1);
}
public static function getIngameMenuItemSelectedFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFF00;
_local1.font = ResourceManager.DefaultFont2.fontName;
_local1.size = 16;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
public static function getMainMenuTextFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont2.fontName;
_local1.size = 16;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
public static function getCaptionTextFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 16;
return (_local1);
}
public static function getIngameMenuItemDeselectedSmallFormat2():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 8;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
public static function getIntroTextFormat2():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 8;
_local1.align = "right";
return (_local1);
}
public static function getIngameMenuItemDeselectedFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont2.fontName;
_local1.size = 16;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
public static function getSelectedMenuItemFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFF00;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 8;
return (_local1);
}
public static function getIngameMenuItemFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.font = ResourceManager.DefaultFont.fontName;
_local1.size = 16;
_local1.align = TextFormatAlign.CENTER;
return (_local1);
}
}
}//package cotogames.carmack.utils
Section 194
//Constants (cotogames.carmack.utils.Constants)
package cotogames.carmack.utils {
public class Constants {
public static const ROBOT_KILLED_POINTS:int = 100;
public static const ROBOT_AVOIDED_POINTS:int = 250;
}
}//package cotogames.carmack.utils
Section 195
//GraphicUtils (cotogames.carmack.utils.GraphicUtils)
package cotogames.carmack.utils {
import flash.display.*;
import cotogames.carmack.resources.*;
public class GraphicUtils {
public static function generateRoundedRectangle(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Shape{
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local7:Shape = new Shape();
_local7.graphics.beginFill(_arg5);
if (_arg6 > 0){
if (_arg6 > (Math.min(_arg3, _arg4) / 2)){
_arg6 = (Math.min(_arg3, _arg4) / 2);
};
_local8 = (Math.PI / 4);
_local7.graphics.moveTo((_arg1 + _arg6), _arg2);
_local7.graphics.lineTo(((_arg1 + _arg3) - _arg6), _arg2);
_local9 = (-(Math.PI) / 2);
_local10 = (((_arg1 + _arg3) - _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = ((_arg2 + _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = (((_arg1 + _arg3) - _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = ((_arg2 + _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_local7.graphics.curveTo(_local10, _local11, _local12, _local13);
_local9 = (_local9 + _local8);
_local10 = (((_arg1 + _arg3) - _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = ((_arg2 + _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = (((_arg1 + _arg3) - _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = ((_arg2 + _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_local7.graphics.curveTo(_local10, _local11, _local12, _local13);
_local7.graphics.lineTo((_arg1 + _arg3), ((_arg2 + _arg4) - _arg6));
_local9 = (_local9 + _local8);
_local10 = (((_arg1 + _arg3) - _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = (((_arg2 + _arg4) - _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = (((_arg1 + _arg3) - _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = (((_arg2 + _arg4) - _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_local7.graphics.curveTo(_local10, _local11, _local12, _local13);
_local9 = (_local9 + _local8);
_local10 = (((_arg1 + _arg3) - _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = (((_arg2 + _arg4) - _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = (((_arg1 + _arg3) - _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = (((_arg2 + _arg4) - _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_local7.graphics.curveTo(_local10, _local11, _local12, _local13);
_local7.graphics.lineTo((_arg1 + _arg6), (_arg2 + _arg4));
_local9 = (_local9 + _local8);
_local10 = ((_arg1 + _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = (((_arg2 + _arg4) - _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = ((_arg1 + _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = (((_arg2 + _arg4) - _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_local7.graphics.curveTo(_local10, _local11, _local12, _local13);
_local9 = (_local9 + _local8);
_local10 = ((_arg1 + _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = (((_arg2 + _arg4) - _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = ((_arg1 + _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = (((_arg2 + _arg4) - _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_local7.graphics.curveTo(_local10, _local11, _local12, _local13);
_local7.graphics.lineTo(_arg1, (_arg2 + _arg6));
_local9 = (_local9 + _local8);
_local10 = ((_arg1 + _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = ((_arg2 + _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = ((_arg1 + _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = ((_arg2 + _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_local7.graphics.curveTo(_local10, _local11, _local12, _local13);
_local9 = (_local9 + _local8);
_local10 = ((_arg1 + _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = ((_arg2 + _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = ((_arg1 + _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = ((_arg2 + _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_local7.graphics.curveTo(_local10, _local11, _local12, _local13);
} else {
_local7.graphics.moveTo(_arg1, _arg2);
_local7.graphics.lineTo((_arg1 + _arg3), _arg2);
_local7.graphics.lineTo((_arg1 + _arg3), (_arg2 + _arg4));
_local7.graphics.lineTo(_arg1, (_arg2 + _arg4));
_local7.graphics.lineTo(_arg1, _arg2);
};
_local7.graphics.endFill();
return (_local7);
}
public static function resetAcidGraphics():void{
TileBitmapResources.AcidBottomGraphics.reset();
TileBitmapResources.AcidBottomLeftTopGraphics.reset();
TileBitmapResources.AcidBottomRightTopGraphics.reset();
TileBitmapResources.AcidBottomTopGraphics.reset();
TileBitmapResources.AcidGraphics.reset();
TileBitmapResources.AcidLeftBottomGraphics.reset();
TileBitmapResources.AcidLeftBottomRightGraphics.reset();
TileBitmapResources.AcidLeftGraphics.reset();
TileBitmapResources.AcidLeftRightGraphics.reset();
TileBitmapResources.AcidLeftTopGraphics.reset();
TileBitmapResources.AcidLeftTopRightGraphics.reset();
TileBitmapResources.AcidRightBottomGraphics.reset();
TileBitmapResources.AcidRightGraphics.reset();
TileBitmapResources.AcidRightTopGraphics.reset();
TileBitmapResources.AcidSingleGraphics.reset();
TileBitmapResources.AcidTopGraphics.reset();
}
}
}//package cotogames.carmack.utils
Section 196
//TimeFormat (cotogames.carmack.utils.TimeFormat)
package cotogames.carmack.utils {
public class TimeFormat {
public static function formatTime(_arg1:Number):String{
var _local2:int = (_arg1 / 60);
var _local3:int = (_arg1 - (_local2 * 60));
return ((((_local2 + "m ") + _local3) + "s"));
}
}
}//package cotogames.carmack.utils
Section 197
//IAutomationObject (mx.automation.IAutomationObject)
package mx.automation {
import flash.events.*;
public interface IAutomationObject {
function createAutomationIDPart(_arg1:IAutomationObject):Object;
function get automationName():String;
function get showInAutomationHierarchy():Boolean;
function set automationName(_arg1:String):void;
function getAutomationChildAt(_arg1:int):IAutomationObject;
function get automationDelegate():Object;
function get automationTabularData():Object;
function resolveAutomationIDPart(_arg1:Object):Array;
function replayAutomatableEvent(_arg1:Event):Boolean;
function set automationDelegate(_arg1:Object):void;
function get automationValue():Array;
function get numAutomationChildren():int;
function set showInAutomationHierarchy(_arg1:Boolean):void;
}
}//package mx.automation
Section 198
//BindabilityInfo (mx.binding.BindabilityInfo)
package mx.binding {
import mx.events.*;
public class BindabilityInfo {
private var classChangeEvents:Object;
private var typeDescription:XML;
private var childChangeEvents:Object;
public static const METHOD:String = "method";
public static const ACCESSOR:String = "accessor";
public static const CHANGE_EVENT:String = "ChangeEvent";
public static const NON_COMMITTING_CHANGE_EVENT:String = "NonCommittingChangeEvent";
public static const BINDABLE:String = "Bindable";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const MANAGED:String = "Managed";
public function BindabilityInfo(_arg1:XML){
childChangeEvents = {};
super();
this.typeDescription = _arg1;
}
private function addChangeEvents(_arg1:XMLList, _arg2:Object, _arg3:Boolean):void{
var _local4:XML;
var _local5:XMLList;
var _local6:String;
for each (_local4 in _arg1) {
_local5 = _local4.arg;
if (_local5.length() > 0){
_local6 = _local5[0].@value;
_arg2[_local6] = _arg3;
} else {
trace((("warning: unconverted Bindable metadata in class '" + typeDescription.@name) + "'"));
};
};
}
private function getClassChangeEvents():Object{
if (!classChangeEvents){
classChangeEvents = {};
addBindabilityEvents(typeDescription.metadata, classChangeEvents);
if (typeDescription.metadata.(@name == MANAGED).length() > 0){
classChangeEvents[PropertyChangeEvent.PROPERTY_CHANGE] = true;
};
};
return (classChangeEvents);
}
private function addBindabilityEvents(_arg1:XMLList, _arg2:Object):void{
var metadata = _arg1;
var eventListObj = _arg2;
addChangeEvents(metadata.(@name == BINDABLE), eventListObj, true);
addChangeEvents(metadata.(@name == CHANGE_EVENT), eventListObj, true);
addChangeEvents(metadata.(@name == NON_COMMITTING_CHANGE_EVENT), eventListObj, false);
}
private function copyProps(_arg1:Object, _arg2:Object):Object{
var _local3:String;
for (_local3 in _arg1) {
_arg2[_local3] = _arg1[_local3];
};
return (_arg2);
}
public function getChangeEvents(_arg1:String):Object{
var childDesc:XMLList;
var numChildren:int;
var childName = _arg1;
var changeEvents:Object = childChangeEvents[childName];
if (!changeEvents){
changeEvents = copyProps(getClassChangeEvents(), {});
childDesc = (typeDescription.accessor.(@name == childName) + typeDescription.method.(@name == childName));
numChildren = childDesc.length();
if (numChildren == 0){
if (!typeDescription.@dynamic){
trace((((("warning: no describeType entry for '" + childName) + "' on non-dynamic type '") + typeDescription.@name) + "'"));
};
} else {
if (numChildren > 1){
trace(((((("warning: multiple describeType entries for '" + childName) + "' on type '") + typeDescription.@name) + "':\n") + childDesc));
};
addBindabilityEvents(childDesc.metadata, changeEvents);
};
childChangeEvents[childName] = changeEvents;
};
return (changeEvents);
}
}
}//package mx.binding
Section 199
//Binding (mx.binding.Binding)
package mx.binding {
import flash.utils.*;
import mx.collections.errors.*;
public class Binding {
mx_internal var destFunc:Function;
mx_internal var srcFunc:Function;
mx_internal var destString:String;
mx_internal var document:Object;
private var hasHadValue:Boolean;
mx_internal var disabledRequests:Dictionary;
mx_internal var isExecuting:Boolean;
mx_internal var isHandlingEvent:Boolean;
public var twoWayCounterpart:Binding;
private var wrappedFunctionSuccessful:Boolean;
mx_internal var _isEnabled:Boolean;
public var uiComponentWatcher:int;
private var lastValue:Object;
mx_internal static const VERSION:String = "3.2.0.3958";
public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){
this.document = _arg1;
this.srcFunc = _arg2;
this.destFunc = _arg3;
this.destString = _arg4;
_isEnabled = true;
isExecuting = false;
isHandlingEvent = false;
hasHadValue = false;
uiComponentWatcher = -1;
BindingManager.addBinding(_arg1, _arg4, this);
}
private function registerDisabledExecute(_arg1:Object):void{
if (_arg1 != null){
disabledRequests = ((disabledRequests)!=null) ? disabledRequests : new Dictionary(true);
disabledRequests[_arg1] = true;
};
}
protected function wrapFunctionCall(_arg1:Object, _arg2:Function, _arg3:Object=null, ... _args):Object{
var result:Object;
var thisArg = _arg1;
var wrappedFunction = _arg2;
var object = _arg3;
var args = _args;
wrappedFunctionSuccessful = false;
try {
result = wrappedFunction.apply(thisArg, args);
wrappedFunctionSuccessful = true;
return (result);
} catch(itemPendingError:ItemPendingError) {
itemPendingError.addResponder(new EvalBindingResponder(this, object));
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + itemPendingError));
};
} catch(rangeError:RangeError) {
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + rangeError));
};
} catch(error:Error) {
if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){
throw (error);
} else {
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + error));
};
};
};
return (null);
}
public function watcherFired(_arg1:Boolean, _arg2:int):void{
var commitEvent = _arg1;
var cloneIndex = _arg2;
if (isHandlingEvent){
return;
};
try {
isHandlingEvent = true;
execute(cloneIndex);
} finally {
isHandlingEvent = false;
};
}
private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{
var _local4:uint;
var _local3:uint = _arg1.length();
if (_local3 == _arg2.length()){
_local4 = 0;
while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) {
_local4++;
};
return ((_local4 == _local3));
//unresolved jump
};
return (false);
}
mx_internal function set isEnabled(_arg1:Boolean):void{
_isEnabled = _arg1;
if (_arg1){
processDisabledRequests();
};
}
private function processDisabledRequests():void{
var _local1:Object;
if (disabledRequests != null){
for (_local1 in disabledRequests) {
execute(_local1);
};
disabledRequests = null;
};
}
public function execute(_arg1:Object=null):void{
var o = _arg1;
if (!isEnabled){
if (o != null){
registerDisabledExecute(o);
};
return;
};
if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){
hasHadValue = true;
return;
};
try {
isExecuting = true;
wrapFunctionCall(this, innerExecute, o);
} finally {
isExecuting = false;
};
}
mx_internal function get isEnabled():Boolean{
return (_isEnabled);
}
private function innerExecute():void{
var _local1:Object = wrapFunctionCall(document, srcFunc);
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", srcFunc result = ") + _local1));
};
if (((hasHadValue) || (wrappedFunctionSuccessful))){
if (((!((((((lastValue is XML)) && (lastValue.hasComplexContent()))) && ((lastValue === _local1))))) && (!((((((((lastValue is XMLList)) && (lastValue.hasComplexContent()))) && ((_local1 is XMLList)))) && (nodeSeqEqual((lastValue as XMLList), (_local1 as XMLList)))))))){
destFunc.call(document, _local1);
lastValue = _local1;
hasHadValue = true;
};
};
}
}
}//package mx.binding
Section 200
//BindingManager (mx.binding.BindingManager)
package mx.binding {
public class BindingManager {
mx_internal static const VERSION:String = "3.2.0.3958";
static var debugDestinationStrings:Object = {};
public static function executeBindings(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:String;
if (((!(_arg2)) || ((_arg2 == "")))){
return;
};
if (((((((_arg1) && ((((_arg1 is IBindingClient)) || (_arg1.hasOwnProperty("_bindingsByDestination")))))) && (_arg1._bindingsByDestination))) && (_arg1._bindingsBeginWithWord[getFirstWord(_arg2)]))){
for (_local4 in _arg1._bindingsByDestination) {
if (_local4.charAt(0) == _arg2.charAt(0)){
if ((((((_local4.indexOf((_arg2 + ".")) == 0)) || ((_local4.indexOf((_arg2 + "[")) == 0)))) || ((_local4 == _arg2)))){
_arg1._bindingsByDestination[_local4].execute(_arg3);
};
};
};
};
}
public static function addBinding(_arg1:Object, _arg2:String, _arg3:Binding):void{
if (!_arg1._bindingsByDestination){
_arg1._bindingsByDestination = {};
_arg1._bindingsBeginWithWord = {};
};
_arg1._bindingsByDestination[_arg2] = _arg3;
_arg1._bindingsBeginWithWord[getFirstWord(_arg2)] = true;
}
public static function debugBinding(_arg1:String):void{
debugDestinationStrings[_arg1] = true;
}
private static function getFirstWord(_arg1:String):String{
var _local2:int = _arg1.indexOf(".");
var _local3:int = _arg1.indexOf("[");
if (_local2 == _local3){
return (_arg1);
};
var _local4:int = Math.min(_local2, _local3);
if (_local4 == -1){
_local4 = Math.max(_local2, _local3);
};
return (_arg1.substr(0, _local4));
}
public static function setEnabled(_arg1:Object, _arg2:Boolean):void{
var _local3:Array;
var _local4:uint;
var _local5:Binding;
if ((((_arg1 is IBindingClient)) && (_arg1._bindings))){
_local3 = (_arg1._bindings as Array);
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4];
_local5.isEnabled = _arg2;
_local4++;
};
};
}
}
}//package mx.binding
Section 201
//EvalBindingResponder (mx.binding.EvalBindingResponder)
package mx.binding {
import mx.rpc.*;
public class EvalBindingResponder implements IResponder {
private var binding:Binding;
private var object:Object;
mx_internal static const VERSION:String = "3.2.0.3958";
public function EvalBindingResponder(_arg1:Binding, _arg2:Object){
this.binding = _arg1;
this.object = _arg2;
}
public function fault(_arg1:Object):void{
}
public function result(_arg1:Object):void{
binding.execute(object);
}
}
}//package mx.binding
Section 202
//IBindingClient (mx.binding.IBindingClient)
package mx.binding {
public interface IBindingClient {
}
}//package mx.binding
Section 203
//CollectionViewError (mx.collections.errors.CollectionViewError)
package mx.collections.errors {
public class CollectionViewError extends Error {
mx_internal static const VERSION:String = "3.2.0.3958";
public function CollectionViewError(_arg1:String){
super(_arg1);
}
}
}//package mx.collections.errors
Section 204
//CursorError (mx.collections.errors.CursorError)
package mx.collections.errors {
public class CursorError extends Error {
mx_internal static const VERSION:String = "3.2.0.3958";
public function CursorError(_arg1:String){
super(_arg1);
}
}
}//package mx.collections.errors
Section 205
//ItemPendingError (mx.collections.errors.ItemPendingError)
package mx.collections.errors {
import mx.rpc.*;
public class ItemPendingError extends Error {
private var _responders:Array;
mx_internal static const VERSION:String = "3.2.0.3958";
public function ItemPendingError(_arg1:String){
super(_arg1);
}
public function get responders():Array{
return (_responders);
}
public function addResponder(_arg1:IResponder):void{
if (!_responders){
_responders = [];
};
_responders.push(_arg1);
}
}
}//package mx.collections.errors
Section 206
//SortError (mx.collections.errors.SortError)
package mx.collections.errors {
public class SortError extends Error {
mx_internal static const VERSION:String = "3.2.0.3958";
public function SortError(_arg1:String){
super(_arg1);
}
}
}//package mx.collections.errors
Section 207
//ArrayCollection (mx.collections.ArrayCollection)
package mx.collections {
import flash.utils.*;
public class ArrayCollection extends ListCollectionView implements IExternalizable {
mx_internal static const VERSION:String = "3.2.0.3958";
public function ArrayCollection(_arg1:Array=null){
this.source = _arg1;
}
public function set source(_arg1:Array):void{
list = new ArrayList(_arg1);
}
public function readExternal(_arg1:IDataInput):void{
if ((list is IExternalizable)){
IExternalizable(list).readExternal(_arg1);
} else {
source = (_arg1.readObject() as Array);
};
}
public function writeExternal(_arg1:IDataOutput):void{
if ((list is IExternalizable)){
IExternalizable(list).writeExternal(_arg1);
} else {
_arg1.writeObject(source);
};
}
public function get source():Array{
if (((list) && ((list is ArrayList)))){
return (ArrayList(list).source);
};
return (null);
}
}
}//package mx.collections
Section 208
//ArrayList (mx.collections.ArrayList)
package mx.collections {
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.resources.*;
import flash.utils.*;
import mx.utils.*;
public class ArrayList extends EventDispatcher implements IList, IExternalizable, IPropertyChangeNotifier {
private var _source:Array;
private var _dispatchEvents:int;// = 0
private var _uid:String;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function ArrayList(_arg1:Array=null){
resourceManager = ResourceManager.getInstance();
super();
disableEvents();
this.source = _arg1;
enableEvents();
_uid = UIDUtil.createUID();
}
public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
var _local5:PropertyChangeEvent = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.UPDATE;
_local5.source = _arg1;
_local5.property = _arg2;
_local5.oldValue = _arg3;
_local5.newValue = _arg4;
itemUpdateHandler(_local5);
}
public function readExternal(_arg1:IDataInput):void{
source = _arg1.readObject();
}
private function internalDispatchEvent(_arg1:String, _arg2:Object=null, _arg3:int=-1):void{
var _local4:CollectionEvent;
var _local5:PropertyChangeEvent;
if (_dispatchEvents == 0){
if (hasEventListener(CollectionEvent.COLLECTION_CHANGE)){
_local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local4.kind = _arg1;
_local4.items.push(_arg2);
_local4.location = _arg3;
dispatchEvent(_local4);
};
if (((hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)) && ((((_arg1 == CollectionEventKind.ADD)) || ((_arg1 == CollectionEventKind.REMOVE)))))){
_local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
_local5.property = _arg3;
if (_arg1 == CollectionEventKind.ADD){
_local5.newValue = _arg2;
} else {
_local5.oldValue = _arg2;
};
dispatchEvent(_local5);
};
};
}
public function removeAll():void{
var _local1:int;
var _local2:int;
if (length > 0){
_local1 = length;
_local2 = 0;
while (_local2 < _local1) {
stopTrackUpdates(source[_local2]);
_local2++;
};
source.splice(0, length);
internalDispatchEvent(CollectionEventKind.RESET);
};
}
public function removeItemAt(_arg1:int):Object{
var _local3:String;
if ((((_arg1 < 0)) || ((_arg1 >= length)))){
_local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]);
throw (new RangeError(_local3));
};
var _local2:Object = source.splice(_arg1, 1)[0];
stopTrackUpdates(_local2);
internalDispatchEvent(CollectionEventKind.REMOVE, _local2, _arg1);
return (_local2);
}
public function get uid():String{
return (_uid);
}
public function getItemIndex(_arg1:Object):int{
return (ArrayUtil.getItemIndex(_arg1, source));
}
public function writeExternal(_arg1:IDataOutput):void{
_arg1.writeObject(_source);
}
public function addItem(_arg1:Object):void{
addItemAt(_arg1, length);
}
public function toArray():Array{
return (source.concat());
}
private function disableEvents():void{
_dispatchEvents--;
}
public function get source():Array{
return (_source);
}
public function getItemAt(_arg1:int, _arg2:int=0):Object{
var _local3:String;
if ((((_arg1 < 0)) || ((_arg1 >= length)))){
_local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]);
throw (new RangeError(_local3));
};
return (source[_arg1]);
}
public function set uid(_arg1:String):void{
_uid = _arg1;
}
public function setItemAt(_arg1:Object, _arg2:int):Object{
var _local4:String;
var _local5:Boolean;
var _local6:Boolean;
var _local7:PropertyChangeEvent;
var _local8:CollectionEvent;
if ((((_arg2 < 0)) || ((_arg2 >= length)))){
_local4 = resourceManager.getString("collections", "outOfBounds", [_arg2]);
throw (new RangeError(_local4));
};
var _local3:Object = source[_arg2];
source[_arg2] = _arg1;
stopTrackUpdates(_local3);
startTrackUpdates(_arg1);
if (_dispatchEvents == 0){
_local5 = hasEventListener(CollectionEvent.COLLECTION_CHANGE);
_local6 = hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE);
if (((_local5) || (_local6))){
_local7 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
_local7.kind = PropertyChangeEventKind.UPDATE;
_local7.oldValue = _local3;
_local7.newValue = _arg1;
_local7.property = _arg2;
};
if (_local5){
_local8 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local8.kind = CollectionEventKind.REPLACE;
_local8.location = _arg2;
_local8.items.push(_local7);
dispatchEvent(_local8);
};
if (_local6){
dispatchEvent(_local7);
};
};
return (_local3);
}
public function get length():int{
if (source){
return (source.length);
};
return (0);
}
protected function stopTrackUpdates(_arg1:Object):void{
if (((_arg1) && ((_arg1 is IEventDispatcher)))){
IEventDispatcher(_arg1).removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, itemUpdateHandler);
};
}
protected function itemUpdateHandler(_arg1:PropertyChangeEvent):void{
var _local2:PropertyChangeEvent;
var _local3:uint;
internalDispatchEvent(CollectionEventKind.UPDATE, _arg1);
if ((((_dispatchEvents == 0)) && (hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)))){
_local2 = PropertyChangeEvent(_arg1.clone());
_local3 = getItemIndex(_arg1.target);
_local2.property = ((_local3.toString() + ".") + _arg1.property);
dispatchEvent(_local2);
};
}
public function addItemAt(_arg1:Object, _arg2:int):void{
var _local3:String;
if ((((_arg2 < 0)) || ((_arg2 > length)))){
_local3 = resourceManager.getString("collections", "outOfBounds", [_arg2]);
throw (new RangeError(_local3));
};
source.splice(_arg2, 0, _arg1);
startTrackUpdates(_arg1);
internalDispatchEvent(CollectionEventKind.ADD, _arg1, _arg2);
}
public function removeItem(_arg1:Object):Boolean{
var _local2:int = getItemIndex(_arg1);
var _local3 = (_local2 >= 0);
if (_local3){
removeItemAt(_local2);
};
return (_local3);
}
protected function startTrackUpdates(_arg1:Object):void{
if (((_arg1) && ((_arg1 is IEventDispatcher)))){
IEventDispatcher(_arg1).addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, itemUpdateHandler, false, 0, true);
};
}
override public function toString():String{
if (source){
return (source.toString());
};
return (getQualifiedClassName(this));
}
private function enableEvents():void{
_dispatchEvents++;
if (_dispatchEvents > 0){
_dispatchEvents = 0;
};
}
public function set source(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:CollectionEvent;
if (((_source) && (_source.length))){
_local3 = _source.length;
_local2 = 0;
while (_local2 < _local3) {
stopTrackUpdates(_source[_local2]);
_local2++;
};
};
_source = (_arg1) ? _arg1 : [];
_local3 = _source.length;
_local2 = 0;
while (_local2 < _local3) {
startTrackUpdates(_source[_local2]);
_local2++;
};
if (_dispatchEvents == 0){
_local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local4.kind = CollectionEventKind.RESET;
dispatchEvent(_local4);
};
}
}
}//package mx.collections
Section 209
//CursorBookmark (mx.collections.CursorBookmark)
package mx.collections {
public class CursorBookmark {
private var _value:Object;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var _first:CursorBookmark;
private static var _last:CursorBookmark;
private static var _current:CursorBookmark;
public function CursorBookmark(_arg1:Object){
_value = _arg1;
}
public function get value():Object{
return (_value);
}
public function getViewIndex():int{
return (-1);
}
public static function get LAST():CursorBookmark{
if (!_last){
_last = new CursorBookmark("${L}");
};
return (_last);
}
public static function get FIRST():CursorBookmark{
if (!_first){
_first = new CursorBookmark("${F}");
};
return (_first);
}
public static function get CURRENT():CursorBookmark{
if (!_current){
_current = new CursorBookmark("${C}");
};
return (_current);
}
}
}//package mx.collections
Section 210
//ICollectionView (mx.collections.ICollectionView)
package mx.collections {
import flash.events.*;
public interface ICollectionView extends IEventDispatcher {
function set filterFunction(_arg1:Function):void;
function enableAutoUpdate():void;
function get length():int;
function disableAutoUpdate():void;
function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void;
function get filterFunction():Function;
function createCursor():IViewCursor;
function refresh():Boolean;
function set sort(_arg1:Sort):void;
function get sort():Sort;
function contains(_arg1:Object):Boolean;
}
}//package mx.collections
Section 211
//IList (mx.collections.IList)
package mx.collections {
import flash.events.*;
public interface IList extends IEventDispatcher {
function addItem(_arg1:Object):void;
function get length():int;
function addItemAt(_arg1:Object, _arg2:int):void;
function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void;
function getItemIndex(_arg1:Object):int;
function removeItemAt(_arg1:int):Object;
function getItemAt(_arg1:int, _arg2:int=0):Object;
function removeAll():void;
function toArray():Array;
function setItemAt(_arg1:Object, _arg2:int):Object;
}
}//package mx.collections
Section 212
//ItemResponder (mx.collections.ItemResponder)
package mx.collections {
import mx.rpc.*;
public class ItemResponder implements IResponder {
private var _faultHandler:Function;
private var _token:Object;
private var _resultHandler:Function;
mx_internal static const VERSION:String = "3.2.0.3958";
public function ItemResponder(_arg1:Function, _arg2:Function, _arg3:Object=null){
_resultHandler = _arg1;
_faultHandler = _arg2;
_token = _arg3;
}
public function result(_arg1:Object):void{
_resultHandler(_arg1, _token);
}
public function fault(_arg1:Object):void{
_faultHandler(_arg1, _token);
}
}
}//package mx.collections
Section 213
//IViewCursor (mx.collections.IViewCursor)
package mx.collections {
import flash.events.*;
public interface IViewCursor extends IEventDispatcher {
function get current():Object;
function moveNext():Boolean;
function get view():ICollectionView;
function movePrevious():Boolean;
function remove():Object;
function findLast(_arg1:Object):Boolean;
function get beforeFirst():Boolean;
function get afterLast():Boolean;
function findAny(_arg1:Object):Boolean;
function get bookmark():CursorBookmark;
function findFirst(_arg1:Object):Boolean;
function seek(_arg1:CursorBookmark, _arg2:int=0, _arg3:int=0):void;
function insert(_arg1:Object):void;
}
}//package mx.collections
Section 214
//ListCollectionView (mx.collections.ListCollectionView)
package mx.collections {
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.resources.*;
import flash.utils.*;
import mx.utils.*;
import mx.collections.errors.*;
public class ListCollectionView extends Proxy implements ICollectionView, IList, IMXMLObject {
private var autoUpdateCounter:int;
private var _list:IList;
private var _filterFunction:Function;
protected var localIndex:Array;
mx_internal var dispatchResetEvent:Boolean;// = true
private var pendingUpdates:Array;
private var resourceManager:IResourceManager;
private var eventDispatcher:EventDispatcher;
private var revision:int;
private var _sort:Sort;
mx_internal static const VERSION:String = "3.2.0.3958";
public function ListCollectionView(_arg1:IList=null){
resourceManager = ResourceManager.getInstance();
super();
eventDispatcher = new EventDispatcher(this);
this.list = _arg1;
}
private function handlePendingUpdates():void{
var _local1:Array;
var _local2:CollectionEvent;
var _local3:int;
var _local4:CollectionEvent;
var _local5:int;
if (pendingUpdates){
_local1 = pendingUpdates;
pendingUpdates = null;
_local3 = 0;
while (_local3 < _local1.length) {
_local4 = _local1[_local3];
if (_local4.kind == CollectionEventKind.UPDATE){
if (!_local2){
_local2 = _local4;
} else {
_local5 = 0;
while (_local5 < _local4.items.length) {
_local2.items.push(_local4.items[_local5]);
_local5++;
};
};
} else {
listChangeHandler(_local4);
};
_local3++;
};
if (_local2){
listChangeHandler(_local2);
};
};
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
private function replaceItemsInView(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:int;
var _local8:PropertyChangeEvent;
var _local9:CollectionEvent;
if (localIndex){
_local4 = _arg1.length;
_local5 = [];
_local6 = [];
_local7 = 0;
while (_local7 < _local4) {
_local8 = _arg1[_local7];
_local5.push(_local8.oldValue);
_local6.push(_local8.newValue);
_local7++;
};
removeItemsFromView(_local5, _arg2, _arg3);
addItemsToView(_local6, _arg2, _arg3);
} else {
_local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local9.kind = CollectionEventKind.REPLACE;
_local9.location = _arg2;
_local9.items = _arg1;
dispatchEvent(_local9);
};
}
public function willTrigger(_arg1:String):Boolean{
return (eventDispatcher.willTrigger(_arg1));
}
private function getFilteredItemIndex(_arg1:Object):int{
var _local4:Object;
var _local5:int;
var _local6:int;
var _local2:int = list.getItemIndex(_arg1);
if (_local2 == 0){
return (0);
};
var _local3:int = (_local2 - 1);
while (_local3 >= 0) {
_local4 = list.getItemAt(_local3);
if (filterFunction(_local4)){
_local5 = localIndex.length;
_local6 = 0;
while (_local6 < _local5) {
if (localIndex[_local6] == _local4){
return ((_local6 + 1));
};
_local6++;
};
};
_local3--;
};
return (0);
}
mx_internal function findItem(_arg1:Object, _arg2:String, _arg3:Boolean=false):int{
var _local4:String;
if (!sort){
_local4 = resourceManager.getString("collections", "itemNotFound");
throw (new CollectionViewError(_local4));
};
if (localIndex.length == 0){
return ((_arg3) ? 0 : -1);
};
return (sort.findItem(localIndex, _arg1, _arg2, _arg3));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return ((_arg1 - 1).toString());
}
public function removeAll():void{
var _local2:int;
var _local1:int = length;
if (_local1 > 0){
if (localIndex){
_local2 = (_local1 - 1);
while (_local2 >= 0) {
removeItemAt(_local2);
_local2--;
};
} else {
list.removeAll();
};
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
var n:Number;
var name = _arg1;
if ((name is QName)){
name = name.localName;
};
var index = -1;
try {
n = parseInt(String(name));
if (!isNaN(n)){
index = int(n);
};
} catch(e:Error) {
};
if (index == -1){
return (false);
};
return ((((index >= 0)) && ((index < length))));
}
public function getItemAt(_arg1:int, _arg2:int=0):Object{
var _local3:String;
if ((((_arg1 < 0)) || ((_arg1 >= length)))){
_local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]);
throw (new RangeError(_local3));
};
if (localIndex){
return (localIndex[_arg1]);
};
if (list){
return (list.getItemAt(_arg1, _arg2));
};
return (null);
}
private function moveItemInView(_arg1:Object, _arg2:Boolean=true, _arg3:Array=null):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:CollectionEvent;
if (localIndex){
_local4 = -1;
_local5 = 0;
while (_local5 < localIndex.length) {
if (localIndex[_local5] == _arg1){
_local4 = _local5;
break;
};
_local5++;
};
if (_local4 > -1){
localIndex.splice(_local4, 1);
};
_local6 = addItemsToView([_arg1], _local4, false);
if (_arg2){
_local7 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local7.items.push(_arg1);
if (((((_arg3) && ((_local6 == _local4)))) && ((_local6 > -1)))){
_arg3.push(_arg1);
return;
};
if ((((_local6 > -1)) && ((_local4 > -1)))){
_local7.kind = CollectionEventKind.MOVE;
_local7.location = _local6;
_local7.oldLocation = _local4;
} else {
if (_local6 > -1){
_local7.kind = CollectionEventKind.ADD;
_local7.location = _local6;
} else {
if (_local4 > -1){
_local7.kind = CollectionEventKind.REMOVE;
_local7.location = _local4;
} else {
_arg2 = false;
};
};
};
if (_arg2){
dispatchEvent(_local7);
};
};
};
}
public function contains(_arg1:Object):Boolean{
return (!((getItemIndex(_arg1) == -1)));
}
public function get sort():Sort{
return (_sort);
}
private function removeItemsFromView(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{
var _local6:int;
var _local7:Object;
var _local8:int;
var _local9:CollectionEvent;
var _local4:Array = (localIndex) ? [] : _arg1;
var _local5:int = _arg2;
if (localIndex){
_local6 = 0;
while (_local6 < _arg1.length) {
_local7 = _arg1[_local6];
_local8 = getItemIndex(_local7);
if (_local8 > -1){
localIndex.splice(_local8, 1);
_local4.push(_local7);
_local5 = _local8;
};
_local6++;
};
};
if (((_arg3) && ((_local4.length > 0)))){
_local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local9.kind = CollectionEventKind.REMOVE;
_local9.location = (((!(localIndex)) || ((_local4.length == 1)))) ? _local5 : -1;
_local9.items = _local4;
dispatchEvent(_local9);
};
}
public function get list():IList{
return (_list);
}
public function addItemAt(_arg1:Object, _arg2:int):void{
var _local4:String;
if ((((((_arg2 < 0)) || (!(list)))) || ((_arg2 > length)))){
_local4 = resourceManager.getString("collections", "outOfBounds", [_arg2]);
throw (new RangeError(_local4));
};
var _local3:int = _arg2;
if (((localIndex) && (sort))){
_local3 = list.length;
} else {
if (((localIndex) && (!((filterFunction == null))))){
if (_local3 == localIndex.length){
_local3 = list.length;
} else {
_local3 = list.getItemIndex(localIndex[_arg2]);
};
};
};
list.addItemAt(_arg1, _local3);
}
public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
list.itemUpdated(_arg1, _arg2, _arg3, _arg4);
}
private function populateLocalIndex():void{
if (list){
localIndex = list.toArray();
} else {
localIndex = [];
};
}
private function handlePropertyChangeEvents(_arg1:Array):void{
var _local3:Array;
var _local4:Object;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:PropertyChangeEvent;
var _local9:Object;
var _local10:Boolean;
var _local11:int;
var _local12:int;
var _local13:CollectionEvent;
var _local2:Array = _arg1;
if (((sort) || (!((filterFunction == null))))){
_local3 = [];
_local5 = 0;
while (_local5 < _arg1.length) {
_local8 = _arg1[_local5];
if (_local8.target){
_local9 = _local8.target;
_local10 = !((_local8.target == _local8.source));
} else {
_local9 = _local8.source;
_local10 = false;
};
_local11 = 0;
while (_local11 < _local3.length) {
if (_local3[_local11].item == _local9){
break;
};
_local11++;
};
if (_local11 < _local3.length){
_local4 = _local3[_local11];
} else {
_local4 = {item:_local9, move:_local10, event:_local8};
_local3.push(_local4);
};
_local4.move = ((((((_local4.move) || (filterFunction))) || (!(_local8.property)))) || (((sort) && (sort.propertyAffectsSort(String(_local8.property))))));
_local5++;
};
_local2 = [];
_local5 = 0;
while (_local5 < _local3.length) {
_local4 = _local3[_local5];
if (_local4.move){
moveItemInView(_local4.item, _local4.item, _local2);
} else {
_local2.push(_local4.item);
};
_local5++;
};
_local6 = [];
_local7 = 0;
while (_local7 < _local2.length) {
_local12 = 0;
while (_local12 < _local3.length) {
if (_local2[_local7] == _local3[_local12].item){
_local6.push(_local3[_local12].event);
};
_local12++;
};
_local7++;
};
_local2 = _local6;
};
if (_local2.length > 0){
_local13 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local13.kind = CollectionEventKind.UPDATE;
_local13.items = _local2;
dispatchEvent(_local13);
};
}
public function set sort(_arg1:Sort):void{
_sort = _arg1;
dispatchEvent(new Event("sortChanged"));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){
return (getItemAt((_arg1 - 1)));
}
public function setItemAt(_arg1:Object, _arg2:int):Object{
var _local4:String;
var _local5:Object;
if ((((((_arg2 < 0)) || (!(list)))) || ((_arg2 >= length)))){
_local4 = resourceManager.getString("collections", "outOfBounds", [_arg2]);
throw (new RangeError(_local4));
};
var _local3:int = _arg2;
if (localIndex){
if (_arg2 > localIndex.length){
_local3 = list.length;
} else {
_local5 = localIndex[_arg2];
_local3 = list.getItemIndex(_local5);
};
};
return (list.setItemAt(_arg1, _local3));
}
mx_internal function getBookmark(_arg1:int):ListCollectionViewBookmark{
var value:Object;
var message:String;
var index = _arg1;
if ((((index < 0)) || ((index > length)))){
message = resourceManager.getString("collections", "invalidIndex", [index]);
throw (new CollectionViewError(message));
};
try {
value = getItemAt(index);
} catch(e:Error) {
value = null;
};
return (new ListCollectionViewBookmark(value, this, revision, index));
}
private function addItemsToView(_arg1:Array, _arg2:int, _arg3:Boolean=true):int{
var _local7:int;
var _local8:int;
var _local9:Object;
var _local10:String;
var _local11:CollectionEvent;
var _local4:Array = (localIndex) ? [] : _arg1;
var _local5:int = _arg2;
var _local6:Boolean;
if (localIndex){
_local7 = _arg2;
_local8 = 0;
while (_local8 < _arg1.length) {
_local9 = _arg1[_local8];
if ((((filterFunction == null)) || (filterFunction(_local9)))){
if (sort){
_local7 = findItem(_local9, Sort.ANY_INDEX_MODE, true);
if (_local6){
_local5 = _local7;
_local6 = false;
};
} else {
_local7 = getFilteredItemIndex(_local9);
if (_local6){
_local5 = _local7;
_local6 = false;
};
};
if (((((sort) && (sort.unique))) && ((sort.compareFunction(_local9, localIndex[_local7]) == 0)))){
_local10 = resourceManager.getString("collections", "incorrectAddition");
throw (new CollectionViewError(_local10));
};
var _temp1 = _local7;
_local7 = (_local7 + 1);
localIndex.splice(_temp1, 0, _local9);
_local4.push(_local9);
} else {
_local5 = -1;
};
_local8++;
};
};
if (((localIndex) && ((_local4.length > 1)))){
_local5 = -1;
};
if (((_arg3) && ((_local4.length > 0)))){
_local11 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local11.kind = CollectionEventKind.ADD;
_local11.location = _local5;
_local11.items = _local4;
dispatchEvent(_local11);
};
return (_local5);
}
public function dispatchEvent(_arg1:Event):Boolean{
return (eventDispatcher.dispatchEvent(_arg1));
}
public function set list(_arg1:IList):void{
var _local2:Boolean;
var _local3:Boolean;
if (_list != _arg1){
if (_list){
_list.removeEventListener(CollectionEvent.COLLECTION_CHANGE, listChangeHandler);
_local2 = (_list.length > 0);
};
_list = _arg1;
if (_list){
_list.addEventListener(CollectionEvent.COLLECTION_CHANGE, listChangeHandler, false, 0, true);
_local3 = (_list.length > 0);
};
if (((_local2) || (_local3))){
reset();
};
dispatchEvent(new Event("listChanged"));
};
}
mx_internal function getBookmarkIndex(_arg1:CursorBookmark):int{
var _local3:String;
if (((!((_arg1 is ListCollectionViewBookmark))) || (!((ListCollectionViewBookmark(_arg1).view == this))))){
_local3 = resourceManager.getString("collections", "bookmarkNotFound");
throw (new CollectionViewError(_local3));
};
var _local2:ListCollectionViewBookmark = ListCollectionViewBookmark(_arg1);
if (_local2.viewRevision != revision){
if ((((((_local2.index < 0)) || ((_local2.index >= length)))) || (!((getItemAt(_local2.index) == _local2.value))))){
_local2.index = getItemIndex(_local2.value);
};
_local2.viewRevision = revision;
};
return (_local2.index);
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function getItemIndex(_arg1:Object):int{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
if (sort){
_local3 = sort.findItem(localIndex, _arg1, Sort.FIRST_INDEX_MODE);
if (_local3 == -1){
return (-1);
};
_local4 = sort.findItem(localIndex, _arg1, Sort.LAST_INDEX_MODE);
_local2 = _local3;
while (_local2 <= _local4) {
if (localIndex[_local2] == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
} else {
if (filterFunction != null){
_local5 = localIndex.length;
_local2 = 0;
while (_local2 < _local5) {
if (localIndex[_local2] == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
};
};
return (list.getItemIndex(_arg1));
}
public function removeItemAt(_arg1:int):Object{
var _local3:String;
var _local4:Object;
if ((((_arg1 < 0)) || ((_arg1 >= length)))){
_local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]);
throw (new RangeError(_local3));
};
var _local2:int = _arg1;
if (localIndex){
_local4 = localIndex[_arg1];
_local2 = list.getItemIndex(_local4);
};
return (list.removeItemAt(_local2));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
var n:Number;
var message:String;
var name = _arg1;
if ((name is QName)){
name = name.localName;
};
var index = -1;
try {
n = parseInt(String(name));
if (!isNaN(n)){
index = int(n);
};
} catch(e:Error) {
};
if (index == -1){
message = resourceManager.getString("collections", "unknownProperty", [name]);
throw (new Error(message));
};
return (getItemAt(index));
}
public function enableAutoUpdate():void{
if (autoUpdateCounter > 0){
autoUpdateCounter--;
if (autoUpdateCounter == 0){
handlePendingUpdates();
};
};
}
mx_internal function reset():void{
var _local1:CollectionEvent;
internalRefresh(false);
if (dispatchResetEvent){
_local1 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local1.kind = CollectionEventKind.RESET;
dispatchEvent(_local1);
};
}
public function toArray():Array{
var _local1:Array;
if (localIndex){
_local1 = localIndex.concat();
} else {
_local1 = list.toArray();
};
return (_local1);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){
return (null);
}
public function initialized(_arg1:Object, _arg2:String):void{
refresh();
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var n:Number;
var message:String;
var name = _arg1;
var value = _arg2;
if ((name is QName)){
name = name.localName;
};
var index = -1;
try {
n = parseInt(String(name));
if (!isNaN(n)){
index = int(n);
};
} catch(e:Error) {
};
if (index == -1){
message = resourceManager.getString("collections", "unknownProperty", [name]);
throw (new Error(message));
};
setItemAt(value, index);
}
public function addItem(_arg1:Object):void{
addItemAt(_arg1, length);
}
private function internalRefresh(_arg1:Boolean):Boolean{
var tmp:Array;
var len:int;
var i:int;
var item:Object;
var refreshEvent:CollectionEvent;
var dispatch = _arg1;
if (((sort) || (!((filterFunction == null))))){
try {
populateLocalIndex();
} catch(pending:ItemPendingError) {
pending.addResponder(new ItemResponder(function (_arg1:Object, _arg2:Object=null):void{
internalRefresh(dispatch);
}, function (_arg1:Object, _arg2:Object=null):void{
}));
return (false);
};
if (filterFunction != null){
tmp = [];
len = localIndex.length;
i = 0;
while (i < len) {
item = localIndex[i];
if (filterFunction(item)){
tmp.push(item);
};
i = (i + 1);
};
localIndex = tmp;
};
if (sort){
sort.sort(localIndex);
dispatch = true;
};
} else {
if (localIndex){
localIndex = null;
};
};
revision++;
pendingUpdates = null;
if (dispatch){
refreshEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
refreshEvent.kind = CollectionEventKind.REFRESH;
dispatchEvent(refreshEvent);
};
return (true);
}
public function set filterFunction(_arg1:Function):void{
_filterFunction = _arg1;
dispatchEvent(new Event("filterFunctionChanged"));
}
public function refresh():Boolean{
return (internalRefresh(true));
}
public function get filterFunction():Function{
return (_filterFunction);
}
public function createCursor():IViewCursor{
return (new ListCollectionViewCursor(this));
}
public function hasEventListener(_arg1:String):Boolean{
return (eventDispatcher.hasEventListener(_arg1));
}
public function get length():int{
if (localIndex){
return (localIndex.length);
};
if (list){
return (list.length);
};
return (0);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1 < length)) ? (_arg1 + 1) : 0);
}
public function disableAutoUpdate():void{
autoUpdateCounter++;
}
public function toString():String{
if (localIndex){
return (ObjectUtil.toString(localIndex));
};
if (((list) && (Object(list).toString))){
return (Object(list).toString());
};
return (getQualifiedClassName(this));
}
private function listChangeHandler(_arg1:CollectionEvent):void{
if (autoUpdateCounter > 0){
if (!pendingUpdates){
pendingUpdates = [];
};
pendingUpdates.push(_arg1);
} else {
switch (_arg1.kind){
case CollectionEventKind.ADD:
addItemsToView(_arg1.items, _arg1.location);
break;
case CollectionEventKind.RESET:
reset();
break;
case CollectionEventKind.REMOVE:
removeItemsFromView(_arg1.items, _arg1.location);
break;
case CollectionEventKind.REPLACE:
replaceItemsInView(_arg1.items, _arg1.location);
break;
case CollectionEventKind.UPDATE:
handlePropertyChangeEvents(_arg1.items);
break;
default:
dispatchEvent(_arg1);
};
};
}
}
}//package mx.collections
import flash.events.*;
import mx.events.*;
import mx.resources.*;
import mx.collections.errors.*;
class ListCollectionViewBookmark extends CursorBookmark {
mx_internal var viewRevision:int;
mx_internal var index:int;
mx_internal var view:ListCollectionView;
private function ListCollectionViewBookmark(_arg1:Object, _arg2:ListCollectionView, _arg3:int, _arg4:int){
super(_arg1);
this.view = _arg2;
this.viewRevision = _arg3;
this.index = _arg4;
}
override public function getViewIndex():int{
return (view.getBookmarkIndex(this));
}
}
class ListCollectionViewCursor extends EventDispatcher implements IViewCursor {
private var _view:ListCollectionView;
private var invalid:Boolean;
private var resourceManager:IResourceManager;
private var currentIndex:int;
private var currentValue:Object;
private static const BEFORE_FIRST_INDEX:int = -1;
private static const AFTER_LAST_INDEX:int = -2;
private function ListCollectionViewCursor(_arg1:ListCollectionView){
var view = _arg1;
resourceManager = ResourceManager.getInstance();
super();
_view = view;
_view.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionEventHandler, false, 0, true);
currentIndex = ((view.length > 0)) ? 0 : AFTER_LAST_INDEX;
if (currentIndex == 0){
try {
setCurrent(view.getItemAt(0), false);
} catch(e:ItemPendingError) {
currentIndex = BEFORE_FIRST_INDEX;
setCurrent(null, false);
};
};
}
public function findAny(_arg1:Object):Boolean{
var index:int;
var values = _arg1;
checkValid();
var lcView:ListCollectionView = ListCollectionView(view);
try {
index = lcView.findItem(values, Sort.ANY_INDEX_MODE);
} catch(e:SortError) {
throw (new CursorError(e.message));
};
if (index > -1){
currentIndex = index;
setCurrent(lcView.getItemAt(currentIndex));
};
return ((index > -1));
}
public function remove():Object{
var oldIndex:int;
var message:String;
if (((beforeFirst) || (afterLast))){
message = resourceManager.getString("collections", "invalidRemove");
throw (new CursorError(message));
};
oldIndex = currentIndex;
currentIndex++;
if (currentIndex >= view.length){
currentIndex = AFTER_LAST_INDEX;
setCurrent(null);
} else {
try {
setCurrent(ListCollectionView(view).getItemAt(currentIndex));
} catch(e:ItemPendingError) {
setCurrent(null, false);
ListCollectionView(view).removeItemAt(oldIndex);
throw (e);
};
};
var removed:Object = ListCollectionView(view).removeItemAt(oldIndex);
return (removed);
}
private function setCurrent(_arg1:Object, _arg2:Boolean=true):void{
currentValue = _arg1;
if (_arg2){
dispatchEvent(new FlexEvent(FlexEvent.CURSOR_UPDATE));
};
}
public function seek(_arg1:CursorBookmark, _arg2:int=0, _arg3:int=0):void{
var message:String;
var bookmark = _arg1;
var offset = _arg2;
var prefetch = _arg3;
checkValid();
if (view.length == 0){
currentIndex = AFTER_LAST_INDEX;
setCurrent(null, false);
return;
};
var newIndex:int = currentIndex;
if (bookmark == CursorBookmark.FIRST){
newIndex = 0;
} else {
if (bookmark == CursorBookmark.LAST){
newIndex = (view.length - 1);
} else {
if (bookmark != CursorBookmark.CURRENT){
try {
newIndex = ListCollectionView(view).getBookmarkIndex(bookmark);
if (newIndex < 0){
setCurrent(null);
message = resourceManager.getString("collections", "bookmarkInvalid");
throw (new CursorError(message));
};
} catch(bmError:CollectionViewError) {
message = resourceManager.getString("collections", "bookmarkInvalid");
throw (new CursorError(message));
};
};
};
};
newIndex = (newIndex + offset);
var newCurrent:Object;
if (newIndex >= view.length){
currentIndex = AFTER_LAST_INDEX;
} else {
if (newIndex < 0){
currentIndex = BEFORE_FIRST_INDEX;
} else {
newCurrent = ListCollectionView(view).getItemAt(newIndex, prefetch);
currentIndex = newIndex;
};
};
setCurrent(newCurrent);
}
public function insert(_arg1:Object):void{
var _local2:int;
var _local3:String;
if (afterLast){
_local2 = view.length;
} else {
if (beforeFirst){
if (view.length > 0){
_local3 = resourceManager.getString("collections", "invalidInsert");
throw (new CursorError(_local3));
};
_local2 = 0;
} else {
_local2 = currentIndex;
};
};
ListCollectionView(view).addItemAt(_arg1, _local2);
}
public function get afterLast():Boolean{
checkValid();
return ((((currentIndex == AFTER_LAST_INDEX)) || ((view.length == 0))));
}
private function checkValid():void{
var _local1:String;
if (invalid){
_local1 = resourceManager.getString("collections", "invalidCursor");
throw (new CursorError(_local1));
};
}
private function collectionEventHandler(_arg1:CollectionEvent):void{
var event = _arg1;
switch (event.kind){
case CollectionEventKind.ADD:
if (event.location <= currentIndex){
currentIndex = (currentIndex + event.items.length);
};
break;
case CollectionEventKind.REMOVE:
if (event.location < currentIndex){
currentIndex = (currentIndex - event.items.length);
} else {
if (event.location == currentIndex){
if (currentIndex < view.length){
try {
setCurrent(ListCollectionView(view).getItemAt(currentIndex));
} catch(error:ItemPendingError) {
setCurrent(null, false);
};
} else {
currentIndex = AFTER_LAST_INDEX;
setCurrent(null);
};
};
};
break;
case CollectionEventKind.MOVE:
if (event.oldLocation == currentIndex){
currentIndex = event.location;
} else {
if (event.oldLocation < currentIndex){
currentIndex = (currentIndex - event.items.length);
};
if (event.location <= currentIndex){
currentIndex = (currentIndex + event.items.length);
};
};
break;
case CollectionEventKind.REFRESH:
if (!((beforeFirst) || (afterLast))){
currentIndex = ListCollectionView(view).getItemIndex(currentValue);
if (currentIndex == -1){
setCurrent(null);
};
};
break;
case CollectionEventKind.REPLACE:
if (event.location == currentIndex){
try {
setCurrent(ListCollectionView(view).getItemAt(currentIndex));
} catch(error:ItemPendingError) {
setCurrent(null, false);
};
};
break;
case CollectionEventKind.RESET:
currentIndex = BEFORE_FIRST_INDEX;
setCurrent(null);
break;
};
}
public function moveNext():Boolean{
if (afterLast){
return (false);
};
var _local1:int = (beforeFirst) ? 0 : (currentIndex + 1);
if (_local1 >= view.length){
_local1 = AFTER_LAST_INDEX;
setCurrent(null);
} else {
setCurrent(ListCollectionView(view).getItemAt(_local1));
};
currentIndex = _local1;
return (!(afterLast));
}
public function get view():ICollectionView{
checkValid();
return (_view);
}
public function movePrevious():Boolean{
if (beforeFirst){
return (false);
};
var _local1:int = (afterLast) ? (view.length - 1) : (currentIndex - 1);
if (_local1 == -1){
_local1 = BEFORE_FIRST_INDEX;
setCurrent(null);
} else {
setCurrent(ListCollectionView(view).getItemAt(_local1));
};
currentIndex = _local1;
return (!(beforeFirst));
}
public function findLast(_arg1:Object):Boolean{
var index:int;
var values = _arg1;
checkValid();
var lcView:ListCollectionView = ListCollectionView(view);
try {
index = lcView.findItem(values, Sort.LAST_INDEX_MODE);
} catch(sortError:SortError) {
throw (new CursorError(sortError.message));
};
if (index > -1){
currentIndex = index;
setCurrent(lcView.getItemAt(currentIndex));
};
return ((index > -1));
}
public function get beforeFirst():Boolean{
checkValid();
return ((((currentIndex == BEFORE_FIRST_INDEX)) || ((view.length == 0))));
}
public function get bookmark():CursorBookmark{
checkValid();
if ((((view.length == 0)) || (beforeFirst))){
return (CursorBookmark.FIRST);
};
if (afterLast){
return (CursorBookmark.LAST);
};
return (ListCollectionView(view).getBookmark(currentIndex));
}
public function findFirst(_arg1:Object):Boolean{
var index:int;
var values = _arg1;
checkValid();
var lcView:ListCollectionView = ListCollectionView(view);
try {
index = lcView.findItem(values, Sort.FIRST_INDEX_MODE);
} catch(sortError:SortError) {
throw (new CursorError(sortError.message));
};
if (index > -1){
currentIndex = index;
setCurrent(lcView.getItemAt(currentIndex));
};
return ((index > -1));
}
public function get current():Object{
checkValid();
return (currentValue);
}
}
Section 215
//Sort (mx.collections.Sort)
package mx.collections {
import flash.events.*;
import mx.resources.*;
import mx.utils.*;
import mx.collections.errors.*;
public class Sort extends EventDispatcher {
private var noFieldsDescending:Boolean;// = false
private var usingCustomCompareFunction:Boolean;
private var defaultEmptyField:SortField;
private var _fields:Array;
private var _compareFunction:Function;
private var _unique:Boolean;
private var fieldList:Array;
private var resourceManager:IResourceManager;
public static const ANY_INDEX_MODE:String = "any";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const LAST_INDEX_MODE:String = "last";
public static const FIRST_INDEX_MODE:String = "first";
public function Sort(){
resourceManager = ResourceManager.getInstance();
fieldList = [];
super();
}
public function get unique():Boolean{
return (_unique);
}
public function get compareFunction():Function{
return ((usingCustomCompareFunction) ? _compareFunction : internalCompare);
}
public function set unique(_arg1:Boolean):void{
_unique = _arg1;
}
public function sort(_arg1:Array):void{
var fixedCompareFunction:Function;
var message:String;
var uniqueRet1:Object;
var fields:Array;
var i:int;
var sortArgs:Object;
var uniqueRet2:Object;
var items = _arg1;
if (((!(items)) || ((items.length <= 1)))){
return;
};
if (usingCustomCompareFunction){
fixedCompareFunction = function (_arg1:Object, _arg2:Object):int{
return (compareFunction(_arg1, _arg2, _fields));
};
if (unique){
uniqueRet1 = items.sort(fixedCompareFunction, Array.UNIQUESORT);
if (uniqueRet1 == 0){
message = resourceManager.getString("collections", "nonUnique");
throw (new SortError(message));
};
} else {
items.sort(fixedCompareFunction);
};
} else {
fields = this.fields;
if (((fields) && ((fields.length > 0)))){
sortArgs = initSortFields(items[0], true);
if (unique){
if (((sortArgs) && ((fields.length == 1)))){
uniqueRet2 = items.sortOn(sortArgs.fields[0], (sortArgs.options[0] | Array.UNIQUESORT));
} else {
uniqueRet2 = items.sort(internalCompare, Array.UNIQUESORT);
};
if (uniqueRet2 == 0){
message = resourceManager.getString("collections", "nonUnique");
throw (new SortError(message));
};
} else {
if (sortArgs){
items.sortOn(sortArgs.fields, sortArgs.options);
} else {
items.sort(internalCompare);
};
};
} else {
items.sort(internalCompare);
};
};
}
public function propertyAffectsSort(_arg1:String):Boolean{
var _local3:SortField;
if (((usingCustomCompareFunction) || (!(fields)))){
return (true);
};
var _local2:int;
while (_local2 < fields.length) {
_local3 = fields[_local2];
if ((((_local3.name == _arg1)) || (_local3.usingCustomCompareFunction))){
return (true);
};
_local2++;
};
return (false);
}
private function internalCompare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{
var _local5:int;
var _local6:int;
var _local7:SortField;
var _local4:int;
if (!_fields){
_local4 = noFieldsCompare(_arg1, _arg2);
} else {
_local5 = 0;
_local6 = (_arg3) ? _arg3.length : _fields.length;
while ((((_local4 == 0)) && ((_local5 < _local6)))) {
_local7 = SortField(_fields[_local5]);
_local4 = _local7.internalCompare(_arg1, _arg2);
_local5++;
};
};
return (_local4);
}
public function reverse():void{
var _local1:int;
if (fields){
_local1 = 0;
while (_local1 < fields.length) {
SortField(fields[_local1]).reverse();
_local1++;
};
};
noFieldsDescending = !(noFieldsDescending);
}
private function noFieldsCompare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{
var message:String;
var a = _arg1;
var b = _arg2;
var fields = _arg3;
if (!defaultEmptyField){
defaultEmptyField = new SortField();
try {
defaultEmptyField.initCompare(a);
} catch(e:SortError) {
message = resourceManager.getString("collections", "noComparator", [a]);
throw (new SortError(message));
};
};
var result:int = defaultEmptyField.compareFunction(a, b);
if (noFieldsDescending){
result = (result * -1);
};
return (result);
}
public function findItem(_arg1:Array, _arg2:Object, _arg3:String, _arg4:Boolean=false, _arg5:Function=null):int{
var compareForFind:Function;
var fieldsForCompare:Array;
var message:String;
var index:int;
var fieldName:String;
var hadPreviousFieldName:Boolean;
var i:int;
var hasFieldName:Boolean;
var objIndex:int;
var match:Boolean;
var prevCompare:int;
var nextCompare:int;
var items = _arg1;
var values = _arg2;
var mode = _arg3;
var returnInsertionIndex = _arg4;
var compareFunction = _arg5;
if (!items){
message = resourceManager.getString("collections", "noItems");
throw (new SortError(message));
};
if (items.length == 0){
return ((returnInsertionIndex) ? 1 : -1);
};
if (compareFunction == null){
compareForFind = this.compareFunction;
if (((values) && ((fieldList.length > 0)))){
fieldsForCompare = [];
hadPreviousFieldName = true;
i = 0;
while (i < fieldList.length) {
fieldName = fieldList[i];
if (fieldName){
try {
hasFieldName = !((values[fieldName] === undefined));
} catch(e:Error) {
hasFieldName = false;
};
if (hasFieldName){
if (!hadPreviousFieldName){
message = resourceManager.getString("collections", "findCondition", [fieldName]);
throw (new SortError(message));
};
fieldsForCompare.push(fieldName);
} else {
hadPreviousFieldName = false;
};
} else {
fieldsForCompare.push(null);
};
i = (i + 1);
};
if (fieldsForCompare.length == 0){
message = resourceManager.getString("collections", "findRestriction");
throw (new SortError(message));
};
try {
initSortFields(items[0]);
} catch(initSortError:SortError) {
};
};
} else {
compareForFind = compareFunction;
};
var found:Boolean;
var objFound:Boolean;
index = 0;
var lowerBound:int;
var upperBound:int = (items.length - 1);
var obj:Object;
var direction = 1;
while (((!(objFound)) && ((lowerBound <= upperBound)))) {
index = Math.round(((lowerBound + upperBound) / 2));
obj = items[index];
direction = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj);
switch (direction){
case -1:
upperBound = (index - 1);
break;
case 0:
objFound = true;
switch (mode){
case ANY_INDEX_MODE:
found = true;
break;
case FIRST_INDEX_MODE:
found = (index == lowerBound);
objIndex = (index - 1);
match = true;
while (((((match) && (!(found)))) && ((objIndex >= lowerBound)))) {
obj = items[objIndex];
prevCompare = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj);
match = (prevCompare == 0);
if (((!(match)) || (((match) && ((objIndex == lowerBound)))))){
found = true;
index = (objIndex + (match) ? 0 : 1);
};
objIndex = (objIndex - 1);
};
break;
case LAST_INDEX_MODE:
found = (index == upperBound);
objIndex = (index + 1);
match = true;
while (((((match) && (!(found)))) && ((objIndex <= upperBound)))) {
obj = items[objIndex];
nextCompare = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj);
match = (nextCompare == 0);
if (((!(match)) || (((match) && ((objIndex == upperBound)))))){
found = true;
index = (objIndex - (match) ? 0 : 1);
};
objIndex = (objIndex + 1);
};
break;
default:
message = resourceManager.getString("collections", "unknownMode");
throw (new SortError(message));
};
break;
case 1:
lowerBound = (index + 1);
break;
};
};
if (((!(found)) && (!(returnInsertionIndex)))){
return (-1);
};
return (((direction)>0) ? (index + 1) : index);
}
private function initSortFields(_arg1:Object, _arg2:Boolean=false):Object{
var _local4:int;
var _local5:SortField;
var _local6:int;
var _local3:Object;
_local4 = 0;
while (_local4 < fields.length) {
SortField(fields[_local4]).initCompare(_arg1);
_local4++;
};
if (_arg2){
_local3 = {fields:[], options:[]};
_local4 = 0;
while (_local4 < fields.length) {
_local5 = fields[_local4];
_local6 = _local5.getArraySortOnOptions();
if (_local6 == -1){
return (null);
};
_local3.fields.push(_local5.name);
_local3.options.push(_local6);
_local4++;
};
};
return (_local3);
}
public function set fields(_arg1:Array):void{
var _local2:SortField;
var _local3:int;
_fields = _arg1;
fieldList = [];
if (_fields){
_local3 = 0;
while (_local3 < _fields.length) {
_local2 = SortField(_fields[_local3]);
fieldList.push(_local2.name);
_local3++;
};
};
dispatchEvent(new Event("fieldsChanged"));
}
public function get fields():Array{
return (_fields);
}
public function set compareFunction(_arg1:Function):void{
_compareFunction = _arg1;
usingCustomCompareFunction = !((_compareFunction == null));
}
override public function toString():String{
return (ObjectUtil.toString(this));
}
}
}//package mx.collections
Section 216
//SortField (mx.collections.SortField)
package mx.collections {
import flash.events.*;
import mx.resources.*;
import mx.utils.*;
import mx.collections.errors.*;
public class SortField extends EventDispatcher {
private var _caseInsensitive:Boolean;
private var _numeric:Object;
private var _descending:Boolean;
private var _compareFunction:Function;
private var _usingCustomCompareFunction:Boolean;
private var _name:String;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function SortField(_arg1:String=null, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
resourceManager = ResourceManager.getInstance();
super();
_name = _arg1;
_caseInsensitive = _arg2;
_descending = _arg3;
_numeric = _arg4;
_compareFunction = stringCompare;
}
public function get caseInsensitive():Boolean{
return (_caseInsensitive);
}
mx_internal function get usingCustomCompareFunction():Boolean{
return (_usingCustomCompareFunction);
}
public function set caseInsensitive(_arg1:Boolean):void{
if (_arg1 != _caseInsensitive){
_caseInsensitive = _arg1;
dispatchEvent(new Event("caseInsensitiveChanged"));
};
}
public function get name():String{
return (_name);
}
public function get numeric():Object{
return (_numeric);
}
public function set name(_arg1:String):void{
_name = _arg1;
dispatchEvent(new Event("nameChanged"));
}
private function numericCompare(_arg1:Object, _arg2:Object):int{
var fa:Number;
var fb:Number;
var a = _arg1;
var b = _arg2;
try {
fa = ((_name == null)) ? Number(a) : Number(a[_name]);
} catch(error:Error) {
};
try {
fb = ((_name == null)) ? Number(b) : Number(b[_name]);
} catch(error:Error) {
};
return (ObjectUtil.numericCompare(fa, fb));
}
public function set numeric(_arg1:Object):void{
if (_numeric != _arg1){
_numeric = _arg1;
dispatchEvent(new Event("numericChanged"));
};
}
private function stringCompare(_arg1:Object, _arg2:Object):int{
var fa:String;
var fb:String;
var a = _arg1;
var b = _arg2;
try {
fa = ((_name == null)) ? String(a) : String(a[_name]);
} catch(error:Error) {
};
try {
fb = ((_name == null)) ? String(b) : String(b[_name]);
} catch(error:Error) {
};
return (ObjectUtil.stringCompare(fa, fb, _caseInsensitive));
}
public function get compareFunction():Function{
return (_compareFunction);
}
public function reverse():void{
descending = !(descending);
}
mx_internal function getArraySortOnOptions():int{
if (((((((usingCustomCompareFunction) || ((name == null)))) || ((_compareFunction == xmlCompare)))) || ((_compareFunction == dateCompare)))){
return (-1);
};
var _local1:int;
if (caseInsensitive){
_local1 = (_local1 | Array.CASEINSENSITIVE);
};
if (descending){
_local1 = (_local1 | Array.DESCENDING);
};
if ((((numeric == true)) || ((_compareFunction == numericCompare)))){
_local1 = (_local1 | Array.NUMERIC);
};
return (_local1);
}
private function dateCompare(_arg1:Object, _arg2:Object):int{
var fa:Date;
var fb:Date;
var a = _arg1;
var b = _arg2;
try {
fa = ((_name == null)) ? (a as Date) : (a[_name] as Date);
} catch(error:Error) {
};
try {
fb = ((_name == null)) ? (b as Date) : (b[_name] as Date);
} catch(error:Error) {
};
return (ObjectUtil.dateCompare(fa, fb));
}
mx_internal function internalCompare(_arg1:Object, _arg2:Object):int{
var _local3:int = compareFunction(_arg1, _arg2);
if (descending){
_local3 = (_local3 * -1);
};
return (_local3);
}
override public function toString():String{
return (ObjectUtil.toString(this));
}
private function nullCompare(_arg1:Object, _arg2:Object):int{
var value:Object;
var left:Object;
var right:Object;
var message:String;
var a = _arg1;
var b = _arg2;
var found:Boolean;
if ((((a == null)) && ((b == null)))){
return (0);
};
if (_name){
try {
left = a[_name];
} catch(error:Error) {
};
try {
right = b[_name];
} catch(error:Error) {
};
};
if ((((left == null)) && ((right == null)))){
return (0);
};
if (left == null){
left = a;
};
if (right == null){
right = b;
};
var typeLeft = typeof(left);
var typeRight = typeof(right);
if ((((typeLeft == "string")) || ((typeRight == "string")))){
found = true;
_compareFunction = stringCompare;
} else {
if ((((typeLeft == "object")) || ((typeRight == "object")))){
if ((((left is Date)) || ((right is Date)))){
found = true;
_compareFunction = dateCompare;
};
} else {
if ((((typeLeft == "xml")) || ((typeRight == "xml")))){
found = true;
_compareFunction = xmlCompare;
} else {
if ((((((((typeLeft == "number")) || ((typeRight == "number")))) || ((typeLeft == "boolean")))) || ((typeRight == "boolean")))){
found = true;
_compareFunction = numericCompare;
};
};
};
};
if (found){
return (_compareFunction(left, right));
};
message = resourceManager.getString("collections", "noComparatorSortField", [name]);
throw (new SortError(message));
}
public function set descending(_arg1:Boolean):void{
if (_descending != _arg1){
_descending = _arg1;
dispatchEvent(new Event("descendingChanged"));
};
}
mx_internal function initCompare(_arg1:Object):void{
var value:Object;
var typ:String;
var test:String;
var obj = _arg1;
if (!usingCustomCompareFunction){
if (numeric == true){
_compareFunction = numericCompare;
} else {
if (((caseInsensitive) || ((numeric == false)))){
_compareFunction = stringCompare;
} else {
if (_name){
try {
value = obj[_name];
} catch(error:Error) {
};
};
if (value == null){
value = obj;
};
typ = typeof(value);
switch (typ){
case "string":
_compareFunction = stringCompare;
break;
case "object":
if ((value is Date)){
_compareFunction = dateCompare;
} else {
_compareFunction = stringCompare;
try {
test = value.toString();
} catch(error2:Error) {
};
if (((!(test)) || ((test == "[object Object]")))){
_compareFunction = nullCompare;
};
};
break;
case "xml":
_compareFunction = xmlCompare;
break;
case "boolean":
case "number":
_compareFunction = numericCompare;
break;
};
};
};
};
}
public function get descending():Boolean{
return (_descending);
}
public function set compareFunction(_arg1:Function):void{
_compareFunction = _arg1;
_usingCustomCompareFunction = !((_arg1 == null));
}
private function xmlCompare(_arg1:Object, _arg2:Object):int{
var sa:String;
var sb:String;
var a = _arg1;
var b = _arg2;
try {
sa = ((_name == null)) ? a.toString() : a[_name].toString();
} catch(error:Error) {
};
try {
sb = ((_name == null)) ? b.toString() : b[_name].toString();
} catch(error:Error) {
};
if (numeric == true){
return (ObjectUtil.numericCompare(parseFloat(sa), parseFloat(sb)));
};
return (ObjectUtil.stringCompare(sa, sb, _caseInsensitive));
}
}
}//package mx.collections
Section 217
//ConstraintError (mx.containers.errors.ConstraintError)
package mx.containers.errors {
public class ConstraintError extends Error {
mx_internal static const VERSION:String = "3.2.0.3958";
public function ConstraintError(_arg1:String){
super(_arg1);
}
}
}//package mx.containers.errors
Section 218
//ApplicationLayout (mx.containers.utilityClasses.ApplicationLayout)
package mx.containers.utilityClasses {
import mx.core.*;
public class ApplicationLayout extends BoxLayout {
mx_internal static const VERSION:String = "3.2.0.3958";
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:IFlexDisplayObject;
super.updateDisplayList(_arg1, _arg2);
var _local3:Container = super.target;
if (((((_local3.horizontalScrollBar) && ((getHorizontalAlignValue() > 0)))) || (((_local3.verticalScrollBar) && ((getVerticalAlignValue() > 0)))))){
_local4 = _local3.getStyle("paddingLeft");
_local5 = _local3.getStyle("paddingTop");
_local6 = 0;
_local7 = 0;
_local8 = _local3.numChildren;
_local9 = 0;
while (_local9 < _local8) {
_local10 = IFlexDisplayObject(_local3.getChildAt(_local9));
if (_local10.x < _local4){
_local6 = Math.max(_local6, (_local4 - _local10.x));
};
if (_local10.y < _local5){
_local7 = Math.max(_local7, (_local5 - _local10.y));
};
_local9++;
};
if (((!((_local6 == 0))) || (!((_local7 == 0))))){
_local9 = 0;
while (_local9 < _local8) {
_local10 = IFlexDisplayObject(_local3.getChildAt(_local9));
IFlexDisplayObject(_local3.getChildAt(_local9)).move((_local10.x + _local6), (_local10.y + _local7));
_local9++;
};
};
};
}
}
}//package mx.containers.utilityClasses
Section 219
//BoxLayout (mx.containers.utilityClasses.BoxLayout)
package mx.containers.utilityClasses {
import mx.core.*;
import mx.controls.scrollClasses.*;
import mx.containers.*;
public class BoxLayout extends Layout {
public var direction:String;// = "vertical"
mx_internal static const VERSION:String = "3.2.0.3958";
private function isVertical():Boolean{
return (!((direction == BoxDirection.HORIZONTAL)));
}
mx_internal function getHorizontalAlignValue():Number{
var _local1:String = target.getStyle("horizontalAlign");
if (_local1 == "center"){
return (0.5);
};
if (_local1 == "right"){
return (1);
};
return (0);
}
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:int;
var _local22:IUIComponent;
var _local23:IUIComponent;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local3:Container = super.target;
var _local4:int = _local3.numChildren;
if (_local4 == 0){
return;
};
var _local5:EdgeMetrics = _local3.viewMetricsAndPadding;
var _local6:Number = _local3.getStyle("paddingLeft");
var _local7:Number = _local3.getStyle("paddingTop");
var _local8:Number = getHorizontalAlignValue();
var _local9:Number = getVerticalAlignValue();
var _local10:Number = ((((_local3.scaleX > 0)) && (!((_local3.scaleX == 1))))) ? (_local3.minWidth / Math.abs(_local3.scaleX)) : _local3.minWidth;
var _local11:Number = ((((_local3.scaleY > 0)) && (!((_local3.scaleY == 1))))) ? (_local3.minHeight / Math.abs(_local3.scaleY)) : _local3.minHeight;
var _local12:Number = ((Math.max(_arg1, _local10) - _local5.right) - _local5.left);
var _local13:Number = ((Math.max(_arg2, _local11) - _local5.bottom) - _local5.top);
var _local14:ScrollBar = _local3.horizontalScrollBar;
var _local15:ScrollBar = _local3.verticalScrollBar;
if (_local4 == 1){
_local23 = IUIComponent(_local3.getChildAt(0));
_local24 = _local23.percentWidth;
_local25 = _local23.percentHeight;
if (_local24){
_local26 = Math.max(_local23.minWidth, Math.min(_local23.maxWidth, ((_local24)>=100) ? _local12 : ((_local12 * _local24) / 100)));
} else {
_local26 = _local23.getExplicitOrMeasuredWidth();
};
if (_local25){
_local27 = Math.max(_local23.minHeight, Math.min(_local23.maxHeight, ((_local25)>=100) ? _local13 : ((_local13 * _local25) / 100)));
} else {
_local27 = _local23.getExplicitOrMeasuredHeight();
};
if ((((_local23.scaleX == 1)) && ((_local23.scaleY == 1)))){
_local23.setActualSize(Math.floor(_local26), Math.floor(_local27));
} else {
_local23.setActualSize(_local26, _local27);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local12 = (_local12 + _local15.minWidth);
};
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local13 = (_local13 + _local14.minHeight);
};
_local20 = (((_local12 - _local23.width) * _local8) + _local6);
_local19 = (((_local13 - _local23.height) * _local9) + _local7);
_local23.move(Math.floor(_local20), Math.floor(_local19));
} else {
if (isVertical()){
_local16 = _local3.getStyle("verticalGap");
_local17 = _local4;
_local21 = 0;
while (_local21 < _local4) {
if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){
_local17--;
};
_local21++;
};
_local18 = Flex.flexChildHeightsProportionally(_local3, (_local13 - ((_local17 - 1) * _local16)), _local12);
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local18 = (_local18 + _local14.minHeight);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local12 = (_local12 + _local15.minWidth);
};
_local19 = (_local7 + (_local18 * _local9));
_local21 = 0;
while (_local21 < _local4) {
_local22 = IUIComponent(_local3.getChildAt(_local21));
_local20 = (((_local12 - _local22.width) * _local8) + _local6);
_local22.move(Math.floor(_local20), Math.floor(_local19));
if (_local22.includeInLayout){
_local19 = (_local19 + (_local22.height + _local16));
};
_local21++;
};
} else {
_local16 = _local3.getStyle("horizontalGap");
_local17 = _local4;
_local21 = 0;
while (_local21 < _local4) {
if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){
_local17--;
};
_local21++;
};
_local18 = Flex.flexChildWidthsProportionally(_local3, (_local12 - ((_local17 - 1) * _local16)), _local13);
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local13 = (_local13 + _local14.minHeight);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local18 = (_local18 + _local15.minWidth);
};
_local20 = (_local6 + (_local18 * _local8));
_local21 = 0;
while (_local21 < _local4) {
_local22 = IUIComponent(_local3.getChildAt(_local21));
_local19 = (((_local13 - _local22.height) * _local9) + _local7);
_local22.move(Math.floor(_local20), Math.floor(_local19));
if (_local22.includeInLayout){
_local20 = (_local20 + (_local22.width + _local16));
};
_local21++;
};
};
};
}
mx_internal function getVerticalAlignValue():Number{
var _local1:String = target.getStyle("verticalAlign");
if (_local1 == "middle"){
return (0.5);
};
if (_local1 == "bottom"){
return (1);
};
return (0);
}
mx_internal function heightPadding(_arg1:Number):Number{
var _local2:EdgeMetrics = target.viewMetricsAndPadding;
var _local3:Number = (_local2.top + _local2.bottom);
if ((((_arg1 > 1)) && (isVertical()))){
_local3 = (_local3 + (target.getStyle("verticalGap") * (_arg1 - 1)));
};
return (_local3);
}
mx_internal function widthPadding(_arg1:Number):Number{
var _local2:EdgeMetrics = target.viewMetricsAndPadding;
var _local3:Number = (_local2.left + _local2.right);
if ((((_arg1 > 1)) && ((isVertical() == false)))){
_local3 = (_local3 + (target.getStyle("horizontalGap") * (_arg1 - 1)));
};
return (_local3);
}
override public function measure():void{
var _local1:Container;
var _local10:Number;
var _local11:Number;
var _local12:IUIComponent;
var _local13:Number;
var _local14:Number;
_local1 = super.target;
var _local2:Boolean = isVertical();
var _local3:Number = 0;
var _local4:Number = 0;
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:int = _local1.numChildren;
var _local8:int = _local7;
var _local9:int;
while (_local9 < _local7) {
_local12 = IUIComponent(_local1.getChildAt(_local9));
if (!_local12.includeInLayout){
_local8--;
} else {
_local13 = _local12.getExplicitOrMeasuredWidth();
_local14 = _local12.getExplicitOrMeasuredHeight();
if (_local2){
_local3 = Math.max((isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth, _local3);
_local5 = Math.max(_local13, _local5);
_local4 = (_local4 + (isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight);
_local6 = (_local6 + _local14);
} else {
_local3 = (_local3 + (isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth);
_local5 = (_local5 + _local13);
_local4 = Math.max((isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight, _local4);
_local6 = Math.max(_local14, _local6);
};
};
_local9++;
};
_local10 = widthPadding(_local8);
_local11 = heightPadding(_local8);
_local1.measuredMinWidth = (_local3 + _local10);
_local1.measuredMinHeight = (_local4 + _local11);
_local1.measuredWidth = (_local5 + _local10);
_local1.measuredHeight = (_local6 + _local11);
}
}
}//package mx.containers.utilityClasses
Section 220
//CanvasLayout (mx.containers.utilityClasses.CanvasLayout)
package mx.containers.utilityClasses {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
import mx.containers.errors.*;
public class CanvasLayout extends Layout {
private var colSpanChildren:Array;
private var constraintRegionsInUse:Boolean;// = false
private var rowSpanChildren:Array;
private var constraintCache:Dictionary;
private var _contentArea:Rectangle;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var r:Rectangle = new Rectangle();
public function CanvasLayout(){
colSpanChildren = [];
rowSpanChildren = [];
constraintCache = new Dictionary(true);
super();
}
private function parseConstraints(_arg1:IUIComponent=null):ChildConstraintInfo{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:String;
var _local11:String;
var _local12:String;
var _local13:String;
var _local14:String;
var _local15:String;
var _local16:String;
var _local17:Array;
var _local18:int;
var _local30:ConstraintColumn;
var _local31:Boolean;
var _local32:ConstraintRow;
var _local2:LayoutConstraints = getLayoutConstraints(_arg1);
if (!_local2){
return (null);
};
while (true) {
_local17 = parseConstraintExp(_local2.left);
if (!_local17){
_local3 = NaN;
} else {
if (_local17.length == 1){
_local3 = Number(_local17[0]);
} else {
_local10 = _local17[0];
_local3 = _local17[1];
};
};
_local17 = parseConstraintExp(_local2.right);
if (!_local17){
_local4 = NaN;
} else {
if (_local17.length == 1){
_local4 = Number(_local17[0]);
} else {
_local11 = _local17[0];
_local4 = _local17[1];
};
};
_local17 = parseConstraintExp(_local2.horizontalCenter);
if (!_local17){
_local5 = NaN;
} else {
if (_local17.length == 1){
_local5 = Number(_local17[0]);
} else {
_local12 = _local17[0];
_local5 = _local17[1];
};
};
_local17 = parseConstraintExp(_local2.top);
if (!_local17){
_local6 = NaN;
} else {
if (_local17.length == 1){
_local6 = Number(_local17[0]);
} else {
_local13 = _local17[0];
_local6 = _local17[1];
};
};
_local17 = parseConstraintExp(_local2.bottom);
if (!_local17){
_local7 = NaN;
} else {
if (_local17.length == 1){
_local7 = Number(_local17[0]);
} else {
_local14 = _local17[0];
_local7 = _local17[1];
};
};
_local17 = parseConstraintExp(_local2.verticalCenter);
if (!_local17){
_local8 = NaN;
} else {
if (_local17.length == 1){
_local8 = Number(_local17[0]);
} else {
_local15 = _local17[0];
_local8 = _local17[1];
};
};
_local17 = parseConstraintExp(_local2.baseline);
if (!_local17){
_local9 = NaN;
} else {
if (_local17.length == 1){
_local9 = Number(_local17[0]);
} else {
_local16 = _local17[0];
_local9 = _local17[1];
};
};
break;
};
var _local19:ContentColumnChild = new ContentColumnChild();
var _local20:Boolean;
var _local21:Number = 0;
var _local22:Number = 0;
var _local23:Number = 0;
_local18 = 0;
while (_local18 < IConstraintLayout(target).constraintColumns.length) {
_local30 = IConstraintLayout(target).constraintColumns[_local18];
if (_local30.mx_internal::contentSize){
if (_local30.id == _local10){
_local19.leftCol = _local30;
_local19.leftOffset = _local3;
_local21 = _local18;
_local19.left = _local21;
_local20 = true;
};
if (_local30.id == _local11){
_local19.rightCol = _local30;
_local19.rightOffset = _local4;
_local22 = (_local18 + 1);
_local19.right = _local22;
_local20 = true;
};
if (_local30.id == _local12){
_local19.hcCol = _local30;
_local19.hcOffset = _local5;
_local23 = (_local18 + 1);
_local19.hc = _local23;
_local20 = true;
};
};
_local18++;
};
if (_local20){
_local19.child = _arg1;
if (((((((_local19.leftCol) && (!(_local19.rightCol)))) || (((_local19.rightCol) && (!(_local19.leftCol)))))) || (_local19.hcCol))){
_local19.span = 1;
} else {
_local19.span = (_local22 - _local21);
};
_local31 = false;
_local18 = 0;
while (_local18 < colSpanChildren.length) {
if (_local19.child == colSpanChildren[_local18].child){
_local31 = true;
break;
};
_local18++;
};
if (!_local31){
colSpanChildren.push(_local19);
};
};
_local20 = false;
var _local24:ContentRowChild = new ContentRowChild();
var _local25:Number = 0;
var _local26:Number = 0;
var _local27:Number = 0;
var _local28:Number = 0;
_local18 = 0;
while (_local18 < IConstraintLayout(target).constraintRows.length) {
_local32 = IConstraintLayout(target).constraintRows[_local18];
if (_local32.mx_internal::contentSize){
if (_local32.id == _local13){
_local24.topRow = _local32;
_local24.topOffset = _local6;
_local25 = _local18;
_local24.top = _local25;
_local20 = true;
};
if (_local32.id == _local14){
_local24.bottomRow = _local32;
_local24.bottomOffset = _local7;
_local26 = (_local18 + 1);
_local24.bottom = _local26;
_local20 = true;
};
if (_local32.id == _local15){
_local24.vcRow = _local32;
_local24.vcOffset = _local8;
_local27 = (_local18 + 1);
_local24.vc = _local27;
_local20 = true;
};
if (_local32.id == _local16){
_local24.baselineRow = _local32;
_local24.baselineOffset = _local9;
_local28 = (_local18 + 1);
_local24.baseline = _local28;
_local20 = true;
};
};
_local18++;
};
if (_local20){
_local24.child = _arg1;
if (((((((((_local24.topRow) && (!(_local24.bottomRow)))) || (((_local24.bottomRow) && (!(_local24.topRow)))))) || (_local24.vcRow))) || (_local24.baselineRow))){
_local24.span = 1;
} else {
_local24.span = (_local26 - _local25);
};
_local31 = false;
_local18 = 0;
while (_local18 < rowSpanChildren.length) {
if (_local24.child == rowSpanChildren[_local18].child){
_local31 = true;
break;
};
_local18++;
};
if (!_local31){
rowSpanChildren.push(_local24);
};
};
var _local29:ChildConstraintInfo = new ChildConstraintInfo(_local3, _local4, _local5, _local6, _local7, _local8, _local9, _local10, _local11, _local12, _local13, _local14, _local15, _local16);
constraintCache[_arg1] = _local29;
return (_local29);
}
private function bound(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (_arg1 < _arg2){
_arg1 = _arg2;
} else {
if (_arg1 > _arg3){
_arg1 = _arg3;
} else {
_arg1 = Math.floor(_arg1);
};
};
return (_arg1);
}
private function shareRowSpace(_arg1:ContentRowChild, _arg2:Number):Number{
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local3:ConstraintRow = _arg1.topRow;
var _local4:ConstraintRow = _arg1.bottomRow;
var _local5:IUIComponent = _arg1.child;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = (_arg1.topOffset) ? _arg1.topOffset : 0;
var _local9:Number = (_arg1.bottomOffset) ? _arg1.bottomOffset : 0;
if (((_local3) && (_local3.height))){
_local6 = (_local6 + _local3.height);
} else {
if (((_local4) && (!(_local3)))){
_local3 = IConstraintLayout(target).constraintRows[(_arg1.bottom - 2)];
if (((_local3) && (_local3.height))){
_local6 = (_local6 + _local3.height);
};
};
};
if (((_local4) && (_local4.height))){
_local7 = (_local7 + _local4.height);
} else {
if (((_local3) && (!(_local4)))){
_local4 = IConstraintLayout(target).constraintRows[(_arg1.top + 1)];
if (((_local4) && (_local4.height))){
_local7 = (_local7 + _local4.height);
};
};
};
if (((_local3) && (isNaN(_local3.height)))){
_local3.setActualHeight(Math.max(0, _local3.maxHeight));
};
if (((_local4) && (isNaN(_local4.height)))){
_local4.setActualHeight(Math.max(0, _local4.height));
};
var _local10:Number = _local5.getExplicitOrMeasuredHeight();
if (_local10){
if (!_arg1.topRow){
if (_local10 > _local6){
_local12 = ((_local10 - _local6) + _local9);
} else {
_local12 = (_local10 + _local9);
};
};
if (!_arg1.bottomRow){
if (_local10 > _local7){
_local11 = ((_local10 - _local7) + _local8);
} else {
_local11 = (_local10 + _local8);
};
};
if (((_arg1.topRow) && (_arg1.bottomRow))){
_local13 = (_local10 / Number(_arg1.span));
if ((_local13 + _local8) < _local6){
_local11 = _local6;
_local12 = ((_local10 - (_local6 - _local8)) + _local9);
} else {
_local11 = (_local13 + _local8);
};
if ((_local13 + _local9) < _local7){
_local12 = _local7;
_local11 = ((_local10 - (_local7 - _local9)) + _local8);
} else {
_local12 = (_local13 + _local9);
};
};
_local12 = bound(_local12, _local4.minHeight, _local4.maxHeight);
_local4.setActualHeight(_local12);
_arg2 = (_arg2 - _local12);
_local11 = bound(_local11, _local3.minHeight, _local3.maxHeight);
_local3.setActualHeight(_local11);
_arg2 = (_arg2 - _local11);
};
return (_arg2);
}
private function parseConstraintExp(_arg1:String):Array{
if (!_arg1){
return (null);
};
var _local2:String = _arg1.replace(/:/g, " ");
var _local3:Array = _local2.split(/\s+/);
return (_local3);
}
private function measureColumnsAndRows():void{
var _local3:int;
var _local4:int;
var _local13:ConstraintColumn;
var _local14:ConstraintRow;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:ContentColumnChild;
var _local20:ContentRowChild;
var _local1:Array = IConstraintLayout(target).constraintColumns;
var _local2:Array = IConstraintLayout(target).constraintRows;
if ((((!(_local2.length) > 0)) && ((!(_local1.length) > 0)))){
constraintRegionsInUse = false;
return;
};
constraintRegionsInUse = true;
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:EdgeMetrics = Container(target).viewMetrics;
var _local8:Number = ((Container(target).width - _local7.left) - _local7.right);
var _local9:Number = ((Container(target).height - _local7.top) - _local7.bottom);
var _local10:Array = [];
var _local11:Array = [];
var _local12:Array = [];
if (_local1.length > 0){
_local3 = 0;
while (_local3 < _local1.length) {
_local13 = _local1[_local3];
if (!isNaN(_local13.percentWidth)){
_local11.push(_local13);
} else {
if (((!(isNaN(_local13.width))) && (!(_local13.mx_internal::contentSize)))){
_local10.push(_local13);
} else {
_local12.push(_local13);
_local13.mx_internal::contentSize = true;
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local10.length) {
_local13 = ConstraintColumn(_local10[_local3]);
_local8 = (_local8 - _local13.width);
_local3++;
};
if (_local12.length > 0){
if (colSpanChildren.length > 0){
colSpanChildren.sortOn("span");
_local4 = 0;
while (_local4 < colSpanChildren.length) {
_local19 = colSpanChildren[_local4];
if (_local19.span == 1){
if (_local19.hcCol){
_local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.hcCol)]);
} else {
if (_local19.leftCol){
_local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.leftCol)]);
} else {
if (_local19.rightCol){
_local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.rightCol)]);
};
};
};
_local16 = _local19.child.getExplicitOrMeasuredWidth();
if (_local19.hcOffset){
_local16 = (_local16 + _local19.hcOffset);
} else {
if (_local19.leftOffset){
_local16 = (_local16 + _local19.leftOffset);
};
if (_local19.rightOffset){
_local16 = (_local16 + _local19.rightOffset);
};
};
if (!isNaN(_local13.width)){
_local16 = Math.max(_local13.width, _local16);
};
_local16 = bound(_local16, _local13.minWidth, _local13.maxWidth);
_local13.setActualWidth(_local16);
_local8 = (_local8 - _local13.width);
} else {
_local8 = shareColumnSpace(_local19, _local8);
};
_local4++;
};
colSpanChildren = [];
};
_local3 = 0;
while (_local3 < _local12.length) {
_local13 = _local12[_local3];
if (!_local13.width){
_local16 = bound(0, _local13.minWidth, 0);
_local13.setActualWidth(_local16);
};
_local3++;
};
};
_local18 = _local8;
_local3 = 0;
while (_local3 < _local11.length) {
_local13 = ConstraintColumn(_local11[_local3]);
if (_local18 <= 0){
_local16 = 0;
} else {
_local16 = Math.round(((_local18 * _local13.percentWidth) / 100));
};
_local16 = bound(_local16, _local13.minWidth, _local13.maxWidth);
_local13.setActualWidth(_local16);
_local8 = (_local8 - _local16);
_local3++;
};
_local3 = 0;
while (_local3 < _local1.length) {
_local13 = ConstraintColumn(_local1[_local3]);
_local13.x = _local5;
_local5 = (_local5 + _local13.width);
_local3++;
};
};
_local10 = [];
_local11 = [];
_local12 = [];
if (_local2.length > 0){
_local3 = 0;
while (_local3 < _local2.length) {
_local14 = _local2[_local3];
if (!isNaN(_local14.percentHeight)){
_local11.push(_local14);
} else {
if (((!(isNaN(_local14.height))) && (!(_local14.mx_internal::contentSize)))){
_local10.push(_local14);
} else {
_local12.push(_local14);
_local14.mx_internal::contentSize = true;
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local10.length) {
_local14 = ConstraintRow(_local10[_local3]);
_local9 = (_local9 - _local14.height);
_local3++;
};
if (_local12.length > 0){
if (rowSpanChildren.length > 0){
rowSpanChildren.sortOn("span");
_local4 = 0;
while (_local4 < rowSpanChildren.length) {
_local20 = rowSpanChildren[_local4];
if (_local20.span == 1){
if (_local20.vcRow){
_local14 = ConstraintRow(_local2[_local2.indexOf(_local20.vcRow)]);
} else {
if (_local20.baselineRow){
_local14 = ConstraintRow(_local2[_local2.indexOf(_local20.baselineRow)]);
} else {
if (_local20.topRow){
_local14 = ConstraintRow(_local2[_local2.indexOf(_local20.topRow)]);
} else {
if (_local20.bottomRow){
_local14 = ConstraintRow(_local2[_local2.indexOf(_local20.bottomRow)]);
};
};
};
};
_local17 = _local20.child.getExplicitOrMeasuredHeight();
if (_local20.baselineOffset){
_local17 = (_local17 + _local20.baselineOffset);
} else {
if (_local20.vcOffset){
_local17 = (_local17 + _local20.vcOffset);
} else {
if (_local20.topOffset){
_local17 = (_local17 + _local20.topOffset);
};
if (_local20.bottomOffset){
_local17 = (_local17 + _local20.bottomOffset);
};
};
};
if (!isNaN(_local14.height)){
_local17 = Math.max(_local14.height, _local17);
};
_local17 = bound(_local17, _local14.minHeight, _local14.maxHeight);
_local14.setActualHeight(_local17);
_local9 = (_local9 - _local14.height);
} else {
_local9 = shareRowSpace(_local20, _local9);
};
_local4++;
};
rowSpanChildren = [];
};
_local3 = 0;
while (_local3 < _local12.length) {
_local14 = ConstraintRow(_local12[_local3]);
if (!_local14.height){
_local17 = bound(0, _local14.minHeight, 0);
_local14.setActualHeight(_local17);
};
_local3++;
};
};
_local18 = _local9;
_local3 = 0;
while (_local3 < _local11.length) {
_local14 = ConstraintRow(_local11[_local3]);
if (_local18 <= 0){
_local17 = 0;
} else {
_local17 = Math.round(((_local18 * _local14.percentHeight) / 100));
};
_local17 = bound(_local17, _local14.minHeight, _local14.maxHeight);
_local14.setActualHeight(_local17);
_local9 = (_local9 - _local17);
_local3++;
};
_local3 = 0;
while (_local3 < _local2.length) {
_local14 = _local2[_local3];
_local14.y = _local6;
_local6 = (_local6 + _local14.height);
_local3++;
};
};
}
private function child_moveHandler(_arg1:MoveEvent):void{
if ((_arg1.target is IUIComponent)){
if (!IUIComponent(_arg1.target).includeInLayout){
return;
};
};
var _local2:Container = super.target;
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
_contentArea = null;
};
}
private function applyAnchorStylesDuringMeasure(_arg1:IUIComponent, _arg2:Rectangle):void{
var _local13:int;
var _local3:IConstraintClient = (_arg1 as IConstraintClient);
if (!_local3){
return;
};
var _local4:ChildConstraintInfo = constraintCache[_local3];
if (!_local4){
_local4 = parseConstraints(_arg1);
};
var _local5:Number = _local4.left;
var _local6:Number = _local4.right;
var _local7:Number = _local4.hc;
var _local8:Number = _local4.top;
var _local9:Number = _local4.bottom;
var _local10:Number = _local4.vc;
var _local11:Array = IConstraintLayout(target).constraintColumns;
var _local12:Array = IConstraintLayout(target).constraintRows;
var _local14:Number = 0;
if (!(_local11.length) > 0){
if (!isNaN(_local7)){
_arg2.x = Math.round((((target.width - _arg1.width) / 2) + _local7));
} else {
if (((!(isNaN(_local5))) && (!(isNaN(_local6))))){
_arg2.x = _local5;
_arg2.width = (_arg2.width + _local6);
} else {
if (!isNaN(_local5)){
_arg2.x = _local5;
} else {
if (!isNaN(_local6)){
_arg2.x = 0;
_arg2.width = (_arg2.width + _local6);
};
};
};
};
} else {
_arg2.x = 0;
_local13 = 0;
while (_local13 < _local11.length) {
_local14 = (_local14 + ConstraintColumn(_local11[_local13]).width);
_local13++;
};
_arg2.width = _local14;
};
if (!(_local12.length) > 0){
if (!isNaN(_local10)){
_arg2.y = Math.round((((target.height - _arg1.height) / 2) + _local10));
} else {
if (((!(isNaN(_local8))) && (!(isNaN(_local9))))){
_arg2.y = _local8;
_arg2.height = (_arg2.height + _local9);
} else {
if (!isNaN(_local8)){
_arg2.y = _local8;
} else {
if (!isNaN(_local9)){
_arg2.y = 0;
_arg2.height = (_arg2.height + _local9);
};
};
};
};
} else {
_local14 = 0;
_arg2.y = 0;
_local13 = 0;
while (_local13 < _local12.length) {
_local14 = (_local14 + ConstraintRow(_local12[_local13]).height);
_local13++;
};
_arg2.height = _local14;
};
}
override public function measure():void{
var _local1:Container;
var _local5:EdgeMetrics;
var _local6:Rectangle;
var _local7:IUIComponent;
var _local8:ConstraintColumn;
var _local9:ConstraintRow;
_local1 = super.target;
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:Number = 0;
_local5 = _local1.viewMetrics;
_local4 = 0;
while (_local4 < _local1.numChildren) {
_local7 = (_local1.getChildAt(_local4) as IUIComponent);
parseConstraints(_local7);
_local4++;
};
_local4 = 0;
while (_local4 < IConstraintLayout(_local1).constraintColumns.length) {
_local8 = IConstraintLayout(_local1).constraintColumns[_local4];
if (_local8.mx_internal::contentSize){
_local8.mx_internal::_width = NaN;
};
_local4++;
};
_local4 = 0;
while (_local4 < IConstraintLayout(_local1).constraintRows.length) {
_local9 = IConstraintLayout(_local1).constraintRows[_local4];
if (_local9.mx_internal::contentSize){
_local9.mx_internal::_height = NaN;
};
_local4++;
};
measureColumnsAndRows();
_contentArea = null;
_local6 = measureContentArea();
_local1.measuredWidth = ((_local6.width + _local5.left) + _local5.right);
_local1.measuredHeight = ((_local6.height + _local5.top) + _local5.bottom);
}
private function target_childRemoveHandler(_arg1:ChildExistenceChangedEvent):void{
DisplayObject(_arg1.relatedObject).removeEventListener(MoveEvent.MOVE, child_moveHandler);
delete constraintCache[_arg1.relatedObject];
}
override public function set target(_arg1:Container):void{
var _local3:int;
var _local4:int;
var _local2:Container = super.target;
if (_arg1 != _local2){
if (_local2){
_local2.removeEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler);
_local2.removeEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler);
_local4 = _local2.numChildren;
_local3 = 0;
while (_local3 < _local4) {
DisplayObject(_local2.getChildAt(_local3)).removeEventListener(MoveEvent.MOVE, child_moveHandler);
_local3++;
};
};
if (_arg1){
_arg1.addEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler);
_arg1.addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler);
_local4 = _arg1.numChildren;
_local3 = 0;
while (_local3 < _local4) {
DisplayObject(_arg1.getChildAt(_local3)).addEventListener(MoveEvent.MOVE, child_moveHandler);
_local3++;
};
};
super.target = _arg1;
};
}
private function measureContentArea():Rectangle{
var _local1:int;
var _local3:Array;
var _local4:Array;
var _local5:IUIComponent;
var _local6:LayoutConstraints;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
if (_contentArea){
return (_contentArea);
};
_contentArea = new Rectangle();
var _local2:int = target.numChildren;
if ((((_local2 == 0)) && (constraintRegionsInUse))){
_local3 = IConstraintLayout(target).constraintColumns;
_local4 = IConstraintLayout(target).constraintRows;
if (_local3.length > 0){
_contentArea.right = (_local3[(_local3.length - 1)].x + _local3[(_local3.length - 1)].width);
} else {
_contentArea.right = 0;
};
if (_local4.length > 0){
_contentArea.bottom = (_local4[(_local4.length - 1)].y + _local4[(_local4.length - 1)].height);
} else {
_contentArea.bottom = 0;
};
};
_local1 = 0;
while (_local1 < _local2) {
_local5 = (target.getChildAt(_local1) as IUIComponent);
_local6 = getLayoutConstraints(_local5);
if (!_local5.includeInLayout){
} else {
_local7 = _local5.x;
_local8 = _local5.y;
_local9 = _local5.getExplicitOrMeasuredWidth();
_local10 = _local5.getExplicitOrMeasuredHeight();
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
if (((!(isNaN(_local5.percentWidth))) || (((((_local6) && (!(isNaN(_local6.left))))) && (!(isNaN(_local6.right))))))){
_local9 = _local5.minWidth;
};
} else {
if (((!(isNaN(_local5.percentWidth))) || (((((((_local6) && (!(isNaN(_local6.left))))) && (!(isNaN(_local6.right))))) && (isNaN(_local5.explicitWidth)))))){
_local9 = _local5.minWidth;
};
};
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
if (((!(isNaN(_local5.percentHeight))) || (((((_local6) && (!(isNaN(_local6.top))))) && (!(isNaN(_local6.bottom))))))){
_local10 = _local5.minHeight;
};
} else {
if (((!(isNaN(_local5.percentHeight))) || (((((((_local6) && (!(isNaN(_local6.top))))) && (!(isNaN(_local6.bottom))))) && (isNaN(_local5.explicitHeight)))))){
_local10 = _local5.minHeight;
};
};
r.x = _local7;
r.y = _local8;
r.width = _local9;
r.height = _local10;
applyAnchorStylesDuringMeasure(_local5, r);
_local7 = r.x;
_local8 = r.y;
_local9 = r.width;
_local10 = r.height;
if (isNaN(_local7)){
_local7 = _local5.x;
};
if (isNaN(_local8)){
_local8 = _local5.y;
};
_local11 = _local7;
_local12 = _local8;
if (isNaN(_local9)){
_local9 = _local5.width;
};
if (isNaN(_local10)){
_local10 = _local5.height;
};
_local11 = (_local11 + _local9);
_local12 = (_local12 + _local10);
_contentArea.right = Math.max(_contentArea.right, _local11);
_contentArea.bottom = Math.max(_contentArea.bottom, _local12);
};
_local1++;
};
return (_contentArea);
}
private function shareColumnSpace(_arg1:ContentColumnChild, _arg2:Number):Number{
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local3:ConstraintColumn = _arg1.leftCol;
var _local4:ConstraintColumn = _arg1.rightCol;
var _local5:IUIComponent = _arg1.child;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = (_arg1.rightOffset) ? _arg1.rightOffset : 0;
var _local9:Number = (_arg1.leftOffset) ? _arg1.leftOffset : 0;
if (((_local3) && (_local3.width))){
_local6 = (_local6 + _local3.width);
} else {
if (((_local4) && (!(_local3)))){
_local3 = IConstraintLayout(target).constraintColumns[(_arg1.right - 2)];
if (((_local3) && (_local3.width))){
_local6 = (_local6 + _local3.width);
};
};
};
if (((_local4) && (_local4.width))){
_local7 = (_local7 + _local4.width);
} else {
if (((_local3) && (!(_local4)))){
_local4 = IConstraintLayout(target).constraintColumns[(_arg1.left + 1)];
if (((_local4) && (_local4.width))){
_local7 = (_local7 + _local4.width);
};
};
};
if (((_local3) && (isNaN(_local3.width)))){
_local3.setActualWidth(Math.max(0, _local3.maxWidth));
};
if (((_local4) && (isNaN(_local4.width)))){
_local4.setActualWidth(Math.max(0, _local4.maxWidth));
};
var _local10:Number = _local5.getExplicitOrMeasuredWidth();
if (_local10){
if (!_arg1.leftCol){
if (_local10 > _local6){
_local12 = ((_local10 - _local6) + _local8);
} else {
_local12 = (_local10 + _local8);
};
};
if (!_arg1.rightCol){
if (_local10 > _local7){
_local11 = ((_local10 - _local7) + _local9);
} else {
_local11 = (_local10 + _local9);
};
};
if (((_arg1.leftCol) && (_arg1.rightCol))){
_local13 = (_local10 / Number(_arg1.span));
if ((_local13 + _local9) < _local6){
_local11 = _local6;
_local12 = ((_local10 - (_local6 - _local9)) + _local8);
} else {
_local11 = (_local13 + _local9);
};
if ((_local13 + _local8) < _local7){
_local12 = _local7;
_local11 = ((_local10 - (_local7 - _local8)) + _local9);
} else {
_local12 = (_local13 + _local8);
};
};
_local11 = bound(_local11, _local3.minWidth, _local3.maxWidth);
_local3.setActualWidth(_local11);
_arg2 = (_arg2 - _local11);
_local12 = bound(_local12, _local4.minWidth, _local4.maxWidth);
_local4.setActualWidth(_local12);
_arg2 = (_arg2 - _local12);
};
return (_arg2);
}
private function getLayoutConstraints(_arg1:IUIComponent):LayoutConstraints{
var _local2:IConstraintClient = (_arg1 as IConstraintClient);
if (!_local2){
return (null);
};
var _local3:LayoutConstraints = new LayoutConstraints();
_local3.baseline = _local2.getConstraintValue("baseline");
_local3.bottom = _local2.getConstraintValue("bottom");
_local3.horizontalCenter = _local2.getConstraintValue("horizontalCenter");
_local3.left = _local2.getConstraintValue("left");
_local3.right = _local2.getConstraintValue("right");
_local3.top = _local2.getConstraintValue("top");
_local3.verticalCenter = _local2.getConstraintValue("verticalCenter");
return (_local3);
}
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:int;
var _local4:IUIComponent;
var _local10:ConstraintColumn;
var _local11:ConstraintRow;
var _local5:Container = super.target;
var _local6:int = _local5.numChildren;
_local5.mx_internal::doingLayout = false;
var _local7:EdgeMetrics = _local5.viewMetrics;
_local5.mx_internal::doingLayout = true;
var _local8:Number = ((_arg1 - _local7.left) - _local7.right);
var _local9:Number = ((_arg2 - _local7.top) - _local7.bottom);
if ((((IConstraintLayout(_local5).constraintColumns.length > 0)) || ((IConstraintLayout(_local5).constraintRows.length > 0)))){
constraintRegionsInUse = true;
};
if (constraintRegionsInUse){
_local3 = 0;
while (_local3 < _local6) {
_local4 = (_local5.getChildAt(_local3) as IUIComponent);
parseConstraints(_local4);
_local3++;
};
_local3 = 0;
while (_local3 < IConstraintLayout(_local5).constraintColumns.length) {
_local10 = IConstraintLayout(_local5).constraintColumns[_local3];
if (_local10.mx_internal::contentSize){
_local10.mx_internal::_width = NaN;
};
_local3++;
};
_local3 = 0;
while (_local3 < IConstraintLayout(_local5).constraintRows.length) {
_local11 = IConstraintLayout(_local5).constraintRows[_local3];
if (_local11.mx_internal::contentSize){
_local11.mx_internal::_height = NaN;
};
_local3++;
};
measureColumnsAndRows();
};
_local3 = 0;
while (_local3 < _local6) {
_local4 = (_local5.getChildAt(_local3) as IUIComponent);
applyAnchorStylesDuringUpdateDisplayList(_local8, _local9, _local4);
_local3++;
};
}
private function applyAnchorStylesDuringUpdateDisplayList(_arg1:Number, _arg2:Number, _arg3:IUIComponent=null):void{
var _local20:int;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:String;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
var _local39:Boolean;
var _local40:Boolean;
var _local41:Boolean;
var _local42:ConstraintColumn;
var _local43:Boolean;
var _local44:Boolean;
var _local45:Boolean;
var _local46:Boolean;
var _local47:ConstraintRow;
var _local4:IConstraintClient = (_arg3 as IConstraintClient);
if (!_local4){
return;
};
var _local5:ChildConstraintInfo = parseConstraints(_arg3);
var _local6:Number = _local5.left;
var _local7:Number = _local5.right;
var _local8:Number = _local5.hc;
var _local9:Number = _local5.top;
var _local10:Number = _local5.bottom;
var _local11:Number = _local5.vc;
var _local12:Number = _local5.baseline;
var _local13:String = _local5.leftBoundary;
var _local14:String = _local5.rightBoundary;
var _local15:String = _local5.hcBoundary;
var _local16:String = _local5.topBoundary;
var _local17:String = _local5.bottomBoundary;
var _local18:String = _local5.vcBoundary;
var _local19:String = _local5.baselineBoundary;
var _local26:Boolean;
var _local27:Boolean;
var _local28:Boolean = ((((!(_local15)) && (!(_local13)))) && (!(_local14)));
var _local29:Boolean = ((((((!(_local18)) && (!(_local16)))) && (!(_local17)))) && (!(_local19)));
var _local30:Number = 0;
var _local31:Number = _arg1;
var _local32:Number = 0;
var _local33:Number = _arg2;
if (!_local28){
_local39 = (_local13) ? true : false;
_local40 = (_local14) ? true : false;
_local41 = (_local15) ? true : false;
_local20 = 0;
while (_local20 < IConstraintLayout(target).constraintColumns.length) {
_local42 = ConstraintColumn(IConstraintLayout(target).constraintColumns[_local20]);
if (_local39){
if (_local13 == _local42.id){
_local30 = _local42.x;
_local39 = false;
};
};
if (_local40){
if (_local14 == _local42.id){
_local31 = (_local42.x + _local42.width);
_local40 = false;
};
};
if (_local41){
if (_local15 == _local42.id){
_local35 = _local42.width;
_local37 = _local42.x;
_local41 = false;
};
};
_local20++;
};
if (_local39){
_local25 = resourceManager.getString("containers", "columnNotFound", [_local13]);
throw (new ConstraintError(_local25));
};
if (_local40){
_local25 = resourceManager.getString("containers", "columnNotFound", [_local14]);
throw (new ConstraintError(_local25));
};
if (_local41){
_local25 = resourceManager.getString("containers", "columnNotFound", [_local15]);
throw (new ConstraintError(_local25));
};
} else {
if (!_local28){
_local25 = resourceManager.getString("containers", "noColumnsFound");
throw (new ConstraintError(_local25));
};
};
_arg1 = Math.round((_local31 - _local30));
if (((!(isNaN(_local6))) && (!(isNaN(_local7))))){
_local21 = ((_arg1 - _local6) - _local7);
if (_local21 < _arg3.minWidth){
_local21 = _arg3.minWidth;
};
} else {
if (!isNaN(_arg3.percentWidth)){
_local21 = ((_arg3.percentWidth / 100) * _arg1);
_local21 = bound(_local21, _arg3.minWidth, _arg3.maxWidth);
_local26 = true;
} else {
_local21 = _arg3.getExplicitOrMeasuredWidth();
};
};
if (((!(_local29)) && ((IConstraintLayout(target).constraintRows.length > 0)))){
_local43 = (_local16) ? true : false;
_local44 = (_local17) ? true : false;
_local45 = (_local18) ? true : false;
_local46 = (_local19) ? true : false;
_local20 = 0;
while (_local20 < IConstraintLayout(target).constraintRows.length) {
_local47 = ConstraintRow(IConstraintLayout(target).constraintRows[_local20]);
if (_local43){
if (_local16 == _local47.id){
_local32 = _local47.y;
_local43 = false;
};
};
if (_local44){
if (_local17 == _local47.id){
_local33 = (_local47.y + _local47.height);
_local44 = false;
};
};
if (_local45){
if (_local18 == _local47.id){
_local34 = _local47.height;
_local36 = _local47.y;
_local45 = false;
};
};
if (_local46){
if (_local19 == _local47.id){
_local38 = _local47.y;
_local46 = false;
};
};
_local20++;
};
if (_local43){
_local25 = resourceManager.getString("containers", "rowNotFound", [_local16]);
throw (new ConstraintError(_local25));
};
if (_local44){
_local25 = resourceManager.getString("containers", "rowNotFound", [_local17]);
throw (new ConstraintError(_local25));
};
if (_local45){
_local25 = resourceManager.getString("containers", "rowNotFound", [_local18]);
throw (new ConstraintError(_local25));
};
if (_local46){
_local25 = resourceManager.getString("containers", "rowNotFound", [_local19]);
throw (new ConstraintError(_local25));
};
} else {
if (((!(_local29)) && (!((IConstraintLayout(target).constraintRows.length > 0))))){
_local25 = resourceManager.getString("containers", "noRowsFound");
throw (new ConstraintError(_local25));
};
};
_arg2 = Math.round((_local33 - _local32));
if (((!(isNaN(_local9))) && (!(isNaN(_local10))))){
_local22 = ((_arg2 - _local9) - _local10);
if (_local22 < _arg3.minHeight){
_local22 = _arg3.minHeight;
};
} else {
if (!isNaN(_arg3.percentHeight)){
_local22 = ((_arg3.percentHeight / 100) * _arg2);
_local22 = bound(_local22, _arg3.minHeight, _arg3.maxHeight);
_local27 = true;
} else {
_local22 = _arg3.getExplicitOrMeasuredHeight();
};
};
if (!isNaN(_local8)){
if (_local15){
_local23 = Math.round(((((_local35 - _local21) / 2) + _local8) + _local37));
} else {
_local23 = Math.round((((_arg1 - _local21) / 2) + _local8));
};
} else {
if (!isNaN(_local6)){
if (_local13){
_local23 = (_local30 + _local6);
} else {
_local23 = _local6;
};
} else {
if (!isNaN(_local7)){
if (_local14){
_local23 = ((_local31 - _local7) - _local21);
} else {
_local23 = ((_arg1 - _local7) - _local21);
};
};
};
};
if (!isNaN(_local12)){
if (_local19){
_local24 = ((_local38 - _arg3.baselinePosition) + _local12);
} else {
_local24 = _local12;
};
};
if (!isNaN(_local11)){
if (_local18){
_local24 = Math.round(((((_local34 - _local22) / 2) + _local11) + _local36));
} else {
_local24 = Math.round((((_arg2 - _local22) / 2) + _local11));
};
} else {
if (!isNaN(_local9)){
if (_local16){
_local24 = (_local32 + _local9);
} else {
_local24 = _local9;
};
} else {
if (!isNaN(_local10)){
if (_local17){
_local24 = ((_local33 - _local10) - _local22);
} else {
_local24 = ((_arg2 - _local10) - _local22);
};
};
};
};
_local23 = (isNaN(_local23)) ? _arg3.x : _local23;
_local24 = (isNaN(_local24)) ? _arg3.y : _local24;
_arg3.move(_local23, _local24);
if (_local26){
if ((_local23 + _local21) > _arg1){
_local21 = Math.max((_arg1 - _local23), _arg3.minWidth);
};
};
if (_local27){
if ((_local24 + _local22) > _arg2){
_local22 = Math.max((_arg2 - _local24), _arg3.minHeight);
};
};
if (((!(isNaN(_local21))) && (!(isNaN(_local22))))){
_arg3.setActualSize(_local21, _local22);
};
}
private function target_childAddHandler(_arg1:ChildExistenceChangedEvent):void{
DisplayObject(_arg1.relatedObject).addEventListener(MoveEvent.MOVE, child_moveHandler);
}
}
}//package mx.containers.utilityClasses
import mx.core.*;
class LayoutConstraints {
public var baseline;
public var left;
public var bottom;
public var top;
public var horizontalCenter;
public var verticalCenter;
public var right;
private function LayoutConstraints():void{
}
}
class ChildConstraintInfo {
public var baseline:Number;
public var left:Number;
public var baselineBoundary:String;
public var leftBoundary:String;
public var hcBoundary:String;
public var top:Number;
public var right:Number;
public var topBoundary:String;
public var rightBoundary:String;
public var bottom:Number;
public var vc:Number;
public var bottomBoundary:String;
public var vcBoundary:String;
public var hc:Number;
private function ChildConstraintInfo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:String=null, _arg12:String=null, _arg13:String=null, _arg14:String=null):void{
this.left = _arg1;
this.right = _arg2;
this.hc = _arg3;
this.top = _arg4;
this.bottom = _arg5;
this.vc = _arg6;
this.baseline = _arg7;
this.leftBoundary = _arg8;
this.rightBoundary = _arg9;
this.hcBoundary = _arg10;
this.topBoundary = _arg11;
this.bottomBoundary = _arg12;
this.vcBoundary = _arg13;
this.baselineBoundary = _arg14;
}
}
class ContentColumnChild {
public var rightCol:ConstraintColumn;
public var hcCol:ConstraintColumn;
public var left:Number;
public var child:IUIComponent;
public var rightOffset:Number;
public var span:Number;
public var hcOffset:Number;
public var leftCol:ConstraintColumn;
public var leftOffset:Number;
public var hc:Number;
public var right:Number;
private function ContentColumnChild():void{
}
}
class ContentRowChild {
public var topRow:ConstraintRow;
public var topOffset:Number;
public var baseline:Number;
public var baselineRow:ConstraintRow;
public var span:Number;
public var top:Number;
public var vcOffset:Number;
public var child:IUIComponent;
public var bottomOffset:Number;
public var bottom:Number;
public var vc:Number;
public var bottomRow:ConstraintRow;
public var vcRow:ConstraintRow;
public var baselineOffset:Number;
private function ContentRowChild():void{
}
}
Section 221
//ConstraintColumn (mx.containers.utilityClasses.ConstraintColumn)
package mx.containers.utilityClasses {
import mx.core.*;
import flash.events.*;
public class ConstraintColumn extends EventDispatcher implements IMXMLObject {
private var _container:IInvalidating;
private var _explicitMinWidth:Number;
mx_internal var _width:Number;
mx_internal var contentSize:Boolean;// = false
private var _percentWidth:Number;
private var _explicitWidth:Number;
private var _explicitMaxWidth:Number;
private var _x:Number;
private var _id:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public function get container():IInvalidating{
return (_container);
}
public function get width():Number{
return (_width);
}
public function get percentWidth():Number{
return (_percentWidth);
}
public function set container(_arg1:IInvalidating):void{
_container = _arg1;
}
public function set maxWidth(_arg1:Number):void{
if (_explicitMaxWidth != _arg1){
_explicitMaxWidth = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("maxWidthChanged"));
};
}
public function set width(_arg1:Number):void{
if (explicitWidth != _arg1){
explicitWidth = _arg1;
if (_width != _arg1){
_width = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("widthChanged"));
};
};
}
public function get maxWidth():Number{
return (_explicitMaxWidth);
}
public function get minWidth():Number{
return (_explicitMinWidth);
}
public function get id():String{
return (_id);
}
public function initialized(_arg1:Object, _arg2:String):void{
this.id = _arg2;
if (((!(this.width)) && (!(this.percentWidth)))){
contentSize = true;
};
}
public function set explicitWidth(_arg1:Number):void{
if (_explicitWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentWidth = NaN;
};
_explicitWidth = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("explicitWidthChanged"));
}
public function setActualWidth(_arg1:Number):void{
if (_width != _arg1){
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
};
}
public function set minWidth(_arg1:Number):void{
if (_explicitMinWidth != _arg1){
_explicitMinWidth = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("minWidthChanged"));
};
}
public function set percentWidth(_arg1:Number):void{
if (_percentWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitWidth = NaN;
};
_percentWidth = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("percentWidthChanged"));
}
public function set x(_arg1:Number):void{
if (_arg1 != _x){
_x = _arg1;
dispatchEvent(new Event("xChanged"));
};
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function get x():Number{
return (_x);
}
}
}//package mx.containers.utilityClasses
Section 222
//ConstraintRow (mx.containers.utilityClasses.ConstraintRow)
package mx.containers.utilityClasses {
import mx.core.*;
import flash.events.*;
public class ConstraintRow extends EventDispatcher implements IMXMLObject {
private var _container:IInvalidating;
mx_internal var _height:Number;
private var _explicitMinHeight:Number;
private var _y:Number;
private var _percentHeight:Number;
private var _explicitMaxHeight:Number;
mx_internal var contentSize:Boolean;// = false
private var _explicitHeight:Number;
private var _id:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public function get container():IInvalidating{
return (_container);
}
public function set container(_arg1:IInvalidating):void{
_container = _arg1;
}
public function set y(_arg1:Number):void{
if (_arg1 != _y){
_y = _arg1;
dispatchEvent(new Event("yChanged"));
};
}
public function set height(_arg1:Number):void{
if (explicitHeight != _arg1){
explicitHeight = _arg1;
if (_height != _arg1){
_height = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("heightChanged"));
};
};
}
public function set maxHeight(_arg1:Number):void{
if (_explicitMaxHeight != _arg1){
_explicitMaxHeight = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("maxHeightChanged"));
};
}
public function setActualHeight(_arg1:Number):void{
if (_height != _arg1){
_height = _arg1;
dispatchEvent(new Event("heightChanged"));
};
}
public function get minHeight():Number{
return (_explicitMinHeight);
}
public function get id():String{
return (_id);
}
public function set percentHeight(_arg1:Number):void{
if (_percentHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitHeight = NaN;
};
_percentHeight = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
}
public function initialized(_arg1:Object, _arg2:String):void{
this.id = _arg2;
if (((!(this.height)) && (!(this.percentHeight)))){
contentSize = true;
};
}
public function get percentHeight():Number{
return (_percentHeight);
}
public function get height():Number{
return (_height);
}
public function get maxHeight():Number{
return (_explicitMaxHeight);
}
public function set minHeight(_arg1:Number):void{
if (_explicitMinHeight != _arg1){
_explicitMinHeight = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("minHeightChanged"));
};
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function get y():Number{
return (_y);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function set explicitHeight(_arg1:Number):void{
if (_explicitHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentHeight = NaN;
};
_explicitHeight = _arg1;
if (container){
container.invalidateSize();
container.invalidateDisplayList();
};
dispatchEvent(new Event("explicitHeightChanged"));
}
}
}//package mx.containers.utilityClasses
Section 223
//Flex (mx.containers.utilityClasses.Flex)
package mx.containers.utilityClasses {
import mx.core.*;
public class Flex {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function flexChildWidthsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{
var _local6:Array;
var _local7:FlexChildInfo;
var _local8:IUIComponent;
var _local9:int;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local4:Number = _arg2;
var _local5:Number = 0;
_local6 = [];
var _local10:int = _arg1.numChildren;
_local9 = 0;
while (_local9 < _local10) {
_local8 = IUIComponent(_arg1.getChildAt(_local9));
_local11 = _local8.percentWidth;
_local12 = _local8.percentHeight;
if (((!(isNaN(_local12))) && (_local8.includeInLayout))){
_local13 = Math.max(_local8.minHeight, Math.min(_local8.maxHeight, ((_local12)>=100) ? _arg3 : ((_arg3 * _local12) / 100)));
} else {
_local13 = _local8.getExplicitOrMeasuredHeight();
};
if (((!(isNaN(_local11))) && (_local8.includeInLayout))){
_local5 = (_local5 + _local11);
_local7 = new FlexChildInfo();
_local7.percent = _local11;
_local7.min = _local8.minWidth;
_local7.max = _local8.maxWidth;
_local7.height = _local13;
_local7.child = _local8;
_local6.push(_local7);
} else {
_local14 = _local8.getExplicitOrMeasuredWidth();
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local14), Math.floor(_local13));
} else {
_local8.setActualSize(_local14, _local13);
};
if (_local8.includeInLayout){
_local4 = (_local4 - _local8.width);
};
};
_local9++;
};
if (_local5){
_local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6);
_local10 = _local6.length;
_local9 = 0;
while (_local9 < _local10) {
_local7 = _local6[_local9];
_local8 = _local7.child;
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local7.size), Math.floor(_local7.height));
} else {
_local8.setActualSize(_local7.size, _local7.height);
};
_local9++;
};
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
distributeExtraWidth(_arg1, _arg2);
};
};
return (_local4);
}
public static function distributeExtraHeight(_arg1:Container, _arg2:Number):void{
var _local5:int;
var _local6:Number;
var _local9:IUIComponent;
var _local10:Number;
var _local11:Number;
var _local3:int = _arg1.numChildren;
var _local4:Boolean;
var _local7:Number = _arg2;
var _local8:Number = 0;
_local5 = 0;
while (_local5 < _local3) {
_local9 = IUIComponent(_arg1.getChildAt(_local5));
if (!_local9.includeInLayout){
} else {
_local10 = _local9.height;
_local6 = _local9.percentHeight;
_local8 = (_local8 + _local10);
if (!isNaN(_local6)){
_local11 = Math.ceil(((_local6 / 100) * _arg2));
if (_local11 > _local10){
_local4 = true;
};
};
};
_local5++;
};
if (!_local4){
return;
};
_local7 = (_local7 - _local8);
var _local12:Boolean;
while (((_local12) && ((_local7 > 0)))) {
_local12 = false;
_local5 = 0;
while (_local5 < _local3) {
_local9 = IUIComponent(_arg1.getChildAt(_local5));
_local10 = _local9.height;
_local6 = _local9.percentHeight;
if (((((!(isNaN(_local6))) && (_local9.includeInLayout))) && ((_local10 < _local9.maxHeight)))){
_local11 = Math.ceil(((_local6 / 100) * _arg2));
if (_local11 > _local10){
_local9.setActualSize(_local9.width, (_local10 + 1));
_local7--;
_local12 = true;
if (_local7 == 0){
return;
};
};
};
_local5++;
};
};
}
public static function distributeExtraWidth(_arg1:Container, _arg2:Number):void{
var _local5:int;
var _local6:Number;
var _local9:IUIComponent;
var _local10:Number;
var _local11:Number;
var _local3:int = _arg1.numChildren;
var _local4:Boolean;
var _local7:Number = _arg2;
var _local8:Number = 0;
_local5 = 0;
while (_local5 < _local3) {
_local9 = IUIComponent(_arg1.getChildAt(_local5));
if (!_local9.includeInLayout){
} else {
_local10 = _local9.width;
_local6 = _local9.percentWidth;
_local8 = (_local8 + _local10);
if (!isNaN(_local6)){
_local11 = Math.ceil(((_local6 / 100) * _arg2));
if (_local11 > _local10){
_local4 = true;
};
};
};
_local5++;
};
if (!_local4){
return;
};
_local7 = (_local7 - _local8);
var _local12:Boolean;
while (((_local12) && ((_local7 > 0)))) {
_local12 = false;
_local5 = 0;
while (_local5 < _local3) {
_local9 = IUIComponent(_arg1.getChildAt(_local5));
_local10 = _local9.width;
_local6 = _local9.percentWidth;
if (((((!(isNaN(_local6))) && (_local9.includeInLayout))) && ((_local10 < _local9.maxWidth)))){
_local11 = Math.ceil(((_local6 / 100) * _arg2));
if (_local11 > _local10){
_local9.setActualSize((_local10 + 1), _local9.height);
_local7--;
_local12 = true;
if (_local7 == 0){
return;
};
};
};
_local5++;
};
};
}
public static function flexChildrenProportionally(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{
var _local6:Number;
var _local7:Boolean;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local5:int = _arg4.length;
var _local8:Number = (_arg2 - ((_arg1 * _arg3) / 100));
if (_local8 > 0){
_arg2 = (_arg2 - _local8);
};
do {
_local6 = 0;
_local7 = true;
_local9 = (_arg2 / _arg3);
_local10 = 0;
while (_local10 < _local5) {
_local11 = _arg4[_local10];
_local12 = (_local11.percent * _local9);
if (_local12 < _local11.min){
_local13 = _local11.min;
_local11.size = _local13;
--_local5;
_arg4[_local10] = _arg4[_local5];
_arg4[_local5] = _local11;
_arg3 = (_arg3 - _local11.percent);
_arg2 = (_arg2 - _local13);
_local7 = false;
break;
} else {
if (_local12 > _local11.max){
_local14 = _local11.max;
_local11.size = _local14;
--_local5;
_arg4[_local10] = _arg4[_local5];
_arg4[_local5] = _local11;
_arg3 = (_arg3 - _local11.percent);
_arg2 = (_arg2 - _local14);
_local7 = false;
break;
} else {
_local11.size = _local12;
_local6 = (_local6 + _local12);
};
};
_local10++;
};
} while (!(_local7));
return (Math.max(0, Math.floor((_arg2 - _local6))));
}
public static function flexChildHeightsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{
var _local7:FlexChildInfo;
var _local8:IUIComponent;
var _local9:int;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local4:Number = _arg2;
var _local5:Number = 0;
var _local6:Array = [];
var _local10:int = _arg1.numChildren;
_local9 = 0;
while (_local9 < _local10) {
_local8 = IUIComponent(_arg1.getChildAt(_local9));
_local11 = _local8.percentWidth;
_local12 = _local8.percentHeight;
if (((!(isNaN(_local11))) && (_local8.includeInLayout))){
_local13 = Math.max(_local8.minWidth, Math.min(_local8.maxWidth, ((_local11)>=100) ? _arg3 : ((_arg3 * _local11) / 100)));
} else {
_local13 = _local8.getExplicitOrMeasuredWidth();
};
if (((!(isNaN(_local12))) && (_local8.includeInLayout))){
_local5 = (_local5 + _local12);
_local7 = new FlexChildInfo();
_local7.percent = _local12;
_local7.min = _local8.minHeight;
_local7.max = _local8.maxHeight;
_local7.width = _local13;
_local7.child = _local8;
_local6.push(_local7);
} else {
_local14 = _local8.getExplicitOrMeasuredHeight();
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local13), Math.floor(_local14));
} else {
_local8.setActualSize(_local13, _local14);
};
if (_local8.includeInLayout){
_local4 = (_local4 - _local8.height);
};
};
_local9++;
};
if (_local5){
_local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6);
_local10 = _local6.length;
_local9 = 0;
while (_local9 < _local10) {
_local7 = _local6[_local9];
_local8 = _local7.child;
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local7.width), Math.floor(_local7.size));
} else {
_local8.setActualSize(_local7.width, _local7.size);
};
_local9++;
};
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
distributeExtraHeight(_arg1, _arg2);
};
};
return (_local4);
}
}
}//package mx.containers.utilityClasses
Section 224
//FlexChildInfo (mx.containers.utilityClasses.FlexChildInfo)
package mx.containers.utilityClasses {
import mx.core.*;
public class FlexChildInfo {
public var flex:Number;// = 0
public var preferred:Number;// = 0
public var percent:Number;
public var width:Number;
public var height:Number;
public var size:Number;// = 0
public var max:Number;
public var min:Number;
public var child:IUIComponent;
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.containers.utilityClasses
Section 225
//IConstraintLayout (mx.containers.utilityClasses.IConstraintLayout)
package mx.containers.utilityClasses {
public interface IConstraintLayout {
function get constraintColumns():Array;
function set constraintRows(_arg1:Array):void;
function get constraintRows():Array;
function set constraintColumns(_arg1:Array):void;
}
}//package mx.containers.utilityClasses
Section 226
//Layout (mx.containers.utilityClasses.Layout)
package mx.containers.utilityClasses {
import mx.core.*;
import mx.resources.*;
public class Layout {
private var _target:Container;
protected var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function Layout(){
resourceManager = ResourceManager.getInstance();
super();
}
public function get target():Container{
return (_target);
}
public function set target(_arg1:Container):void{
_target = _arg1;
}
public function measure():void{
}
public function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
}
}//package mx.containers.utilityClasses
Section 227
//BoxDirection (mx.containers.BoxDirection)
package mx.containers {
public final class BoxDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.containers
Section 228
//Canvas (mx.containers.Canvas)
package mx.containers {
import mx.core.*;
import mx.containers.utilityClasses.*;
public class Canvas extends Container implements IConstraintLayout {
private var _constraintColumns:Array;
private var layoutObject:CanvasLayout;
private var _constraintRows:Array;
mx_internal static const VERSION:String = "3.2.0.3958";
public function Canvas(){
layoutObject = new CanvasLayout();
_constraintColumns = [];
_constraintRows = [];
super();
layoutObject.target = this;
}
public function get constraintColumns():Array{
return (_constraintColumns);
}
override mx_internal function get usePadding():Boolean{
return (false);
}
public function set constraintRows(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (_arg1 != _constraintRows){
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
ConstraintRow(_arg1[_local3]).container = this;
_local3++;
};
_constraintRows = _arg1;
invalidateSize();
invalidateDisplayList();
};
}
public function get constraintRows():Array{
return (_constraintRows);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
layoutObject.updateDisplayList(_arg1, _arg2);
}
public function set constraintColumns(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (_arg1 != _constraintColumns){
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
ConstraintColumn(_arg1[_local3]).container = this;
_local3++;
};
_constraintColumns = _arg1;
invalidateSize();
invalidateDisplayList();
};
}
override protected function measure():void{
super.measure();
layoutObject.measure();
}
}
}//package mx.containers
Section 229
//DataGridListData (mx.controls.dataGridClasses.DataGridListData)
package mx.controls.dataGridClasses {
import mx.core.*;
import mx.controls.listClasses.*;
public class DataGridListData extends BaseListData {
public var dataField:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public function DataGridListData(_arg1:String, _arg2:String, _arg3:int, _arg4:String, _arg5:IUIComponent, _arg6:int=0){
super(_arg1, _arg4, _arg5, _arg6, _arg3);
this.dataField = _arg2;
}
}
}//package mx.controls.dataGridClasses
Section 230
//BaseListData (mx.controls.listClasses.BaseListData)
package mx.controls.listClasses {
import mx.core.*;
public class BaseListData {
private var _uid:String;
public var owner:IUIComponent;
public var label:String;
public var rowIndex:int;
public var columnIndex:int;
mx_internal static const VERSION:String = "3.2.0.3958";
public function BaseListData(_arg1:String, _arg2:String, _arg3:IUIComponent, _arg4:int=0, _arg5:int=0){
this.label = _arg1;
this.uid = _arg2;
this.owner = _arg3;
this.rowIndex = _arg4;
this.columnIndex = _arg5;
}
public function set uid(_arg1:String):void{
_uid = _arg1;
}
public function get uid():String{
return (_uid);
}
}
}//package mx.controls.listClasses
Section 231
//IDropInListItemRenderer (mx.controls.listClasses.IDropInListItemRenderer)
package mx.controls.listClasses {
public interface IDropInListItemRenderer {
function get listData():BaseListData;
function set listData(_arg1:BaseListData):void;
}
}//package mx.controls.listClasses
Section 232
//IListItemRenderer (mx.controls.listClasses.IListItemRenderer)
package mx.controls.listClasses {
import mx.core.*;
import mx.managers.*;
import flash.events.*;
import mx.styles.*;
public interface IListItemRenderer extends IDataRenderer, IEventDispatcher, IFlexDisplayObject, ILayoutManagerClient, ISimpleStyleClient, IUIComponent {
}
}//package mx.controls.listClasses
Section 233
//ScrollBar (mx.controls.scrollClasses.ScrollBar)
package mx.controls.scrollClasses {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.styles.*;
import mx.controls.*;
import flash.utils.*;
import flash.ui.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
private var _pageScrollSize:Number;// = 0
mx_internal var scrollTrack:Button;
mx_internal var downArrow:Button;
mx_internal var scrollThumb:ScrollThumb;
private var trackScrollRepeatDirection:int;
private var _minScrollPosition:Number;// = 0
private var trackPosition:Number;
private var _pageSize:Number;// = 0
mx_internal var _minHeight:Number;// = 32
private var _maxScrollPosition:Number;// = 0
private var trackScrollTimer:Timer;
mx_internal var upArrow:Button;
private var _lineScrollSize:Number;// = 1
private var _scrollPosition:Number;// = 0
private var trackScrolling:Boolean;// = false
mx_internal var isScrolling:Boolean;
mx_internal var oldPosition:Number;
mx_internal var _minWidth:Number;// = 16
mx_internal static const VERSION:String = "3.2.0.3958";
public static const THICKNESS:Number = 16;
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
invalidateDisplayList();
}
public function set lineScrollSize(_arg1:Number):void{
_lineScrollSize = _arg1;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
mx_internal function dispatchScrollEvent(_arg1:Number, _arg2:String):void{
var _local3:ScrollEvent = new ScrollEvent(ScrollEvent.SCROLL);
_local3.detail = _arg2;
_local3.position = scrollPosition;
_local3.delta = (scrollPosition - _arg1);
_local3.direction = direction;
dispatchEvent(_local3);
}
private function downArrow_buttonDownHandler(_arg1:FlexEvent):void{
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
lineScroll(1);
}
private function scrollTrack_mouseDownHandler(_arg1:MouseEvent):void{
if (!(((_arg1.target == this)) || ((_arg1.target == scrollTrack)))){
return;
};
trackScrolling = true;
var _local2:DisplayObject = systemManager.getSandboxRoot();
_local2.addEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true);
_local2.addEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true);
_local2.addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, scrollTrack_mouseLeaveHandler);
systemManager.deployMouseShields(true);
var _local3:Point = new Point(_arg1.localX, _arg1.localY);
_local3 = _arg1.target.localToGlobal(_local3);
_local3 = globalToLocal(_local3);
trackPosition = _local3.y;
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
trackScrollRepeatDirection = (((scrollThumb.y + scrollThumb.height) < _local3.y)) ? 1 : ((scrollThumb.y > _local3.y)) ? -1 : 0;
pageScroll(trackScrollRepeatDirection);
if (!trackScrollTimer){
trackScrollTimer = new Timer(getStyle("repeatDelay"), 1);
trackScrollTimer.addEventListener(TimerEvent.TIMER, trackScrollTimerHandler);
};
trackScrollTimer.start();
}
public function set minScrollPosition(_arg1:Number):void{
_minScrollPosition = _arg1;
invalidateDisplayList();
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
mx_internal function get linePlusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_DOWN : ScrollEventDetail.LINE_RIGHT);
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
protected function get thumbStyleFilters():Object{
return (null);
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
mx_internal function get virtualHeight():Number{
return (unscaledHeight);
}
public function set scrollPosition(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_scrollPosition = _arg1;
if (scrollThumb){
if (!cacheAsBitmap){
cacheHeuristic = (scrollThumb.cacheHeuristic = true);
};
if (!isScrolling){
_arg1 = Math.min(_arg1, maxScrollPosition);
_arg1 = Math.max(_arg1, minScrollPosition);
_local2 = (maxScrollPosition - minScrollPosition);
_local3 = ((((_local2 == 0)) || (isNaN(_local2)))) ? 0 : ((((_arg1 - minScrollPosition) * (trackHeight - scrollThumb.height)) / _local2) + trackY);
_local4 = (((virtualWidth - scrollThumb.width) / 2) + getStyle("thumbOffset"));
scrollThumb.move(Math.round(_local4), Math.round(_local3));
};
};
}
protected function get downArrowStyleFilters():Object{
return (null);
}
public function get pageSize():Number{
return (_pageSize);
}
public function set pageScrollSize(_arg1:Number):void{
_pageScrollSize = _arg1;
}
public function set maxScrollPosition(_arg1:Number):void{
_maxScrollPosition = _arg1;
invalidateDisplayList();
}
mx_internal function pageScroll(_arg1:int):void{
var _local4:Number;
var _local5:String;
var _local2:Number = ((_pageScrollSize)!=0) ? _pageScrollSize : pageSize;
var _local3:Number = (_scrollPosition + (_arg1 * _local2));
if (_local3 > maxScrollPosition){
_local3 = maxScrollPosition;
} else {
if (_local3 < minScrollPosition){
_local3 = minScrollPosition;
};
};
if (_local3 != scrollPosition){
_local4 = scrollPosition;
scrollPosition = _local3;
_local5 = ((_arg1 < 0)) ? pageMinusDetail : pagePlusDetail;
dispatchScrollEvent(_local4, _local5);
};
}
override protected function createChildren():void{
super.createChildren();
if (!scrollTrack){
scrollTrack = new Button();
scrollTrack.focusEnabled = false;
scrollTrack.skinName = "trackSkin";
scrollTrack.upSkinName = "trackUpSkin";
scrollTrack.overSkinName = "trackOverSkin";
scrollTrack.downSkinName = "trackDownSkin";
scrollTrack.disabledSkinName = "trackDisabledSkin";
if ((scrollTrack is ISimpleStyleClient)){
ISimpleStyleClient(scrollTrack).styleName = this;
};
addChild(scrollTrack);
scrollTrack.validateProperties();
};
if (!upArrow){
upArrow = new Button();
upArrow.enabled = false;
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
upArrow.upSkinName = "upArrowUpSkin";
upArrow.overSkinName = "upArrowOverSkin";
upArrow.downSkinName = "upArrowDownSkin";
upArrow.disabledSkinName = "upArrowDisabledSkin";
upArrow.skinName = "upArrowSkin";
upArrow.upIconName = "";
upArrow.overIconName = "";
upArrow.downIconName = "";
upArrow.disabledIconName = "";
addChild(upArrow);
upArrow.styleName = new StyleProxy(this, upArrowStyleFilters);
upArrow.validateProperties();
upArrow.addEventListener(FlexEvent.BUTTON_DOWN, upArrow_buttonDownHandler);
};
if (!downArrow){
downArrow = new Button();
downArrow.enabled = false;
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
downArrow.upSkinName = "downArrowUpSkin";
downArrow.overSkinName = "downArrowOverSkin";
downArrow.downSkinName = "downArrowDownSkin";
downArrow.disabledSkinName = "downArrowDisabledSkin";
downArrow.skinName = "downArrowSkin";
downArrow.upIconName = "";
downArrow.overIconName = "";
downArrow.downIconName = "";
downArrow.disabledIconName = "";
addChild(downArrow);
downArrow.styleName = new StyleProxy(this, downArrowStyleFilters);
downArrow.validateProperties();
downArrow.addEventListener(FlexEvent.BUTTON_DOWN, downArrow_buttonDownHandler);
};
}
private function scrollTrack_mouseOverHandler(_arg1:MouseEvent):void{
if (!(((_arg1.target == this)) || ((_arg1.target == scrollTrack)))){
return;
};
if (trackScrolling){
trackScrollTimer.start();
};
}
private function get minDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_TOP : ScrollEventDetail.AT_LEFT);
}
mx_internal function isScrollBarKey(_arg1:uint):Boolean{
var _local2:Number;
if (_arg1 == Keyboard.HOME){
if (scrollPosition != 0){
_local2 = scrollPosition;
scrollPosition = 0;
dispatchScrollEvent(_local2, minDetail);
};
return (true);
} else {
if (_arg1 == Keyboard.END){
if (scrollPosition < maxScrollPosition){
_local2 = scrollPosition;
scrollPosition = maxScrollPosition;
dispatchScrollEvent(_local2, maxDetail);
};
return (true);
};
};
return (false);
}
mx_internal function get lineMinusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_LEFT);
}
mx_internal function get pageMinusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_UP : ScrollEventDetail.PAGE_LEFT);
}
private function get maxDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_BOTTOM : ScrollEventDetail.AT_RIGHT);
}
private function scrollTrack_mouseLeaveHandler(_arg1:Event):void{
trackScrolling = false;
var _local2:DisplayObject = systemManager.getSandboxRoot();
_local2.removeEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true);
_local2.removeEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true);
_local2.removeEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, scrollTrack_mouseLeaveHandler);
systemManager.deployMouseShields(false);
if (trackScrollTimer){
trackScrollTimer.reset();
};
if (_arg1.target != scrollTrack){
return;
};
var _local3:String = ((oldPosition > scrollPosition)) ? pageMinusDetail : pagePlusDetail;
dispatchScrollEvent(oldPosition, _local3);
oldPosition = NaN;
}
protected function get upArrowStyleFilters():Object{
return (null);
}
private function get trackHeight():Number{
return ((virtualHeight - (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight())));
}
public function get pageScrollSize():Number{
return (_pageScrollSize);
}
override protected function measure():void{
super.measure();
upArrow.validateSize();
downArrow.validateSize();
scrollTrack.validateSize();
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
_minWidth = (scrollThumb) ? scrollThumb.getExplicitOrMeasuredWidth() : 0;
_minWidth = Math.max(scrollTrack.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredWidth(), _minWidth);
} else {
_minWidth = upArrow.getExplicitOrMeasuredWidth();
};
_minHeight = (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight());
}
mx_internal function lineScroll(_arg1:int):void{
var _local4:Number;
var _local5:String;
var _local2:Number = _lineScrollSize;
var _local3:Number = (_scrollPosition + (_arg1 * _local2));
if (_local3 > maxScrollPosition){
_local3 = maxScrollPosition;
} else {
if (_local3 < minScrollPosition){
_local3 = minScrollPosition;
};
};
if (_local3 != scrollPosition){
_local4 = scrollPosition;
scrollPosition = _local3;
_local5 = ((_arg1 < 0)) ? lineMinusDetail : linePlusDetail;
dispatchScrollEvent(_local4, _local5);
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
var _local5:Number;
this.pageSize = _arg1;
_pageScrollSize = ((_arg4)>0) ? _arg4 : _arg1;
this.minScrollPosition = Math.max(_arg2, 0);
this.maxScrollPosition = Math.max(_arg3, 0);
_scrollPosition = Math.max(this.minScrollPosition, _scrollPosition);
_scrollPosition = Math.min(this.maxScrollPosition, _scrollPosition);
if (((((this.maxScrollPosition - this.minScrollPosition) > 0)) && (enabled))){
upArrow.enabled = true;
downArrow.enabled = true;
scrollTrack.enabled = true;
addEventListener(MouseEvent.MOUSE_DOWN, scrollTrack_mouseDownHandler);
addEventListener(MouseEvent.MOUSE_OVER, scrollTrack_mouseOverHandler);
addEventListener(MouseEvent.MOUSE_OUT, scrollTrack_mouseOutHandler);
if (!scrollThumb){
scrollThumb = new ScrollThumb();
scrollThumb.focusEnabled = false;
addChildAt(scrollThumb, getChildIndex(downArrow));
scrollThumb.styleName = new StyleProxy(this, thumbStyleFilters);
scrollThumb.upSkinName = "thumbUpSkin";
scrollThumb.overSkinName = "thumbOverSkin";
scrollThumb.downSkinName = "thumbDownSkin";
scrollThumb.iconName = "thumbIcon";
scrollThumb.skinName = "thumbSkin";
};
_local5 = ((trackHeight < 0)) ? 0 : Math.round(((_arg1 / ((this.maxScrollPosition - this.minScrollPosition) + _arg1)) * trackHeight));
if (_local5 < scrollThumb.minHeight){
if (trackHeight < scrollThumb.minHeight){
scrollThumb.visible = false;
} else {
_local5 = scrollThumb.minHeight;
scrollThumb.visible = true;
scrollThumb.setActualSize(scrollThumb.measuredWidth, scrollThumb.minHeight);
};
} else {
scrollThumb.visible = true;
scrollThumb.setActualSize(scrollThumb.measuredWidth, _local5);
};
scrollThumb.setRange((upArrow.getExplicitOrMeasuredHeight() + 0), ((virtualHeight - downArrow.getExplicitOrMeasuredHeight()) - scrollThumb.height), this.minScrollPosition, this.maxScrollPosition);
scrollPosition = Math.max(Math.min(scrollPosition, this.maxScrollPosition), this.minScrollPosition);
} else {
upArrow.enabled = false;
downArrow.enabled = false;
scrollTrack.enabled = false;
if (scrollThumb){
scrollThumb.visible = false;
};
};
}
private function trackScrollTimerHandler(_arg1:Event):void{
if (trackScrollRepeatDirection == 1){
if ((scrollThumb.y + scrollThumb.height) > trackPosition){
return;
};
};
if (trackScrollRepeatDirection == -1){
if (scrollThumb.y < trackPosition){
return;
};
};
pageScroll(trackScrollRepeatDirection);
if (((trackScrollTimer) && ((trackScrollTimer.repeatCount == 1)))){
trackScrollTimer.delay = getStyle("repeatInterval");
trackScrollTimer.repeatCount = 0;
};
}
private function upArrow_buttonDownHandler(_arg1:FlexEvent):void{
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
lineScroll(-1);
}
public function set pageSize(_arg1:Number):void{
_pageSize = _arg1;
}
private function get trackY():Number{
return (upArrow.getExplicitOrMeasuredHeight());
}
private function scrollTrack_mouseOutHandler(_arg1:MouseEvent):void{
if (trackScrolling){
trackScrollTimer.stop();
};
}
private function scrollTrack_mouseUpHandler(_arg1:MouseEvent):void{
scrollTrack_mouseLeaveHandler(_arg1);
}
private function scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Point;
if (trackScrolling){
_local2 = new Point(_arg1.stageX, _arg1.stageY);
_local2 = globalToLocal(_local2);
trackPosition = _local2.y;
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if ($height == 1){
return;
};
if (!upArrow){
return;
};
super.updateDisplayList(_arg1, _arg2);
if (cacheAsBitmap){
cacheHeuristic = (scrollThumb.cacheHeuristic = false);
};
upArrow.setActualSize(upArrow.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredHeight());
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
upArrow.move(((virtualWidth - upArrow.width) / 2), 0);
} else {
upArrow.move(0, 0);
};
scrollTrack.setActualSize(scrollTrack.getExplicitOrMeasuredWidth(), virtualHeight);
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
scrollTrack.x = ((virtualWidth - scrollTrack.width) / 2);
};
scrollTrack.y = 0;
downArrow.setActualSize(downArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredHeight());
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
downArrow.move(((virtualWidth - downArrow.width) / 2), (virtualHeight - downArrow.getExplicitOrMeasuredHeight()));
} else {
downArrow.move(0, (virtualHeight - downArrow.getExplicitOrMeasuredHeight()));
};
setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, _pageScrollSize);
scrollPosition = _scrollPosition;
}
mx_internal function get pagePlusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_DOWN : ScrollEventDetail.PAGE_RIGHT);
}
mx_internal function get virtualWidth():Number{
return (unscaledWidth);
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("directionChanged"));
}
public function get direction():String{
return (_direction);
}
}
}//package mx.controls.scrollClasses
Section 234
//ScrollBarDirection (mx.controls.scrollClasses.ScrollBarDirection)
package mx.controls.scrollClasses {
public final class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.controls.scrollClasses
Section 235
//ScrollThumb (mx.controls.scrollClasses.ScrollThumb)
package mx.controls.scrollClasses {
import flash.geom.*;
import flash.events.*;
import mx.events.*;
import mx.controls.*;
public class ScrollThumb extends Button {
private var lastY:Number;
private var datamin:Number;
private var ymax:Number;
private var ymin:Number;
private var datamax:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function ScrollThumb(){
explicitMinHeight = 10;
stickyHighlighting = true;
}
private function stopDragThumb():void{
var _local1:ScrollBar = ScrollBar(parent);
_local1.isScrolling = false;
_local1.dispatchScrollEvent(_local1.oldPosition, ScrollEventDetail.THUMB_POSITION);
_local1.oldPosition = NaN;
systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
}
override protected function mouseDownHandler(_arg1:MouseEvent):void{
super.mouseDownHandler(_arg1);
var _local2:ScrollBar = ScrollBar(parent);
_local2.oldPosition = _local2.scrollPosition;
lastY = _arg1.localY;
systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
if (ymin == ymax){
return;
};
var _local2:Point = new Point(_arg1.stageX, _arg1.stageY);
_local2 = globalToLocal(_local2);
var _local3:Number = (_local2.y - lastY);
_local3 = (_local3 + y);
if (_local3 < ymin){
_local3 = ymin;
} else {
if (_local3 > ymax){
_local3 = ymax;
};
};
var _local4:ScrollBar = ScrollBar(parent);
_local4.isScrolling = true;
$y = _local3;
var _local5:Number = _local4.scrollPosition;
var _local6:Number = (Math.round((((datamax - datamin) * (y - ymin)) / (ymax - ymin))) + datamin);
_local4.scrollPosition = _local6;
_local4.dispatchScrollEvent(_local5, ScrollEventDetail.THUMB_TRACK);
_arg1.updateAfterEvent();
}
override mx_internal function buttonReleased():void{
super.buttonReleased();
stopDragThumb();
}
mx_internal function setRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
this.ymin = _arg1;
this.ymax = _arg2;
this.datamin = _arg3;
this.datamax = _arg4;
}
}
}//package mx.controls.scrollClasses
Section 236
//Button (mx.controls.Button)
package mx.controls {
import flash.display.*;
import flash.text.*;
import mx.core.*;
import mx.managers.*;
import flash.events.*;
import mx.events.*;
import mx.styles.*;
import flash.utils.*;
import mx.controls.listClasses.*;
import flash.ui.*;
import mx.controls.dataGridClasses.*;
public class Button extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IListItemRenderer, IFontContextComponent, IButton {
mx_internal var _emphasized:Boolean;// = false
mx_internal var extraSpacing:Number;// = 20
private var icons:Array;
public var selectedField:String;// = null
private var labelChanged:Boolean;// = false
private var skinMeasuredWidth:Number;
mx_internal var checkedDefaultSkin:Boolean;// = false
private var autoRepeatTimer:Timer;
mx_internal var disabledIconName:String;// = "disabledIcon"
mx_internal var disabledSkinName:String;// = "disabledSkin"
mx_internal var checkedDefaultIcon:Boolean;// = false
public var stickyHighlighting:Boolean;// = false
private var enabledChanged:Boolean;// = false
mx_internal var selectedUpIconName:String;// = "selectedUpIcon"
mx_internal var selectedUpSkinName:String;// = "selectedUpSkin"
mx_internal var upIconName:String;// = "upIcon"
mx_internal var upSkinName:String;// = "upSkin"
mx_internal var centerContent:Boolean;// = true
mx_internal var buttonOffset:Number;// = 0
private var skinMeasuredHeight:Number;
private var oldUnscaledWidth:Number;
mx_internal var downIconName:String;// = "downIcon"
mx_internal var _labelPlacement:String;// = "right"
mx_internal var downSkinName:String;// = "downSkin"
mx_internal var _toggle:Boolean;// = false
private var _phase:String;// = "up"
private var toolTipSet:Boolean;// = false
private var _data:Object;
mx_internal var currentIcon:IFlexDisplayObject;
mx_internal var currentSkin:IFlexDisplayObject;
mx_internal var overIconName:String;// = "overIcon"
mx_internal var selectedDownIconName:String;// = "selectedDownIcon"
mx_internal var overSkinName:String;// = "overSkin"
mx_internal var iconName:String;// = "icon"
mx_internal var skinName:String;// = "skin"
mx_internal var selectedDownSkinName:String;// = "selectedDownSkin"
private var skins:Array;
private var selectedSet:Boolean;
private var _autoRepeat:Boolean;// = false
private var styleChangedFlag:Boolean;// = true
mx_internal var selectedOverIconName:String;// = "selectedOverIcon"
private var _listData:BaseListData;
mx_internal var selectedOverSkinName:String;// = "selectedOverSkin"
protected var textField:IUITextField;
private var labelSet:Boolean;
mx_internal var defaultIconUsesStates:Boolean;// = false
mx_internal var defaultSkinUsesStates:Boolean;// = false
mx_internal var toggleChanged:Boolean;// = false
private var emphasizedChanged:Boolean;// = false
private var _label:String;// = ""
mx_internal var _selected:Boolean;// = false
mx_internal var selectedDisabledIconName:String;// = "selectedDisabledIcon"
mx_internal var selectedDisabledSkinName:String;// = "selectedDisabledSkin"
mx_internal static const VERSION:String = "3.2.0.3958";
mx_internal static var createAccessibilityImplementation:Function;
mx_internal static var TEXT_WIDTH_PADDING:Number = 6;
public function Button(){
skins = [];
icons = [];
super();
mouseChildren = false;
addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
addEventListener(MouseEvent.CLICK, clickHandler);
}
private function previousVersion_measure():void{
var bm:EdgeMetrics;
var lineMetrics:TextLineMetrics;
var paddingLeft:Number;
var paddingRight:Number;
var paddingTop:Number;
var paddingBottom:Number;
var horizontalGap:Number;
super.measure();
var textWidth:Number = 0;
var textHeight:Number = 0;
if (label){
lineMetrics = measureText(label);
textWidth = lineMetrics.width;
textHeight = lineMetrics.height;
paddingLeft = getStyle("paddingLeft");
paddingRight = getStyle("paddingRight");
paddingTop = getStyle("paddingTop");
paddingBottom = getStyle("paddingBottom");
textWidth = (textWidth + ((paddingLeft + paddingRight) + getStyle("textIndent")));
textHeight = (textHeight + (paddingTop + paddingBottom));
};
try {
bm = currentSkin["borderMetrics"];
} catch(e:Error) {
bm = new EdgeMetrics(3, 3, 3, 3);
};
var tempCurrentIcon:IFlexDisplayObject = getCurrentIcon();
var iconWidth:Number = (tempCurrentIcon) ? tempCurrentIcon.width : 0;
var iconHeight:Number = (tempCurrentIcon) ? tempCurrentIcon.height : 0;
var w:Number = 0;
var h:Number = 0;
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
w = (textWidth + iconWidth);
if (iconWidth != 0){
horizontalGap = getStyle("horizontalGap");
w = (w + (horizontalGap - 2));
};
h = Math.max(textHeight, (iconHeight + 6));
} else {
w = Math.max(textWidth, iconWidth);
h = (textHeight + iconHeight);
if (iconHeight != 0){
h = (h + getStyle("verticalGap"));
};
};
if (bm){
w = (w + (bm.left + bm.right));
h = (h + (bm.top + bm.bottom));
};
if (((label) && (!((label.length == 0))))){
w = (w + extraSpacing);
} else {
w = (w + 6);
};
if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){
skinMeasuredWidth = currentSkin.measuredWidth;
skinMeasuredHeight = currentSkin.measuredHeight;
};
if (!isNaN(skinMeasuredWidth)){
w = Math.max(skinMeasuredWidth, w);
};
if (!isNaN(skinMeasuredHeight)){
h = Math.max(skinMeasuredHeight, h);
};
measuredMinWidth = (measuredWidth = w);
measuredMinHeight = (measuredHeight = h);
}
public function get label():String{
return (_label);
}
mx_internal function getCurrentIconName():String{
var _local1:String;
if (!enabled){
_local1 = (selected) ? selectedDisabledIconName : disabledIconName;
} else {
if (phase == ButtonPhase.UP){
_local1 = (selected) ? selectedUpIconName : upIconName;
} else {
if (phase == ButtonPhase.OVER){
_local1 = (selected) ? selectedOverIconName : overIconName;
} else {
if (phase == ButtonPhase.DOWN){
_local1 = (selected) ? selectedDownIconName : downIconName;
};
};
};
};
return (_local1);
}
protected function mouseUpHandler(_arg1:MouseEvent):void{
if (!enabled){
return;
};
phase = ButtonPhase.OVER;
buttonReleased();
if (!toggle){
_arg1.updateAfterEvent();
};
}
override protected function adjustFocusRect(_arg1:DisplayObject=null):void{
super.adjustFocusRect((currentSkin) ? this : DisplayObject(currentIcon));
}
mx_internal function set phase(_arg1:String):void{
_phase = _arg1;
invalidateSize();
invalidateDisplayList();
}
mx_internal function viewIconForPhase(_arg1:String):IFlexDisplayObject{
var _local3:IFlexDisplayObject;
var _local4:Boolean;
var _local5:String;
var _local2:Class = Class(getStyle(_arg1));
if (!_local2){
_local2 = Class(getStyle(iconName));
if (defaultIconUsesStates){
_arg1 = iconName;
};
if (((!(checkedDefaultIcon)) && (_local2))){
_local3 = IFlexDisplayObject(new (_local2));
if (((!((_local3 is IProgrammaticSkin))) && ((_local3 is IStateClient)))){
defaultIconUsesStates = true;
_arg1 = iconName;
};
if (_local3){
checkedDefaultIcon = true;
};
};
};
_local3 = IFlexDisplayObject(getChildByName(_arg1));
if (_local3 == null){
if (_local2 != null){
_local3 = IFlexDisplayObject(new (_local2));
_local3.name = _arg1;
if ((_local3 is ISimpleStyleClient)){
ISimpleStyleClient(_local3).styleName = this;
};
addChild(DisplayObject(_local3));
_local4 = false;
if ((_local3 is IInvalidating)){
IInvalidating(_local3).validateNow();
_local4 = true;
} else {
if ((_local3 is IProgrammaticSkin)){
IProgrammaticSkin(_local3).validateDisplayList();
_local4 = true;
};
};
if (((_local3) && ((_local3 is IUIComponent)))){
IUIComponent(_local3).enabled = enabled;
};
if (_local4){
_local3.setActualSize(_local3.measuredWidth, _local3.measuredHeight);
};
icons.push(_local3);
};
};
if (currentIcon != null){
currentIcon.visible = false;
};
currentIcon = _local3;
if (((defaultIconUsesStates) && ((currentIcon is IStateClient)))){
_local5 = "";
if (!enabled){
_local5 = (selected) ? "selectedDisabled" : "disabled";
} else {
if (phase == ButtonPhase.UP){
_local5 = (selected) ? "selectedUp" : "up";
} else {
if (phase == ButtonPhase.OVER){
_local5 = (selected) ? "selectedOver" : "over";
} else {
if (phase == ButtonPhase.DOWN){
_local5 = (selected) ? "selectedDown" : "down";
};
};
};
};
IStateClient(currentIcon).currentState = _local5;
};
if (currentIcon != null){
currentIcon.visible = true;
};
return (_local3);
}
mx_internal function viewSkinForPhase(_arg1:String, _arg2:String):void{
var _local4:IFlexDisplayObject;
var _local5:Number;
var _local6:ISimpleStyleClient;
var _local3:Class = Class(getStyle(_arg1));
if (!_local3){
_local3 = Class(getStyle(skinName));
if (defaultSkinUsesStates){
_arg1 = skinName;
};
if (((!(checkedDefaultSkin)) && (_local3))){
_local4 = IFlexDisplayObject(new (_local3));
if (((!((_local4 is IProgrammaticSkin))) && ((_local4 is IStateClient)))){
defaultSkinUsesStates = true;
_arg1 = skinName;
};
if (_local4){
checkedDefaultSkin = true;
};
};
};
_local4 = IFlexDisplayObject(getChildByName(_arg1));
if (!_local4){
if (_local3){
_local4 = IFlexDisplayObject(new (_local3));
_local4.name = _arg1;
_local6 = (_local4 as ISimpleStyleClient);
if (_local6){
_local6.styleName = this;
};
addChild(DisplayObject(_local4));
_local4.setActualSize(unscaledWidth, unscaledHeight);
if ((((_local4 is IInvalidating)) && (initialized))){
IInvalidating(_local4).validateNow();
} else {
if ((((_local4 is IProgrammaticSkin)) && (initialized))){
IProgrammaticSkin(_local4).validateDisplayList();
};
};
skins.push(_local4);
};
};
if (currentSkin){
currentSkin.visible = false;
};
currentSkin = _local4;
if (((defaultSkinUsesStates) && ((currentSkin is IStateClient)))){
IStateClient(currentSkin).currentState = _arg2;
};
if (currentSkin){
currentSkin.visible = true;
};
if (enabled){
if (phase == ButtonPhase.OVER){
_local5 = textField.getStyle("textRollOverColor");
} else {
if (phase == ButtonPhase.DOWN){
_local5 = textField.getStyle("textSelectedColor");
} else {
_local5 = textField.getStyle("color");
};
};
textField.setColor(_local5);
};
}
mx_internal function getTextField():IUITextField{
return (textField);
}
protected function rollOverHandler(_arg1:MouseEvent):void{
if (phase == ButtonPhase.UP){
if (_arg1.buttonDown){
return;
};
phase = ButtonPhase.OVER;
_arg1.updateAfterEvent();
} else {
if (phase == ButtonPhase.OVER){
phase = ButtonPhase.DOWN;
_arg1.updateAfterEvent();
if (autoRepeatTimer){
autoRepeatTimer.start();
};
};
};
}
override protected function createChildren():void{
super.createChildren();
if (!textField){
textField = IUITextField(createInFontContext(UITextField));
textField.styleName = this;
addChild(DisplayObject(textField));
};
}
mx_internal function setSelected(_arg1:Boolean, _arg2:Boolean=false):void{
if (_selected != _arg1){
_selected = _arg1;
invalidateDisplayList();
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
if (toggle){
dispatchEvent(new Event(Event.CHANGE));
};
} else {
if (((toggle) && (!(_arg2)))){
dispatchEvent(new Event(Event.CHANGE));
};
};
dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
};
}
private function autoRepeatTimer_timerDelayHandler(_arg1:Event):void{
if (!enabled){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
if (autoRepeat){
autoRepeatTimer.reset();
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.delay = getStyle("repeatInterval");
autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler);
autoRepeatTimer.start();
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set selected(_arg1:Boolean):void{
selectedSet = true;
setSelected(_arg1, true);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (phase != ButtonPhase.UP){
phase = ButtonPhase.UP;
};
}
public function get labelPlacement():String{
return (_labelPlacement);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
if (_arg1){
autoRepeatTimer = new Timer(1);
} else {
autoRepeatTimer = null;
};
}
mx_internal function changeIcons():void{
var _local1:int = icons.length;
var _local2:int;
while (_local2 < _local1) {
removeChild(icons[_local2]);
_local2++;
};
icons = [];
checkedDefaultIcon = false;
defaultIconUsesStates = false;
}
public function set data(_arg1:Object):void{
var _local2:*;
var _local3:*;
_data = _arg1;
if (((((_listData) && ((_listData is DataGridListData)))) && (!((DataGridListData(_listData).dataField == null))))){
_local2 = _data[DataGridListData(_listData).dataField];
_local3 = "";
} else {
if (_listData){
if (selectedField){
_local2 = _data[selectedField];
};
_local3 = _listData.label;
} else {
_local2 = _data;
};
};
if (((!((_local2 === undefined))) && (!(selectedSet)))){
selected = (_local2 as Boolean);
selectedSet = false;
};
if (((!((_local3 === undefined))) && (!(labelSet)))){
label = _local3;
labelSet = false;
};
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}
mx_internal function getCurrentIcon():IFlexDisplayObject{
var _local1:String = getCurrentIconName();
if (!_local1){
return (null);
};
return (viewIconForPhase(_local1));
}
public function get fontContext():IFlexModuleFactory{
return (moduleFactory);
}
public function get emphasized():Boolean{
return (_emphasized);
}
public function get listData():BaseListData{
return (_listData);
}
mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{
var _local20:TextLineMetrics;
var _local28:MoveEvent;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
previousVersion_layoutContents(_arg1, _arg2, _arg3);
return;
};
var _local4:Number = 0;
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = 0;
var _local9:Number = 0;
var _local10:Number = 0;
var _local11:Number = 0;
var _local12:Number = 0;
var _local13:Number = 0;
var _local14:Number = getStyle("paddingLeft");
var _local15:Number = getStyle("paddingRight");
var _local16:Number = getStyle("paddingTop");
var _local17:Number = getStyle("paddingBottom");
var _local18:Number = 0;
var _local19:Number = 0;
if (label){
_local20 = measureText(label);
_local18 = (_local20.width + TEXT_WIDTH_PADDING);
_local19 = (_local20.height + UITextField.TEXT_HEIGHT_PADDING);
} else {
_local20 = measureText("Wj");
_local19 = (_local20.height + UITextField.TEXT_HEIGHT_PADDING);
};
var _local21:Number = (_arg3) ? buttonOffset : 0;
var _local22:String = getStyle("textAlign");
var _local23:Number = _arg1;
var _local24:Number = _arg2;
var _local25:EdgeMetrics = (((((currentSkin) && ((currentSkin is IBorder)))) && (!((currentSkin is IFlexAsset))))) ? IBorder(currentSkin).borderMetrics : null;
if (_local25){
_local23 = (_local23 - (_local25.left + _local25.right));
_local24 = (_local24 - (_local25.top + _local25.bottom));
};
if (currentIcon){
_local8 = currentIcon.width;
_local9 = currentIcon.height;
};
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local12 = getStyle("horizontalGap");
if ((((_local8 == 0)) || ((_local18 == 0)))){
_local12 = 0;
};
if (_local18 > 0){
_local4 = Math.max(Math.min(((((_local23 - _local8) - _local12) - _local14) - _local15), _local18), 0);
textField.width = _local4;
} else {
_local4 = 0;
textField.width = _local4;
};
_local5 = Math.min(_local24, _local19);
textField.height = _local5;
if (_local22 == "left"){
_local6 = (_local6 + _local14);
} else {
if (_local22 == "right"){
_local6 = (_local6 + ((((_local23 - _local4) - _local8) - _local12) - _local15));
} else {
_local6 = (_local6 + (((((((_local23 - _local4) - _local8) - _local12) - _local14) - _local15) / 2) + _local14));
};
};
if (labelPlacement == ButtonLabelPlacement.RIGHT){
_local6 = (_local6 + (_local8 + _local12));
_local10 = (_local6 - (_local8 + _local12));
} else {
_local10 = ((_local6 + _local4) + _local12);
};
_local11 = (((((_local24 - _local9) - _local16) - _local17) / 2) + _local16);
_local7 = (((((_local24 - _local5) - _local16) - _local17) / 2) + _local16);
} else {
_local13 = getStyle("verticalGap");
if ((((_local9 == 0)) || ((label == "")))){
_local13 = 0;
};
if (_local18 > 0){
_local4 = Math.max(((_local23 - _local14) - _local15), 0);
textField.width = _local4;
_local5 = Math.min(((((_local24 - _local9) - _local16) - _local17) - _local13), _local19);
textField.height = _local5;
} else {
_local4 = 0;
textField.width = _local4;
_local5 = 0;
textField.height = _local5;
};
_local6 = _local14;
if (_local22 == "left"){
_local10 = (_local10 + _local14);
} else {
if (_local22 == "right"){
_local10 = (_local10 + Math.max(((_local23 - _local8) - _local15), _local14));
} else {
_local10 = (_local10 + (((((_local23 - _local8) - _local14) - _local15) / 2) + _local14));
};
};
if (labelPlacement == ButtonLabelPlacement.TOP){
_local7 = (_local7 + (((((((_local24 - _local5) - _local9) - _local16) - _local17) - _local13) / 2) + _local16));
_local11 = (_local11 + ((_local7 + _local5) + _local13));
} else {
_local11 = (_local11 + (((((((_local24 - _local5) - _local9) - _local16) - _local17) - _local13) / 2) + _local16));
_local7 = (_local7 + ((_local11 + _local9) + _local13));
};
};
var _local26:Number = _local21;
var _local27:Number = _local21;
if (_local25){
_local26 = (_local26 + _local25.left);
_local27 = (_local27 + _local25.top);
};
textField.x = Math.round((_local6 + _local26));
textField.y = Math.round((_local7 + _local27));
if (currentIcon){
_local10 = (_local10 + _local26);
_local11 = (_local11 + _local27);
_local28 = new MoveEvent(MoveEvent.MOVE);
_local28.oldX = currentIcon.x;
_local28.oldY = currentIcon.y;
currentIcon.x = Math.round(_local10);
currentIcon.y = Math.round(_local11);
currentIcon.dispatchEvent(_local28);
};
if (currentSkin){
setChildIndex(DisplayObject(currentSkin), (numChildren - 1));
};
if (currentIcon){
setChildIndex(DisplayObject(currentIcon), (numChildren - 1));
};
if (textField){
setChildIndex(DisplayObject(textField), (numChildren - 1));
};
}
protected function mouseDownHandler(_arg1:MouseEvent):void{
if (!enabled){
return;
};
systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.getSandboxRoot().addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, stage_mouseLeaveHandler);
buttonPressed();
_arg1.updateAfterEvent();
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
buttonPressed();
};
}
protected function rollOutHandler(_arg1:MouseEvent):void{
if (phase == ButtonPhase.OVER){
phase = ButtonPhase.UP;
_arg1.updateAfterEvent();
} else {
if ((((phase == ButtonPhase.DOWN)) && (!(stickyHighlighting)))){
phase = ButtonPhase.OVER;
_arg1.updateAfterEvent();
if (autoRepeatTimer){
autoRepeatTimer.stop();
};
};
};
}
mx_internal function get phase():String{
return (_phase);
}
override public function set enabled(_arg1:Boolean):void{
if (super.enabled == _arg1){
return;
};
super.enabled = _arg1;
enabledChanged = true;
invalidateProperties();
invalidateDisplayList();
}
override protected function measure():void{
var _local9:TextLineMetrics;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
previousVersion_measure();
return;
};
super.measure();
var _local1:Number = 0;
var _local2:Number = 0;
if (label){
_local9 = measureText(label);
_local1 = (_local9.width + TEXT_WIDTH_PADDING);
_local2 = (_local9.height + UITextField.TEXT_HEIGHT_PADDING);
};
var _local3:IFlexDisplayObject = getCurrentIcon();
var _local4:Number = (_local3) ? _local3.width : 0;
var _local5:Number = (_local3) ? _local3.height : 0;
var _local6:Number = 0;
var _local7:Number = 0;
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local6 = (_local1 + _local4);
if (((_local1) && (_local4))){
_local6 = (_local6 + getStyle("horizontalGap"));
};
_local7 = Math.max(_local2, _local5);
} else {
_local6 = Math.max(_local1, _local4);
_local7 = (_local2 + _local5);
if (((_local2) && (_local5))){
_local7 = (_local7 + getStyle("verticalGap"));
};
};
if (((_local1) || (_local4))){
_local6 = (_local6 + (getStyle("paddingLeft") + getStyle("paddingRight")));
_local7 = (_local7 + (getStyle("paddingTop") + getStyle("paddingBottom")));
};
var _local8:EdgeMetrics = (((((currentSkin) && ((currentSkin is IBorder)))) && (!((currentSkin is IFlexAsset))))) ? IBorder(currentSkin).borderMetrics : null;
if (_local8){
_local6 = (_local6 + (_local8.left + _local8.right));
_local7 = (_local7 + (_local8.top + _local8.bottom));
};
if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){
skinMeasuredWidth = currentSkin.measuredWidth;
skinMeasuredHeight = currentSkin.measuredHeight;
};
if (!isNaN(skinMeasuredWidth)){
_local6 = Math.max(skinMeasuredWidth, _local6);
};
if (!isNaN(skinMeasuredHeight)){
_local7 = Math.max(skinMeasuredHeight, _local7);
};
measuredMinWidth = (measuredWidth = _local6);
measuredMinHeight = (measuredHeight = _local7);
}
public function get toggle():Boolean{
return (_toggle);
}
mx_internal function buttonReleased():void{
systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.getSandboxRoot().removeEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, stage_mouseLeaveHandler);
if (autoRepeatTimer){
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler);
autoRepeatTimer.reset();
};
}
mx_internal function buttonPressed():void{
phase = ButtonPhase.DOWN;
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
if (autoRepeat){
autoRepeatTimer.delay = getStyle("repeatDelay");
autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.start();
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
buttonReleased();
if (phase == ButtonPhase.DOWN){
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
phase = ButtonPhase.UP;
};
}
public function get selected():Boolean{
return (_selected);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("labelPlacementChanged"));
}
protected function clickHandler(_arg1:MouseEvent):void{
if (!enabled){
_arg1.stopImmediatePropagation();
return;
};
if (toggle){
setSelected(!(selected));
_arg1.updateAfterEvent();
};
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
public function set toggle(_arg1:Boolean):void{
_toggle = _arg1;
toggleChanged = true;
invalidateProperties();
invalidateDisplayList();
dispatchEvent(new Event("toggleChanged"));
}
override public function get baselinePosition():Number{
var _local1:String;
var _local2:TextLineMetrics;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local1 = label;
if (!_local1){
_local1 = "Wj";
};
validateNow();
if (((!(label)) && ((((labelPlacement == ButtonLabelPlacement.TOP)) || ((labelPlacement == ButtonLabelPlacement.BOTTOM)))))){
_local2 = measureText(_local1);
return ((((measuredHeight - _local2.height) / 2) + _local2.ascent));
};
return ((textField.y + measureText(_local1).ascent));
};
if (!validateBaselinePosition()){
return (NaN);
};
return ((textField.y + textField.baselinePosition));
}
public function get data():Object{
return (_data);
}
public function set fontContext(_arg1:IFlexModuleFactory):void{
this.moduleFactory = _arg1;
}
mx_internal function viewSkin():void{
var _local1:String;
var _local2:String;
if (!enabled){
_local1 = (selected) ? selectedDisabledSkinName : disabledSkinName;
_local2 = (selected) ? "selectedDisabled" : "disabled";
} else {
if (phase == ButtonPhase.UP){
_local1 = (selected) ? selectedUpSkinName : upSkinName;
_local2 = (selected) ? "selectedUp" : "up";
} else {
if (phase == ButtonPhase.OVER){
_local1 = (selected) ? selectedOverSkinName : overSkinName;
_local2 = (selected) ? "selectedOver" : "over";
} else {
if (phase == ButtonPhase.DOWN){
_local1 = (selected) ? selectedDownSkinName : downSkinName;
_local2 = (selected) ? "selectedDown" : "down";
};
};
};
};
viewSkinForPhase(_local1, _local2);
}
override public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
super.styleChanged(_arg1);
if (((!(_arg1)) || ((_arg1 == "styleName")))){
changeSkins();
changeIcons();
if (initialized){
viewSkin();
viewIcon();
};
} else {
if (_arg1.toLowerCase().indexOf("skin") != -1){
changeSkins();
} else {
if (_arg1.toLowerCase().indexOf("icon") != -1){
changeIcons();
invalidateSize();
};
};
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
emphasizedChanged = true;
invalidateDisplayList();
}
mx_internal function viewIcon():void{
var _local1:String = getCurrentIconName();
viewIconForPhase(_local1);
}
override public function set toolTip(_arg1:String):void{
super.toolTip = _arg1;
if (_arg1){
toolTipSet = true;
} else {
toolTipSet = false;
invalidateDisplayList();
};
}
override protected function commitProperties():void{
super.commitProperties();
if (((hasFontContextChanged()) && (!((textField == null))))){
removeChild(DisplayObject(textField));
textField = null;
};
if (!textField){
textField = IUITextField(createInFontContext(UITextField));
textField.styleName = this;
addChild(DisplayObject(textField));
enabledChanged = true;
toggleChanged = true;
};
if (!initialized){
viewSkin();
viewIcon();
};
if (enabledChanged){
textField.enabled = enabled;
if (((currentIcon) && ((currentIcon is IUIComponent)))){
IUIComponent(currentIcon).enabled = enabled;
};
enabledChanged = false;
};
if (toggleChanged){
if (!toggle){
selected = false;
};
toggleChanged = false;
};
}
mx_internal function changeSkins():void{
var _local1:int = skins.length;
var _local2:int;
while (_local2 < _local1) {
removeChild(skins[_local2]);
_local2++;
};
skins = [];
skinMeasuredWidth = NaN;
skinMeasuredHeight = NaN;
checkedDefaultSkin = false;
defaultSkinUsesStates = false;
if (((initialized) && ((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)))){
viewSkin();
invalidateSize();
};
}
private function autoRepeatTimer_timerHandler(_arg1:Event):void{
if (!enabled){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
}
private function previousVersion_layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{
var _local20:TextLineMetrics;
var _local28:Number;
var _local29:MoveEvent;
var _local4:Number = 0;
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = 0;
var _local9:Number = 0;
var _local10:Number = 0;
var _local11:Number = 0;
var _local12:Number = 2;
var _local13:Number = 2;
var _local14:Number = getStyle("paddingLeft");
var _local15:Number = getStyle("paddingRight");
var _local16:Number = getStyle("paddingTop");
var _local17:Number = getStyle("paddingBottom");
var _local18:Number = 0;
var _local19:Number = 0;
if (label){
_local20 = measureText(label);
if (_local20.width > 0){
_local18 = (((_local14 + _local15) + getStyle("textIndent")) + _local20.width);
};
_local19 = _local20.height;
} else {
_local20 = measureText("Wj");
_local19 = _local20.height;
};
var _local21:Number = (_arg3) ? buttonOffset : 0;
var _local22:String = getStyle("textAlign");
var _local23:EdgeMetrics = (((currentSkin) && ((currentSkin is IRectangularBorder)))) ? IRectangularBorder(currentSkin).borderMetrics : null;
var _local24:Number = _arg1;
var _local25:Number = ((_arg2 - _local16) - _local17);
if (_local23){
_local24 = (_local24 - (_local23.left + _local23.right));
_local25 = (_local25 - (_local23.top + _local23.bottom));
};
if (currentIcon){
_local8 = currentIcon.width;
_local9 = currentIcon.height;
};
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local12 = getStyle("horizontalGap");
if ((((_local8 == 0)) || ((_local18 == 0)))){
_local12 = 0;
};
if (_local18 > 0){
_local4 = Math.max(((((_local24 - _local8) - _local12) - _local14) - _local15), 0);
textField.width = _local4;
} else {
_local4 = 0;
textField.width = _local4;
};
_local5 = Math.min((_local25 + 2), (_local19 + UITextField.TEXT_HEIGHT_PADDING));
textField.height = _local5;
if (labelPlacement == ButtonLabelPlacement.RIGHT){
_local6 = (_local8 + _local12);
if (centerContent){
if (_local22 == "left"){
_local6 = (_local6 + _local14);
} else {
if (_local22 == "right"){
_local6 = (_local6 + ((((_local24 - _local4) - _local8) - _local12) - _local14));
} else {
_local28 = ((((_local24 - _local4) - _local8) - _local12) / 2);
_local6 = (_local6 + Math.max(_local28, _local14));
};
};
};
_local10 = (_local6 - (_local8 + _local12));
if (!centerContent){
_local6 = (_local6 + _local14);
};
} else {
_local6 = ((((_local24 - _local4) - _local8) - _local12) - _local15);
if (centerContent){
if (_local22 == "left"){
_local6 = 2;
} else {
if (_local22 == "right"){
_local6--;
} else {
if (_local6 > 0){
_local6 = (_local6 / 2);
};
};
};
};
_local10 = ((_local6 + _local4) + _local12);
};
_local7 = 0;
_local11 = _local7;
if (centerContent){
_local11 = (Math.round(((_local25 - _local9) / 2)) + _local16);
_local7 = (Math.round(((_local25 - _local5) / 2)) + _local16);
} else {
_local7 = (_local7 + (Math.max(0, ((_local25 - _local5) / 2)) + _local16));
_local11 = (_local11 + (Math.max(0, (((_local25 - _local9) / 2) - 1)) + _local16));
};
} else {
_local13 = getStyle("verticalGap");
if ((((_local9 == 0)) || ((_local19 == 0)))){
_local13 = 0;
};
if (_local18 > 0){
_local4 = Math.min(_local24, (_local18 + UITextField.TEXT_WIDTH_PADDING));
textField.width = _local4;
_local5 = Math.min(((_local25 - _local9) + 1), (_local19 + 5));
textField.height = _local5;
} else {
_local4 = 0;
textField.width = _local4;
_local5 = 0;
textField.height = _local5;
};
_local6 = ((_local24 - _local4) / 2);
_local10 = ((_local24 - _local8) / 2);
if (labelPlacement == ButtonLabelPlacement.TOP){
_local7 = (((_local25 - _local5) - _local9) - _local13);
if (((centerContent) && ((_local7 > 0)))){
_local7 = (_local7 / 2);
};
_local7 = (_local7 + _local16);
_local11 = (((_local7 + _local5) + _local13) - 3);
} else {
_local7 = ((_local9 + _local13) + _local16);
if (centerContent){
_local7 = (_local7 + (((((_local25 - _local5) - _local9) - _local13) / 2) + 1));
};
_local11 = (((_local7 - _local9) - _local13) + 3);
};
};
var _local26:Number = _local21;
var _local27:Number = _local21;
if (_local23){
_local26 = (_local26 + _local23.left);
_local27 = (_local27 + _local23.top);
};
textField.x = (_local6 + _local26);
textField.y = (_local7 + _local27);
if (currentIcon){
_local10 = (_local10 + _local26);
_local11 = (_local11 + _local27);
_local29 = new MoveEvent(MoveEvent.MOVE);
_local29.oldX = currentIcon.x;
_local29.oldY = currentIcon.y;
currentIcon.x = Math.round(_local10);
currentIcon.y = Math.round(_local11);
currentIcon.dispatchEvent(_local29);
};
if (currentSkin){
setChildIndex(DisplayObject(currentSkin), (numChildren - 1));
};
if (currentIcon){
setChildIndex(DisplayObject(currentIcon), (numChildren - 1));
};
if (textField){
setChildIndex(DisplayObject(textField), (numChildren - 1));
};
}
private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{
if (contains(DisplayObject(_arg1.target))){
return;
};
phase = ButtonPhase.UP;
buttonReleased();
_arg1.updateAfterEvent();
}
public function set label(_arg1:String):void{
labelSet = true;
if (_label != _arg1){
_label = _arg1;
labelChanged = true;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("labelChanged"));
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local5:IFlexDisplayObject;
var _local6:Boolean;
super.updateDisplayList(_arg1, _arg2);
if (emphasizedChanged){
changeSkins();
emphasizedChanged = false;
};
var _local3:int = skins.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = IFlexDisplayObject(skins[_local4]);
_local5.setActualSize(_arg1, _arg2);
_local4++;
};
viewSkin();
viewIcon();
layoutContents(_arg1, _arg2, (phase == ButtonPhase.DOWN));
if ((((((((oldUnscaledWidth > _arg1)) || (!((textField.text == label))))) || (labelChanged))) || (styleChangedFlag))){
textField.text = label;
_local6 = textField.truncateToFit();
if (!toolTipSet){
if (_local6){
super.toolTip = label;
} else {
super.toolTip = null;
};
};
styleChangedFlag = false;
labelChanged = false;
};
oldUnscaledWidth = _arg1;
}
private function stage_mouseLeaveHandler(_arg1:Event):void{
phase = ButtonPhase.UP;
buttonReleased();
}
public function set listData(_arg1:BaseListData):void{
_listData = _arg1;
}
}
}//package mx.controls
Section 237
//ButtonLabelPlacement (mx.controls.ButtonLabelPlacement)
package mx.controls {
public final class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package mx.controls
Section 238
//ButtonPhase (mx.controls.ButtonPhase)
package mx.controls {
public final class ButtonPhase {
public static const DOWN:String = "down";
public static const OVER:String = "over";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const UP:String = "up";
}
}//package mx.controls
Section 239
//HScrollBar (mx.controls.HScrollBar)
package mx.controls {
import mx.controls.scrollClasses.*;
import flash.ui.*;
public class HScrollBar extends ScrollBar {
mx_internal static const VERSION:String = "3.2.0.3958";
public function HScrollBar(){
super.direction = ScrollBarDirection.HORIZONTAL;
scaleX = -1;
rotation = -90;
}
override mx_internal function get virtualHeight():Number{
return (unscaledWidth);
}
override protected function measure():void{
super.measure();
measuredWidth = _minHeight;
measuredHeight = _minWidth;
}
override public function get minHeight():Number{
return (_minWidth);
}
override mx_internal function get virtualWidth():Number{
return (unscaledHeight);
}
override public function get minWidth():Number{
return (_minHeight);
}
override mx_internal function isScrollBarKey(_arg1:uint):Boolean{
if (_arg1 == Keyboard.LEFT){
lineScroll(-1);
return (true);
};
if (_arg1 == Keyboard.RIGHT){
lineScroll(1);
return (true);
};
return (super.isScrollBarKey(_arg1));
}
override public function set direction(_arg1:String):void{
}
}
}//package mx.controls
Section 240
//IFlexContextMenu (mx.controls.IFlexContextMenu)
package mx.controls {
import flash.display.*;
public interface IFlexContextMenu {
function setContextMenu(_arg1:InteractiveObject):void;
function unsetContextMenu(_arg1:InteractiveObject):void;
}
}//package mx.controls
Section 241
//ToolTip (mx.controls.ToolTip)
package mx.controls {
import flash.display.*;
import flash.text.*;
import mx.core.*;
import mx.styles.*;
public class ToolTip extends UIComponent implements IToolTip, IFontContextComponent {
private var textChanged:Boolean;
private var _text:String;
protected var textField:IUITextField;
mx_internal var border:IFlexDisplayObject;
mx_internal static const VERSION:String = "3.2.0.3958";
public static var maxWidth:Number = 300;
public function ToolTip(){
mouseEnabled = false;
}
public function set fontContext(_arg1:IFlexModuleFactory):void{
this.moduleFactory = _arg1;
}
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){
invalidateDisplayList();
};
}
override protected function commitProperties():void{
var _local1:int;
var _local2:TextFormat;
super.commitProperties();
if (((hasFontContextChanged()) && (!((textField == null))))){
_local1 = getChildIndex(DisplayObject(textField));
removeTextField();
createTextField(_local1);
invalidateSize();
textChanged = true;
};
if (textChanged){
_local2 = textField.getTextFormat();
_local2.leftMargin = 0;
_local2.rightMargin = 0;
textField.defaultTextFormat = _local2;
textField.text = _text;
textChanged = false;
};
}
mx_internal function getTextField():IUITextField{
return (textField);
}
override protected function createChildren():void{
var _local1:Class;
super.createChildren();
if (!border){
_local1 = getStyle("borderSkin");
border = new (_local1);
if ((border is ISimpleStyleClient)){
ISimpleStyleClient(border).styleName = this;
};
addChild(DisplayObject(border));
};
createTextField(-1);
}
override protected function measure():void{
var _local7:Number;
super.measure();
var _local1:EdgeMetrics = borderMetrics;
var _local2:Number = (_local1.left + getStyle("paddingLeft"));
var _local3:Number = (_local1.top + getStyle("paddingTop"));
var _local4:Number = (_local1.right + getStyle("paddingRight"));
var _local5:Number = (_local1.bottom + getStyle("paddingBottom"));
var _local6:Number = (_local2 + _local4);
_local7 = (_local3 + _local5);
textField.wordWrap = false;
if ((textField.textWidth + _local6) > ToolTip.maxWidth){
textField.width = (ToolTip.maxWidth - _local6);
textField.wordWrap = true;
};
measuredWidth = (textField.width + _local6);
measuredHeight = (textField.height + _local7);
}
public function get fontContext():IFlexModuleFactory{
return (moduleFactory);
}
public function set text(_arg1:String):void{
_text = _arg1;
textChanged = true;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
public function get text():String{
return (_text);
}
mx_internal function removeTextField():void{
if (textField){
removeChild(DisplayObject(textField));
textField = null;
};
}
mx_internal function createTextField(_arg1:int):void{
if (!textField){
textField = IUITextField(createInFontContext(UITextField));
textField.autoSize = TextFieldAutoSize.LEFT;
textField.mouseEnabled = false;
textField.multiline = true;
textField.selectable = false;
textField.wordWrap = false;
textField.styleName = this;
if (_arg1 == -1){
addChild(DisplayObject(textField));
} else {
addChildAt(DisplayObject(textField), _arg1);
};
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:EdgeMetrics = borderMetrics;
var _local4:Number = (_local3.left + getStyle("paddingLeft"));
var _local5:Number = (_local3.top + getStyle("paddingTop"));
var _local6:Number = (_local3.right + getStyle("paddingRight"));
var _local7:Number = (_local3.bottom + getStyle("paddingBottom"));
var _local8:Number = (_local4 + _local6);
var _local9:Number = (_local5 + _local7);
border.setActualSize(_arg1, _arg2);
textField.move(_local4, _local5);
textField.setActualSize((_arg1 - _local8), (_arg2 - _local9));
}
private function get borderMetrics():EdgeMetrics{
if ((border is IRectangularBorder)){
return (IRectangularBorder(border).borderMetrics);
};
return (EdgeMetrics.EMPTY);
}
}
}//package mx.controls
Section 242
//VScrollBar (mx.controls.VScrollBar)
package mx.controls {
import mx.controls.scrollClasses.*;
import flash.ui.*;
public class VScrollBar extends ScrollBar {
mx_internal static const VERSION:String = "3.2.0.3958";
public function VScrollBar(){
super.direction = ScrollBarDirection.VERTICAL;
}
override protected function measure():void{
super.measure();
measuredWidth = _minWidth;
measuredHeight = _minHeight;
}
override public function get minHeight():Number{
return (_minHeight);
}
override mx_internal function isScrollBarKey(_arg1:uint):Boolean{
if (_arg1 == Keyboard.UP){
lineScroll(-1);
return (true);
};
if (_arg1 == Keyboard.DOWN){
lineScroll(1);
return (true);
};
if (_arg1 == Keyboard.PAGE_UP){
pageScroll(-1);
return (true);
};
if (_arg1 == Keyboard.PAGE_DOWN){
pageScroll(1);
return (true);
};
return (super.isScrollBarKey(_arg1));
}
override public function get minWidth():Number{
return (_minWidth);
}
override public function set direction(_arg1:String):void{
}
}
}//package mx.controls
Section 243
//Application (mx.core.Application)
package mx.core {
import flash.display.*;
import mx.managers.*;
import flash.events.*;
import mx.events.*;
import mx.styles.*;
import mx.effects.*;
import flash.net.*;
import flash.utils.*;
import mx.containers.utilityClasses.*;
import flash.ui.*;
import flash.system.*;
import flash.external.*;
public class Application extends LayoutContainer {
public var preloader:Object;
public var pageTitle:String;
private var resizeWidth:Boolean;// = true
private var _applicationViewMetrics:EdgeMetrics;
mx_internal var _parameters:Object;
private var processingCreationQueue:Boolean;// = false
public var scriptRecursionLimit:int;
private var resizeHandlerAdded:Boolean;// = false
private var preloadObj:Object;
public var usePreloader:Boolean;
mx_internal var _url:String;
private var _viewSourceURL:String;
public var resetHistory:Boolean;// = true
public var historyManagementEnabled:Boolean;// = true
public var scriptTimeLimit:Number;
public var frameRate:Number;
private var creationQueue:Array;
private var resizeHeight:Boolean;// = true
public var controlBar:IUIComponent;
private var viewSourceCMI:ContextMenuItem;
mx_internal static const VERSION:String = "3.2.0.3958";
mx_internal static var useProgressiveLayout:Boolean = false;
public function Application(){
creationQueue = [];
name = "application";
UIComponentGlobals.layoutManager = ILayoutManager(Singleton.getInstance("mx.managers::ILayoutManager"));
UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
if (!ApplicationGlobals.application){
ApplicationGlobals.application = this;
};
super();
layoutObject = new ApplicationLayout();
layoutObject.target = this;
boxLayoutClass = ApplicationLayout;
showInAutomationHierarchy = true;
}
public function set viewSourceURL(_arg1:String):void{
_viewSourceURL = _arg1;
}
override public function set percentWidth(_arg1:Number):void{
super.percentWidth = _arg1;
invalidateDisplayList();
}
override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
var _local2:Object = {};
if (_arg1 == this){
_local2.width = width;
_local2.height = height;
_local2.verticalScrollPosition = verticalScrollPosition;
_local2.horizontalScrollPosition = horizontalScrollPosition;
_local2.horizontalScrollBarVisible = !((horizontalScrollBar == null));
_local2.verticalScrollBarVisible = !((verticalScrollBar == null));
_local2.whiteBoxVisible = !((whiteBox == null));
setActualSize(measuredWidth, measuredHeight);
horizontalScrollPosition = 0;
verticalScrollPosition = 0;
if (horizontalScrollBar){
horizontalScrollBar.visible = false;
};
if (verticalScrollBar){
verticalScrollBar.visible = false;
};
if (whiteBox){
whiteBox.visible = false;
};
updateDisplayList(unscaledWidth, unscaledHeight);
};
_local2.scrollRect = super.prepareToPrint(_arg1);
return (_local2);
}
override protected function measure():void{
var _local2:Number;
super.measure();
var _local1:EdgeMetrics = borderMetrics;
if (((controlBar) && (controlBar.includeInLayout))){
_local2 = ((controlBar.getExplicitOrMeasuredWidth() + _local1.left) + _local1.right);
measuredWidth = Math.max(measuredWidth, _local2);
measuredMinWidth = Math.max(measuredMinWidth, _local2);
};
}
override public function getChildIndex(_arg1:DisplayObject):int{
if (((controlBar) && ((_arg1 == controlBar)))){
return (-1);
};
return (super.getChildIndex(_arg1));
}
private function resizeHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
if (resizeWidth){
if (isNaN(percentWidth)){
_local2 = DisplayObject(systemManager).width;
} else {
super.percentWidth = Math.max(percentWidth, 0);
super.percentWidth = Math.min(percentWidth, 100);
_local2 = ((percentWidth * screen.width) / 100);
};
if (!isNaN(explicitMaxWidth)){
_local2 = Math.min(_local2, explicitMaxWidth);
};
if (!isNaN(explicitMinWidth)){
_local2 = Math.max(_local2, explicitMinWidth);
};
} else {
_local2 = width;
};
if (resizeHeight){
if (isNaN(percentHeight)){
_local3 = DisplayObject(systemManager).height;
} else {
super.percentHeight = Math.max(percentHeight, 0);
super.percentHeight = Math.min(percentHeight, 100);
_local3 = ((percentHeight * screen.height) / 100);
};
if (!isNaN(explicitMaxHeight)){
_local3 = Math.min(_local3, explicitMaxHeight);
};
if (!isNaN(explicitMinHeight)){
_local3 = Math.max(_local3, explicitMinHeight);
};
} else {
_local3 = height;
};
if (((!((_local2 == width))) || (!((_local3 == height))))){
invalidateProperties();
invalidateSize();
};
setActualSize(_local2, _local3);
invalidateDisplayList();
}
private function initManagers(_arg1:ISystemManager):void{
if (_arg1.isTopLevel()){
focusManager = new FocusManager(this);
_arg1.activate(this);
};
}
override public function initialize():void{
var _local2:Object;
var _local1:ISystemManager = systemManager;
_url = _local1.loaderInfo.url;
_parameters = _local1.loaderInfo.parameters;
initManagers(_local1);
_descriptor = null;
if (documentDescriptor){
creationPolicy = documentDescriptor.properties.creationPolicy;
if ((((creationPolicy == null)) || ((creationPolicy.length == 0)))){
creationPolicy = ContainerCreationPolicy.AUTO;
};
_local2 = documentDescriptor.properties;
if (_local2.width != null){
width = _local2.width;
delete _local2.width;
};
if (_local2.height != null){
height = _local2.height;
delete _local2.height;
};
documentDescriptor.events = null;
};
initContextMenu();
super.initialize();
addEventListener(Event.ADDED, addedHandler);
if (((_local1.isTopLevelRoot()) && ((Capabilities.isDebugger == true)))){
setInterval(debugTickler, 1500);
};
}
override public function set percentHeight(_arg1:Number):void{
super.percentHeight = _arg1;
invalidateDisplayList();
}
override public function get id():String{
if (((((!(super.id)) && ((this == Application.application)))) && (ExternalInterface.available))){
return (ExternalInterface.objectID);
};
return (super.id);
}
override mx_internal function setUnscaledWidth(_arg1:Number):void{
invalidateProperties();
super.setUnscaledWidth(_arg1);
}
private function debugTickler():void{
var _local1:int;
}
private function doNextQueueItem(_arg1:FlexEvent=null):void{
processingCreationQueue = true;
Application.useProgressiveLayout = true;
callLater(processNextQueueItem);
}
private function initContextMenu():void{
var _local2:String;
if (flexContextMenu != null){
if ((systemManager is InteractiveObject)){
InteractiveObject(systemManager).contextMenu = contextMenu;
};
return;
};
var _local1:ContextMenu = new ContextMenu();
_local1.hideBuiltInItems();
_local1.builtInItems.print = true;
if (_viewSourceURL){
_local2 = resourceManager.getString("core", "viewSource");
viewSourceCMI = new ContextMenuItem(_local2, true);
viewSourceCMI.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler);
_local1.customItems.push(viewSourceCMI);
};
contextMenu = _local1;
if ((systemManager is InteractiveObject)){
InteractiveObject(systemManager).contextMenu = _local1;
};
}
private function addedHandler(_arg1:Event):void{
if ((((_arg1.target == this)) && ((creationQueue.length > 0)))){
doNextQueueItem();
};
}
public function get viewSourceURL():String{
return (_viewSourceURL);
}
override mx_internal function get usePadding():Boolean{
return (!((layout == ContainerLayout.ABSOLUTE)));
}
override mx_internal function setUnscaledHeight(_arg1:Number):void{
invalidateProperties();
super.setUnscaledHeight(_arg1);
}
mx_internal function dockControlBar(_arg1:IUIComponent, _arg2:Boolean):void{
var controlBar = _arg1;
var dock = _arg2;
if (dock){
try {
removeChild(DisplayObject(controlBar));
} catch(e:Error) {
return;
};
rawChildren.addChildAt(DisplayObject(controlBar), firstChildIndex);
setControlBar(controlBar);
} else {
try {
rawChildren.removeChild(DisplayObject(controlBar));
} catch(e:Error) {
return;
};
setControlBar(null);
addChildAt(DisplayObject(controlBar), 0);
};
}
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((_arg1 == "backgroundColor")) && ((getStyle("backgroundImage") == getStyle("defaultBackgroundImage"))))){
clearStyle("backgroundImage");
};
}
override protected function layoutChrome(_arg1:Number, _arg2:Number):void{
super.layoutChrome(_arg1, _arg2);
if (!doingLayout){
createBorder();
};
var _local3:EdgeMetrics = borderMetrics;
var _local4:Number = getStyle("borderThickness");
var _local5:EdgeMetrics = new EdgeMetrics();
_local5.left = (_local3.left - _local4);
_local5.top = (_local3.top - _local4);
_local5.right = (_local3.right - _local4);
_local5.bottom = (_local3.bottom - _local4);
if (((controlBar) && (controlBar.includeInLayout))){
if ((controlBar is IInvalidating)){
IInvalidating(controlBar).invalidateDisplayList();
};
controlBar.setActualSize((width - (_local5.left + _local5.right)), controlBar.getExplicitOrMeasuredHeight());
controlBar.move(_local5.left, _local5.top);
};
}
protected function menuItemSelectHandler(_arg1:Event):void{
navigateToURL(new URLRequest(_viewSourceURL), "_blank");
}
private function printCreationQueue():void{
var _local4:Object;
var _local1 = "";
var _local2:Number = creationQueue.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = creationQueue[_local3];
_local1 = (_local1 + (((((" [" + _local3) + "] ") + _local4.id) + " ") + _local4.index));
_local3++;
};
}
override protected function resourcesChanged():void{
super.resourcesChanged();
if (viewSourceCMI){
viewSourceCMI.caption = resourceManager.getString("core", "viewSource");
};
}
override protected function commitProperties():void{
super.commitProperties();
resizeWidth = isNaN(explicitWidth);
resizeHeight = isNaN(explicitHeight);
if (((resizeWidth) || (resizeHeight))){
resizeHandler(new Event(Event.RESIZE));
if (!resizeHandlerAdded){
systemManager.addEventListener(Event.RESIZE, resizeHandler, false, 0, true);
resizeHandlerAdded = true;
};
} else {
if (resizeHandlerAdded){
systemManager.removeEventListener(Event.RESIZE, resizeHandler);
resizeHandlerAdded = false;
};
};
}
override public function set toolTip(_arg1:String):void{
}
public function addToCreationQueue(_arg1:Object, _arg2:int=-1, _arg3:Function=null, _arg4:IFlexDisplayObject=null):void{
var _local8:int;
var _local9:int;
var _local10:int;
var _local12:int;
var _local5:int = creationQueue.length;
var _local6:Object = {};
var _local7:Boolean;
_local6.id = _arg1;
_local6.parent = _arg4;
_local6.callbackFunc = _arg3;
_local6.index = _arg2;
var _local11:int;
while (_local11 < _local5) {
_local9 = creationQueue[_local11].index;
_local10 = (creationQueue[_local11].parent) ? creationQueue[_local11].parent.nestLevel : 0;
if (_local6.index != -1){
if ((((_local9 == -1)) || ((_local6.index < _local9)))){
_local8 = _local11;
_local7 = true;
break;
};
} else {
_local12 = (_local6.parent) ? _local6.parent.nestLevel : 0;
if ((((_local9 == -1)) && ((_local10 < _local12)))){
_local8 = _local11;
_local7 = true;
break;
};
};
_local11++;
};
if (!_local7){
creationQueue.push(_local6);
_local7 = true;
} else {
creationQueue.splice(_local8, 0, _local6);
};
if (((initialized) && (!(processingCreationQueue)))){
doNextQueueItem();
};
}
override mx_internal function initThemeColor():Boolean{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:CSSStyleDeclaration;
var _local1:Boolean = super.initThemeColor();
if (!_local1){
_local5 = StyleManager.getStyleDeclaration("global");
if (_local5){
_local2 = _local5.getStyle("themeColor");
_local3 = _local5.getStyle("rollOverColor");
_local4 = _local5.getStyle("selectionColor");
};
if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){
setThemeColor(_local2);
};
_local1 = true;
};
return (_local1);
}
override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
if (_arg2 == this){
setActualSize(_arg1.width, _arg1.height);
if (horizontalScrollBar){
horizontalScrollBar.visible = _arg1.horizontalScrollBarVisible;
};
if (verticalScrollBar){
verticalScrollBar.visible = _arg1.verticalScrollBarVisible;
};
if (whiteBox){
whiteBox.visible = _arg1.whiteBoxVisible;
};
horizontalScrollPosition = _arg1.horizontalScrollPosition;
verticalScrollPosition = _arg1.verticalScrollPosition;
updateDisplayList(unscaledWidth, unscaledHeight);
};
super.finishPrint(_arg1.scrollRect, _arg2);
}
private function processNextQueueItem():void{
var queueItem:Object;
var nextChild:IUIComponent;
if (EffectManager.effectsPlaying.length > 0){
callLater(processNextQueueItem);
} else {
if (creationQueue.length > 0){
queueItem = creationQueue.shift();
try {
nextChild = ((queueItem.id is String)) ? document[queueItem.id] : queueItem.id;
if ((nextChild is Container)){
Container(nextChild).createComponentsFromDescriptors(true);
};
if ((((nextChild is Container)) && ((Container(nextChild).creationPolicy == ContainerCreationPolicy.QUEUED)))){
doNextQueueItem();
} else {
nextChild.addEventListener("childrenCreationComplete", doNextQueueItem);
};
} catch(e:Error) {
processNextQueueItem();
};
} else {
processingCreationQueue = false;
Application.useProgressiveLayout = false;
};
};
}
override public function set label(_arg1:String):void{
}
public function get parameters():Object{
return (_parameters);
}
override public function get viewMetrics():EdgeMetrics{
if (!_applicationViewMetrics){
_applicationViewMetrics = new EdgeMetrics();
};
var _local1:EdgeMetrics = _applicationViewMetrics;
var _local2:EdgeMetrics = super.viewMetrics;
var _local3:Number = getStyle("borderThickness");
_local1.left = _local2.left;
_local1.top = _local2.top;
_local1.right = _local2.right;
_local1.bottom = _local2.bottom;
if (((controlBar) && (controlBar.includeInLayout))){
_local1.top = (_local1.top - _local3);
_local1.top = (_local1.top + Math.max(controlBar.getExplicitOrMeasuredHeight(), _local3));
};
return (_local1);
}
public function get url():String{
return (_url);
}
override public function set icon(_arg1:Class):void{
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
createBorder();
}
private function setControlBar(_arg1:IUIComponent):void{
if (_arg1 == controlBar){
return;
};
if (((controlBar) && ((controlBar is IStyleClient)))){
IStyleClient(controlBar).clearStyle("cornerRadius");
IStyleClient(controlBar).clearStyle("docked");
};
controlBar = _arg1;
if (((controlBar) && ((controlBar is IStyleClient)))){
IStyleClient(controlBar).setStyle("cornerRadius", 0);
IStyleClient(controlBar).setStyle("docked", true);
};
invalidateSize();
invalidateDisplayList();
invalidateViewMetricsAndPadding();
}
override public function set tabIndex(_arg1:int):void{
}
public static function get application():Object{
return (ApplicationGlobals.application);
}
}
}//package mx.core
Section 244
//ApplicationGlobals (mx.core.ApplicationGlobals)
package mx.core {
public class ApplicationGlobals {
public static var application:Object;
}
}//package mx.core
Section 245
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.2.0.3958";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 246
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 247
//ComponentDescriptor (mx.core.ComponentDescriptor)
package mx.core {
public class ComponentDescriptor {
public var events:Object;
public var type:Class;
public var document:Object;
private var _properties:Object;
public var propertiesFactory:Function;
public var id:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public function ComponentDescriptor(_arg1:Object){
var _local2:String;
super();
for (_local2 in _arg1) {
this[_local2] = _arg1[_local2];
};
}
public function toString():String{
return (("ComponentDescriptor_" + id));
}
public function invalidateProperties():void{
_properties = null;
}
public function get properties():Object{
var _local1:Array;
var _local2:int;
var _local3:int;
if (_properties){
return (_properties);
};
if (propertiesFactory != null){
_properties = propertiesFactory.call(document);
};
if (_properties){
_local1 = _properties.childDescriptors;
if (_local1){
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].document = document;
_local3++;
};
};
} else {
_properties = {};
};
return (_properties);
}
}
}//package mx.core
Section 248
//Container (mx.core.Container)
package mx.core {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import mx.managers.*;
import flash.events.*;
import mx.events.*;
import mx.styles.*;
import mx.controls.*;
import mx.graphics.*;
import mx.controls.scrollClasses.*;
import mx.binding.*;
import flash.utils.*;
import mx.controls.listClasses.*;
import flash.ui.*;
public class Container extends UIComponent implements IContainer, IDataRenderer, IFocusManagerContainer, IListItemRenderer, IRawChildrenContainer {
private var forceLayout:Boolean;// = false
private var _numChildrenCreated:int;// = -1
private var _horizontalLineScrollSize:Number;// = 5
mx_internal var border:IFlexDisplayObject;
protected var actualCreationPolicy:String;
private var _viewMetricsAndPadding:EdgeMetrics;
private var _creatingContentPane:Boolean;// = false
private var _childRepeaters:Array;
private var scrollableWidth:Number;// = 0
private var _childDescriptors:Array;
private var _rawChildren:ContainerRawChildrenList;
private var _data:Object;
private var _verticalPageScrollSize:Number;// = 0
private var _viewMetrics:EdgeMetrics;
private var _verticalScrollBar:ScrollBar;
private var scrollPropertiesChanged:Boolean;// = false
private var changedStyles:String;// = null
private var scrollPositionChanged:Boolean;// = true
private var _defaultButton:IFlexDisplayObject;
private var mouseEventReferenceCount:int;// = 0
private var _focusPane:Sprite;
protected var whiteBox:Shape;
private var _forceClippingCount:int;
private var _horizontalPageScrollSize:Number;// = 0
private var _creationPolicy:String;
private var _creationIndex:int;// = -1
private var _clipContent:Boolean;// = true
private var _verticalScrollPosition:Number;// = 0
private var _autoLayout:Boolean;// = true
private var _icon:Class;// = null
mx_internal var doingLayout:Boolean;// = false
private var _horizontalScrollBar:ScrollBar;
private var numChildrenBefore:int;
private var viewableHeight:Number;// = 0
private var viewableWidth:Number;// = 0
mx_internal var contentPane:Sprite;// = null
private var _createdComponents:Array;
private var _firstChildIndex:int;// = 0
private var scrollableHeight:Number;// = 0
private var _verticalLineScrollSize:Number;// = 5
private var _horizontalScrollPosition:Number;// = 0
mx_internal var _horizontalScrollPolicy:String;// = "auto"
private var verticalScrollPositionPending:Number;
mx_internal var _verticalScrollPolicy:String;// = "auto"
private var horizontalScrollPositionPending:Number;
mx_internal var _numChildren:int;// = 0
private var recursionFlag:Boolean;// = true
private var _label:String;// = ""
mx_internal var blocker:Sprite;
mx_internal static const VERSION:String = "3.2.0.3958";
private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>";
public function Container(){
tabChildren = true;
tabEnabled = false;
showInAutomationHierarchy = false;
}
public function set verticalScrollPolicy(_arg1:String):void{
if (_verticalScrollPolicy != _arg1){
_verticalScrollPolicy = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalScrollPolicyChanged"));
};
}
private function createContentPaneAndScrollbarsIfNeeded():Boolean{
var _local1:Rectangle;
var _local2:Boolean;
if (_clipContent){
_local1 = getScrollableRect();
_local2 = createScrollbarsIfNeeded(_local1);
if (border){
updateBackgroundImageRect();
};
return (_local2);
//unresolved jump
};
_local2 = createOrDestroyScrollbars(false, false, false);
_local1 = getScrollableRect();
scrollableWidth = _local1.right;
scrollableHeight = _local1.bottom;
if (((_local2) && (border))){
updateBackgroundImageRect();
};
return (_local2);
}
override protected function initializationComplete():void{
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
public function set creatingContentPane(_arg1:Boolean):void{
_creatingContentPane = _arg1;
}
public function set clipContent(_arg1:Boolean):void{
if (_clipContent != _arg1){
_clipContent = _arg1;
invalidateDisplayList();
};
}
protected function scrollChildren():void{
if (!contentPane){
return;
};
var _local1:EdgeMetrics = viewMetrics;
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:Number = ((unscaledWidth - _local1.left) - _local1.right);
var _local5:Number = ((unscaledHeight - _local1.top) - _local1.bottom);
if (_clipContent){
_local2 = (_local2 + _horizontalScrollPosition);
if (horizontalScrollBar){
_local4 = viewableWidth;
};
_local3 = (_local3 + _verticalScrollPosition);
if (verticalScrollBar){
_local5 = viewableHeight;
};
} else {
_local4 = scrollableWidth;
_local5 = scrollableHeight;
};
var _local6:Rectangle = getScrollableRect();
if ((((((((((((((_local2 == 0)) && ((_local3 == 0)))) && ((_local4 >= _local6.right)))) && ((_local5 >= _local6.bottom)))) && ((_local6.left >= 0)))) && ((_local6.top >= 0)))) && ((_forceClippingCount <= 0)))){
contentPane.scrollRect = null;
contentPane.opaqueBackground = null;
contentPane.cacheAsBitmap = false;
} else {
contentPane.scrollRect = new Rectangle(_local2, _local3, _local4, _local5);
};
if (focusPane){
focusPane.scrollRect = contentPane.scrollRect;
};
if (((((border) && ((border is IRectangularBorder)))) && (IRectangularBorder(border).hasBackgroundImage))){
IRectangularBorder(border).layoutBackgroundImage();
};
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:InteractiveObject;
super.doubleClickEnabled = _arg1;
if (contentPane){
_local2 = contentPane.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (contentPane.getChildAt(_local3) as InteractiveObject);
if (_local4){
_local4.doubleClickEnabled = _arg1;
};
_local3++;
};
};
}
override public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local5:ISimpleStyleClient;
var _local3:int = super.numChildren;
var _local4:int;
while (_local4 < _local3) {
if (((((contentPane) || ((_local4 < _firstChildIndex)))) || ((_local4 >= (_firstChildIndex + _numChildren))))){
_local5 = (super.getChildAt(_local4) as ISimpleStyleClient);
if (_local5){
_local5.styleChanged(_arg1);
if ((_local5 is IStyleClient)){
IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2);
};
};
};
_local4++;
};
if (_arg2){
changedStyles = (((!((changedStyles == null))) || ((_arg1 == null)))) ? MULTIPLE_PROPERTIES : _arg1;
invalidateProperties();
};
}
mx_internal function get createdComponents():Array{
return (_createdComponents);
}
public function get childDescriptors():Array{
return (_childDescriptors);
}
override public function get contentMouseY():Number{
if (contentPane){
return (contentPane.mouseY);
};
return (super.contentMouseY);
}
mx_internal function get childRepeaters():Array{
return (_childRepeaters);
}
override public function contains(_arg1:DisplayObject):Boolean{
if (contentPane){
return (contentPane.contains(_arg1));
};
return (super.contains(_arg1));
}
override public function get contentMouseX():Number{
if (contentPane){
return (contentPane.mouseX);
};
return (super.contentMouseX);
}
mx_internal function set createdComponents(_arg1:Array):void{
_createdComponents = _arg1;
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
override public function validateSize(_arg1:Boolean=false):void{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
if ((((autoLayout == false)) && ((forceLayout == false)))){
if (_arg1){
_local2 = super.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = super.getChildAt(_local3);
if ((_local4 is ILayoutManagerClient)){
ILayoutManagerClient(_local4).validateSize(true);
};
_local3++;
};
};
adjustSizesForScaleChanges();
} else {
super.validateSize(_arg1);
};
}
public function get rawChildren():IChildList{
if (!_rawChildren){
_rawChildren = new ContainerRawChildrenList(this);
};
return (_rawChildren);
}
override public function getChildAt(_arg1:int):DisplayObject{
if (contentPane){
return (contentPane.getChildAt(_arg1));
};
return (super.getChildAt((_firstChildIndex + _arg1)));
}
override protected function attachOverlay():void{
rawChildren_addChild(overlay);
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){
if ((((mouseEventReferenceCount < 2147483647)) && ((mouseEventReferenceCount++ == 0)))){
setStyle("mouseShield", true);
setStyle("mouseShieldChildren", true);
};
};
}
override public function localToContent(_arg1:Point):Point{
if (!contentPane){
return (_arg1);
};
_arg1 = localToGlobal(_arg1);
return (globalToContent(_arg1));
}
public function executeChildBindings(_arg1:Boolean):void{
var _local4:IUIComponent;
var _local2:int = numChildren;
var _local3:int;
while (_local3 < _local2) {
_local4 = IUIComponent(getChildAt(_local3));
if ((_local4 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_local4).executeBindings(_arg1);
};
_local3++;
};
}
protected function createBorder():void{
var _local1:Class;
if (((!(border)) && (isBorderNeeded()))){
_local1 = getStyle("borderSkin");
if (_local1 != null){
border = new (_local1);
border.name = "border";
if ((border is IUIComponent)){
IUIComponent(border).enabled = enabled;
};
if ((border is ISimpleStyleClient)){
ISimpleStyleClient(border).styleName = this;
};
rawChildren.addChildAt(DisplayObject(border), 0);
invalidateDisplayList();
};
};
}
public function get verticalScrollPosition():Number{
if (!isNaN(verticalScrollPositionPending)){
return (verticalScrollPositionPending);
};
return (_verticalScrollPosition);
}
public function get horizontalScrollPosition():Number{
if (!isNaN(horizontalScrollPositionPending)){
return (horizontalScrollPositionPending);
};
return (_horizontalScrollPosition);
}
protected function layoutChrome(_arg1:Number, _arg2:Number):void{
if (border){
updateBackgroundImageRect();
border.move(0, 0);
border.setActualSize(_arg1, _arg2);
};
}
mx_internal function set childRepeaters(_arg1:Array):void{
_childRepeaters = _arg1;
}
override public function get focusPane():Sprite{
return (_focusPane);
}
public function set creationIndex(_arg1:int):void{
_creationIndex = _arg1;
}
public function get viewMetrics():EdgeMetrics{
var _local1:EdgeMetrics = borderMetrics;
var _local2:Boolean = ((!((verticalScrollBar == null))) && (((doingLayout) || ((verticalScrollPolicy == ScrollPolicy.ON)))));
var _local3:Boolean = ((!((horizontalScrollBar == null))) && (((doingLayout) || ((horizontalScrollPolicy == ScrollPolicy.ON)))));
if (((!(_local2)) && (!(_local3)))){
return (_local1);
};
if (!_viewMetrics){
_viewMetrics = _local1.clone();
} else {
_viewMetrics.left = _local1.left;
_viewMetrics.right = _local1.right;
_viewMetrics.top = _local1.top;
_viewMetrics.bottom = _local1.bottom;
};
if (_local2){
_viewMetrics.right = (_viewMetrics.right + verticalScrollBar.minWidth);
};
if (_local3){
_viewMetrics.bottom = (_viewMetrics.bottom + horizontalScrollBar.minHeight);
};
return (_viewMetrics);
}
public function set verticalScrollBar(_arg1:ScrollBar):void{
_verticalScrollBar = _arg1;
}
public function set verticalScrollPosition(_arg1:Number):void{
if (_verticalScrollPosition == _arg1){
return;
};
_verticalScrollPosition = _arg1;
scrollPositionChanged = true;
if (!initialized){
verticalScrollPositionPending = _arg1;
};
invalidateDisplayList();
dispatchEvent(new Event("viewChanged"));
}
private function createOrDestroyScrollbars(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):Boolean{
var _local5:IFocusManager;
var _local6:String;
var _local7:String;
var _local8:Graphics;
var _local4:Boolean;
if (((((_arg1) || (_arg2))) || (_arg3))){
createContentPane();
};
if (_arg1){
if (!horizontalScrollBar){
horizontalScrollBar = new HScrollBar();
horizontalScrollBar.name = "horizontalScrollBar";
_local6 = getStyle("horizontalScrollBarStyleName");
if (((_local6) && ((horizontalScrollBar is ISimpleStyleClient)))){
ISimpleStyleClient(horizontalScrollBar).styleName = _local6;
};
rawChildren.addChild(DisplayObject(horizontalScrollBar));
horizontalScrollBar.lineScrollSize = horizontalLineScrollSize;
horizontalScrollBar.pageScrollSize = horizontalPageScrollSize;
horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler);
horizontalScrollBar.enabled = enabled;
if ((horizontalScrollBar is IInvalidating)){
IInvalidating(horizontalScrollBar).validateNow();
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
if (!verticalScrollBar){
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
};
} else {
if (horizontalScrollBar){
horizontalScrollBar.removeEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler);
rawChildren.removeChild(DisplayObject(horizontalScrollBar));
horizontalScrollBar = null;
viewableWidth = (scrollableWidth = 0);
if (_horizontalScrollPosition != 0){
_horizontalScrollPosition = 0;
scrollPositionChanged = true;
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
_local5 = focusManager;
if (((!(verticalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){
removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
};
};
if (_arg2){
if (!verticalScrollBar){
verticalScrollBar = new VScrollBar();
verticalScrollBar.name = "verticalScrollBar";
_local7 = getStyle("verticalScrollBarStyleName");
if (((_local7) && ((verticalScrollBar is ISimpleStyleClient)))){
ISimpleStyleClient(verticalScrollBar).styleName = _local7;
};
rawChildren.addChild(DisplayObject(verticalScrollBar));
verticalScrollBar.lineScrollSize = verticalLineScrollSize;
verticalScrollBar.pageScrollSize = verticalPageScrollSize;
verticalScrollBar.addEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler);
verticalScrollBar.enabled = enabled;
if ((verticalScrollBar is IInvalidating)){
IInvalidating(verticalScrollBar).validateNow();
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
if (!horizontalScrollBar){
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
};
} else {
if (verticalScrollBar){
verticalScrollBar.removeEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler);
rawChildren.removeChild(DisplayObject(verticalScrollBar));
verticalScrollBar = null;
viewableHeight = (scrollableHeight = 0);
if (_verticalScrollPosition != 0){
_verticalScrollPosition = 0;
scrollPositionChanged = true;
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
_local5 = focusManager;
if (((!(horizontalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){
removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
};
};
if (((horizontalScrollBar) && (verticalScrollBar))){
if (!whiteBox){
whiteBox = new FlexShape();
whiteBox.name = "whiteBox";
_local8 = whiteBox.graphics;
_local8.beginFill(0xFFFFFF);
_local8.drawRect(0, 0, verticalScrollBar.minWidth, horizontalScrollBar.minHeight);
_local8.endFill();
rawChildren.addChild(whiteBox);
};
} else {
if (whiteBox){
rawChildren.removeChild(whiteBox);
whiteBox = null;
};
};
return (_local4);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local3:String;
var _local4:Number;
var _local2:Object = getFocus();
if ((_local2 is TextField)){
return;
};
if (verticalScrollBar){
_local3 = ScrollEventDirection.VERTICAL;
_local4 = verticalScrollPosition;
switch (_arg1.keyCode){
case Keyboard.DOWN:
verticalScrollPosition = (verticalScrollPosition + verticalLineScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_DOWN);
_arg1.stopPropagation();
break;
case Keyboard.UP:
verticalScrollPosition = (verticalScrollPosition - verticalLineScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_UP);
_arg1.stopPropagation();
break;
case Keyboard.PAGE_UP:
verticalScrollPosition = (verticalScrollPosition - verticalPageScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_UP);
_arg1.stopPropagation();
break;
case Keyboard.PAGE_DOWN:
verticalScrollPosition = (verticalScrollPosition + verticalPageScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_DOWN);
_arg1.stopPropagation();
break;
case Keyboard.HOME:
verticalScrollPosition = verticalScrollBar.minScrollPosition;
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_TOP);
_arg1.stopPropagation();
break;
case Keyboard.END:
verticalScrollPosition = verticalScrollBar.maxScrollPosition;
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_BOTTOM);
_arg1.stopPropagation();
break;
};
};
if (horizontalScrollBar){
_local3 = ScrollEventDirection.HORIZONTAL;
_local4 = horizontalScrollPosition;
switch (_arg1.keyCode){
case Keyboard.LEFT:
horizontalScrollPosition = (horizontalScrollPosition - horizontalLineScrollSize);
dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_LEFT);
_arg1.stopPropagation();
break;
case Keyboard.RIGHT:
horizontalScrollPosition = (horizontalScrollPosition + horizontalLineScrollSize);
dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_RIGHT);
_arg1.stopPropagation();
break;
};
};
}
public function get icon():Class{
return (_icon);
}
private function createOrDestroyBlocker():void{
var _local1:DisplayObject;
var _local2:ISystemManager;
if (enabled){
if (blocker){
rawChildren.removeChild(blocker);
blocker = null;
};
} else {
if (!blocker){
blocker = new FlexSprite();
blocker.name = "blocker";
blocker.mouseEnabled = true;
rawChildren.addChild(blocker);
blocker.addEventListener(MouseEvent.CLICK, blocker_clickHandler);
_local1 = (focusManager) ? DisplayObject(focusManager.getFocus()) : null;
while (_local1) {
if (_local1 == this){
_local2 = systemManager;
if (((_local2) && (_local2.stage))){
_local2.stage.focus = null;
};
break;
};
_local1 = _local1.parent;
};
};
};
}
private function horizontalScrollBar_scrollHandler(_arg1:Event):void{
var _local2:Number;
if ((_arg1 is ScrollEvent)){
_local2 = horizontalScrollPosition;
horizontalScrollPosition = horizontalScrollBar.scrollPosition;
dispatchScrollEvent(ScrollEventDirection.HORIZONTAL, _local2, horizontalScrollPosition, ScrollEvent(_arg1).detail);
};
}
public function createComponentFromDescriptor(_arg1:ComponentDescriptor, _arg2:Boolean):IFlexDisplayObject{
var _local7:String;
var _local10:IRepeaterClient;
var _local11:IStyleClient;
var _local12:String;
var _local13:String;
var _local3:UIComponentDescriptor = UIComponentDescriptor(_arg1);
var _local4:Object = _local3.properties;
if (((((((!((numChildrenBefore == 0))) || (!((numChildrenCreated == -1))))) && ((_local3.instanceIndices == null)))) && (hasChildMatchingDescriptor(_local3)))){
return (null);
};
UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
var _local5:Class = _local3.type;
var _local6:IDeferredInstantiationUIComponent = new (_local5);
_local6.id = _local3.id;
if (((_local6.id) && (!((_local6.id == ""))))){
_local6.name = _local6.id;
};
_local6.descriptor = _local3;
if (((_local4.childDescriptors) && ((_local6 is Container)))){
Container(_local6)._childDescriptors = _local4.childDescriptors;
delete _local4.childDescriptors;
};
for (_local7 in _local4) {
_local6[_local7] = _local4[_local7];
};
if ((_local6 is Container)){
Container(_local6).recursionFlag = _arg2;
};
if (_local3.instanceIndices){
if ((_local6 is IRepeaterClient)){
_local10 = IRepeaterClient(_local6);
_local10.instanceIndices = _local3.instanceIndices;
_local10.repeaters = _local3.repeaters;
_local10.repeaterIndices = _local3.repeaterIndices;
};
};
if ((_local6 is IStyleClient)){
_local11 = IStyleClient(_local6);
if (_local3.stylesFactory != null){
if (!_local11.styleDeclaration){
_local11.styleDeclaration = new CSSStyleDeclaration();
};
_local11.styleDeclaration.factory = _local3.stylesFactory;
};
};
var _local8:Object = _local3.events;
if (_local8){
for (_local12 in _local8) {
_local13 = _local8[_local12];
_local6.addEventListener(_local12, _local3.document[_local13]);
};
};
var _local9:Array = _local3.effects;
if (_local9){
_local6.registerEffects(_local9);
};
if ((_local6 is IRepeaterClient)){
IRepeaterClient(_local6).initializeRepeaterArrays(this);
};
_local6.createReferenceOnParentDocument(IFlexDisplayObject(_local3.document));
if (!_local6.document){
_local6.document = _local3.document;
};
if ((_local6 is IRepeater)){
if (!childRepeaters){
childRepeaters = [];
};
childRepeaters.push(_local6);
_local6.executeBindings();
IRepeater(_local6).initializeRepeater(this, _arg2);
} else {
addChild(DisplayObject(_local6));
_local6.executeBindings();
if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){
_local6.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
};
return (_local6);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
if (horizontalScrollBar){
horizontalScrollBar.enabled = _arg1;
};
if (verticalScrollBar){
verticalScrollBar.enabled = _arg1;
};
invalidateProperties();
}
public function set horizontalScrollBar(_arg1:ScrollBar):void{
_horizontalScrollBar = _arg1;
}
mx_internal function get usePadding():Boolean{
return (true);
}
override public function get baselinePosition():Number{
var _local2:IUIComponent;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
if ((((getStyle("verticalAlign") == "top")) && ((numChildren > 0)))){
_local2 = (getChildAt(0) as IUIComponent);
if (_local2){
return ((_local2.y + _local2.baselinePosition));
};
};
return (super.baselinePosition);
};
if (!validateBaselinePosition()){
return (NaN);
};
var _local1:TextLineMetrics = measureText("Wj");
if (height < (((2 * viewMetrics.top) + 4) + _local1.ascent)){
return (int((height + ((_local1.ascent - height) / 2))));
};
return (((viewMetrics.top + 2) + _local1.ascent));
}
override public function getChildByName(_arg1:String):DisplayObject{
var _local2:DisplayObject;
var _local3:int;
if (contentPane){
return (contentPane.getChildByName(_arg1));
};
_local2 = super.getChildByName(_arg1);
if (!_local2){
return (null);
};
_local3 = (super.getChildIndex(_local2) - _firstChildIndex);
if ((((_local3 < 0)) || ((_local3 >= _numChildren)))){
return (null);
};
return (_local2);
}
public function get verticalLineScrollSize():Number{
return (_verticalLineScrollSize);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
var _local3:DisplayObjectContainer = _arg1.parent;
if (((_local3) && (!((_local3 is Loader))))){
if (_local3 == this){
_arg2 = ((_arg2)==numChildren) ? (_arg2 - 1) : _arg2;
};
_local3.removeChild(_arg1);
};
addingChild(_arg1);
if (contentPane){
contentPane.addChildAt(_arg1, _arg2);
} else {
$addChildAt(_arg1, (_firstChildIndex + _arg2));
};
childAdded(_arg1);
if ((((_arg1 is UIComponent)) && (UIComponent(_arg1).isDocument))){
BindingManager.setEnabled(_arg1, true);
};
return (_arg1);
}
public function get maxVerticalScrollPosition():Number{
return ((verticalScrollBar) ? verticalScrollBar.maxScrollPosition : Math.max((scrollableHeight - viewableHeight), 0));
}
public function set horizontalScrollPosition(_arg1:Number):void{
if (_horizontalScrollPosition == _arg1){
return;
};
_horizontalScrollPosition = _arg1;
scrollPositionChanged = true;
if (!initialized){
horizontalScrollPositionPending = _arg1;
};
invalidateDisplayList();
dispatchEvent(new Event("viewChanged"));
}
mx_internal function invalidateViewMetricsAndPadding():void{
_viewMetricsAndPadding = null;
}
public function get horizontalLineScrollSize():Number{
return (_horizontalLineScrollSize);
}
override public function set focusPane(_arg1:Sprite):void{
var _local2:Boolean = invalidateSizeFlag;
var _local3:Boolean = invalidateDisplayListFlag;
invalidateSizeFlag = true;
invalidateDisplayListFlag = true;
if (_arg1){
rawChildren.addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
rawChildren.removeChild(_focusPane);
_focusPane = null;
};
if (((_arg1) && (contentPane))){
_arg1.x = contentPane.x;
_arg1.y = contentPane.y;
_arg1.scrollRect = contentPane.scrollRect;
};
invalidateSizeFlag = _local2;
invalidateDisplayListFlag = _local3;
}
private function updateBackgroundImageRect():void{
var _local1:IRectangularBorder = (border as IRectangularBorder);
if (!_local1){
return;
};
if ((((viewableWidth == 0)) && ((viewableHeight == 0)))){
_local1.backgroundImageBounds = null;
return;
};
var _local2:EdgeMetrics = viewMetrics;
var _local3:Number = (viewableWidth) ? viewableWidth : ((unscaledWidth - _local2.left) - _local2.right);
var _local4:Number = (viewableHeight) ? viewableHeight : ((unscaledHeight - _local2.top) - _local2.bottom);
if (getStyle("backgroundAttachment") == "fixed"){
_local1.backgroundImageBounds = new Rectangle(_local2.left, _local2.top, _local3, _local4);
} else {
_local1.backgroundImageBounds = new Rectangle(_local2.left, _local2.top, Math.max(scrollableWidth, _local3), Math.max(scrollableHeight, _local4));
};
}
private function blocker_clickHandler(_arg1:Event):void{
_arg1.stopPropagation();
}
private function mouseWheelHandler(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
if (verticalScrollBar){
_arg1.stopPropagation();
_local2 = ((_arg1.delta <= 0)) ? 1 : -1;
_local3 = (verticalScrollBar) ? verticalScrollBar.lineScrollSize : 1;
_local4 = Math.max(Math.abs(_arg1.delta), _local3);
_local5 = verticalScrollPosition;
verticalScrollPosition = (verticalScrollPosition + ((3 * _local4) * _local2));
dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local5, verticalScrollPosition, ((_arg1.delta <= 0)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_DOWN);
};
}
public function get defaultButton():IFlexDisplayObject{
return (_defaultButton);
}
mx_internal function createContentPane():void{
var _local3:int;
var _local5:IUIComponent;
if (contentPane){
return;
};
creatingContentPane = true;
var _local1:int = numChildren;
var _local2:Sprite = new FlexSprite();
_local2.name = "contentPane";
_local2.tabChildren = true;
if (border){
_local3 = (rawChildren.getChildIndex(DisplayObject(border)) + 1);
if ((((border is IRectangularBorder)) && (IRectangularBorder(border).hasBackgroundImage))){
_local3++;
};
} else {
_local3 = 0;
};
rawChildren.addChildAt(_local2, _local3);
var _local4:int;
while (_local4 < _local1) {
_local5 = IUIComponent(super.getChildAt(_firstChildIndex));
_local2.addChild(DisplayObject(_local5));
_local5.parentChanged(_local2);
_numChildren--;
_local4++;
};
contentPane = _local2;
creatingContentPane = false;
contentPane.visible = true;
}
public function set verticalPageScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_verticalPageScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalPageScrollSizeChanged"));
}
mx_internal function setDocumentDescriptor(_arg1:UIComponentDescriptor):void{
var _local2:String;
if (processedDescriptors){
return;
};
if (((_documentDescriptor) && (_documentDescriptor.properties.childDescriptors))){
if (_arg1.properties.childDescriptors){
_local2 = resourceManager.getString("core", "multipleChildSets_ClassAndSubclass");
throw (new Error(_local2));
};
} else {
_documentDescriptor = _arg1;
_documentDescriptor.document = this;
};
}
private function verticalScrollBar_scrollHandler(_arg1:Event):void{
var _local2:Number;
if ((_arg1 is ScrollEvent)){
_local2 = verticalScrollPosition;
verticalScrollPosition = verticalScrollBar.scrollPosition;
dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local2, verticalScrollPosition, ScrollEvent(_arg1).detail);
};
}
public function get creationPolicy():String{
return (_creationPolicy);
}
public function set icon(_arg1:Class):void{
_icon = _arg1;
dispatchEvent(new Event("iconChanged"));
}
private function dispatchScrollEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String):void{
var _local5:ScrollEvent = new ScrollEvent(ScrollEvent.SCROLL);
_local5.direction = _arg1;
_local5.position = _arg3;
_local5.delta = (_arg3 - _arg2);
_local5.detail = _arg4;
dispatchEvent(_local5);
}
public function get label():String{
return (_label);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
public function get borderMetrics():EdgeMetrics{
return ((((border) && ((border is IRectangularBorder)))) ? IRectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
numChildrenCreated--;
if (numChildrenCreated <= 0){
dispatchEvent(new FlexEvent("childrenCreationComplete"));
};
}
override public function contentToLocal(_arg1:Point):Point{
if (!contentPane){
return (_arg1);
};
_arg1 = contentToGlobal(_arg1);
return (globalToLocal(_arg1));
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
var _local2:int;
var _local3:int;
if ((((_arg1 is IDeferredInstantiationUIComponent)) && (IDeferredInstantiationUIComponent(_arg1).descriptor))){
if (createdComponents){
_local2 = createdComponents.length;
_local3 = 0;
while (_local3 < _local2) {
if (createdComponents[_local3] === _arg1){
createdComponents.splice(_local3, 1);
};
_local3++;
};
};
};
removingChild(_arg1);
if ((((_arg1 is UIComponent)) && (UIComponent(_arg1).isDocument))){
BindingManager.setEnabled(_arg1, false);
};
if (contentPane){
contentPane.removeChild(_arg1);
} else {
$removeChild(_arg1);
};
childRemoved(_arg1);
return (_arg1);
}
final mx_internal function get $numChildren():int{
return (super.numChildren);
}
mx_internal function get numRepeaters():int{
return ((childRepeaters) ? childRepeaters.length : 0);
}
mx_internal function set numChildrenCreated(_arg1:int):void{
_numChildrenCreated = _arg1;
}
public function get creatingContentPane():Boolean{
return (_creatingContentPane);
}
public function get clipContent():Boolean{
return (_clipContent);
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
override public function regenerateStyleCache(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
super.regenerateStyleCache(_arg1);
if (contentPane){
_local2 = contentPane.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = getChildAt(_local3);
if (((_arg1) && ((_local4 is UIComponent)))){
if (UIComponent(_local4).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){
UIComponent(_local4).regenerateStyleCache(_arg1);
};
} else {
if ((((_local4 is IUITextField)) && (IUITextField(_local4).inheritingStyles))){
StyleProtoChain.initTextField(IUITextField(_local4));
};
};
_local3++;
};
};
}
override public function getChildIndex(_arg1:DisplayObject):int{
var _local2:int;
if (contentPane){
return (contentPane.getChildIndex(_arg1));
};
_local2 = (super.getChildIndex(_arg1) - _firstChildIndex);
return (_local2);
}
mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{
return (super.contains(_arg1));
}
mx_internal function getScrollableRect():Rectangle{
var _local9:DisplayObject;
var _local1:Number = 0;
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:Number = 0;
var _local5:int = numChildren;
var _local6:int;
while (_local6 < _local5) {
_local9 = getChildAt(_local6);
if ((((_local9 is IUIComponent)) && (!(IUIComponent(_local9).includeInLayout)))){
} else {
_local1 = Math.min(_local1, _local9.x);
_local2 = Math.min(_local2, _local9.y);
if (!isNaN(_local9.width)){
_local3 = Math.max(_local3, (_local9.x + _local9.width));
};
if (!isNaN(_local9.height)){
_local4 = Math.max(_local4, (_local9.y + _local9.height));
};
};
_local6++;
};
var _local7:EdgeMetrics = viewMetrics;
var _local8:Rectangle = new Rectangle();
_local8.left = _local1;
_local8.top = _local2;
_local8.right = _local3;
_local8.bottom = _local4;
if (usePadding){
_local8.right = (_local8.right + getStyle("paddingRight"));
_local8.bottom = (_local8.bottom + getStyle("paddingBottom"));
};
return (_local8);
}
override protected function createChildren():void{
var _local1:Application;
super.createChildren();
createBorder();
createOrDestroyScrollbars((horizontalScrollPolicy == ScrollPolicy.ON), (verticalScrollPolicy == ScrollPolicy.ON), (((horizontalScrollPolicy == ScrollPolicy.ON)) || ((verticalScrollPolicy == ScrollPolicy.ON))));
if (creationPolicy != null){
actualCreationPolicy = creationPolicy;
} else {
if ((parent is Container)){
if (Container(parent).actualCreationPolicy == ContainerCreationPolicy.QUEUED){
actualCreationPolicy = ContainerCreationPolicy.AUTO;
} else {
actualCreationPolicy = Container(parent).actualCreationPolicy;
};
};
};
if (actualCreationPolicy == ContainerCreationPolicy.NONE){
actualCreationPolicy = ContainerCreationPolicy.AUTO;
} else {
if (actualCreationPolicy == ContainerCreationPolicy.QUEUED){
_local1 = (parentApplication) ? Application(parentApplication) : Application(Application.application);
_local1.addToCreationQueue(this, creationIndex, null, this);
} else {
if (recursionFlag){
createComponentsFromDescriptors();
};
};
};
if (autoLayout == false){
forceLayout = true;
};
UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true);
}
override public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument;
BindingManager.executeBindings(_local2, id, this);
if (_arg1){
executeChildBindings(_arg1);
};
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3:int;
var _local4:int = _local3;
var _local5:int = _arg2;
if (contentPane){
contentPane.setChildIndex(_arg1, _arg2);
if (((_autoLayout) || (forceLayout))){
invalidateDisplayList();
};
} else {
_local3 = super.getChildIndex(_arg1);
_arg2 = (_arg2 + _firstChildIndex);
if (_arg2 == _local3){
return;
};
super.setChildIndex(_arg1, _arg2);
invalidateDisplayList();
_local4 = (_local3 - _firstChildIndex);
_local5 = (_arg2 - _firstChildIndex);
};
var _local6:IndexChangedEvent = new IndexChangedEvent(IndexChangedEvent.CHILD_INDEX_CHANGE);
_local6.relatedObject = _arg1;
_local6.oldIndex = _local4;
_local6.newIndex = _local5;
dispatchEvent(_local6);
dispatchEvent(new Event("childrenChanged"));
}
override public function globalToContent(_arg1:Point):Point{
if (contentPane){
return (contentPane.globalToLocal(_arg1));
};
return (globalToLocal(_arg1));
}
mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{
var _local2:int = rawChildren_getChildIndex(_arg1);
return (rawChildren_removeChildAt(_local2));
}
mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3:int = super.getChildIndex(_arg1);
super.setChildIndex(_arg1, _arg2);
if ((((_local3 < _firstChildIndex)) && ((_arg2 >= _firstChildIndex)))){
_firstChildIndex--;
} else {
if ((((_local3 >= _firstChildIndex)) && ((_arg2 <= _firstChildIndex)))){
_firstChildIndex++;
};
};
dispatchEvent(new Event("childrenChanged"));
}
public function set verticalLineScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_verticalLineScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalLineScrollSizeChanged"));
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
public function get creationIndex():int{
return (_creationIndex);
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
public function get viewMetricsAndPadding():EdgeMetrics{
if (((((_viewMetricsAndPadding) && (((!(horizontalScrollBar)) || ((horizontalScrollPolicy == ScrollPolicy.ON)))))) && (((!(verticalScrollBar)) || ((verticalScrollPolicy == ScrollPolicy.ON)))))){
return (_viewMetricsAndPadding);
};
if (!_viewMetricsAndPadding){
_viewMetricsAndPadding = new EdgeMetrics();
};
var _local1:EdgeMetrics = _viewMetricsAndPadding;
var _local2:EdgeMetrics = viewMetrics;
_local1.left = (_local2.left + getStyle("paddingLeft"));
_local1.right = (_local2.right + getStyle("paddingRight"));
_local1.top = (_local2.top + getStyle("paddingTop"));
_local1.bottom = (_local2.bottom + getStyle("paddingBottom"));
return (_local1);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
return (addChildAt(_arg1, numChildren));
}
public function set horizontalPageScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_horizontalPageScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalPageScrollSizeChanged"));
}
override mx_internal function childAdded(_arg1:DisplayObject):void{
dispatchEvent(new Event("childrenChanged"));
var _local2:ChildExistenceChangedEvent = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_ADD);
_local2.relatedObject = _arg1;
dispatchEvent(_local2);
_arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
super.childAdded(_arg1);
}
public function set horizontalScrollPolicy(_arg1:String):void{
if (_horizontalScrollPolicy != _arg1){
_horizontalScrollPolicy = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalScrollPolicyChanged"));
};
}
private function layoutCompleteHandler(_arg1:FlexEvent):void{
UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler);
forceLayout = false;
var _local2:Boolean;
if (!isNaN(horizontalScrollPositionPending)){
if (horizontalScrollPositionPending < 0){
horizontalScrollPositionPending = 0;
} else {
if (horizontalScrollPositionPending > maxHorizontalScrollPosition){
horizontalScrollPositionPending = maxHorizontalScrollPosition;
};
};
if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == horizontalScrollPositionPending))))){
_horizontalScrollPosition = horizontalScrollPositionPending;
horizontalScrollBar.scrollPosition = horizontalScrollPositionPending;
_local2 = true;
};
horizontalScrollPositionPending = NaN;
};
if (!isNaN(verticalScrollPositionPending)){
if (verticalScrollPositionPending < 0){
verticalScrollPositionPending = 0;
} else {
if (verticalScrollPositionPending > maxVerticalScrollPosition){
verticalScrollPositionPending = maxVerticalScrollPosition;
};
};
if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == verticalScrollPositionPending))))){
_verticalScrollPosition = verticalScrollPositionPending;
verticalScrollBar.scrollPosition = verticalScrollPositionPending;
_local2 = true;
};
verticalScrollPositionPending = NaN;
};
if (_local2){
scrollChildren();
};
}
public function createComponentsFromDescriptors(_arg1:Boolean=true):void{
var _local4:IFlexDisplayObject;
numChildrenBefore = numChildren;
createdComponents = [];
var _local2:int = (childDescriptors) ? childDescriptors.length : 0;
var _local3:int;
while (_local3 < _local2) {
_local4 = createComponentFromDescriptor(childDescriptors[_local3], _arg1);
createdComponents.push(_local4);
_local3++;
};
if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){
UIComponentGlobals.layoutManager.usePhasedInstantiation = false;
};
numChildrenCreated = (numChildren - numChildrenBefore);
processedDescriptors = true;
}
override mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{
var _local4:EdgeMetrics = viewMetrics;
var _local5:Number = 0;
if (!_arg3){
_arg3 = new RoundedRectangle(_local4.left, _local4.top, ((unscaledWidth - _local4.right) - _local4.left), ((unscaledHeight - _local4.bottom) - _local4.top), _local5);
};
if (((((((((isNaN(_arg3.x)) || (isNaN(_arg3.y)))) || (isNaN(_arg3.width)))) || (isNaN(_arg3.height)))) || (isNaN(_arg3.cornerRadius)))){
return;
};
var _local6:Graphics = _arg1.graphics;
_local6.clear();
_local6.beginFill(_arg2);
_local6.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2));
_local6.endFill();
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){
if ((((mouseEventReferenceCount > 0)) && ((--mouseEventReferenceCount == 0)))){
setStyle("mouseShield", false);
setStyle("mouseShieldChildren", false);
};
};
}
mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = super.getChildAt(_arg1);
super.removingChild(_local2);
$removeChildAt(_arg1);
super.childRemoved(_local2);
if ((((_firstChildIndex < _arg1)) && ((_arg1 < (_firstChildIndex + _numChildren))))){
_numChildren--;
} else {
if ((((_numChildren == 0)) || ((_arg1 < _firstChildIndex)))){
_firstChildIndex--;
};
};
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("childrenChanged"));
return (_local2);
}
public function set data(_arg1:Object):void{
_data = _arg1;
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
invalidateDisplayList();
}
override public function removeChildAt(_arg1:int):DisplayObject{
return (removeChild(getChildAt(_arg1)));
}
private function isBorderNeeded():Boolean{
var c:Class = getStyle("borderSkin");
try {
if (c != getDefinitionByName("mx.skins.halo::HaloBorder")){
return (true);
};
} catch(e:Error) {
return (true);
};
var v:Object = getStyle("borderStyle");
if (v){
if (((!((v == "none"))) || ((((v == "none")) && (getStyle("mouseShield")))))){
return (true);
};
};
v = getStyle("backgroundColor");
if (((!((v === null))) && (!((v === ""))))){
return (true);
};
v = getStyle("backgroundImage");
return (((!((v == null))) && (!((v == "")))));
}
public function set autoLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
_autoLayout = _arg1;
if (_arg1){
invalidateSize();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
};
}
public function get verticalPageScrollSize():Number{
return (_verticalPageScrollSize);
}
public function getChildren():Array{
var _local1:Array = [];
var _local2:int = numChildren;
var _local3:int;
while (_local3 < _local2) {
_local1.push(getChildAt(_local3));
_local3++;
};
return (_local1);
}
private function createScrollbarsIfNeeded(_arg1:Rectangle):Boolean{
var _local2:Number = _arg1.right;
var _local3:Number = _arg1.bottom;
var _local4:Number = unscaledWidth;
var _local5:Number = unscaledHeight;
var _local6:Boolean = (((_arg1.left < 0)) || ((_arg1.top < 0)));
var _local7:EdgeMetrics = viewMetrics;
if (scaleX != 1){
_local4 = (_local4 + (1 / Math.abs(scaleX)));
};
if (scaleY != 1){
_local5 = (_local5 + (1 / Math.abs(scaleY)));
};
_local4 = Math.floor(_local4);
_local5 = Math.floor(_local5);
_local2 = Math.floor(_local2);
_local3 = Math.floor(_local3);
if (((horizontalScrollBar) && (!((horizontalScrollPolicy == ScrollPolicy.ON))))){
_local5 = (_local5 - horizontalScrollBar.minHeight);
};
if (((verticalScrollBar) && (!((verticalScrollPolicy == ScrollPolicy.ON))))){
_local4 = (_local4 - verticalScrollBar.minWidth);
};
_local4 = (_local4 - (_local7.left + _local7.right));
_local5 = (_local5 - (_local7.top + _local7.bottom));
var _local8 = (horizontalScrollPolicy == ScrollPolicy.ON);
var _local9 = (verticalScrollPolicy == ScrollPolicy.ON);
var _local10:Boolean = ((((((((((_local8) || (_local9))) || (_local6))) || (!((overlay == null))))) || ((_local7.left > 0)))) || ((_local7.top > 0)));
if (_local4 < _local2){
_local10 = true;
if ((((((horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 18)))) && ((((unscaledWidth - _local7.left) - _local7.right) >= 32)))){
_local8 = true;
};
};
if (_local5 < _local3){
_local10 = true;
if ((((((verticalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledWidth - _local7.left) - _local7.right) >= 18)))) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 32)))){
_local9 = true;
};
};
if (((((((((((((((_local8) && (_local9))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && ((verticalScrollPolicy == ScrollPolicy.AUTO)))) && (horizontalScrollBar))) && (verticalScrollBar))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))) && (((_local5 + horizontalScrollBar.minHeight) >= _local3)))){
_local9 = false;
_local8 = _local9;
} else {
if (((((((((_local8) && (!(_local9)))) && (verticalScrollBar))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))){
_local8 = false;
};
};
var _local11:Boolean = createOrDestroyScrollbars(_local8, _local9, _local10);
if (((((!((scrollableWidth == _local2))) || (!((viewableWidth == _local4))))) || (_local11))){
if (horizontalScrollBar){
horizontalScrollBar.setScrollProperties(_local4, 0, (_local2 - _local4), horizontalPageScrollSize);
scrollPositionChanged = true;
};
viewableWidth = _local4;
scrollableWidth = _local2;
};
if (((((!((scrollableHeight == _local3))) || (!((viewableHeight == _local5))))) || (_local11))){
if (verticalScrollBar){
verticalScrollBar.setScrollProperties(_local5, 0, (_local3 - _local5), verticalPageScrollSize);
scrollPositionChanged = true;
};
viewableHeight = _local5;
scrollableHeight = _local3;
};
return (_local11);
}
override mx_internal function removingChild(_arg1:DisplayObject):void{
super.removingChild(_arg1);
_arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
var _local2:ChildExistenceChangedEvent = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_REMOVE);
_local2.relatedObject = _arg1;
dispatchEvent(_local2);
}
mx_internal function get numChildrenCreated():int{
return (_numChildrenCreated);
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
if ((((_firstChildIndex < _arg2)) && ((_arg2 < ((_firstChildIndex + _numChildren) + 1))))){
_numChildren++;
} else {
if (_arg2 <= _firstChildIndex){
_firstChildIndex++;
};
};
super.addingChild(_arg1);
$addChildAt(_arg1, _arg2);
super.childAdded(_arg1);
dispatchEvent(new Event("childrenChanged"));
return (_arg1);
}
private function hasChildMatchingDescriptor(_arg1:UIComponentDescriptor):Boolean{
var _local4:int;
var _local5:IUIComponent;
var _local2:String = _arg1.id;
if (((!((_local2 == null))) && ((document[_local2] == null)))){
return (false);
};
var _local3:int = numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = IUIComponent(getChildAt(_local4));
if ((((_local5 is IDeferredInstantiationUIComponent)) && ((IDeferredInstantiationUIComponent(_local5).descriptor == _arg1)))){
return (true);
};
_local4++;
};
if (childRepeaters){
_local3 = childRepeaters.length;
_local4 = 0;
while (_local4 < _local3) {
if (IDeferredInstantiationUIComponent(childRepeaters[_local4]).descriptor == _arg1){
return (true);
};
_local4++;
};
};
return (false);
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
override public function validateDisplayList():void{
var _local1:EdgeMetrics;
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (((_autoLayout) || (forceLayout))){
doingLayout = true;
super.validateDisplayList();
doingLayout = false;
} else {
layoutChrome(unscaledWidth, unscaledHeight);
};
invalidateDisplayListFlag = true;
if (createContentPaneAndScrollbarsIfNeeded()){
if (((_autoLayout) || (forceLayout))){
doingLayout = true;
super.validateDisplayList();
doingLayout = false;
};
createContentPaneAndScrollbarsIfNeeded();
};
if (clampScrollPositions()){
scrollChildren();
};
if (contentPane){
_local1 = viewMetrics;
if (overlay){
overlay.x = 0;
overlay.y = 0;
overlay.width = unscaledWidth;
overlay.height = unscaledHeight;
};
if (((horizontalScrollBar) || (verticalScrollBar))){
if (((verticalScrollBar) && ((verticalScrollPolicy == ScrollPolicy.ON)))){
_local1.right = (_local1.right - verticalScrollBar.minWidth);
};
if (((horizontalScrollBar) && ((horizontalScrollPolicy == ScrollPolicy.ON)))){
_local1.bottom = (_local1.bottom - horizontalScrollBar.minHeight);
};
if (horizontalScrollBar){
_local2 = ((unscaledWidth - _local1.left) - _local1.right);
if (verticalScrollBar){
_local2 = (_local2 - verticalScrollBar.minWidth);
};
horizontalScrollBar.setActualSize(_local2, horizontalScrollBar.minHeight);
horizontalScrollBar.move(_local1.left, ((unscaledHeight - _local1.bottom) - horizontalScrollBar.minHeight));
};
if (verticalScrollBar){
_local3 = ((unscaledHeight - _local1.top) - _local1.bottom);
if (horizontalScrollBar){
_local3 = (_local3 - horizontalScrollBar.minHeight);
};
verticalScrollBar.setActualSize(verticalScrollBar.minWidth, _local3);
verticalScrollBar.move(((unscaledWidth - _local1.right) - verticalScrollBar.minWidth), _local1.top);
};
if (whiteBox){
whiteBox.x = verticalScrollBar.x;
whiteBox.y = horizontalScrollBar.y;
};
};
contentPane.x = _local1.left;
contentPane.y = _local1.top;
if (focusPane){
focusPane.x = _local1.left;
focusPane.y = _local1.top;
};
scrollChildren();
};
invalidateDisplayListFlag = false;
if (blocker){
_local1 = viewMetrics;
_local4 = (enabled) ? null : getStyle("backgroundDisabledColor");
if ((((_local4 === null)) || (isNaN(Number(_local4))))){
_local4 = getStyle("backgroundColor");
};
if ((((_local4 === null)) || (isNaN(Number(_local4))))){
_local4 = 0xFFFFFF;
};
_local5 = getStyle("disabledOverlayAlpha");
if (isNaN(_local5)){
_local5 = 0.6;
};
blocker.x = _local1.left;
blocker.y = _local1.top;
_local6 = (unscaledWidth - (_local1.left + _local1.right));
_local7 = (unscaledHeight - (_local1.top + _local1.bottom));
blocker.graphics.clear();
blocker.graphics.beginFill(uint(_local4), _local5);
blocker.graphics.drawRect(0, 0, _local6, _local7);
blocker.graphics.endFill();
rawChildren.setChildIndex(blocker, (rawChildren.numChildren - 1));
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_horizontalLineScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalLineScrollSizeChanged"));
}
override public function initialize():void{
var _local1:*;
var _local2:String;
if (((((isDocument) && (documentDescriptor))) && (!(processedDescriptors)))){
_local1 = documentDescriptor.properties;
if (((_local1) && (_local1.childDescriptors))){
if (_childDescriptors){
_local2 = resourceManager.getString("core", "multipleChildSets_ClassAndInstance");
throw (new Error(_local2));
};
_childDescriptors = _local1.childDescriptors;
};
};
super.initialize();
}
mx_internal function set forceClipping(_arg1:Boolean):void{
if (_clipContent){
if (_arg1){
_forceClippingCount++;
} else {
_forceClippingCount--;
};
createContentPane();
scrollChildren();
};
}
public function removeAllChildren():void{
while (numChildren > 0) {
removeChildAt(0);
};
}
override public function contentToGlobal(_arg1:Point):Point{
if (contentPane){
return (contentPane.localToGlobal(_arg1));
};
return (localToGlobal(_arg1));
}
public function get horizontalPageScrollSize():Number{
return (_horizontalPageScrollSize);
}
override mx_internal function childRemoved(_arg1:DisplayObject):void{
super.childRemoved(_arg1);
invalidateSize();
invalidateDisplayList();
if (!contentPane){
_numChildren--;
if (_numChildren == 0){
_firstChildIndex = super.numChildren;
};
};
if (((contentPane) && (!(autoLayout)))){
forceLayout = true;
UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true);
};
dispatchEvent(new Event("childrenChanged"));
}
public function set defaultButton(_arg1:IFlexDisplayObject):void{
_defaultButton = _arg1;
ContainerGlobals.focusedContainer = null;
}
public function get data():Object{
return (_data);
}
override public function get numChildren():int{
return ((contentPane) ? contentPane.numChildren : _numChildren);
}
public function get autoLayout():Boolean{
return (_autoLayout);
}
override public function styleChanged(_arg1:String):void{
var _local3:String;
var _local4:String;
var _local2:Boolean = (((_arg1 == null)) || ((_arg1 == "styleName")));
if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateDisplayList();
};
if (((_local2) || ((_arg1 == "borderSkin")))){
if (border){
rawChildren.removeChild(DisplayObject(border));
border = null;
createBorder();
};
};
if (((((((((((_local2) || ((_arg1 == "borderStyle")))) || ((_arg1 == "backgroundColor")))) || ((_arg1 == "backgroundImage")))) || ((_arg1 == "mouseShield")))) || ((_arg1 == "mouseShieldChildren")))){
createBorder();
};
super.styleChanged(_arg1);
if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateViewMetricsAndPadding();
};
if (((_local2) || ((_arg1 == "horizontalScrollBarStyleName")))){
if (((horizontalScrollBar) && ((horizontalScrollBar is ISimpleStyleClient)))){
_local3 = getStyle("horizontalScrollBarStyleName");
ISimpleStyleClient(horizontalScrollBar).styleName = _local3;
};
};
if (((_local2) || ((_arg1 == "verticalScrollBarStyleName")))){
if (((verticalScrollBar) && ((verticalScrollBar is ISimpleStyleClient)))){
_local4 = getStyle("verticalScrollBarStyleName");
ISimpleStyleClient(verticalScrollBar).styleName = _local4;
};
};
}
override protected function commitProperties():void{
var _local1:String;
super.commitProperties();
if (changedStyles){
_local1 = ((changedStyles == MULTIPLE_PROPERTIES)) ? null : changedStyles;
super.notifyStyleChangeInChildren(_local1, true);
changedStyles = null;
};
createOrDestroyBlocker();
}
override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
if (_arg1){
contentPane.scrollRect = Rectangle(_arg1);
};
super.finishPrint(_arg1, _arg2);
}
public function get maxHorizontalScrollPosition():Number{
return ((horizontalScrollBar) ? horizontalScrollBar.maxScrollPosition : Math.max((scrollableWidth - viewableWidth), 0));
}
public function set creationPolicy(_arg1:String):void{
_creationPolicy = _arg1;
setActualCreationPolicies(_arg1);
}
public function set label(_arg1:String):void{
_label = _arg1;
dispatchEvent(new Event("labelChanged"));
}
private function clampScrollPositions():Boolean{
var _local1:Boolean;
if (_horizontalScrollPosition < 0){
_horizontalScrollPosition = 0;
_local1 = true;
} else {
if (_horizontalScrollPosition > maxHorizontalScrollPosition){
_horizontalScrollPosition = maxHorizontalScrollPosition;
_local1 = true;
};
};
if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == _horizontalScrollPosition))))){
horizontalScrollBar.scrollPosition = _horizontalScrollPosition;
};
if (_verticalScrollPosition < 0){
_verticalScrollPosition = 0;
_local1 = true;
} else {
if (_verticalScrollPosition > maxVerticalScrollPosition){
_verticalScrollPosition = maxVerticalScrollPosition;
_local1 = true;
};
};
if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == _verticalScrollPosition))))){
verticalScrollBar.scrollPosition = _verticalScrollPosition;
};
return (_local1);
}
override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
var _local2:Rectangle = (((contentPane) && (contentPane.scrollRect))) ? contentPane.scrollRect : null;
if (_local2){
contentPane.scrollRect = null;
};
super.prepareToPrint(_arg1);
return (_local2);
}
mx_internal function get firstChildIndex():int{
return (_firstChildIndex);
}
mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{
if (_numChildren == 0){
_firstChildIndex++;
};
super.addingChild(_arg1);
$addChild(_arg1);
super.childAdded(_arg1);
dispatchEvent(new Event("childrenChanged"));
return (_arg1);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Object;
var _local4:Number;
super.updateDisplayList(_arg1, _arg2);
layoutChrome(_arg1, _arg2);
if (scrollPositionChanged){
clampScrollPositions();
scrollChildren();
scrollPositionChanged = false;
};
if (scrollPropertiesChanged){
if (horizontalScrollBar){
horizontalScrollBar.lineScrollSize = horizontalLineScrollSize;
horizontalScrollBar.pageScrollSize = horizontalPageScrollSize;
};
if (verticalScrollBar){
verticalScrollBar.lineScrollSize = verticalLineScrollSize;
verticalScrollBar.pageScrollSize = verticalPageScrollSize;
};
scrollPropertiesChanged = false;
};
if (((contentPane) && (contentPane.scrollRect))){
_local3 = (enabled) ? null : getStyle("backgroundDisabledColor");
if ((((_local3 === null)) || (isNaN(Number(_local3))))){
_local3 = getStyle("backgroundColor");
};
_local4 = getStyle("backgroundAlpha");
if (((((((!(_clipContent)) || (isNaN(Number(_local3))))) || ((_local3 === "")))) || (((!(((horizontalScrollBar) || (verticalScrollBar)))) && (!(cacheAsBitmap)))))){
_local3 = null;
} else {
if (((getStyle("backgroundImage")) || (getStyle("background")))){
_local3 = null;
} else {
if (_local4 != 1){
_local3 = null;
};
};
};
contentPane.opaqueBackground = _local3;
contentPane.cacheAsBitmap = !((_local3 == null));
};
}
override mx_internal function addingChild(_arg1:DisplayObject):void{
var _local2:IUIComponent = IUIComponent(_arg1);
super.addingChild(_arg1);
invalidateSize();
invalidateDisplayList();
if (!contentPane){
if (_numChildren == 0){
_firstChildIndex = super.numChildren;
};
_numChildren++;
};
if (((contentPane) && (!(autoLayout)))){
forceLayout = true;
UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true);
};
}
mx_internal function setActualCreationPolicies(_arg1:String):void{
var _local5:IFlexDisplayObject;
var _local6:Container;
actualCreationPolicy = _arg1;
var _local2:String = _arg1;
if (_arg1 == ContainerCreationPolicy.QUEUED){
_local2 = ContainerCreationPolicy.AUTO;
};
var _local3:int = numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = IFlexDisplayObject(getChildAt(_local4));
if ((_local5 is Container)){
_local6 = Container(_local5);
if (_local6.creationPolicy == null){
_local6.setActualCreationPolicies(_local2);
};
};
_local4++;
};
}
}
}//package mx.core
Section 249
//ContainerCreationPolicy (mx.core.ContainerCreationPolicy)
package mx.core {
public final class ContainerCreationPolicy {
public static const ALL:String = "all";
public static const QUEUED:String = "queued";
public static const NONE:String = "none";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const AUTO:String = "auto";
}
}//package mx.core
Section 250
//ContainerGlobals (mx.core.ContainerGlobals)
package mx.core {
import flash.display.*;
import mx.managers.*;
public class ContainerGlobals {
public static var focusedContainer:InteractiveObject;
public static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{
var _local6:IFocusManager;
var _local7:IButton;
var _local3:InteractiveObject = _arg2;
var _local4:InteractiveObject = _arg2;
var _local5:IUIComponent;
if (((!((_arg2 == null))) && ((_arg1 == _arg2)))){
return;
};
while (_local4) {
if (_local4.parent){
_local3 = _local4.parent;
} else {
_local3 = null;
};
if ((_local4 is IUIComponent)){
_local5 = IUIComponent(_local4);
};
_local4 = _local3;
if (((((_local4) && ((_local4 is IContainer)))) && (IContainer(_local4).defaultButton))){
break;
};
};
if (((!((ContainerGlobals.focusedContainer == _local4))) || ((((ContainerGlobals.focusedContainer == null)) && ((_local4 == null)))))){
if (!_local4){
_local4 = InteractiveObject(_local5);
};
if (((_local4) && ((_local4 is IContainer)))){
_local6 = IContainer(_local4).focusManager;
if (!_local6){
return;
};
_local7 = (IContainer(_local4).defaultButton as IButton);
if (_local7){
ContainerGlobals.focusedContainer = InteractiveObject(_local4);
_local6.defaultButton = (_local7 as IButton);
} else {
ContainerGlobals.focusedContainer = InteractiveObject(_local4);
_local6.defaultButton = null;
};
};
};
}
}
}//package mx.core
Section 251
//ContainerLayout (mx.core.ContainerLayout)
package mx.core {
public final class ContainerLayout {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
public static const ABSOLUTE:String = "absolute";
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 252
//ContainerRawChildrenList (mx.core.ContainerRawChildrenList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public class ContainerRawChildrenList implements IChildList {
private var owner:Container;
mx_internal static const VERSION:String = "3.2.0.3958";
public function ContainerRawChildrenList(_arg1:Container){
this.owner = _arg1;
}
public function addChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_addChild(_arg1));
}
public function getChildIndex(_arg1:DisplayObject):int{
return (owner.mx_internal::rawChildren_getChildIndex(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2);
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_removeChildAt(_arg1));
}
public function get numChildren():int{
return (owner.mx_internal::$numChildren);
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2));
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function contains(_arg1:DisplayObject):Boolean{
return (owner.mx_internal::rawChildren_contains(_arg1));
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_removeChild(_arg1));
}
public function getChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_getChildAt(_arg1));
}
}
}//package mx.core
Section 253
//DragSource (mx.core.DragSource)
package mx.core {
public class DragSource {
private var formatHandlers:Object;
private var dataHolder:Object;
private var _formats:Array;
mx_internal static const VERSION:String = "3.2.0.3958";
public function DragSource(){
dataHolder = {};
formatHandlers = {};
_formats = [];
super();
}
public function hasFormat(_arg1:String):Boolean{
var _local2:int = _formats.length;
var _local3:int;
while (_local3 < _local2) {
if (_formats[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public function addData(_arg1:Object, _arg2:String):void{
_formats.push(_arg2);
dataHolder[_arg2] = _arg1;
}
public function dataForFormat(_arg1:String):Object{
var _local2:Object = dataHolder[_arg1];
if (_local2){
return (_local2);
};
if (formatHandlers[_arg1]){
return (formatHandlers[_arg1]());
};
return (null);
}
public function addHandler(_arg1:Function, _arg2:String):void{
_formats.push(_arg2);
formatHandlers[_arg2] = _arg1;
}
public function get formats():Array{
return (_formats);
}
}
}//package mx.core
Section 254
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 255
//EmbeddedFont (mx.core.EmbeddedFont)
package mx.core {
public class EmbeddedFont {
private var _fontName:String;
private var _fontStyle:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public function EmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean){
_fontName = _arg1;
_fontStyle = EmbeddedFontRegistry.getFontStyle(_arg2, _arg3);
}
public function get fontStyle():String{
return (_fontStyle);
}
public function get fontName():String{
return (_fontName);
}
}
}//package mx.core
Section 256
//EmbeddedFontRegistry (mx.core.EmbeddedFontRegistry)
package mx.core {
import flash.text.*;
import flash.utils.*;
public class EmbeddedFontRegistry implements IEmbeddedFontRegistry {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var fonts:Object = {};
private static var instance:IEmbeddedFontRegistry;
public function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory{
var _local4:int;
var _local5:Object;
var _local3:Dictionary = fonts[createFontKey(_arg1)];
if (_local3){
_local4 = _local3[_arg2];
if (_local4){
return (_arg2);
};
for (_local5 in _local3) {
return ((_local5 as IFlexModuleFactory));
};
};
return (null);
}
public function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{
var _local5:int;
var _local6:Object;
var _local3:String = createFontKey(_arg1);
var _local4:Dictionary = fonts[_local3];
if (_local4 != null){
delete _local4[_arg2];
_local5 = 0;
for (_local6 in _local4) {
_local5++;
};
if (_local5 == 0){
delete fonts[_local3];
};
};
}
public function getFonts():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in fonts) {
_local1.push(createEmbeddedFont(_local2));
};
return (_local1);
}
public function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{
var _local3:String = createFontKey(_arg1);
var _local4:Dictionary = fonts[_local3];
if (!_local4){
_local4 = new Dictionary(true);
fonts[_local3] = _local4;
};
_local4[_arg2] = 1;
}
public static function registerFonts(_arg1:Object, _arg2:IFlexModuleFactory):void{
var _local4:Object;
var _local5:Object;
var _local6:String;
var _local7:Boolean;
var _local8:Boolean;
var _local3:IEmbeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
for (_local4 in _arg1) {
_local5 = _arg1[_local4];
for (_local6 in _local5) {
if (_local5[_local6] == false){
} else {
if (_local6 == "regular"){
_local7 = false;
_local8 = false;
} else {
if (_local6 == "boldItalic"){
_local7 = true;
_local8 = true;
} else {
if (_local6 == "bold"){
_local7 = true;
_local8 = false;
} else {
if (_local6 == "italic"){
_local7 = false;
_local8 = true;
};
};
};
};
_local3.registerFont(new EmbeddedFont(String(_local4), _local7, _local8), _arg2);
};
};
};
}
public static function getInstance():IEmbeddedFontRegistry{
if (!instance){
instance = new (EmbeddedFontRegistry);
};
return (instance);
}
public static function getFontStyle(_arg1:Boolean, _arg2:Boolean):String{
var _local3:String = FontStyle.REGULAR;
if (((_arg1) && (_arg2))){
_local3 = FontStyle.BOLD_ITALIC;
} else {
if (_arg1){
_local3 = FontStyle.BOLD;
} else {
if (_arg2){
_local3 = FontStyle.ITALIC;
};
};
};
return (_local3);
}
private static function createFontKey(_arg1:EmbeddedFont):String{
return ((_arg1.fontName + _arg1.fontStyle));
}
private static function createEmbeddedFont(_arg1:String):EmbeddedFont{
var _local2:String;
var _local3:Boolean;
var _local4:Boolean;
var _local5:int = endsWith(_arg1, FontStyle.REGULAR);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, false, false));
};
_local5 = endsWith(_arg1, FontStyle.BOLD);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, true, false));
};
_local5 = endsWith(_arg1, FontStyle.BOLD_ITALIC);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, true, true));
};
_local5 = endsWith(_arg1, FontStyle.ITALIC);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, false, true));
};
return (new EmbeddedFont("", false, false));
}
private static function endsWith(_arg1:String, _arg2:String):int{
var _local3:int = _arg1.lastIndexOf(_arg2);
if ((((_local3 > 0)) && (((_local3 + _arg2.length) == _arg1.length)))){
return (_local3);
};
return (-1);
}
}
}//package mx.core
Section 257
//EventPriority (mx.core.EventPriority)
package mx.core {
public final class EventPriority {
public static const DEFAULT:int = 0;
public static const BINDING:int = 100;
public static const DEFAULT_HANDLER:int = -50;
public static const EFFECT:int = -100;
public static const CURSOR_MANAGEMENT:int = 200;
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 258
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 259
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 260
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 261
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 262
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 263
//FlexTextField (mx.core.FlexTextField)
package mx.core {
import flash.text.*;
import mx.utils.*;
public class FlexTextField extends TextField {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexTextField(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 264
//FlexVersion (mx.core.FlexVersion)
package mx.core {
import mx.resources.*;
public class FlexVersion {
public static const VERSION_2_0_1:uint = 33554433;
public static const CURRENT_VERSION:uint = 50331648;
public static const VERSION_3_0:uint = 50331648;
public static const VERSION_2_0:uint = 33554432;
public static const VERSION_ALREADY_READ:String = "versionAlreadyRead";
public static const VERSION_ALREADY_SET:String = "versionAlreadySet";
mx_internal static const VERSION:String = "3.2.0.3958";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
mx_internal static function changeCompatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
_compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function set compatibilityVersion(_arg1:uint):void{
var _local2:String;
if (_arg1 == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ);
};
_compatibilityVersion = _arg1;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(_arg1:Function):void{
_compatibilityErrorFunction = _arg1;
}
public static function set compatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var _local1:uint = ((compatibilityVersion >> 24) & 0xFF);
var _local2:uint = ((compatibilityVersion >> 16) & 0xFF);
var _local3:uint = (compatibilityVersion & 0xFFFF);
return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString()));
}
}
}//package mx.core
Section 265
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 266
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 267
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(_arg1:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 268
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.core
Section 269
//IConstraintClient (mx.core.IConstraintClient)
package mx.core {
public interface IConstraintClient {
function setConstraintValue(_arg1:String, _arg2):void;
function getConstraintValue(_arg1:String);
}
}//package mx.core
Section 270
//IContainer (mx.core.IContainer)
package mx.core {
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import mx.managers.*;
public interface IContainer extends IUIComponent {
function set hitArea(_arg1:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(_arg1:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(_arg1:Boolean):void;
function set creatingContentPane(_arg1:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(_arg1:DisplayObject):int;
function set doubleClickEnabled(_arg1:Boolean):void;
function getObjectsUnderPoint(_arg1:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(_arg1:Boolean):void;
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(_arg1:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(_arg1:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(_arg1:Boolean):void;
function getChildAt(_arg1:int):DisplayObject;
function set soundTransform(_arg1:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(_arg1:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(_arg1:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(_arg1:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(_arg1:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(_arg1:Boolean):void;
function set buttonMode(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(_arg1:DisplayObject):DisplayObject;
function set tabIndex(_arg1:int):void;
function addChild(_arg1:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean;
}
}//package mx.core
Section 271
//IDataRenderer (mx.core.IDataRenderer)
package mx.core {
public interface IDataRenderer {
function get data():Object;
function set data(_arg1:Object):void;
}
}//package mx.core
Section 272
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent)
package mx.core {
public interface IDeferredInstantiationUIComponent extends IUIComponent {
function set cacheHeuristic(_arg1:Boolean):void;
function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function get cachePolicy():String;
function set id(_arg1:String):void;
function registerEffects(_arg1:Array):void;
function executeBindings(_arg1:Boolean=false):void;
function get id():String;
function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function set descriptor(_arg1:UIComponentDescriptor):void;
function get descriptor():UIComponentDescriptor;
}
}//package mx.core
Section 273
//IEmbeddedFontRegistry (mx.core.IEmbeddedFontRegistry)
package mx.core {
public interface IEmbeddedFontRegistry {
function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory;
function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void;
function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void;
function getFonts():Array;
}
}//package mx.core
Section 274
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 275
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 276
//IFlexModule (mx.core.IFlexModule)
package mx.core {
public interface IFlexModule {
function set moduleFactory(_arg1:IFlexModuleFactory):void;
function get moduleFactory():IFlexModuleFactory;
}
}//package mx.core
Section 277
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 278
//IFontContextComponent (mx.core.IFontContextComponent)
package mx.core {
public interface IFontContextComponent {
function get fontContext():IFlexModuleFactory;
function set fontContext(_arg1:IFlexModuleFactory):void;
}
}//package mx.core
Section 279
//IIMESupport (mx.core.IIMESupport)
package mx.core {
public interface IIMESupport {
function set imeMode(_arg1:String):void;
function get imeMode():String;
}
}//package mx.core
Section 280
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateSize():void;
function invalidateDisplayList():void;
function invalidateProperties():void;
}
}//package mx.core
Section 281
//IMXMLObject (mx.core.IMXMLObject)
package mx.core {
public interface IMXMLObject {
function initialized(_arg1:Object, _arg2:String):void;
}
}//package mx.core
Section 282
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 283
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier)
package mx.core {
import flash.events.*;
public interface IPropertyChangeNotifier extends IEventDispatcher, IUID {
}
}//package mx.core
Section 284
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 285
//IRectangularBorder (mx.core.IRectangularBorder)
package mx.core {
import flash.geom.*;
public interface IRectangularBorder extends IBorder {
function get backgroundImageBounds():Rectangle;
function get hasBackgroundImage():Boolean;
function set backgroundImageBounds(_arg1:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 286
//IRepeater (mx.core.IRepeater)
package mx.core {
public interface IRepeater {
function get container():IContainer;
function set startingIndex(_arg1:int):void;
function get startingIndex():int;
function set recycleChildren(_arg1:Boolean):void;
function get currentItem():Object;
function get count():int;
function get recycleChildren():Boolean;
function executeChildBindings():void;
function set dataProvider(_arg1:Object):void;
function initializeRepeater(_arg1:IContainer, _arg2:Boolean):void;
function get currentIndex():int;
function get dataProvider():Object;
function set count(_arg1:int):void;
}
}//package mx.core
Section 287
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 288
//IStateClient (mx.core.IStateClient)
package mx.core {
public interface IStateClient {
function get currentState():String;
function set currentState(_arg1:String):void;
}
}//package mx.core
Section 289
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup)
package mx.core {
import flash.events.*;
public interface ISWFBridgeGroup {
function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider;
function removeChildBridge(_arg1:IEventDispatcher):void;
function get parentBridge():IEventDispatcher;
function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void;
function set parentBridge(_arg1:IEventDispatcher):void;
function containsBridge(_arg1:IEventDispatcher):Boolean;
function getChildBridges():Array;
}
}//package mx.core
Section 290
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider)
package mx.core {
import flash.events.*;
public interface ISWFBridgeProvider {
function get childAllowsParent():Boolean;
function get swfBridge():IEventDispatcher;
function get parentAllowsChild():Boolean;
}
}//package mx.core
Section 291
//ISWFLoader (mx.core.ISWFLoader)
package mx.core {
import flash.geom.*;
public interface ISWFLoader extends ISWFBridgeProvider {
function getVisibleApplicationRect(_arg1:Boolean=false):Rectangle;
function set loadForCompatibility(_arg1:Boolean):void;
function get loadForCompatibility():Boolean;
}
}//package mx.core
Section 292
//ITextFieldFactory (mx.core.ITextFieldFactory)
package mx.core {
import flash.text.*;
public interface ITextFieldFactory {
function createTextField(_arg1:IFlexModuleFactory):TextField;
}
}//package mx.core
Section 293
//IToolTip (mx.core.IToolTip)
package mx.core {
import flash.geom.*;
public interface IToolTip extends IUIComponent {
function set text(_arg1:String):void;
function get screen():Rectangle;
function get text():String;
}
}//package mx.core
Section 294
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(_arg1:Sprite):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function set isPopUp(_arg1:Boolean):void;
function get explicitMinHeight():Number;
function get percentWidth():Number;
function get isPopUp():Boolean;
function get owner():DisplayObjectContainer;
function get percentHeight():Number;
function get baselinePosition():Number;
function owns(_arg1:DisplayObject):Boolean;
function initialize():void;
function get maxWidth():Number;
function get minWidth():Number;
function getExplicitOrMeasuredWidth():Number;
function get explicitMaxWidth():Number;
function get explicitMaxHeight():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function set percentWidth(_arg1:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function set explicitWidth(_arg1:Number):void;
function set measuredMinHeight(_arg1:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(_arg1:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(_arg1:Number):void;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function set document(_arg1:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 295
//IUID (mx.core.IUID)
package mx.core {
public interface IUID {
function get uid():String;
function set uid(_arg1:String):void;
}
}//package mx.core
Section 296
//IUITextField (mx.core.IUITextField)
package mx.core {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import mx.managers.*;
import mx.styles.*;
public interface IUITextField extends IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent {
function replaceText(_arg1:int, _arg2:int, _arg3:String):void;
function get doubleClickEnabled():Boolean;
function get nestLevel():int;
function get caretIndex():int;
function set doubleClickEnabled(_arg1:Boolean):void;
function get maxScrollH():int;
function set nestLevel(_arg1:int):void;
function get numLines():int;
function get scrollH():int;
function setColor(_arg1:uint):void;
function get maxScrollV():int;
function getImageReference(_arg1:String):DisplayObject;
function get scrollV():int;
function get border():Boolean;
function get text():String;
function get styleSheet():StyleSheet;
function getCharBoundaries(_arg1:int):Rectangle;
function get background():Boolean;
function set scrollH(_arg1:int):void;
function getFirstCharInParagraph(_arg1:int):int;
function get type():String;
function replaceSelectedText(_arg1:String):void;
function set borderColor(_arg1:uint):void;
function get alwaysShowSelection():Boolean;
function get sharpness():Number;
function get tabIndex():int;
function get textColor():uint;
function set defaultTextFormat(_arg1:TextFormat):void;
function get condenseWhite():Boolean;
function get displayAsPassword():Boolean;
function get autoSize():String;
function setSelection(_arg1:int, _arg2:int):void;
function set scrollV(_arg1:int):void;
function set useRichTextClipboard(_arg1:Boolean):void;
function get selectionBeginIndex():int;
function get selectable():Boolean;
function set border(_arg1:Boolean):void;
function set multiline(_arg1:Boolean):void;
function set background(_arg1:Boolean):void;
function set embedFonts(_arg1:Boolean):void;
function set text(_arg1:String):void;
function get selectionEndIndex():int;
function set mouseWheelEnabled(_arg1:Boolean):void;
function appendText(_arg1:String):void;
function get antiAliasType():String;
function set styleSheet(_arg1:StyleSheet):void;
function set nonInheritingStyles(_arg1:Object):void;
function set textColor(_arg1:uint):void;
function get wordWrap():Boolean;
function getLineIndexAtPoint(_arg1:Number, _arg2:Number):int;
function get htmlText():String;
function set tabIndex(_arg1:int):void;
function get thickness():Number;
function getLineIndexOfChar(_arg1:int):int;
function get bottomScrollV():int;
function set restrict(_arg1:String):void;
function set alwaysShowSelection(_arg1:Boolean):void;
function getTextFormat(_arg1:int=-1, _arg2:int=-1):TextFormat;
function set sharpness(_arg1:Number):void;
function set type(_arg1:String):void;
function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void;
function set gridFitType(_arg1:String):void;
function getUITextFormat():UITextFormat;
function set inheritingStyles(_arg1:Object):void;
function setFocus():void;
function get borderColor():uint;
function set condenseWhite(_arg1:Boolean):void;
function get textWidth():Number;
function getLineOffset(_arg1:int):int;
function set displayAsPassword(_arg1:Boolean):void;
function set autoSize(_arg1:String):void;
function get defaultTextFormat():TextFormat;
function get useRichTextClipboard():Boolean;
function get nonZeroTextHeight():Number;
function set backgroundColor(_arg1:uint):void;
function get embedFonts():Boolean;
function set selectable(_arg1:Boolean):void;
function get multiline():Boolean;
function set maxChars(_arg1:int):void;
function get textHeight():Number;
function get nonInheritingStyles():Object;
function getLineText(_arg1:int):String;
function set focusRect(_arg1:Object):void;
function get mouseWheelEnabled():Boolean;
function get restrict():String;
function getParagraphLength(_arg1:int):int;
function set mouseEnabled(_arg1:Boolean):void;
function get gridFitType():String;
function get inheritingStyles():Object;
function set ignorePadding(_arg1:Boolean):void;
function set antiAliasType(_arg1:String):void;
function get backgroundColor():uint;
function getCharIndexAtPoint(_arg1:Number, _arg2:Number):int;
function set tabEnabled(_arg1:Boolean):void;
function get maxChars():int;
function get focusRect():Object;
function get ignorePadding():Boolean;
function get mouseEnabled():Boolean;
function get length():int;
function set wordWrap(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function set thickness(_arg1:Number):void;
function getLineLength(_arg1:int):int;
function truncateToFit(_arg1:String=null):Boolean;
function set htmlText(_arg1:String):void;
function getLineMetrics(_arg1:int):TextLineMetrics;
function getStyle(_arg1:String);
}
}//package mx.core
Section 297
//LayoutContainer (mx.core.LayoutContainer)
package mx.core {
import flash.events.*;
import mx.containers.*;
import mx.containers.utilityClasses.*;
public class LayoutContainer extends Container implements IConstraintLayout {
private var _constraintColumns:Array;
protected var layoutObject:Layout;
private var _layout:String;// = "vertical"
private var processingCreationQueue:Boolean;// = false
protected var boxLayoutClass:Class;
private var resizeHandlerAdded:Boolean;// = false
private var preloadObj:Object;
private var creationQueue:Array;
private var _constraintRows:Array;
protected var canvasLayoutClass:Class;
mx_internal static const VERSION:String = "3.2.0.3958";
mx_internal static var useProgressiveLayout:Boolean = false;
public function LayoutContainer(){
layoutObject = new BoxLayout();
canvasLayoutClass = CanvasLayout;
boxLayoutClass = BoxLayout;
creationQueue = [];
_constraintColumns = [];
_constraintRows = [];
super();
layoutObject.target = this;
}
public function get constraintColumns():Array{
return (_constraintColumns);
}
override mx_internal function get usePadding():Boolean{
return (!((layout == ContainerLayout.ABSOLUTE)));
}
override protected function layoutChrome(_arg1:Number, _arg2:Number):void{
super.layoutChrome(_arg1, _arg2);
if (!doingLayout){
createBorder();
};
}
public function set constraintColumns(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (_arg1 != _constraintColumns){
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
ConstraintColumn(_arg1[_local3]).container = this;
_local3++;
};
_constraintColumns = _arg1;
invalidateSize();
invalidateDisplayList();
};
}
public function set layout(_arg1:String):void{
if (_layout != _arg1){
_layout = _arg1;
if (layoutObject){
layoutObject.target = null;
};
if (_layout == ContainerLayout.ABSOLUTE){
layoutObject = new canvasLayoutClass();
} else {
layoutObject = new boxLayoutClass();
if (_layout == ContainerLayout.VERTICAL){
BoxLayout(layoutObject).direction = BoxDirection.VERTICAL;
} else {
BoxLayout(layoutObject).direction = BoxDirection.HORIZONTAL;
};
};
if (layoutObject){
layoutObject.target = this;
};
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("layoutChanged"));
};
}
public function get constraintRows():Array{
return (_constraintRows);
}
override protected function measure():void{
super.measure();
layoutObject.measure();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
layoutObject.updateDisplayList(_arg1, _arg2);
createBorder();
}
public function get layout():String{
return (_layout);
}
public function set constraintRows(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (_arg1 != _constraintRows){
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
ConstraintRow(_arg1[_local3]).container = this;
_local3++;
};
_constraintRows = _arg1;
invalidateSize();
invalidateDisplayList();
};
}
}
}//package mx.core
Section 298
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 299
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 300
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 301
//ResourceModuleRSLItem (mx.core.ResourceModuleRSLItem)
package mx.core {
import flash.events.*;
import mx.events.*;
import mx.resources.*;
public class ResourceModuleRSLItem extends RSLItem {
mx_internal static const VERSION:String = "3.2.0.3958";
public function ResourceModuleRSLItem(_arg1:String){
super(_arg1);
}
private function resourceErrorHandler(_arg1:ResourceEvent):void{
var _local2:IOErrorEvent = new IOErrorEvent(IOErrorEvent.IO_ERROR);
_local2.text = _arg1.errorText;
super.itemErrorHandler(_local2);
}
override public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
var _local6:IResourceManager = ResourceManager.getInstance();
var _local7:IEventDispatcher = _local6.loadResourceModule(url);
_local7.addEventListener(ResourceEvent.PROGRESS, itemProgressHandler);
_local7.addEventListener(ResourceEvent.COMPLETE, itemCompleteHandler);
_local7.addEventListener(ResourceEvent.ERROR, resourceErrorHandler);
}
}
}//package mx.core
Section 302
//RSLItem (mx.core.RSLItem)
package mx.core {
import flash.display.*;
import flash.events.*;
import mx.events.*;
import flash.system.*;
import flash.net.*;
import mx.utils.*;
public class RSLItem {
protected var chainedSecurityErrorHandler:Function;
public var total:uint;// = 0
public var loaded:uint;// = 0
private var completed:Boolean;// = false
protected var chainedRSLErrorHandler:Function;
protected var chainedIOErrorHandler:Function;
protected var chainedCompleteHandler:Function;
private var errorText:String;
protected var chainedProgressHandler:Function;
public var urlRequest:URLRequest;
public var rootURL:String;
protected var url:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public function RSLItem(_arg1:String, _arg2:String=null){
this.url = _arg1;
this.rootURL = _arg2;
}
public function itemProgressHandler(_arg1:ProgressEvent):void{
loaded = _arg1.bytesLoaded;
total = _arg1.bytesTotal;
if (chainedProgressHandler != null){
chainedProgressHandler(_arg1);
};
}
public function itemErrorHandler(_arg1:ErrorEvent):void{
errorText = decodeURI(_arg1.text);
completed = true;
loaded = 0;
total = 0;
trace(errorText);
if ((((_arg1.type == IOErrorEvent.IO_ERROR)) && (!((chainedIOErrorHandler == null))))){
chainedIOErrorHandler(_arg1);
} else {
if ((((_arg1.type == SecurityErrorEvent.SECURITY_ERROR)) && (!((chainedSecurityErrorHandler == null))))){
chainedSecurityErrorHandler(_arg1);
} else {
if ((((_arg1.type == RSLEvent.RSL_ERROR)) && (!((chainedRSLErrorHandler == null))))){
chainedRSLErrorHandler(_arg1);
};
};
};
}
public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
var _local6:Loader = new Loader();
var _local7:LoaderContext = new LoaderContext();
urlRequest = new URLRequest(LoaderUtil.createAbsoluteURL(rootURL, url));
_local6.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, itemProgressHandler);
_local6.contentLoaderInfo.addEventListener(Event.COMPLETE, itemCompleteHandler);
_local6.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, itemErrorHandler);
_local6.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, itemErrorHandler);
_local7.applicationDomain = ApplicationDomain.currentDomain;
_local6.load(urlRequest, _local7);
}
public function itemCompleteHandler(_arg1:Event):void{
completed = true;
if (chainedCompleteHandler != null){
chainedCompleteHandler(_arg1);
};
}
}
}//package mx.core
Section 303
//RSLListLoader (mx.core.RSLListLoader)
package mx.core {
import flash.events.*;
public class RSLListLoader {
private var chainedSecurityErrorHandler:Function;
private var chainedIOErrorHandler:Function;
private var rslList:Array;
private var chainedRSLErrorHandler:Function;
private var chainedCompleteHandler:Function;
private var currentIndex:int;// = 0
private var chainedProgressHandler:Function;
mx_internal static const VERSION:String = "3.2.0.3958";
public function RSLListLoader(_arg1:Array){
rslList = [];
super();
this.rslList = _arg1;
}
private function loadNext():void{
if (!isDone()){
currentIndex++;
if (currentIndex < rslList.length){
rslList[currentIndex].load(chainedProgressHandler, listCompleteHandler, listIOErrorHandler, listSecurityErrorHandler, chainedRSLErrorHandler);
};
};
}
public function getIndex():int{
return (currentIndex);
}
public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
currentIndex = -1;
loadNext();
}
private function listCompleteHandler(_arg1:Event):void{
if (chainedCompleteHandler != null){
chainedCompleteHandler(_arg1);
};
loadNext();
}
public function isDone():Boolean{
return ((currentIndex >= rslList.length));
}
private function listSecurityErrorHandler(_arg1:Event):void{
if (chainedSecurityErrorHandler != null){
chainedSecurityErrorHandler(_arg1);
};
}
public function getItemCount():int{
return (rslList.length);
}
public function getItem(_arg1:int):RSLItem{
if ((((_arg1 < 0)) || ((_arg1 >= rslList.length)))){
return (null);
};
return (rslList[_arg1]);
}
private function listIOErrorHandler(_arg1:Event):void{
if (chainedIOErrorHandler != null){
chainedIOErrorHandler(_arg1);
};
}
}
}//package mx.core
Section 304
//ScrollPolicy (mx.core.ScrollPolicy)
package mx.core {
public final class ScrollPolicy {
public static const AUTO:String = "auto";
public static const ON:String = "on";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const OFF:String = "off";
}
}//package mx.core
Section 305
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var classMap:Object = {};
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class = classMap[_arg1];
if (!_local2){
throw (new Error((("No class registered for interface '" + _arg1) + "'.")));
};
return (_local2["getInstance"]());
}
}
}//package mx.core
Section 306
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 307
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 308
//SWFBridgeGroup (mx.core.SWFBridgeGroup)
package mx.core {
import mx.managers.*;
import flash.events.*;
import flash.utils.*;
public class SWFBridgeGroup implements ISWFBridgeGroup {
private var _parentBridge:IEventDispatcher;
private var _childBridges:Dictionary;
private var _groupOwner:ISystemManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function SWFBridgeGroup(_arg1:ISystemManager){
_groupOwner = _arg1;
}
public function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider{
if (!_childBridges){
return (null);
};
return (ISWFBridgeProvider(_childBridges[_arg1]));
}
public function removeChildBridge(_arg1:IEventDispatcher):void{
var _local2:Object;
if (((!(_childBridges)) || (!(_arg1)))){
return;
};
for (_local2 in _childBridges) {
if (_local2 == _arg1){
delete _childBridges[_local2];
};
};
}
public function get parentBridge():IEventDispatcher{
return (_parentBridge);
}
public function containsBridge(_arg1:IEventDispatcher):Boolean{
var _local2:Object;
if (((parentBridge) && ((parentBridge == _arg1)))){
return (true);
};
for (_local2 in _childBridges) {
if (_arg1 == _local2){
return (true);
};
};
return (false);
}
public function set parentBridge(_arg1:IEventDispatcher):void{
_parentBridge = _arg1;
}
public function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void{
if (!_childBridges){
_childBridges = new Dictionary();
};
_childBridges[_arg1] = _arg2;
}
public function getChildBridges():Array{
var _local2:Object;
var _local1:Array = [];
for (_local2 in _childBridges) {
_local1.push(_local2);
};
return (_local1);
}
}
}//package mx.core
Section 309
//TextFieldFactory (mx.core.TextFieldFactory)
package mx.core {
import flash.text.*;
import flash.utils.*;
public class TextFieldFactory implements ITextFieldFactory {
private var textFields:Dictionary;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var instance:ITextFieldFactory;
public function TextFieldFactory(){
textFields = new Dictionary(true);
super();
}
public function createTextField(_arg1:IFlexModuleFactory):TextField{
var _local4:Object;
var _local2:TextField;
var _local3:Dictionary = textFields[_arg1];
if (_local3){
for (_local4 in _local3) {
_local2 = TextField(_local4);
break;
};
};
if (!_local2){
if (_arg1){
_local2 = TextField(_arg1.create("flash.text.TextField"));
} else {
_local2 = new TextField();
};
if (!_local3){
_local3 = new Dictionary(true);
};
_local3[_local2] = 1;
textFields[_arg1] = _local3;
};
return (_local2);
}
public static function getInstance():ITextFieldFactory{
if (!instance){
instance = new (TextFieldFactory);
};
return (instance);
}
}
}//package mx.core
Section 310
//UIComponent (mx.core.UIComponent)
package mx.core {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import mx.managers.*;
import mx.automation.*;
import flash.events.*;
import mx.events.*;
import mx.resources.*;
import mx.styles.*;
import mx.controls.*;
import mx.states.*;
import mx.effects.*;
import mx.graphics.*;
import mx.binding.*;
import flash.utils.*;
import mx.utils.*;
import mx.validators.*;
import flash.system.*;
import mx.modules.*;
public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener, IStateClient, IConstraintClient {
private var cachedEmbeddedFont:EmbeddedFont;// = null
private var errorStringChanged:Boolean;// = false
mx_internal var overlay:UIComponent;
mx_internal var automaticRadioButtonGroups:Object;
private var _currentState:String;
private var _isPopUp:Boolean;
private var _repeaters:Array;
private var _systemManager:ISystemManager;
private var _measuredWidth:Number;// = 0
private var methodQueue:Array;
mx_internal var _width:Number;
private var _tweeningProperties:Array;
private var _validationSubField:String;
private var _endingEffectInstances:Array;
mx_internal var saveBorderColor:Boolean;// = true
mx_internal var overlayColor:uint;
mx_internal var overlayReferenceCount:int;// = 0
private var hasFontContextBeenSaved:Boolean;// = false
private var _repeaterIndices:Array;
private var oldExplicitWidth:Number;
mx_internal var _descriptor:UIComponentDescriptor;
private var _initialized:Boolean;// = false
private var _focusEnabled:Boolean;// = true
private var cacheAsBitmapCount:int;// = 0
private var requestedCurrentState:String;
private var listeningForRender:Boolean;// = false
mx_internal var invalidateDisplayListFlag:Boolean;// = false
private var oldScaleX:Number;// = 1
private var oldScaleY:Number;// = 1
mx_internal var _explicitMaxHeight:Number;
mx_internal var invalidatePropertiesFlag:Boolean;// = false
private var hasFocusRect:Boolean;// = false
mx_internal var invalidateSizeFlag:Boolean;// = false
private var _scaleX:Number;// = 1
private var _scaleY:Number;// = 1
private var _styleDeclaration:CSSStyleDeclaration;
private var _resourceManager:IResourceManager;
mx_internal var _affectedProperties:Object;
mx_internal var _documentDescriptor:UIComponentDescriptor;
private var _processedDescriptors:Boolean;// = false
mx_internal var origBorderColor:Number;
private var _focusManager:IFocusManager;
private var _cachePolicy:String;// = "auto"
private var _measuredHeight:Number;// = 0
private var _id:String;
private var _owner:DisplayObjectContainer;
public var transitions:Array;
mx_internal var _parent:DisplayObjectContainer;
private var _measuredMinWidth:Number;// = 0
private var oldMinWidth:Number;
private var _explicitWidth:Number;
private var _enabled:Boolean;// = false
public var states:Array;
private var _mouseFocusEnabled:Boolean;// = true
private var oldHeight:Number;// = 0
private var _currentStateChanged:Boolean;
private var cachedTextFormat:UITextFormat;
mx_internal var _height:Number;
private var _automationDelegate:IAutomationObject;
private var _percentWidth:Number;
private var _automationName:String;// = null
private var _isEffectStarted:Boolean;// = false
private var _styleName:Object;
private var lastUnscaledWidth:Number;
mx_internal var _document:Object;
mx_internal var _errorString:String;// = ""
private var oldExplicitHeight:Number;
private var _nestLevel:int;// = 0
private var _systemManagerDirty:Boolean;// = false
private var _explicitHeight:Number;
mx_internal var _toolTip:String;
private var _filters:Array;
private var _focusPane:Sprite;
private var playStateTransition:Boolean;// = true
private var _nonInheritingStyles:Object;
private var _showInAutomationHierarchy:Boolean;// = true
private var _moduleFactory:IFlexModuleFactory;
private var preventDrawFocus:Boolean;// = false
private var oldX:Number;// = 0
private var oldY:Number;// = 0
private var _instanceIndices:Array;
private var _visible:Boolean;// = true
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
mx_internal var _effectsStarted:Array;
mx_internal var _explicitMinWidth:Number;
private var lastUnscaledHeight:Number;
mx_internal var _explicitMaxWidth:Number;
private var _measuredMinHeight:Number;// = 0
private var _uid:String;
private var _currentTransitionEffect:IEffect;
private var _updateCompletePendingFlag:Boolean;// = false
private var oldMinHeight:Number;
private var _flexContextMenu:IFlexContextMenu;
mx_internal var _explicitMinHeight:Number;
private var _percentHeight:Number;
private var oldEmbeddedFontContext:IFlexModuleFactory;// = null
private var oldWidth:Number;// = 0
public static const DEFAULT_MEASURED_WIDTH:Number = 160;
public static const DEFAULT_MAX_WIDTH:Number = 10000;
public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22;
public static const DEFAULT_MAX_HEIGHT:Number = 10000;
public static const DEFAULT_MEASURED_HEIGHT:Number = 22;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40;
mx_internal static var dispatchEventHook:Function;
private static var fakeMouseY:QName = new QName(mx_internal, "_mouseY");
mx_internal static var createAccessibilityImplementation:Function;
mx_internal static var STYLE_UNINITIALIZED:Object = {};
private static var fakeMouseX:QName = new QName(mx_internal, "_mouseX");
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
public function UIComponent(){
methodQueue = [];
_resourceManager = ResourceManager.getInstance();
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
states = [];
transitions = [];
_effectsStarted = [];
_affectedProperties = {};
_endingEffectInstances = [];
super();
focusRect = false;
tabEnabled = (this is IFocusManagerComponent);
tabChildren = false;
enabled = true;
$visible = false;
addEventListener(Event.ADDED, addedHandler);
addEventListener(Event.REMOVED, removedHandler);
if ((this is IFocusManagerComponent)){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
resourcesChanged();
resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true);
_width = super.width;
_height = super.height;
}
override public function get filters():Array{
return ((_filters) ? _filters : super.filters);
}
public function get toolTip():String{
return (_toolTip);
}
private function transition_effectEndHandler(_arg1:EffectEvent):void{
_currentTransitionEffect = null;
}
public function get nestLevel():int{
return (_nestLevel);
}
protected function adjustFocusRect(_arg1:DisplayObject=null):void{
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Number;
if (!_arg1){
_arg1 = this;
};
if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){
return;
};
var _local2:IFocusManager = focusManager;
if (!_local2){
return;
};
var _local3:IFlexDisplayObject = IFlexDisplayObject(getFocusObject());
if (_local3){
if (((errorString) && (!((errorString == ""))))){
_local4 = getStyle("errorColor");
} else {
_local4 = getStyle("themeColor");
};
_local5 = getStyle("focusThickness");
if ((_local3 is IStyleClient)){
IStyleClient(_local3).setStyle("focusColor", _local4);
};
_local3.setActualSize((_arg1.width + (2 * _local5)), (_arg1.height + (2 * _local5)));
if (rotation){
_local7 = ((rotation * Math.PI) / 180);
_local6 = new Point((_arg1.x - (_local5 * (Math.cos(_local7) - Math.sin(_local7)))), (_arg1.y - (_local5 * (Math.cos(_local7) + Math.sin(_local7)))));
DisplayObject(_local3).rotation = rotation;
} else {
_local6 = new Point((_arg1.x - _local5), (_arg1.y - _local5));
};
if (_arg1.parent == this){
_local6.x = (_local6.x + x);
_local6.y = (_local6.y + y);
};
_local6 = parent.localToGlobal(_local6);
_local6 = parent.globalToLocal(_local6);
_local3.move(_local6.x, _local6.y);
if ((_local3 is IInvalidating)){
IInvalidating(_local3).validateNow();
} else {
if ((_local3 is IProgrammaticSkin)){
IProgrammaticSkin(_local3).validateNow();
};
};
};
}
mx_internal function setUnscaledWidth(_arg1:Number):void{
var _local2:Number = (_arg1 * Math.abs(oldScaleX));
if (_explicitWidth == _local2){
return;
};
if (!isNaN(_local2)){
_percentWidth = NaN;
};
_explicitWidth = _local2;
invalidateSize();
var _local3:IInvalidating = (parent as IInvalidating);
if (((_local3) && (includeInLayout))){
_local3.invalidateSize();
_local3.invalidateDisplayList();
};
}
private function isOnDisplayList():Boolean{
var p:DisplayObjectContainer;
try {
p = (_parent) ? _parent : super.parent;
} catch(e:SecurityError) {
return (true);
};
return ((p) ? true : false);
}
public function set nestLevel(_arg1:int):void{
var _local2:IChildList;
var _local3:int;
var _local4:int;
var _local5:ILayoutManagerClient;
var _local6:IUITextField;
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
updateCallbacks();
_local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
_local3 = _local2.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = (_local2.getChildAt(_local4) as ILayoutManagerClient);
if (_local5){
_local5.nestLevel = (_arg1 + 1);
} else {
_local6 = (_local2.getChildAt(_local4) as IUITextField);
if (_local6){
_local6.nestLevel = (_arg1 + 1);
};
};
_local4++;
};
};
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function callLaterDispatcher(_arg1:Event):void{
var callLaterErrorEvent:DynamicEvent;
var event = _arg1;
UIComponentGlobals.callLaterDispatcherCount++;
if (!UIComponentGlobals.catchCallLaterExceptions){
callLaterDispatcher2(event);
} else {
try {
callLaterDispatcher2(event);
} catch(e:Error) {
callLaterErrorEvent = new DynamicEvent("callLaterError");
callLaterErrorEvent.error = e;
systemManager.dispatchEvent(callLaterErrorEvent);
};
};
UIComponentGlobals.callLaterDispatcherCount--;
}
public function getStyle(_arg1:String){
return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]);
}
final mx_internal function get $width():Number{
return (super.width);
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, (Math.PI / 2), _arg1, _arg2);
return (UIComponentGlobals.tempMatrix);
}
public function setCurrentState(_arg1:String, _arg2:Boolean=true):void{
if (((!((_arg1 == currentState))) && (!(((isBaseState(_arg1)) && (isBaseState(currentState))))))){
requestedCurrentState = _arg1;
playStateTransition = _arg2;
if (initialized){
commitCurrentState();
} else {
_currentStateChanged = true;
addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
};
}
private function getBaseStates(_arg1:State):Array{
var _local2:Array = [];
while (((_arg1) && (_arg1.basedOn))) {
_local2.push(_arg1.basedOn);
_arg1 = getState(_arg1.basedOn);
};
return (_local2);
}
public function set minHeight(_arg1:Number):void{
if (explicitMinHeight == _arg1){
return;
};
explicitMinHeight = _arg1;
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
public function get errorString():String{
return (_errorString);
}
mx_internal function setUnscaledHeight(_arg1:Number):void{
var _local2:Number = (_arg1 * Math.abs(oldScaleY));
if (_explicitHeight == _local2){
return;
};
if (!isNaN(_local2)){
_percentHeight = NaN;
};
_explicitHeight = _local2;
invalidateSize();
var _local3:IInvalidating = (parent as IInvalidating);
if (((_local3) && (includeInLayout))){
_local3.invalidateSize();
_local3.invalidateDisplayList();
};
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
final mx_internal function set $width(_arg1:Number):void{
super.width = _arg1;
}
public function getVisibleRect(_arg1:DisplayObject=null):Rectangle{
if (!_arg1){
_arg1 = DisplayObject(systemManager);
};
var _local2:Point = new Point(x, y);
var _local3:DisplayObject = ($parent) ? $parent : parent;
_local2 = _local3.localToGlobal(_local2);
var _local4:Rectangle = new Rectangle(_local2.x, _local2.y, width, height);
var _local5:DisplayObject = this;
var _local6:Rectangle = new Rectangle();
do {
if ((_local5 is UIComponent)){
if (UIComponent(_local5).$parent){
_local5 = UIComponent(_local5).$parent;
} else {
_local5 = UIComponent(_local5).parent;
};
} else {
_local5 = _local5.parent;
};
if (((_local5) && (_local5.scrollRect))){
_local6 = _local5.scrollRect.clone();
_local2 = _local5.localToGlobal(_local6.topLeft);
_local6.x = _local2.x;
_local6.y = _local2.y;
_local4 = _local4.intersection(_local6);
};
} while (((_local5) && (!((_local5 == _arg1)))));
return (_local4);
}
public function invalidateDisplayList():void{
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (((isOnDisplayList()) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
};
}
mx_internal function initThemeColor():Boolean{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Array;
var _local7:int;
var _local8:CSSStyleDeclaration;
var _local1:Object = _styleName;
if (_styleDeclaration){
_local2 = _styleDeclaration.getStyle("themeColor");
_local3 = _styleDeclaration.getStyle("rollOverColor");
_local4 = _styleDeclaration.getStyle("selectionColor");
};
if ((((((_local2 === null)) || (!(StyleManager.isValidStyleValue(_local2))))) && (((_local1) && (!((_local1 is ISimpleStyleClient))))))){
_local5 = ((_local1 is String)) ? StyleManager.getStyleDeclaration(("." + _local1)) : _local1;
if (_local5){
_local2 = _local5.getStyle("themeColor");
_local3 = _local5.getStyle("rollOverColor");
_local4 = _local5.getStyle("selectionColor");
};
};
if ((((_local2 === null)) || (!(StyleManager.isValidStyleValue(_local2))))){
_local6 = getClassStyleDeclarations();
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (_local8){
_local2 = _local8.getStyle("themeColor");
_local3 = _local8.getStyle("rollOverColor");
_local4 = _local8.getStyle("selectionColor");
};
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
break;
};
_local7++;
};
};
if (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (isNaN(_local3)))) && (isNaN(_local4)))){
setThemeColor(_local2);
return (true);
};
return (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (!(isNaN(_local3))))) && (!(isNaN(_local4)))));
}
override public function get scaleX():Number{
return (_scaleX);
}
public function get uid():String{
if (!_uid){
_uid = toString();
};
return (_uid);
}
override public function get mouseX():Number{
if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseX] === undefined)))){
return (super.mouseX);
};
return (globalToLocal(new Point(root[fakeMouseX], 0)).x);
}
override public function stopDrag():void{
super.stopDrag();
invalidateProperties();
dispatchEvent(new Event("xChanged"));
dispatchEvent(new Event("yChanged"));
}
public function get focusPane():Sprite{
return (_focusPane);
}
public function set tweeningProperties(_arg1:Array):void{
_tweeningProperties = _arg1;
}
public function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, 0, _arg1, _arg2);
return (UIComponentGlobals.tempMatrix);
}
public function get isDocument():Boolean{
return ((document == this));
}
public function set validationSubField(_arg1:String):void{
_validationSubField = _arg1;
}
override public function get scaleY():Number{
return (_scaleY);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function createInFontContext(_arg1:Class):Object{
hasFontContextBeenSaved = true;
var _local2:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
var _local3:String = getStyle("fontWeight");
var _local4:String = getStyle("fontStyle");
var _local5 = (_local3 == "bold");
var _local6 = (_local4 == "italic");
oldEmbeddedFontContext = getFontContext(_local2, _local5, _local6);
var _local7:Object = createInModuleContext((oldEmbeddedFontContext) ? oldEmbeddedFontContext : moduleFactory, getQualifiedClassName(_arg1));
if (_local7 == null){
_local7 = new (_arg1);
};
return (_local7);
}
public function get screen():Rectangle{
var _local1:ISystemManager = systemManager;
return ((_local1) ? _local1.screen : null);
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus(DisplayObject(_arg1.target))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
};
ContainerGlobals.checkFocus(_arg1.relatedObject, this);
};
}
public function hasFontContextChanged():Boolean{
if (!hasFontContextBeenSaved){
return (false);
};
var _local1:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
var _local2:String = getStyle("fontWeight");
var _local3:String = getStyle("fontStyle");
var _local4 = (_local2 == "bold");
var _local5 = (_local3 == "italic");
var _local6:EmbeddedFont = getEmbeddedFont(_local1, _local4, _local5);
var _local7:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(_local6, moduleFactory);
return (!((_local7 == oldEmbeddedFontContext)));
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
override public function get x():Number{
return (super.x);
}
override public function get y():Number{
return (super.y);
}
override public function get visible():Boolean{
return (_visible);
}
mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{
if (!overlay){
overlayColor = _arg1;
overlay = new UIComponent();
overlay.name = "overlay";
overlay.$visible = true;
fillOverlay(overlay, _arg1, _arg2);
attachOverlay();
if (!_arg2){
addEventListener(ResizeEvent.RESIZE, overlay_resizeHandler);
};
overlay.x = 0;
overlay.y = 0;
invalidateDisplayList();
overlayReferenceCount = 1;
} else {
overlayReferenceCount++;
};
dispatchEvent(new ChildExistenceChangedEvent(ChildExistenceChangedEvent.OVERLAY_CREATED, true, false, overlay));
}
public function get percentWidth():Number{
return (_percentWidth);
}
public function set explicitMinHeight(_arg1:Number):void{
if (_explicitMinHeight == _arg1){
return;
};
_explicitMinHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinHeightChanged"));
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
mx_internal function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function stylesInitialized():void{
}
public function set errorString(_arg1:String):void{
var _local2:String = _errorString;
_errorString = _arg1;
ToolTipManager.registerErrorString(this, _local2, _arg1);
errorStringChanged = true;
invalidateProperties();
dispatchEvent(new Event("errorStringChanged"));
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
final mx_internal function set $height(_arg1:Number):void{
super.height = _arg1;
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
final mx_internal function $removeChild(_arg1:DisplayObject):DisplayObject{
return (super.removeChild(_arg1));
}
override public function set scaleX(_arg1:Number):void{
if (_scaleX == _arg1){
return;
};
_scaleX = _arg1;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("scaleXChanged"));
}
override public function set scaleY(_arg1:Number):void{
if (_scaleY == _arg1){
return;
};
_scaleY = _arg1;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("scaleYChanged"));
}
public function set uid(_arg1:String):void{
this._uid = _arg1;
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
if (automationDelegate){
return (automationDelegate.createAutomationIDPart(_arg1));
};
return (null);
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
if (automationDelegate){
return (automationDelegate.getAutomationChildAt(_arg1));
};
return (null);
}
mx_internal function get isEffectStarted():Boolean{
return (_isEffectStarted);
}
override public function get parent():DisplayObjectContainer{
try {
return ((_parent) ? _parent : super.parent);
} catch(e:SecurityError) {
};
return (null);
}
override public function get mouseY():Number{
if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseY] === undefined)))){
return (super.mouseY);
};
return (globalToLocal(new Point(0, root[fakeMouseY])).y);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
dispatchEvent(new Event("heightChanged"));
_local3 = true;
};
if (_local3){
invalidateDisplayList();
dispatchResizeEvent();
};
}
private function focusObj_resizeHandler(_arg1:ResizeEvent):void{
adjustFocusRect();
}
mx_internal function adjustSizesForScaleChanges():void{
var _local3:Number;
var _local1:Number = scaleX;
var _local2:Number = scaleY;
if (_local1 != oldScaleX){
_local3 = Math.abs((_local1 / oldScaleX));
if (explicitMinWidth){
explicitMinWidth = (explicitMinWidth * _local3);
};
if (!isNaN(explicitWidth)){
explicitWidth = (explicitWidth * _local3);
};
if (explicitMaxWidth){
explicitMaxWidth = (explicitMaxWidth * _local3);
};
oldScaleX = _local1;
};
if (_local2 != oldScaleY){
_local3 = Math.abs((_local2 / oldScaleY));
if (explicitMinHeight){
explicitMinHeight = (explicitMinHeight * _local3);
};
if (explicitHeight){
explicitHeight = (explicitHeight * _local3);
};
if (explicitMaxHeight){
explicitMaxHeight = (explicitMaxHeight * _local3);
};
oldScaleY = _local2;
};
}
public function set focusPane(_arg1:Sprite):void{
if (_arg1){
addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
removeChild(_focusPane);
_focusPane.mask = null;
_focusPane = null;
};
}
public function determineTextFormatFromStyles():UITextFormat{
var _local2:String;
var _local1:UITextFormat = cachedTextFormat;
if (!_local1){
_local2 = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ",");
_local1 = new UITextFormat(getNonNullSystemManager(), _local2);
_local1.moduleFactory = moduleFactory;
_local1.align = _inheritingStyles.textAlign;
_local1.bold = (_inheritingStyles.fontWeight == "bold");
_local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor;
_local1.font = _local2;
_local1.indent = _inheritingStyles.textIndent;
_local1.italic = (_inheritingStyles.fontStyle == "italic");
_local1.kerning = _inheritingStyles.kerning;
_local1.leading = _nonInheritingStyles.leading;
_local1.leftMargin = _nonInheritingStyles.paddingLeft;
_local1.letterSpacing = _inheritingStyles.letterSpacing;
_local1.rightMargin = _nonInheritingStyles.paddingRight;
_local1.size = _inheritingStyles.fontSize;
_local1.underline = (_nonInheritingStyles.textDecoration == "underline");
_local1.antiAliasType = _inheritingStyles.fontAntiAliasType;
_local1.gridFitType = _inheritingStyles.fontGridFitType;
_local1.sharpness = _inheritingStyles.fontSharpness;
_local1.thickness = _inheritingStyles.fontThickness;
cachedTextFormat = _local1;
};
return (_local1);
}
public function validationResultHandler(_arg1:ValidationResultEvent):void{
var _local2:String;
var _local3:ValidationResult;
var _local4:int;
if (_arg1.type == ValidationResultEvent.VALID){
if (errorString != ""){
errorString = "";
dispatchEvent(new FlexEvent(FlexEvent.VALID));
};
} else {
if (((((!((validationSubField == null))) && (!((validationSubField == ""))))) && (_arg1.results))){
_local4 = 0;
while (_local4 < _arg1.results.length) {
_local3 = _arg1.results[_local4];
if (_local3.subField == validationSubField){
if (_local3.isError){
_local2 = _local3.errorMessage;
} else {
if (errorString != ""){
errorString = "";
dispatchEvent(new FlexEvent(FlexEvent.VALID));
};
};
break;
};
_local4++;
};
} else {
if (((_arg1.results) && ((_arg1.results.length > 0)))){
_local2 = _arg1.results[0].errorMessage;
};
};
if (((_local2) && (!((errorString == _local2))))){
errorString = _local2;
dispatchEvent(new FlexEvent(FlexEvent.INVALID));
};
};
}
public function invalidateProperties():void{
if (!invalidatePropertiesFlag){
invalidatePropertiesFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateProperties(this);
};
};
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
private function focusObj_scrollHandler(_arg1:Event):void{
adjustFocusRect();
}
final mx_internal function get $x():Number{
return (super.x);
}
final mx_internal function get $y():Number{
return (super.y);
}
public function setConstraintValue(_arg1:String, _arg2):void{
setStyle(_arg1, _arg2);
}
protected function resourcesChanged():void{
}
public function registerEffects(_arg1:Array):void{
var _local4:String;
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]);
if (((!((_local4 == null))) && (!((_local4 == ""))))){
addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
_local3++;
};
}
public function get explicitMinWidth():Number{
return (_explicitMinWidth);
}
private function filterChangeHandler(_arg1:Event):void{
super.filters = _filters;
}
override public function set visible(_arg1:Boolean):void{
setVisible(_arg1);
}
public function set explicitHeight(_arg1:Number):void{
if (_explicitHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentHeight = NaN;
};
_explicitHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitHeightChanged"));
}
override public function set x(_arg1:Number):void{
if (super.x == _arg1){
return;
};
super.x = _arg1;
invalidateProperties();
dispatchEvent(new Event("xChanged"));
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
_showInAutomationHierarchy = _arg1;
}
override public function set y(_arg1:Number):void{
if (super.y == _arg1){
return;
};
super.y = _arg1;
invalidateProperties();
dispatchEvent(new Event("yChanged"));
}
private function resourceManager_changeHandler(_arg1:Event):void{
resourcesChanged();
}
public function set systemManager(_arg1:ISystemManager):void{
_systemManager = _arg1;
_systemManagerDirty = false;
}
mx_internal function getFocusObject():DisplayObject{
var _local1:IFocusManager = focusManager;
if (((!(_local1)) || (!(_local1.focusPane)))){
return (null);
};
return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0));
}
public function set percentWidth(_arg1:Number):void{
if (_percentWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitWidth = NaN;
};
_percentWidth = _arg1;
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2:DisplayObjectContainer = _arg1.parent;
if (((_local2) && (!((_local2 is Loader))))){
_local2.removeChild(_arg1);
};
var _local3:int = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren;
addingChild(_arg1);
$addChildAt(_arg1, _local3);
childAdded(_arg1);
return (_arg1);
}
public function get document():Object{
return (_document);
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
final mx_internal function $addChild(_arg1:DisplayObject):DisplayObject{
return (super.addChild(_arg1));
}
mx_internal function setThemeColor(_arg1:Object):void{
var _local2:Number;
if ((_local2 is String)){
_local2 = parseInt(String(_arg1));
} else {
_local2 = Number(_arg1);
};
if (isNaN(_local2)){
_local2 = StyleManager.getColorName(_arg1);
};
var _local3:Number = ColorUtil.adjustBrightness2(_local2, 50);
var _local4:Number = ColorUtil.adjustBrightness2(_local2, 70);
setStyle("selectionColor", _local3);
setStyle("rollOverColor", _local4);
}
public function get explicitMaxWidth():Number{
return (_explicitMaxWidth);
}
public function get id():String{
return (_id);
}
override public function get height():Number{
return (_height);
}
public function set minWidth(_arg1:Number):void{
if (explicitMinWidth == _arg1){
return;
};
explicitMinWidth = _arg1;
}
public function set currentState(_arg1:String):void{
setCurrentState(_arg1, true);
}
public function getRepeaterItem(_arg1:int=-1):Object{
var _local2:Array = repeaters;
if (_arg1 == -1){
_arg1 = (_local2.length - 1);
};
return (_local2[_arg1].getItemAt(repeaterIndices[_arg1]));
}
public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument;
BindingManager.executeBindings(_local2, id, this);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
mx_internal function getFontContext(_arg1:String, _arg2:Boolean, _arg3:Boolean):IFlexModuleFactory{
return (embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(_arg1, _arg2, _arg3), moduleFactory));
}
public function get instanceIndex():int{
return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1);
}
public function set measuredWidth(_arg1:Number):void{
_measuredWidth = _arg1;
}
public function effectFinished(_arg1:IEffectInstance):void{
_endingEffectInstances.push(_arg1);
invalidateProperties();
UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true);
}
mx_internal function set isEffectStarted(_arg1:Boolean):void{
_isEffectStarted = _arg1;
}
mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{
if (!_arg3){
_arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0);
};
var _local4:Graphics = _arg1.graphics;
_local4.clear();
_local4.beginFill(_arg2);
_local4.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2));
_local4.endFill();
}
public function get instanceIndices():Array{
return ((_instanceIndices) ? _instanceIndices.slice(0) : null);
}
mx_internal function childAdded(_arg1:DisplayObject):void{
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).initialized){
UIComponent(_arg1).initialize();
};
} else {
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
};
}
public function globalToContent(_arg1:Point):Point{
return (globalToLocal(_arg1));
}
mx_internal function removingChild(_arg1:DisplayObject):void{
}
mx_internal function getEffectsForProperty(_arg1:String):Array{
return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []);
}
override public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = getChildAt(_arg1);
removingChild(_local2);
$removeChild(_local2);
childRemoved(_local2);
return (_local2);
}
protected function measure():void{
measuredMinWidth = 0;
measuredMinHeight = 0;
measuredWidth = 0;
measuredHeight = 0;
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
mx_internal function getNonNullSystemManager():ISystemManager{
var _local1:ISystemManager = systemManager;
if (!_local1){
_local1 = ISystemManager(SystemManager.getSWFRoot(this));
};
if (!_local1){
return (SystemManagerGlobals.topLevelSystemManagers[0]);
};
return (_local1);
}
protected function get unscaledWidth():Number{
return ((width / Math.abs(scaleX)));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
if (_arg1){
dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE));
};
}
private function processEffectFinished(_arg1:Array):void{
var _local3:int;
var _local4:IEffectInstance;
var _local5:IEffectInstance;
var _local6:Array;
var _local7:int;
var _local8:String;
var _local9:int;
var _local2:int = (_effectsStarted.length - 1);
while (_local2 >= 0) {
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1[_local3];
if (_local4 == _effectsStarted[_local2]){
_local5 = _effectsStarted[_local2];
_effectsStarted.splice(_local2, 1);
_local6 = _local5.effect.getAffectedProperties();
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (_affectedProperties[_local8] != undefined){
_local9 = 0;
while (_local9 < _affectedProperties[_local8].length) {
if (_affectedProperties[_local8][_local9] == _local4){
_affectedProperties[_local8].splice(_local9, 1);
break;
};
_local9++;
};
if (_affectedProperties[_local8].length == 0){
delete _affectedProperties[_local8];
};
};
_local7++;
};
break;
};
_local3++;
};
_local2--;
};
isEffectStarted = ((_effectsStarted.length > 0)) ? true : false;
if (((_local4) && (_local4.hideFocusRing))){
preventDrawFocus = false;
};
}
private function commitCurrentState():void{
var _local3:StateChangeEvent;
var _local1:IEffect = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null;
var _local2:String = findCommonBaseState(_currentState, requestedCurrentState);
var _local4:String = (_currentState) ? _currentState : "";
var _local5:State = getState(requestedCurrentState);
if (_currentTransitionEffect){
_currentTransitionEffect.end();
};
initializeState(requestedCurrentState);
if (_local1){
_local1.captureStartValues();
};
_local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING);
_local3.oldState = _local4;
_local3.newState = (requestedCurrentState) ? requestedCurrentState : "";
dispatchEvent(_local3);
if (isBaseState(_currentState)){
dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
};
removeState(_currentState, _local2);
_currentState = requestedCurrentState;
if (isBaseState(currentState)){
dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
} else {
applyState(_currentState, _local2);
};
_local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE);
_local3.oldState = _local4;
_local3.newState = (_currentState) ? _currentState : "";
dispatchEvent(_local3);
if (_local1){
UIComponentGlobals.layoutManager.validateNow();
_currentTransitionEffect = _local1;
_local1.addEventListener(EffectEvent.EFFECT_END, transition_effectEndHandler);
_local1.play();
};
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
private function dispatchResizeEvent():void{
var _local1:ResizeEvent = new ResizeEvent(ResizeEvent.RESIZE);
_local1.oldWidth = oldWidth;
_local1.oldHeight = oldHeight;
dispatchEvent(_local1);
oldWidth = width;
oldHeight = height;
}
public function set maxWidth(_arg1:Number):void{
if (explicitMaxWidth == _arg1){
return;
};
explicitMaxWidth = _arg1;
}
public function validateDisplayList():void{
var _local1:ISystemManager;
var _local2:Number;
var _local3:Number;
if (invalidateDisplayListFlag){
_local1 = (parent as ISystemManager);
if (_local1){
if ((((_local1 is SystemManagerProxy)) || ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))))){
setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
};
};
_local2 = ((scaleX == 0)) ? 0 : (width / scaleX);
_local3 = ((scaleY == 0)) ? 0 : (height / scaleY);
if (Math.abs((_local2 - lastUnscaledWidth)) < 1E-5){
_local2 = lastUnscaledWidth;
};
if (Math.abs((_local3 - lastUnscaledHeight)) < 1E-5){
_local3 = lastUnscaledHeight;
};
updateDisplayList(_local2, _local3);
lastUnscaledWidth = _local2;
lastUnscaledHeight = _local3;
invalidateDisplayListFlag = false;
};
}
public function contentToGlobal(_arg1:Point):Point{
return (localToGlobal(_arg1));
}
public function resolveAutomationIDPart(_arg1:Object):Array{
if (automationDelegate){
return (automationDelegate.resolveAutomationIDPart(_arg1));
};
return ([]);
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function setFocus():void{
var _local1:ISystemManager = systemManager;
if (((_local1) && (((_local1.stage) || (_local1.useSWFBridge()))))){
if (UIComponentGlobals.callLaterDispatcherCount == 0){
_local1.stage.focus = this;
UIComponentGlobals.nextFocusObject = null;
} else {
UIComponentGlobals.nextFocusObject = this;
_local1.addEventListener(FlexEvent.ENTER_FRAME, setFocusLater);
};
} else {
UIComponentGlobals.nextFocusObject = this;
callLater(setFocusLater);
};
}
private function getTransition(_arg1:String, _arg2:String):IEffect{
var _local6:Transition;
var _local3:IEffect;
var _local4:int;
if (!transitions){
return (null);
};
if (!_arg1){
_arg1 = "";
};
if (!_arg2){
_arg2 = "";
};
var _local5:int;
while (_local5 < transitions.length) {
_local6 = transitions[_local5];
if ((((((_local6.fromState == "*")) && ((_local6.toState == "*")))) && ((_local4 < 1)))){
_local3 = _local6.effect;
_local4 = 1;
} else {
if ((((((_local6.fromState == _arg1)) && ((_local6.toState == "*")))) && ((_local4 < 2)))){
_local3 = _local6.effect;
_local4 = 2;
} else {
if ((((((_local6.fromState == "*")) && ((_local6.toState == _arg2)))) && ((_local4 < 3)))){
_local3 = _local6.effect;
_local4 = 3;
} else {
if ((((((_local6.fromState == _arg1)) && ((_local6.toState == _arg2)))) && ((_local4 < 4)))){
_local3 = _local6.effect;
_local4 = 4;
break;
};
};
};
};
_local5++;
};
return (_local3);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
if (_arg1){
setVisible(_visible, true);
dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE));
};
}
final mx_internal function set $y(_arg1:Number):void{
super.y = _arg1;
}
public function owns(_arg1:DisplayObject):Boolean{
var child = _arg1;
var childList:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
if (childList.contains(child)){
return (true);
};
try {
while (((child) && (!((child == this))))) {
if ((child is IUIComponent)){
child = IUIComponent(child).owner;
} else {
child = child.parent;
};
};
} catch(e:SecurityError) {
return (false);
};
return ((child == this));
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
_visible = _arg1;
if (!initialized){
return;
};
if ($visible == _arg1){
return;
};
$visible = _arg1;
if (!_arg2){
dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE));
};
}
final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (super.addChildAt(_arg1, _arg2));
}
public function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
var _local2:Array;
var _local3:Object;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:PropertyChangeEvent;
if (((id) && (!((id == ""))))){
_local2 = _instanceIndices;
if (!_local2){
_arg1[id] = null;
} else {
_local3 = _arg1[id];
if (!_local3){
return;
};
_local4 = [];
_local4.push(_local3);
_local5 = _local2.length;
_local6 = 0;
while (_local6 < (_local5 - 1)) {
_local8 = _local3[_local2[_local6]];
if (!_local8){
return;
};
_local3 = _local8;
_local4.push(_local3);
_local6++;
};
_local3.splice(_local2[(_local5 - 1)], 1);
_local7 = (_local4.length - 1);
while (_local7 > 0) {
if (_local4[_local7].length == 0){
_local4[(_local7 - 1)].splice(_local2[_local7], 1);
};
_local7--;
};
if ((((_local4.length > 0)) && ((_local4[0].length == 0)))){
_arg1[id] = null;
} else {
_local9 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]);
_arg1.dispatchEvent(_local9);
};
};
};
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
public function effectStarted(_arg1:IEffectInstance):void{
var _local4:String;
_effectsStarted.push(_arg1);
var _local2:Array = _arg1.effect.getAffectedProperties();
var _local3:int;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
if (_affectedProperties[_local4] == undefined){
_affectedProperties[_local4] = [];
};
_affectedProperties[_local4].push(_arg1);
_local3++;
};
isEffectStarted = true;
if (_arg1.hideFocusRing){
preventDrawFocus = true;
drawFocus(false);
};
}
final mx_internal function set $x(_arg1:Number):void{
super.x = _arg1;
}
private function applyState(_arg1:String, _arg2:String):void{
var _local4:Array;
var _local5:int;
var _local3:State = getState(_arg1);
if (_arg1 == _arg2){
return;
};
if (_local3){
if (_local3.basedOn != _arg2){
applyState(_local3.basedOn, _arg2);
};
_local4 = _local3.overrides;
_local5 = 0;
while (_local5 < _local4.length) {
_local4[_local5].apply(this);
_local5++;
};
_local3.dispatchEnterState();
};
}
protected function commitProperties():void{
var _local1:Number;
var _local2:Number;
if (_scaleX != oldScaleX){
_local1 = Math.abs((_scaleX / oldScaleX));
if (!isNaN(explicitMinWidth)){
explicitMinWidth = (explicitMinWidth * _local1);
};
if (!isNaN(explicitWidth)){
explicitWidth = (explicitWidth * _local1);
};
if (!isNaN(explicitMaxWidth)){
explicitMaxWidth = (explicitMaxWidth * _local1);
};
_width = (_width * _local1);
super.scaleX = (oldScaleX = _scaleX);
};
if (_scaleY != oldScaleY){
_local2 = Math.abs((_scaleY / oldScaleY));
if (!isNaN(explicitMinHeight)){
explicitMinHeight = (explicitMinHeight * _local2);
};
if (!isNaN(explicitHeight)){
explicitHeight = (explicitHeight * _local2);
};
if (!isNaN(explicitMaxHeight)){
explicitMaxHeight = (explicitMaxHeight * _local2);
};
_height = (_height * _local2);
super.scaleY = (oldScaleY = _scaleY);
};
if (((!((x == oldX))) || (!((y == oldY))))){
dispatchMoveEvent();
};
if (((!((width == oldWidth))) || (!((height == oldHeight))))){
dispatchResizeEvent();
};
if (errorStringChanged){
errorStringChanged = false;
setBorderColorForErrorString();
};
}
public function get percentHeight():Number{
return (_percentHeight);
}
override public function get width():Number{
return (_width);
}
final mx_internal function get $parent():DisplayObjectContainer{
return (super.parent);
}
public function set explicitMinWidth(_arg1:Number):void{
if (_explicitMinWidth == _arg1){
return;
};
_explicitMinWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinWidthChanged"));
}
public function get isPopUp():Boolean{
return (_isPopUp);
}
private function measureSizes():Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local1:Boolean;
if (!invalidateSizeFlag){
return (_local1);
};
if (((isNaN(explicitWidth)) || (isNaN(explicitHeight)))){
_local4 = Math.abs(scaleX);
_local5 = Math.abs(scaleY);
if (_local4 != 1){
_measuredMinWidth = (_measuredMinWidth / _local4);
_measuredWidth = (_measuredWidth / _local4);
};
if (_local5 != 1){
_measuredMinHeight = (_measuredMinHeight / _local5);
_measuredHeight = (_measuredHeight / _local5);
};
measure();
invalidateSizeFlag = false;
if (((!(isNaN(explicitMinWidth))) && ((measuredWidth < explicitMinWidth)))){
measuredWidth = explicitMinWidth;
};
if (((!(isNaN(explicitMaxWidth))) && ((measuredWidth > explicitMaxWidth)))){
measuredWidth = explicitMaxWidth;
};
if (((!(isNaN(explicitMinHeight))) && ((measuredHeight < explicitMinHeight)))){
measuredHeight = explicitMinHeight;
};
if (((!(isNaN(explicitMaxHeight))) && ((measuredHeight > explicitMaxHeight)))){
measuredHeight = explicitMaxHeight;
};
if (_local4 != 1){
_measuredMinWidth = (_measuredMinWidth * _local4);
_measuredWidth = (_measuredWidth * _local4);
};
if (_local5 != 1){
_measuredMinHeight = (_measuredMinHeight * _local5);
_measuredHeight = (_measuredHeight * _local5);
};
} else {
invalidateSizeFlag = false;
_measuredMinWidth = 0;
_measuredMinHeight = 0;
};
adjustSizesForScaleChanges();
if (isNaN(oldMinWidth)){
oldMinWidth = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth;
oldMinHeight = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight;
oldExplicitWidth = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth;
oldExplicitHeight = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight;
_local1 = true;
} else {
_local3 = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth;
if (_local3 != oldMinWidth){
oldMinWidth = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight;
if (_local3 != oldMinHeight){
oldMinHeight = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth;
if (_local3 != oldExplicitWidth){
oldExplicitWidth = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight;
if (_local3 != oldExplicitHeight){
oldExplicitHeight = _local3;
_local1 = true;
};
};
return (_local1);
}
public function get automationTabularData():Object{
if (automationDelegate){
return (automationDelegate.automationTabularData);
};
return (null);
}
public function validateNow():void{
UIComponentGlobals.layoutManager.validateClient(this);
}
public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
}
public function get repeaters():Array{
return ((_repeaters) ? _repeaters.slice(0) : []);
}
private function dispatchMoveEvent():void{
var _local1:MoveEvent = new MoveEvent(MoveEvent.MOVE);
_local1.oldX = oldX;
_local1.oldY = oldY;
dispatchEvent(_local1);
oldX = x;
oldY = y;
}
public function drawFocus(_arg1:Boolean):void{
var _local4:DisplayObjectContainer;
var _local5:Class;
if (!parent){
return;
};
var _local2:DisplayObject = getFocusObject();
var _local3:Sprite = (focusManager) ? focusManager.focusPane : null;
if (((_arg1) && (!(preventDrawFocus)))){
_local4 = _local3.parent;
if (_local4 != parent){
if (_local4){
if ((_local4 is ISystemManager)){
ISystemManager(_local4).focusPane = null;
} else {
IUIComponent(_local4).focusPane = null;
};
};
if ((parent is ISystemManager)){
ISystemManager(parent).focusPane = _local3;
} else {
IUIComponent(parent).focusPane = _local3;
};
};
_local5 = getStyle("focusSkin");
if (((_local2) && (!((_local2 is _local5))))){
_local3.removeChild(_local2);
_local2 = null;
};
if (!_local2){
_local2 = new (_local5);
_local2.name = "focus";
_local3.addChild(_local2);
};
if ((_local2 is ILayoutManagerClient)){
ILayoutManagerClient(_local2).nestLevel = nestLevel;
};
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = this;
};
addEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);
addEventListener(MoveEvent.MOVE, focusObj_moveHandler);
addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true);
addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler);
addEventListener(Event.REMOVED, focusObj_removedHandler, true);
_local2.visible = true;
hasFocusRect = true;
adjustFocusRect();
} else {
if (hasFocusRect){
hasFocusRect = false;
if (_local2){
_local2.visible = false;
};
removeEventListener(MoveEvent.MOVE, focusObj_moveHandler);
removeEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);
removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true);
removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler);
removeEventListener(Event.REMOVED, focusObj_removedHandler, true);
};
};
}
public function get flexContextMenu():IFlexContextMenu{
return (_flexContextMenu);
}
private function get indexedID():String{
var _local1:String = id;
var _local2:Array = instanceIndices;
if (_local2){
_local1 = (_local1 + (("[" + _local2.join("][")) + "]"));
};
return (_local1);
}
public function get measuredMinHeight():Number{
return (_measuredMinHeight);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = (document) ? document : ApplicationGlobals.application;
};
if ((((_arg1 is UIComponent)) && ((UIComponent(_arg1).moduleFactory == null)))){
if (moduleFactory != null){
UIComponent(_arg1).moduleFactory = moduleFactory;
} else {
if ((((document is IFlexModule)) && (!((document.moduleFactory == null))))){
UIComponent(_arg1).moduleFactory = document.moduleFactory;
} else {
if ((((parent is UIComponent)) && (!((UIComponent(parent).moduleFactory == null))))){
UIComponent(_arg1).moduleFactory = UIComponent(parent).moduleFactory;
};
};
};
};
if ((((((_arg1 is IFontContextComponent)) && ((!(_arg1) is UIComponent)))) && ((IFontContextComponent(_arg1).fontContext == null)))){
IFontContextComponent(_arg1).fontContext = moduleFactory;
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
} else {
if ((_arg1 is IUITextField)){
IUITextField(_arg1).nestLevel = (nestLevel + 1);
};
};
if ((_arg1 is InteractiveObject)){
if (doubleClickEnabled){
InteractiveObject(_arg1).doubleClickEnabled = true;
};
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).regenerateStyleCache(true);
} else {
if ((((_arg1 is IUITextField)) && (IUITextField(_arg1).inheritingStyles))){
StyleProtoChain.initTextField(IUITextField(_arg1));
};
};
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleChanged(null);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).notifyStyleChangeInChildren(null, true);
};
if ((_arg1 is UIComponent)){
UIComponent(_arg1).initThemeColor();
};
if ((_arg1 is UIComponent)){
UIComponent(_arg1).stylesInitialized();
};
}
public function set repeaterIndices(_arg1:Array):void{
_repeaterIndices = _arg1;
}
protected function initializationComplete():void{
processedDescriptors = true;
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
var _local4:UIComponent;
var _local2:int = numChildren;
var _local3:int;
while (_local3 < _local2) {
_local4 = (getChildAt(_local3) as UIComponent);
if (!_local4){
} else {
if ((((_local4.moduleFactory == null)) || ((_local4.moduleFactory == _moduleFactory)))){
_local4.moduleFactory = _arg1;
};
};
_local3++;
};
_moduleFactory = _arg1;
}
private function focusObj_removedHandler(_arg1:Event):void{
if (_arg1.target != this){
return;
};
var _local2:DisplayObject = getFocusObject();
if (_local2){
_local2.visible = false;
};
}
mx_internal function updateCallbacks():void{
if (invalidateDisplayListFlag){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
if (invalidateSizeFlag){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
if (invalidatePropertiesFlag){
UIComponentGlobals.layoutManager.invalidateProperties(this);
};
if (((systemManager) && (((_systemManager.stage) || (_systemManager.useSWFBridge()))))){
if ((((methodQueue.length > 0)) && (!(listeningForRender)))){
_systemManager.addEventListener(FlexEvent.RENDER, callLaterDispatcher);
_systemManager.addEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
if (_systemManager.stage){
_systemManager.stage.invalidate();
};
};
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_styleDeclaration = _arg1;
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:IChildList;
var _local4:InteractiveObject;
super.doubleClickEnabled = _arg1;
if ((this is IRawChildrenContainer)){
_local2 = IRawChildrenContainer(this).rawChildren;
} else {
_local2 = IChildList(this);
};
var _local3:int;
while (_local3 < _local2.numChildren) {
_local4 = (_local2.getChildAt(_local3) as InteractiveObject);
if (_local4){
_local4.doubleClickEnabled = _arg1;
};
_local3++;
};
}
public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
return (null);
}
public function get minHeight():Number{
if (!isNaN(explicitMinHeight)){
return (explicitMinHeight);
};
return (measuredMinHeight);
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local5:ISimpleStyleClient;
cachedTextFormat = null;
var _local3:int = numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = (getChildAt(_local4) as ISimpleStyleClient);
if (_local5){
_local5.styleChanged(_arg1);
if ((_local5 is IStyleClient)){
IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2);
};
};
_local4++;
};
}
public function get contentMouseX():Number{
return (mouseX);
}
public function get contentMouseY():Number{
return (mouseY);
}
public function get tweeningProperties():Array{
return (_tweeningProperties);
}
public function set explicitMaxWidth(_arg1:Number):void{
if (_explicitMaxWidth == _arg1){
return;
};
_explicitMaxWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxWidthChanged"));
}
public function set document(_arg1:Object):void{
var _local4:IUIComponent;
var _local2:int = numChildren;
var _local3:int;
while (_local3 < _local2) {
_local4 = (getChildAt(_local3) as IUIComponent);
if (!_local4){
} else {
if ((((_local4.document == _document)) || ((_local4.document == ApplicationGlobals.application)))){
_local4.document = _arg1;
};
};
_local3++;
};
_document = _arg1;
}
public function validateSize(_arg1:Boolean=false):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:IInvalidating;
if (_arg1){
_local2 = 0;
while (_local2 < numChildren) {
_local3 = getChildAt(_local2);
if ((_local3 is ILayoutManagerClient)){
(_local3 as ILayoutManagerClient).validateSize(true);
};
_local2++;
};
};
if (invalidateSizeFlag){
_local4 = measureSizes();
if (((_local4) && (includeInLayout))){
invalidateDisplayList();
_local5 = (parent as IInvalidating);
if (_local5){
_local5.invalidateSize();
_local5.invalidateDisplayList();
};
};
};
}
public function get validationSubField():String{
return (_validationSubField);
}
override public function dispatchEvent(_arg1:Event):Boolean{
if (dispatchEventHook != null){
dispatchEventHook(_arg1, this);
};
return (super.dispatchEvent(_arg1));
}
public function set id(_arg1:String):void{
_id = _arg1;
}
private function overlay_resizeHandler(_arg1:Event):void{
fillOverlay(overlay, overlayColor, null);
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
final mx_internal function get $height():Number{
return (super.height);
}
protected function attachOverlay():void{
addChild(overlay);
}
public function get explicitMinHeight():Number{
return (_explicitMinHeight);
}
override public function set height(_arg1:Number):void{
var _local2:IInvalidating;
if (explicitHeight != _arg1){
explicitHeight = _arg1;
invalidateSize();
};
if (_height != _arg1){
invalidateProperties();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
_height = _arg1;
dispatchEvent(new Event("heightChanged"));
};
}
public function get numAutomationChildren():int{
if (automationDelegate){
return (automationDelegate.numAutomationChildren);
};
return (0);
}
public function get parentApplication():Object{
var _local2:UIComponent;
var _local1:Object = systemManager.document;
if (_local1 == this){
_local2 = (_local1.systemManager.parent as UIComponent);
_local1 = (_local2) ? _local2.systemManager.document : null;
};
return (_local1);
}
public function localToContent(_arg1:Point):Point{
return (_arg1);
}
public function get repeaterIndex():int{
return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1);
}
private function removeState(_arg1:String, _arg2:String):void{
var _local4:Array;
var _local5:int;
var _local3:State = getState(_arg1);
if (_arg1 == _arg2){
return;
};
if (_local3){
_local3.dispatchExitState();
_local4 = _local3.overrides;
_local5 = _local4.length;
while (_local5) {
_local4[(_local5 - 1)].remove(this);
_local5--;
};
if (_local3.basedOn != _arg2){
removeState(_local3.basedOn, _arg2);
};
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "styleName"){
styleName = _arg2;
return;
};
if (EffectManager.getEventForEffectTrigger(_arg1) != ""){
EffectManager.setStyle(_arg1, this);
};
var _local3:Boolean = StyleManager.isInheritingStyle(_arg1);
var _local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED));
var _local5 = !((getStyle(_arg1) == _arg2));
if (!_styleDeclaration){
_styleDeclaration = new CSSStyleDeclaration();
_styleDeclaration.setStyle(_arg1, _arg2);
if (_local4){
regenerateStyleCache(_local3);
};
} else {
_styleDeclaration.setStyle(_arg1, _arg2);
};
if (((_local4) && (_local5))){
styleChanged(_arg1);
notifyStyleChangeInChildren(_arg1, _local3);
};
}
public function get showInAutomationHierarchy():Boolean{
return (_showInAutomationHierarchy);
}
public function get systemManager():ISystemManager{
var _local1:DisplayObject;
var _local2:DisplayObjectContainer;
var _local3:IUIComponent;
if (((!(_systemManager)) || (_systemManagerDirty))){
_local1 = root;
if ((_systemManager is SystemManagerProxy)){
} else {
if (((_local1) && (!((_local1 is Stage))))){
_systemManager = (_local1 as ISystemManager);
} else {
if (_local1){
_systemManager = (Stage(_local1).getChildAt(0) as ISystemManager);
} else {
_local2 = parent;
while (_local2) {
_local3 = (_local2 as IUIComponent);
if (_local3){
_systemManager = _local3.systemManager;
break;
} else {
if ((_local2 is ISystemManager)){
_systemManager = (_local2 as ISystemManager);
break;
};
};
_local2 = _local2.parent;
};
};
};
};
_systemManagerDirty = false;
};
return (_systemManager);
}
private function isBaseState(_arg1:String):Boolean{
return (((!(_arg1)) || ((_arg1 == ""))));
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
cachedTextFormat = null;
invalidateDisplayList();
dispatchEvent(new Event("enabledChanged"));
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
public function get minWidth():Number{
if (!isNaN(explicitMinWidth)){
return (explicitMinWidth);
};
return (measuredMinWidth);
}
private function setFocusLater(_arg1:Event=null):void{
var _local2:ISystemManager = systemManager;
if (((_local2) && (_local2.stage))){
_local2.stage.removeEventListener(Event.ENTER_FRAME, setFocusLater);
if (UIComponentGlobals.nextFocusObject){
_local2.stage.focus = UIComponentGlobals.nextFocusObject;
};
UIComponentGlobals.nextFocusObject = null;
};
}
public function get currentState():String{
return ((_currentStateChanged) ? requestedCurrentState : _currentState);
}
public function initializeRepeaterArrays(_arg1:IRepeaterClient):void{
if (((((((_arg1) && (_arg1.instanceIndices))) && (((!(_arg1.isDocument)) || (!((_arg1 == descriptor.document))))))) && (!(_instanceIndices)))){
_instanceIndices = _arg1.instanceIndices;
_repeaters = _arg1.repeaters;
_repeaterIndices = _arg1.repeaterIndices;
};
}
public function get baselinePosition():Number{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
return (NaN);
};
if (!validateBaselinePosition()){
return (NaN);
};
var _local1:TextLineMetrics = measureText("Wj");
if (height < ((2 + _local1.ascent) + 2)){
return (int((height + ((_local1.ascent - height) / 2))));
};
return ((2 + _local1.ascent));
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function set instanceIndices(_arg1:Array):void{
_instanceIndices = _arg1;
}
public function set cachePolicy(_arg1:String):void{
if (_cachePolicy != _arg1){
_cachePolicy = _arg1;
if (_arg1 == UIComponentCachePolicy.OFF){
cacheAsBitmap = false;
} else {
if (_arg1 == UIComponentCachePolicy.ON){
cacheAsBitmap = true;
} else {
cacheAsBitmap = (cacheAsBitmapCount > 0);
};
};
};
}
public function get automationValue():Array{
if (automationDelegate){
return (automationDelegate.automationValue);
};
return ([]);
}
private function addedHandler(_arg1:Event):void{
var event = _arg1;
if (event.eventPhase != EventPhase.AT_TARGET){
return;
};
try {
if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){
event.stopImmediatePropagation();
return;
};
} catch(error:SecurityError) {
};
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is ISystemManager)){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
};
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
var _local3:DisplayObjectContainer = _arg1.parent;
if (((_local3) && (!((_local3 is Loader))))){
_local3.removeChild(_arg1);
};
if (((overlayReferenceCount) && (!((_arg1 == overlay))))){
_arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 1)));
};
addingChild(_arg1);
$addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
public function get maxWidth():Number{
return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth);
}
override public function set alpha(_arg1:Number):void{
super.alpha = _arg1;
dispatchEvent(new Event("alphaChanged"));
}
private function removedHandler(_arg1:Event):void{
var event = _arg1;
if (event.eventPhase != EventPhase.AT_TARGET){
return;
};
try {
if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){
event.stopImmediatePropagation();
return;
};
} catch(error:SecurityError) {
};
_systemManagerDirty = true;
}
public function callLater(_arg1:Function, _arg2:Array=null):void{
methodQueue.push(new MethodQueueElement(_arg1, _arg2));
var _local3:ISystemManager = systemManager;
if (((_local3) && (((_local3.stage) || (_local3.useSWFBridge()))))){
if (!listeningForRender){
_local3.addEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local3.addEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
if (_local3.stage){
_local3.stage.invalidate();
};
};
}
public function get initialized():Boolean{
return (_initialized);
}
private function callLaterDispatcher2(_arg1:Event):void{
var _local6:MethodQueueElement;
if (UIComponentGlobals.callLaterSuspendCount > 0){
return;
};
var _local2:ISystemManager = systemManager;
if (((((_local2) && (((_local2.stage) || (_local2.useSWFBridge()))))) && (listeningForRender))){
_local2.removeEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local2.removeEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
var _local3:Array = methodQueue;
methodQueue = [];
var _local4:int = _local3.length;
var _local5:int;
while (_local5 < _local4) {
_local6 = MethodQueueElement(_local3[_local5]);
_local6.method.apply(null, _local6.args);
_local5++;
};
}
public function measureHTMLText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureHTMLText(_arg1));
}
public function set descriptor(_arg1:UIComponentDescriptor):void{
_descriptor = _arg1;
}
private function getState(_arg1:String):State{
if (((!(states)) || (isBaseState(_arg1)))){
return (null);
};
var _local2:int;
while (_local2 < states.length) {
if (states[_local2].name == _arg1){
return (states[_local2]);
};
_local2++;
};
var _local3:String = resourceManager.getString("core", "stateUndefined", [_arg1]);
throw (new ArgumentError(_local3));
}
public function validateProperties():void{
if (invalidatePropertiesFlag){
commitProperties();
invalidatePropertiesFlag = false;
};
}
mx_internal function get documentDescriptor():UIComponentDescriptor{
return (_documentDescriptor);
}
public function set includeInLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
if (_includeInLayout != _arg1){
_includeInLayout = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("includeInLayoutChanged"));
};
}
public function getClassStyleDeclarations():Array{
var myApplicationDomain:ApplicationDomain;
var cache:Array;
var myRoot:DisplayObject;
var s:CSSStyleDeclaration;
var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(this);
if (factory != null){
myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
} else {
myRoot = SystemManager.getSWFRoot(this);
if (!myRoot){
return ([]);
};
myApplicationDomain = myRoot.loaderInfo.applicationDomain;
};
var className:String = getQualifiedClassName(this);
className = className.replace("::", ".");
cache = StyleManager.typeSelectorCache[className];
if (cache){
return (cache);
};
var decls:Array = [];
var classNames:Array = [];
var caches:Array = [];
var declcache:Array = [];
while (((((!((className == null))) && (!((className == "mx.core.UIComponent"))))) && (!((className == "mx.core.UITextField"))))) {
cache = StyleManager.typeSelectorCache[className];
if (cache){
decls = decls.concat(cache);
break;
};
s = StyleManager.getStyleDeclaration(className);
if (s){
decls.unshift(s);
classNames.push(className);
caches.push(classNames);
declcache.push(decls);
decls = [];
classNames = [];
} else {
classNames.push(className);
};
try {
className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className));
className = className.replace("::", ".");
} catch(e:ReferenceError) {
className = null;
};
};
caches.push(classNames);
declcache.push(decls);
decls = [];
while (caches.length) {
classNames = caches.pop();
decls = decls.concat(declcache.pop());
while (classNames.length) {
StyleManager.typeSelectorCache[classNames.pop()] = decls;
};
};
return (decls);
}
public function set measuredMinWidth(_arg1:Number):void{
_measuredMinWidth = _arg1;
}
private function initializeState(_arg1:String):void{
var _local2:State = getState(_arg1);
while (_local2) {
_local2.initialize();
_local2 = getState(_local2.basedOn);
};
}
mx_internal function initProtoChain():void{
var _local1:CSSStyleDeclaration;
var _local7:Object;
var _local8:CSSStyleDeclaration;
if (styleName){
if ((styleName is CSSStyleDeclaration)){
_local1 = CSSStyleDeclaration(styleName);
} else {
if ((((styleName is IFlexDisplayObject)) || ((styleName is IStyleClient)))){
StyleProtoChain.initProtoChainForUIComponentStyleName(this);
return;
};
if ((styleName is String)){
_local1 = StyleManager.getStyleDeclaration(("." + styleName));
};
};
};
var _local2:Object = StyleManager.stylesRoot;
if (((_local2) && (_local2.effects))){
registerEffects(_local2.effects);
};
var _local3:IStyleClient = (parent as IStyleClient);
if (_local3){
_local7 = _local3.inheritingStyles;
if (_local7 == UIComponent.STYLE_UNINITIALIZED){
_local7 = _local2;
};
} else {
if (isPopUp){
if ((((((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)) && (_owner))) && ((_owner is IStyleClient)))){
_local7 = IStyleClient(_owner).inheritingStyles;
} else {
_local7 = ApplicationGlobals.application.inheritingStyles;
};
} else {
_local7 = StyleManager.stylesRoot;
};
};
var _local4:Array = getClassStyleDeclarations();
var _local5:int = _local4.length;
var _local6:int;
while (_local6 < _local5) {
_local8 = _local4[_local6];
_local7 = _local8.addStyleToProtoChain(_local7, this);
_local2 = _local8.addStyleToProtoChain(_local2, this);
if (_local8.effects){
registerEffects(_local8.effects);
};
_local6++;
};
if (_local1){
_local7 = _local1.addStyleToProtoChain(_local7, this);
_local2 = _local1.addStyleToProtoChain(_local2, this);
if (_local1.effects){
registerEffects(_local1.effects);
};
};
inheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local7, this) : _local7;
nonInheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local2, this) : _local2;
}
public function get repeaterIndices():Array{
return ((_repeaterIndices) ? _repeaterIndices.slice() : []);
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
$removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
private function focusObj_moveHandler(_arg1:MoveEvent):void{
adjustFocusRect();
}
public function get styleDeclaration():CSSStyleDeclaration{
return (_styleDeclaration);
}
override public function get doubleClickEnabled():Boolean{
return (super.doubleClickEnabled);
}
public function contentToLocal(_arg1:Point):Point{
return (_arg1);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
if (_currentStateChanged){
_currentStateChanged = false;
commitCurrentState();
validateNow();
};
removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
}
public function set measuredHeight(_arg1:Number):void{
_measuredHeight = _arg1;
}
protected function createChildren():void{
}
public function get activeEffects():Array{
return (_effectsStarted);
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
if (((overlayReferenceCount) && (!((_arg1 == overlay))))){
_arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 2)));
};
super.setChildIndex(_arg1, _arg2);
}
public function regenerateStyleCache(_arg1:Boolean):void{
var _local5:DisplayObject;
initProtoChain();
var _local2:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
var _local3:int = _local2.numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = _local2.getChildAt(_local4);
if ((_local5 is IStyleClient)){
if (IStyleClient(_local5).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){
IStyleClient(_local5).regenerateStyleCache(_arg1);
};
} else {
if ((_local5 is IUITextField)){
if (IUITextField(_local5).inheritingStyles){
StyleProtoChain.initTextField(IUITextField(_local5));
};
};
};
_local4++;
};
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus(DisplayObject(_arg1.target))){
drawFocus(false);
};
}
public function getFocus():InteractiveObject{
var _local1:ISystemManager = systemManager;
if (!_local1){
return (null);
};
if (UIComponentGlobals.nextFocusObject){
return (UIComponentGlobals.nextFocusObject);
};
return (_local1.stage.focus);
}
public function endEffectsStarted():void{
var _local1:int = _effectsStarted.length;
var _local2:int;
while (_local2 < _local1) {
_effectsStarted[_local2].end();
_local2++;
};
}
protected function get unscaledHeight():Number{
return ((height / Math.abs(scaleY)));
}
public function get enabled():Boolean{
return (_enabled);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
override public function set cacheAsBitmap(_arg1:Boolean):void{
super.cacheAsBitmap = _arg1;
cacheAsBitmapCount = (_arg1) ? 1 : 0;
}
mx_internal function removeOverlay():void{
if ((((((overlayReferenceCount > 0)) && ((--overlayReferenceCount == 0)))) && (overlay))){
removeEventListener("resize", overlay_resizeHandler);
if (super.getChildByName("overlay")){
$removeChild(overlay);
};
overlay = null;
};
}
public function set cacheHeuristic(_arg1:Boolean):void{
if (_cachePolicy == UIComponentCachePolicy.AUTO){
if (_arg1){
cacheAsBitmapCount++;
} else {
if (cacheAsBitmapCount != 0){
cacheAsBitmapCount--;
};
};
super.cacheAsBitmap = !((cacheAsBitmapCount == 0));
};
}
public function get cachePolicy():String{
return (_cachePolicy);
}
public function set maxHeight(_arg1:Number):void{
if (explicitMaxHeight == _arg1){
return;
};
explicitMaxHeight = _arg1;
}
public function getConstraintValue(_arg1:String){
return (getStyle(_arg1));
}
public function set focusManager(_arg1:IFocusManager):void{
_focusManager = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function get descriptor():UIComponentDescriptor{
return (_descriptor);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function get cursorManager():ICursorManager{
var _local2:ICursorManager;
var _local1:DisplayObject = parent;
while (_local1) {
if ((((_local1 is IUIComponent)) && (("cursorManager" in _local1)))){
_local2 = _local1["cursorManager"];
return (_local2);
};
_local1 = _local1.parent;
};
return (CursorManager.getInstance());
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredMinWidth():Number{
return (_measuredMinWidth);
}
public function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
var _local2:Array;
var _local3:Object;
var _local4:int;
var _local5:int;
var _local6:PropertyChangeEvent;
var _local7:Object;
if (((id) && (!((id == ""))))){
_local2 = _instanceIndices;
if (!_local2){
_arg1[id] = this;
} else {
_local3 = _arg1[id];
if (!(_local3 is Array)){
_local3 = (_arg1[id] = []);
};
_local4 = _local2.length;
_local5 = 0;
while (_local5 < (_local4 - 1)) {
_local7 = _local3[_local2[_local5]];
if (!(_local7 is Array)){
_local7 = (_local3[_local2[_local5]] = []);
};
_local3 = _local7;
_local5++;
};
_local3[_local2[(_local4 - 1)]] = this;
_local6 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]);
_arg1.dispatchEvent(_local6);
};
};
}
public function get repeater():IRepeater{
return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null);
}
public function set isPopUp(_arg1:Boolean):void{
_isPopUp = _arg1;
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function initialize():void{
if (initialized){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE));
createChildren();
childrenCreated();
initializeAccessibility();
initializationComplete();
}
override public function set width(_arg1:Number):void{
var _local2:IInvalidating;
if (explicitWidth != _arg1){
explicitWidth = _arg1;
invalidateSize();
};
if (_width != _arg1){
invalidateProperties();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
};
}
public function set percentHeight(_arg1:Number):void{
if (_percentHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitHeight = NaN;
};
_percentHeight = _arg1;
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
final mx_internal function set $visible(_arg1:Boolean):void{
super.visible = _arg1;
}
private function findCommonBaseState(_arg1:String, _arg2:String):String{
var _local3:State = getState(_arg1);
var _local4:State = getState(_arg2);
if (((!(_local3)) || (!(_local4)))){
return ("");
};
if (((isBaseState(_local3.basedOn)) && (isBaseState(_local4.basedOn)))){
return ("");
};
var _local5:Array = getBaseStates(_local3);
var _local6:Array = getBaseStates(_local4);
var _local7 = "";
while (_local5[(_local5.length - 1)] == _local6[(_local6.length - 1)]) {
_local7 = _local5.pop();
_local6.pop();
if (((!(_local5.length)) || (!(_local6.length)))){
break;
};
};
if (((_local5.length) && ((_local5[(_local5.length - 1)] == _local4.name)))){
_local7 = _local4.name;
} else {
if (((_local6.length) && ((_local6[(_local6.length - 1)] == _local3.name)))){
_local7 = _local3.name;
};
};
return (_local7);
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
if (IUIComponent(_arg1).document != _arg1){
IUIComponent(_arg1).document = null;
};
IUIComponent(_arg1).parentChanged(null);
};
}
final mx_internal function $removeChildAt(_arg1:int):DisplayObject{
return (super.removeChildAt(_arg1));
}
public function get maxHeight():Number{
return ((isNaN(explicitMaxHeight)) ? DEFAULT_MAX_HEIGHT : explicitMaxHeight);
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function set explicitMaxHeight(_arg1:Number):void{
if (_explicitMaxHeight == _arg1){
return;
};
_explicitMaxHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxHeightChanged"));
}
public function get focusManager():IFocusManager{
if (_focusManager){
return (_focusManager);
};
var _local1:DisplayObject = parent;
while (_local1) {
if ((_local1 is IFocusManagerContainer)){
return (IFocusManagerContainer(_local1).focusManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (inheritingStyles == UIComponent.STYLE_UNINITIALIZED){
return;
};
regenerateStyleCache(true);
initThemeColor();
styleChanged("styleName");
notifyStyleChangeInChildren("styleName", true);
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
protected function get resourceManager():IResourceManager{
return (_resourceManager);
}
mx_internal function validateBaselinePosition():Boolean{
var _local1:Number;
var _local2:Number;
if (!parent){
return (false);
};
if ((((width == 0)) && ((height == 0)))){
validateNow();
_local1 = getExplicitOrMeasuredWidth();
_local2 = getExplicitOrMeasuredHeight();
setActualSize(_local1, _local2);
};
validateNow();
return (true);
}
mx_internal function cancelAllCallLaters():void{
var _local1:ISystemManager = systemManager;
if (((_local1) && (((_local1.stage) || (_local1.useSWFBridge()))))){
if (listeningForRender){
_local1.removeEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local1.removeEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
};
methodQueue.splice(0);
}
private function updateCompleteHandler(_arg1:FlexEvent):void{
UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
processEffectFinished(_endingEffectInstances);
_endingEffectInstances = [];
}
public function styleChanged(_arg1:String):void{
if ((((this is IFontContextComponent)) && (hasFontContextChanged()))){
invalidateProperties();
};
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateSize();
};
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || ((_arg1 == "themeColor")))){
initThemeColor();
};
invalidateDisplayList();
if ((parent is IInvalidating)){
if (StyleManager.isParentSizeInvalidatingStyle(_arg1)){
IInvalidating(parent).invalidateSize();
};
if (StyleManager.isParentDisplayListInvalidatingStyle(_arg1)){
IInvalidating(parent).invalidateDisplayList();
};
};
}
final mx_internal function get $visible():Boolean{
return (super.visible);
}
public function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null, _arg9:String=null, _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Matrix;
var _local16:Object;
var _local12:Graphics = graphics;
if (((!(_arg3)) || (!(_arg4)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is Array)){
if ((_arg7 is Array)){
_local14 = (_arg7 as Array);
} else {
_local14 = [_arg7, _arg7];
};
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local15 = null;
if (_arg8){
if ((_arg8 is Matrix)){
_local15 = Matrix(_arg8);
} else {
_local15 = new Matrix();
if ((_arg8 is Number)){
_local15.createGradientBox(_arg3, _arg4, ((Number(_arg8) * Math.PI) / 180), _arg1, _arg2);
} else {
_local15.createGradientBox(_arg8.w, _arg8.h, _arg8.r, _arg8.x, _arg8.y);
};
};
};
if (_arg9 == GradientType.RADIAL){
_local12.beginGradientFill(GradientType.RADIAL, (_arg6 as Array), _local14, _arg10, _local15);
} else {
_local12.beginGradientFill(GradientType.LINEAR, (_arg6 as Array), _local14, _arg10, _local15);
};
} else {
_local12.beginFill(Number(_arg6), Number(_arg7));
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local16 = _arg11.r;
if ((_local16 is Number)){
_local13 = (Number(_local16) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local16.tl, _local16.tr, _local16.bl, _local16.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function move(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_arg1 != super.x){
super.x = _arg1;
dispatchEvent(new Event("xChanged"));
_local3 = true;
};
if (_arg2 != super.y){
super.y = _arg2;
dispatchEvent(new Event("yChanged"));
_local3 = true;
};
if (_local3){
dispatchMoveEvent();
};
}
public function set toolTip(_arg1:String):void{
var _local2:String = _toolTip;
_toolTip = _arg1;
ToolTipManager.registerToolTip(this, _local2, _arg1);
dispatchEvent(new Event("toolTipChanged"));
}
public function set repeaters(_arg1:Array):void{
_repeaters = _arg1;
}
public function get explicitMaxHeight():Number{
return (_explicitMaxHeight);
}
public function measureText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureText(_arg1));
}
public function get styleName():Object{
return (_styleName);
}
protected function createInModuleContext(_arg1:IFlexModuleFactory, _arg2:String):Object{
var _local3:Object;
if (_arg1){
_local3 = _arg1.create(_arg2);
};
return (_local3);
}
public function get parentDocument():Object{
var _local1:IUIComponent;
var _local2:ISystemManager;
if (document == this){
_local1 = (parent as IUIComponent);
if (_local1){
return (_local1.document);
};
_local2 = (parent as ISystemManager);
if (_local2){
return (_local2.document);
};
return (null);
//unresolved jump
};
return (document);
}
protected function childrenCreated():void{
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
public function set flexContextMenu(_arg1:IFlexContextMenu):void{
if (_flexContextMenu){
_flexContextMenu.unsetContextMenu(this);
};
_flexContextMenu = _arg1;
if (_arg1 != null){
_flexContextMenu.setContextMenu(this);
};
}
public function set explicitWidth(_arg1:Number):void{
if (_explicitWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentWidth = NaN;
};
_explicitWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitWidthChanged"));
}
private function setBorderColorForErrorString():void{
if (((!(_errorString)) || ((_errorString.length == 0)))){
if (!isNaN(origBorderColor)){
setStyle("borderColor", origBorderColor);
saveBorderColor = true;
};
} else {
if (saveBorderColor){
saveBorderColor = false;
origBorderColor = getStyle("borderColor");
};
setStyle("borderColor", getStyle("errorColor"));
};
styleChanged("themeColor");
var _local1:IFocusManager = focusManager;
var _local2:DisplayObject = (_local1) ? DisplayObject(_local1.getFocus()) : null;
if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){
drawFocus(true);
};
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function invalidateSize():void{
if (!invalidateSizeFlag){
invalidateSizeFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
};
}
public function set measuredMinHeight(_arg1:Number):void{
_measuredMinHeight = _arg1;
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
override public function set filters(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:IEventDispatcher;
if (_filters){
_local2 = _filters.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (_filters[_local3] as IEventDispatcher);
if (_local4){
_local4.removeEventListener("change", filterChangeHandler);
};
_local3++;
};
};
_filters = _arg1;
if (_filters){
_local2 = _filters.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (_filters[_local3] as IEventDispatcher);
if (_local4){
_local4.addEventListener("change", filterChangeHandler);
};
_local3++;
};
};
super.filters = _filters;
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
public static function resumeBackgroundProcessing():void{
var _local1:ISystemManager;
if (UIComponentGlobals.callLaterSuspendCount > 0){
UIComponentGlobals.callLaterSuspendCount--;
if (UIComponentGlobals.callLaterSuspendCount == 0){
_local1 = SystemManagerGlobals.topLevelSystemManagers[0];
if (((_local1) && (_local1.stage))){
_local1.stage.invalidate();
};
};
};
}
public static function suspendBackgroundProcessing():void{
UIComponentGlobals.callLaterSuspendCount++;
}
}
}//package mx.core
class MethodQueueElement {
public var method:Function;
public var args:Array;
private function MethodQueueElement(_arg1:Function, _arg2:Array=null){
this.method = _arg1;
this.args = _arg2;
}
}
Section 311
//UIComponentCachePolicy (mx.core.UIComponentCachePolicy)
package mx.core {
public final class UIComponentCachePolicy {
public static const AUTO:String = "auto";
public static const ON:String = "on";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const OFF:String = "off";
}
}//package mx.core
Section 312
//UIComponentDescriptor (mx.core.UIComponentDescriptor)
package mx.core {
public class UIComponentDescriptor extends ComponentDescriptor {
mx_internal var instanceIndices:Array;
public var stylesFactory:Function;
public var effects:Array;
mx_internal var repeaters:Array;
mx_internal var repeaterIndices:Array;
mx_internal static const VERSION:String = "3.2.0.3958";
public function UIComponentDescriptor(_arg1:Object){
super(_arg1);
}
override public function toString():String{
return (("UIComponentDescriptor_" + id));
}
}
}//package mx.core
Section 313
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public static function set catchCallLaterExceptions(_arg1:Boolean):void{
_catchCallLaterExceptions = _arg1;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(_arg1:Boolean):void{
designTime = _arg1;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 314
//UITextField (mx.core.UITextField)
package mx.core {
import flash.display.*;
import flash.text.*;
import mx.managers.*;
import mx.automation.*;
import flash.events.*;
import mx.resources.*;
import mx.styles.*;
import flash.utils.*;
import mx.utils.*;
public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUITextField {
private var _enabled:Boolean;// = true
private var untruncatedText:String;
private var cachedEmbeddedFont:EmbeddedFont;// = null
private var cachedTextFormat:TextFormat;
private var _automationDelegate:IAutomationObject;
private var _automationName:String;
private var _styleName:Object;
private var _document:Object;
mx_internal var _toolTip:String;
private var _nestLevel:int;// = 0
private var _explicitHeight:Number;
private var _moduleFactory:IFlexModuleFactory;
private var _initialized:Boolean;// = false
private var _nonInheritingStyles:Object;
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
private var invalidateDisplayListFlag:Boolean;// = true
mx_internal var explicitColor:uint;// = 4294967295
private var _processedDescriptors:Boolean;// = true
private var _updateCompletePendingFlag:Boolean;// = false
private var explicitHTMLText:String;// = null
mx_internal var _parent:DisplayObjectContainer;
private var _imeMode:String;// = null
private var resourceManager:IResourceManager;
mx_internal var styleChangedFlag:Boolean;// = true
private var _ignorePadding:Boolean;// = true
private var _owner:DisplayObjectContainer;
private var _explicitWidth:Number;
mx_internal static const TEXT_WIDTH_PADDING:int = 5;
mx_internal static const TEXT_HEIGHT_PADDING:int = 4;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var truncationIndicatorResource:String;
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
mx_internal static var debuggingBorders:Boolean = false;
public function UITextField(){
resourceManager = ResourceManager.getInstance();
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
super();
super.text = "";
focusRect = false;
selectable = false;
tabEnabled = false;
if (debuggingBorders){
border = true;
};
if (!truncationIndicatorResource){
truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator");
};
addEventListener(Event.CHANGE, changeHandler);
addEventListener("textFieldStyleChange", textFieldStyleChangeHandler);
resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
public function get nestLevel():int{
return (_nestLevel);
}
private function textFieldStyleChangeHandler(_arg1:Event):void{
if (explicitHTMLText != null){
super.htmlText = explicitHTMLText;
};
}
public function truncateToFit(_arg1:String=null):Boolean{
var _local4:String;
if (!_arg1){
_arg1 = truncationIndicatorResource;
};
validateNow();
var _local2:String = super.text;
untruncatedText = _local2;
var _local3:Number = width;
if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > (_local3 + 1E-14))))){
var _local5 = _local2;
super.text = _local5;
_local4 = _local5;
_local2.slice(0, Math.floor(((_local3 / (textWidth + TEXT_WIDTH_PADDING)) * _local2.length)));
while ((((_local4.length > 1)) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))) {
_local4 = _local4.slice(0, -1);
super.text = (_local4 + _arg1);
};
return (true);
};
return (false);
}
public function set nestLevel(_arg1:int):void{
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
StyleProtoChain.initTextField(this);
styleChangedFlag = true;
validateNow();
};
}
public function get minHeight():Number{
return (0);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
public function getStyle(_arg1:String){
if (StyleManager.inheritingStyles[_arg1]){
return ((inheritingStyles) ? inheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1));
//unresolved jump
};
return ((nonInheritingStyles) ? nonInheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1));
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function setColor(_arg1:uint):void{
explicitColor = _arg1;
styleChangedFlag = true;
invalidateDisplayListFlag = true;
validateNow();
}
override public function replaceText(_arg1:int, _arg2:int, _arg3:String):void{
super.replaceText(_arg1, _arg2, _arg3);
dispatchEvent(new Event("textReplace"));
}
private function creatingSystemManager():ISystemManager{
return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager);
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
public function get explicitMinHeight():Number{
return (NaN);
}
public function get focusPane():Sprite{
return (null);
}
public function getTextStyles():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.align = getStyle("textAlign");
_local1.bold = (getStyle("fontWeight") == "bold");
if (enabled){
if (explicitColor == StyleManager.NOT_A_COLOR){
_local1.color = getStyle("color");
} else {
_local1.color = explicitColor;
};
} else {
_local1.color = getStyle("disabledColor");
};
_local1.font = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
_local1.indent = getStyle("textIndent");
_local1.italic = (getStyle("fontStyle") == "italic");
_local1.kerning = getStyle("kerning");
_local1.leading = getStyle("leading");
_local1.leftMargin = (ignorePadding) ? 0 : getStyle("paddingLeft");
_local1.letterSpacing = getStyle("letterSpacing");
_local1.rightMargin = (ignorePadding) ? 0 : getStyle("paddingRight");
_local1.size = getStyle("fontSize");
_local1.underline = (getStyle("textDecoration") == "underline");
cachedTextFormat = _local1;
return (_local1);
}
override public function set text(_arg1:String):void{
if (!_arg1){
_arg1 = "";
};
if (((!(isHTML)) && ((super.text == _arg1)))){
return;
};
super.text = _arg1;
explicitHTMLText = null;
if (invalidateDisplayListFlag){
validateNow();
};
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function get showInAutomationHierarchy():Boolean{
return (true);
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get systemManager():ISystemManager{
var _local2:IUIComponent;
var _local1:DisplayObject = parent;
while (_local1) {
_local2 = (_local1 as IUIComponent);
if (_local2){
return (_local2.systemManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function setStyle(_arg1:String, _arg2):void{
}
public function get percentWidth():Number{
return (NaN);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function get baselinePosition():Number{
var _local1:TextLineMetrics;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local1 = getLineMetrics(0);
return (((height - 4) - _local1.descent));
};
if (!parent){
return (NaN);
};
var _local2 = (text == "");
if (_local2){
super.text = "Wj";
};
_local1 = getLineMetrics(0);
if (_local2){
super.text = "";
};
return ((2 + _local1.ascent));
}
public function set enabled(_arg1:Boolean):void{
mouseEnabled = _arg1;
_enabled = _arg1;
styleChanged("color");
}
public function get minWidth():Number{
return (0);
}
public function get automationValue():Array{
if (automationDelegate){
return (automationDelegate.automationValue);
};
return ([""]);
}
public function get tweeningProperties():Array{
return (null);
}
public function get measuredWidth():Number{
validateNow();
if (!stage){
return ((textWidth + TEXT_WIDTH_PADDING));
};
return (((textWidth * transform.concatenatedMatrix.d) + TEXT_WIDTH_PADDING));
}
public function set tweeningProperties(_arg1:Array):void{
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
return (null);
}
override public function get parent():DisplayObjectContainer{
return ((_parent) ? _parent : super.parent);
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (width != _arg1){
width = _arg1;
};
if (height != _arg2){
height = _arg2;
};
}
public function get numAutomationChildren():int{
return (0);
}
public function set focusPane(_arg1:Sprite):void{
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
return (null);
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is SystemManager)){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function get maxWidth():Number{
return (UIComponent.DEFAULT_MAX_WIDTH);
}
private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function get initialized():Boolean{
return (_initialized);
}
public function invalidateDisplayList():void{
invalidateDisplayListFlag = true;
}
public function invalidateProperties():void{
}
override public function insertXMLText(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{
super.insertXMLText(_arg1, _arg2, _arg3, _arg4);
dispatchEvent(new Event("textInsert"));
}
public function set includeInLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
if (_includeInLayout != _arg1){
_includeInLayout = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
};
}
override public function set htmlText(_arg1:String):void{
if (!_arg1){
_arg1 = "";
};
if (((isHTML) && ((super.htmlText == _arg1)))){
return;
};
if (((cachedTextFormat) && ((styleSheet == null)))){
defaultTextFormat = cachedTextFormat;
};
super.htmlText = _arg1;
explicitHTMLText = _arg1;
if (invalidateDisplayListFlag){
validateNow();
};
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
}
private function resourceManager_changeHandler(_arg1:Event):void{
truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator");
if (untruncatedText != null){
super.text = untruncatedText;
truncateToFit();
};
}
public function set measuredMinWidth(_arg1:Number):void{
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
public function get explicitMinWidth():Number{
return (NaN);
}
public function set percentWidth(_arg1:Number):void{
}
public function get imeMode():String{
return (_imeMode);
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
public function set systemManager(_arg1:ISystemManager):void{
}
public function get explicitMaxWidth():Number{
return (NaN);
}
public function get document():Object{
return (_document);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
public function get enabled():Boolean{
return (_enabled);
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
public function get automationTabularData():Object{
return (null);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
public function get measuredMinWidth():Number{
return (0);
}
public function set isPopUp(_arg1:Boolean):void{
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredHeight():Number{
validateNow();
if (!stage){
return ((textHeight + TEXT_HEIGHT_PADDING));
};
return (((textHeight * transform.concatenatedMatrix.a) + TEXT_HEIGHT_PADDING));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function setFocus():void{
systemManager.stage.focus = this;
}
public function initialize():void{
}
public function set percentHeight(_arg1:Number):void{
}
public function resolveAutomationIDPart(_arg1:Object):Array{
return ([]);
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getUITextFormat():UITextFormat{
validateNow();
var _local1:UITextFormat = new UITextFormat(creatingSystemManager());
_local1.moduleFactory = moduleFactory;
_local1.copyFrom(getTextFormat());
_local1.antiAliasType = antiAliasType;
_local1.gridFitType = gridFitType;
_local1.sharpness = sharpness;
_local1.thickness = thickness;
return (_local1);
}
private function changeHandler(_arg1:Event):void{
explicitHTMLText = null;
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
public function get nonZeroTextHeight():Number{
var _local1:Number;
if (super.text == ""){
super.text = "Wj";
_local1 = textHeight;
super.text = "";
return (_local1);
};
return (textHeight);
}
public function owns(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void{
if (styleSheet){
return;
};
super.setTextFormat(_arg1, _arg2, _arg3);
dispatchEvent(new Event("textFormatChange"));
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
this.visible = _arg1;
}
public function get maxHeight():Number{
return (UIComponent.DEFAULT_MAX_HEIGHT);
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
public function get isPopUp():Boolean{
return (false);
}
public function set ignorePadding(_arg1:Boolean):void{
_ignorePadding = _arg1;
styleChanged(null);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (parent){
StyleProtoChain.initTextField(this);
styleChanged("styleName");
};
}
public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (("callLater" in parent)){
Object(parent).callLater(validateNow);
};
};
}
public function get percentHeight():Number{
return (NaN);
}
private function get isHTML():Boolean{
return (!((explicitHTMLText == null)));
}
public function get explicitMaxHeight():Number{
return (NaN);
}
public function get styleName():Object{
return (_styleName);
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
public function validateNow():void{
var _local1:TextFormat;
var _local2:EmbeddedFont;
var _local3:IFlexModuleFactory;
var _local4:ISystemManager;
if (!parent){
return;
};
if (((!(isNaN(explicitWidth))) && (!((super.width == explicitWidth))))){
super.width = ((explicitWidth)>4) ? explicitWidth : 4;
};
if (((!(isNaN(explicitHeight))) && (!((super.height == explicitHeight))))){
super.height = explicitHeight;
};
if (styleChangedFlag){
_local1 = getTextStyles();
if (_local1.font){
_local2 = getEmbeddedFont(_local1.font, _local1.bold, _local1.italic);
_local3 = embeddedFontRegistry.getAssociatedModuleFactory(_local2, moduleFactory);
if (_local3 != null){
embedFonts = true;
} else {
_local4 = creatingSystemManager();
embedFonts = ((!((_local4 == null))) && (_local4.isFontFaceEmbedded(_local1)));
};
} else {
embedFonts = getStyle("embedFonts");
};
if (getStyle("fontAntiAliasType") != undefined){
antiAliasType = getStyle("fontAntiAliasType");
gridFitType = getStyle("fontGridFitType");
sharpness = getStyle("fontSharpness");
thickness = getStyle("fontThickness");
};
if (!styleSheet){
super.setTextFormat(_local1);
defaultTextFormat = _local1;
};
dispatchEvent(new Event("textFieldStyleChange"));
};
styleChangedFlag = false;
invalidateDisplayListFlag = false;
}
public function set toolTip(_arg1:String):void{
var _local2:String = _toolTip;
_toolTip = _arg1;
ToolTipManager.registerToolTip(this, _local2, _arg1);
}
public function move(_arg1:Number, _arg2:Number):void{
if (this.x != _arg1){
this.x = _arg1;
};
if (this.y != _arg2){
this.y = _arg2;
};
}
public function get toolTip():String{
return (_toolTip);
}
public function get ignorePadding():Boolean{
return (_ignorePadding);
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function invalidateSize():void{
invalidateDisplayListFlag = true;
}
public function set measuredMinHeight(_arg1:Number):void{
}
public function get measuredMinHeight():Number{
return (0);
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
}
}//package mx.core
Section 315
//UITextFormat (mx.core.UITextFormat)
package mx.core {
import flash.text.*;
import mx.managers.*;
public class UITextFormat extends TextFormat {
private var systemManager:ISystemManager;
public var sharpness:Number;
public var gridFitType:String;
public var antiAliasType:String;
public var thickness:Number;
private var cachedEmbeddedFont:EmbeddedFont;// = null
private var _moduleFactory:IFlexModuleFactory;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
private static var _textFieldFactory:ITextFieldFactory;
public function UITextFormat(_arg1:ISystemManager, _arg2:String=null, _arg3:Object=null, _arg4:Object=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:Object=null, _arg12:Object=null, _arg13:Object=null, _arg14:Object=null){
this.systemManager = _arg1;
super(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14);
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
mx_internal function copyFrom(_arg1:TextFormat):void{
font = _arg1.font;
size = _arg1.size;
color = _arg1.color;
bold = _arg1.bold;
italic = _arg1.italic;
underline = _arg1.underline;
url = _arg1.url;
target = _arg1.target;
align = _arg1.align;
leftMargin = _arg1.leftMargin;
rightMargin = _arg1.rightMargin;
indent = _arg1.indent;
leading = _arg1.leading;
letterSpacing = _arg1.letterSpacing;
blockIndent = _arg1.blockIndent;
bullet = _arg1.bullet;
display = _arg1.display;
indent = _arg1.indent;
kerning = _arg1.kerning;
tabStops = _arg1.tabStops;
}
private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function measureText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{
return (measure(_arg1, false, _arg2));
}
private function measure(_arg1:String, _arg2:Boolean, _arg3:Boolean):TextLineMetrics{
if (!_arg1){
_arg1 = "";
};
var _local4:Boolean;
var _local5:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(font, bold, italic), moduleFactory);
_local4 = !((_local5 == null));
if (_local5 == null){
_local5 = systemManager;
};
var _local6:TextField;
_local6 = TextField(textFieldFactory.createTextField(_local5));
if (_arg2){
_local6.htmlText = "";
} else {
_local6.text = "";
};
_local6.defaultTextFormat = this;
if (font){
_local6.embedFonts = ((_local4) || (((!((systemManager == null))) && (systemManager.isFontFaceEmbedded(this)))));
} else {
_local6.embedFonts = false;
};
_local6.antiAliasType = antiAliasType;
_local6.gridFitType = gridFitType;
_local6.sharpness = sharpness;
_local6.thickness = thickness;
if (_arg2){
_local6.htmlText = _arg1;
} else {
_local6.text = _arg1;
};
var _local7:TextLineMetrics = _local6.getLineMetrics(0);
if (indent != null){
_local7.width = (_local7.width + indent);
};
if (_arg3){
_local7.width = Math.ceil(_local7.width);
_local7.height = Math.ceil(_local7.height);
};
return (_local7);
}
public function measureHTMLText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{
return (measure(_arg1, true, _arg2));
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
private static function get textFieldFactory():ITextFieldFactory{
if (!_textFieldFactory){
_textFieldFactory = ITextFieldFactory(Singleton.getInstance("mx.core::ITextFieldFactory"));
};
return (_textFieldFactory);
}
}
}//package mx.core
Section 316
//AddRemoveEffectTargetFilter (mx.effects.effectClasses.AddRemoveEffectTargetFilter)
package mx.effects.effectClasses {
import mx.effects.*;
public class AddRemoveEffectTargetFilter extends EffectTargetFilter {
public var add:Boolean;// = true
mx_internal static const VERSION:String = "3.2.0.3958";
public function AddRemoveEffectTargetFilter(){
filterProperties = ["parent"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local3:int = _arg1.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
if (add){
return ((((_local5.start["parent"] == null)) && (!((_local5.end["parent"] == null)))));
};
return (((!((_local5.start["parent"] == null))) && ((_local5.end["parent"] == null))));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 317
//HideShowEffectTargetFilter (mx.effects.effectClasses.HideShowEffectTargetFilter)
package mx.effects.effectClasses {
import mx.effects.*;
public class HideShowEffectTargetFilter extends EffectTargetFilter {
public var show:Boolean;// = true
mx_internal static const VERSION:String = "3.2.0.3958";
public function HideShowEffectTargetFilter(){
filterProperties = ["visible"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local3:int = _arg1.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
return ((_local5.end["visible"] == show));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 318
//PropertyChanges (mx.effects.effectClasses.PropertyChanges)
package mx.effects.effectClasses {
public class PropertyChanges {
public var target:Object;
public var start:Object;
public var end:Object;
mx_internal static const VERSION:String = "3.2.0.3958";
public function PropertyChanges(_arg1:Object){
end = {};
start = {};
super();
this.target = _arg1;
}
}
}//package mx.effects.effectClasses
Section 319
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance)
package mx.effects.effectClasses {
import mx.core.*;
import mx.events.*;
import mx.effects.*;
public class TweenEffectInstance extends EffectInstance {
private var _seekTime:Number;// = 0
public var easingFunction:Function;
public var tween:Tween;
mx_internal var needToLayout:Boolean;// = false
mx_internal static const VERSION:String = "3.2.0.3958";
public function TweenEffectInstance(_arg1:Object){
super(_arg1);
}
override public function stop():void{
super.stop();
if (tween){
tween.stop();
};
}
mx_internal function applyTweenStartValues():void{
if (duration > 0){
onTweenUpdate(tween.getCurrentValue(0));
};
}
override public function get playheadTime():Number{
if (tween){
return ((tween.playheadTime + super.playheadTime));
};
return (0);
}
protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{
var _local6:Tween = new Tween(_arg1, _arg2, _arg3, _arg4, _arg5);
_local6.addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
_local6.addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
_local6.addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
if (easingFunction != null){
_local6.easingFunction = easingFunction;
};
if (_seekTime > 0){
_local6.seek(_seekTime);
};
_local6.playReversed = playReversed;
return (_local6);
}
private function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
override public function end():void{
stopRepeat = true;
if (delayTimer){
delayTimer.reset();
};
if (tween){
tween.endTween();
tween = null;
};
}
override public function reverse():void{
super.reverse();
if (tween){
tween.reverse();
};
super.playReversed = !(playReversed);
}
override mx_internal function set playReversed(_arg1:Boolean):void{
super.playReversed = _arg1;
if (tween){
tween.playReversed = _arg1;
};
}
override public function resume():void{
super.resume();
if (tween){
tween.resume();
};
}
public function onTweenEnd(_arg1:Object):void{
onTweenUpdate(_arg1);
tween = null;
if (needToLayout){
UIComponentGlobals.layoutManager.validateNow();
};
finishRepeat();
}
public function onTweenUpdate(_arg1:Object):void{
}
override public function pause():void{
super.pause();
if (tween){
tween.pause();
};
}
public function seek(_arg1:Number):void{
if (tween){
tween.seek(_arg1);
} else {
_seekTime = _arg1;
};
}
}
}//package mx.effects.effectClasses
Section 320
//ZoomInstance (mx.effects.effectClasses.ZoomInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.events.*;
import mx.effects.*;
public class ZoomInstance extends TweenEffectInstance {
private var newY:Number;
public var originY:Number;
private var origX:Number;
private var origY:Number;
public var originX:Number;
private var origPercentHeight:Number;
public var zoomWidthFrom:Number;
public var zoomWidthTo:Number;
private var newX:Number;
public var captureRollEvents:Boolean;
private var origPercentWidth:Number;
public var zoomHeightFrom:Number;
private var origScaleX:Number;
public var zoomHeightTo:Number;
private var origScaleY:Number;
private var scaledOriginX:Number;
private var scaledOriginY:Number;
private var show:Boolean;// = true
private var _mouseHasMoved:Boolean;// = false
mx_internal static const VERSION:String = "3.2.0.3958";
public function ZoomInstance(_arg1:Object){
super(_arg1);
}
override public function finishEffect():void{
if (captureRollEvents){
target.removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
target.removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
};
super.finishEffect();
}
private function getScaleFromWidth(_arg1:Number):Number{
return ((_arg1 / (target.width / Math.abs(target.scaleX))));
}
override public function initEffect(_arg1:Event):void{
super.initEffect(_arg1);
if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){
show = false;
};
}
private function getScaleFromHeight(_arg1:Number):Number{
return ((_arg1 / (target.height / Math.abs(target.scaleY))));
}
private function applyPropertyChanges():void{
var _local2:Boolean;
var _local3:Boolean;
var _local1:PropertyChanges = propertyChanges;
if (_local1){
_local2 = false;
_local3 = false;
if (_local1.end["scaleX"] !== undefined){
zoomWidthFrom = (isNaN(zoomWidthFrom)) ? target.scaleX : zoomWidthFrom;
zoomWidthTo = (isNaN(zoomWidthTo)) ? _local1.end["scaleX"] : zoomWidthTo;
_local3 = true;
};
if (_local1.end["scaleY"] !== undefined){
zoomHeightFrom = (isNaN(zoomHeightFrom)) ? target.scaleY : zoomHeightFrom;
zoomHeightTo = (isNaN(zoomHeightTo)) ? _local1.end["scaleY"] : zoomHeightTo;
_local3 = true;
};
if (_local3){
return;
};
if (_local1.end["width"] !== undefined){
zoomWidthFrom = (isNaN(zoomWidthFrom)) ? getScaleFromWidth(target.width) : zoomWidthFrom;
zoomWidthTo = (isNaN(zoomWidthTo)) ? getScaleFromWidth(_local1.end["width"]) : zoomWidthTo;
_local2 = true;
};
if (_local1.end["height"] !== undefined){
zoomHeightFrom = (isNaN(zoomHeightFrom)) ? getScaleFromHeight(target.height) : zoomHeightFrom;
zoomHeightTo = (isNaN(zoomHeightTo)) ? getScaleFromHeight(_local1.end["height"]) : zoomHeightTo;
_local2 = true;
};
if (_local2){
return;
};
if (_local1.end["visible"] !== undefined){
show = _local1.end["visible"];
};
};
}
private function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_MOVE){
_mouseHasMoved = true;
} else {
if ((((_arg1.type == MouseEvent.ROLL_OUT)) || ((_arg1.type == MouseEvent.ROLL_OVER)))){
if (!_mouseHasMoved){
_arg1.stopImmediatePropagation();
};
_mouseHasMoved = false;
};
};
}
override public function play():void{
super.play();
applyPropertyChanges();
if (((((((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))) && (isNaN(zoomHeightFrom)))) && (isNaN(zoomHeightTo)))){
if (show){
zoomWidthFrom = (zoomHeightFrom = 0);
zoomWidthTo = target.scaleX;
zoomHeightTo = target.scaleY;
} else {
zoomWidthFrom = target.scaleX;
zoomHeightFrom = target.scaleY;
zoomWidthTo = (zoomHeightTo = 0);
};
} else {
if (((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))){
zoomWidthFrom = (zoomWidthTo = target.scaleX);
} else {
if (((isNaN(zoomHeightFrom)) && (isNaN(zoomHeightTo)))){
zoomHeightFrom = (zoomHeightTo = target.scaleY);
};
};
if (isNaN(zoomWidthFrom)){
zoomWidthFrom = target.scaleX;
} else {
if (isNaN(zoomWidthTo)){
zoomWidthTo = ((zoomWidthFrom)==1) ? 0 : 1;
};
};
if (isNaN(zoomHeightFrom)){
zoomHeightFrom = target.scaleY;
} else {
if (isNaN(zoomHeightTo)){
zoomHeightTo = ((zoomHeightFrom)==1) ? 0 : 1;
};
};
};
if (zoomWidthFrom < 0.01){
zoomWidthFrom = 0.01;
};
if (zoomWidthTo < 0.01){
zoomWidthTo = 0.01;
};
if (zoomHeightFrom < 0.01){
zoomHeightFrom = 0.01;
};
if (zoomHeightTo < 0.01){
zoomHeightTo = 0.01;
};
origScaleX = target.scaleX;
origScaleY = target.scaleY;
newX = (origX = target.x);
newY = (origY = target.y);
if (isNaN(originX)){
scaledOriginX = (target.width / 2);
} else {
scaledOriginX = (originX * origScaleX);
};
if (isNaN(originY)){
scaledOriginY = (target.height / 2);
} else {
scaledOriginY = (originY * origScaleY);
};
scaledOriginX = Number(scaledOriginX.toFixed(1));
scaledOriginY = Number(scaledOriginY.toFixed(1));
origPercentWidth = target.percentWidth;
if (!isNaN(origPercentWidth)){
target.width = target.width;
};
origPercentHeight = target.percentHeight;
if (!isNaN(origPercentHeight)){
target.height = target.height;
};
tween = createTween(this, [zoomWidthFrom, zoomHeightFrom], [zoomWidthTo, zoomHeightTo], duration);
if (captureRollEvents){
target.addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
target.addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
target.addEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
};
}
override public function onTweenEnd(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
if (!isNaN(origPercentWidth)){
_local2 = target.width;
target.percentWidth = origPercentWidth;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target._width = _local2;
};
};
if (!isNaN(origPercentHeight)){
_local3 = target.height;
target.percentHeight = origPercentHeight;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target._height = _local3;
};
};
super.onTweenEnd(_arg1);
if (hideOnEffectEnd){
EffectManager.suspendEventHandling();
target.scaleX = origScaleX;
target.scaleY = origScaleY;
target.move(origX, origY);
EffectManager.resumeEventHandling();
};
}
override public function onTweenUpdate(_arg1:Object):void{
EffectManager.suspendEventHandling();
if (Math.abs((newX - target.x)) > 0.1){
origX = (origX + (Number(target.x.toFixed(1)) - newX));
};
if (Math.abs((newY - target.y)) > 0.1){
origY = (origY + (Number(target.y.toFixed(1)) - newY));
};
target.scaleX = _arg1[0];
target.scaleY = _arg1[1];
var _local2:Number = (_arg1[0] / origScaleX);
var _local3:Number = (_arg1[1] / origScaleY);
var _local4:Number = (scaledOriginX * _local2);
var _local5:Number = (scaledOriginY * _local3);
newX = ((scaledOriginX - _local4) + origX);
newY = ((scaledOriginY - _local5) + origY);
newX = Number(newX.toFixed(1));
newY = Number(newY.toFixed(1));
target.move(newX, newY);
if (tween){
tween.needToLayout = true;
} else {
needToLayout = true;
};
EffectManager.resumeEventHandling();
}
}
}//package mx.effects.effectClasses
Section 321
//Effect (mx.effects.Effect)
package mx.effects {
import mx.core.*;
import mx.managers.*;
import flash.events.*;
import mx.events.*;
import mx.effects.effectClasses.*;
import flash.utils.*;
public class Effect extends EventDispatcher implements IEffect {
private var _perElementOffset:Number;// = 0
private var _hideFocusRing:Boolean;// = false
private var _customFilter:EffectTargetFilter;
public var repeatCount:int;// = 1
public var suspendBackgroundProcessing:Boolean;// = false
public var startDelay:int;// = 0
private var _relevantProperties:Array;
private var _callValidateNow:Boolean;// = false
mx_internal var applyActualDimensions:Boolean;// = true
private var _filter:String;
private var _triggerEvent:Event;
private var _effectTargetHost:IEffectTargetHost;
mx_internal var durationExplicitlySet:Boolean;// = false
public var repeatDelay:int;// = 0
private var _targets:Array;
mx_internal var propertyChangesArray:Array;
mx_internal var filterObject:EffectTargetFilter;
protected var endValuesCaptured:Boolean;// = false
public var instanceClass:Class;
private var _duration:Number;// = 500
private var isPaused:Boolean;// = false
private var _relevantStyles:Array;
private var _instances:Array;
mx_internal static const VERSION:String = "3.2.0.3958";
public function Effect(_arg1:Object=null){
_instances = [];
instanceClass = IEffectInstance;
_relevantStyles = [];
_targets = [];
super();
this.target = _arg1;
}
public function get targets():Array{
return (_targets);
}
public function set targets(_arg1:Array):void{
var _local2:int = _arg1.length;
var _local3:int = (_local2 - 1);
while (_local3 > 0) {
if (_arg1[_local3] == null){
_arg1.splice(_local3, 1);
};
_local3--;
};
_targets = _arg1;
}
public function set hideFocusRing(_arg1:Boolean):void{
_hideFocusRing = _arg1;
}
public function get hideFocusRing():Boolean{
return (_hideFocusRing);
}
public function stop():void{
var _local3:IEffectInstance;
var _local1:int = _instances.length;
var _local2:int = _local1;
while (_local2 >= 0) {
_local3 = IEffectInstance(_instances[_local2]);
if (_local3){
_local3.stop();
};
_local2--;
};
}
public function captureStartValues():void{
var _local1:int;
var _local2:int;
if (targets.length > 0){
propertyChangesArray = [];
_callValidateNow = true;
_local1 = targets.length;
_local2 = 0;
while (_local2 < _local1) {
propertyChangesArray.push(new PropertyChanges(targets[_local2]));
_local2++;
};
propertyChangesArray = captureValues(propertyChangesArray, true);
};
endValuesCaptured = false;
}
mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{
var _local4:Object;
var _local5:Object;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local3:Array = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties;
if (((_local3) && ((_local3.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local3.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local3[_local9]] = getValueFromTarget(_local5, _local3[_local9]);
_local9++;
};
_local7++;
};
};
var _local10:Array = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles;
if (((_local10) && ((_local10.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local10.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local10[_local9]] = _local5.getStyle(_local10[_local9]);
_local9++;
};
_local7++;
};
};
return (_arg1);
}
protected function getValueFromTarget(_arg1:Object, _arg2:String){
if ((_arg2 in _arg1)){
return (_arg1[_arg2]);
};
return (undefined);
}
public function set target(_arg1:Object):void{
_targets.splice(0);
if (_arg1){
_targets[0] = _arg1;
};
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function set perElementOffset(_arg1:Number):void{
_perElementOffset = _arg1;
}
public function resume():void{
var _local1:int;
var _local2:int;
if (((isPlaying) && (isPaused))){
isPaused = false;
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).resume();
_local2++;
};
};
}
public function set duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
public function play(_arg1:Array=null, _arg2:Boolean=false):Array{
var _local6:IEffectInstance;
if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){
if (_callValidateNow){
LayoutManager.getInstance().validateNow();
};
if (!endValuesCaptured){
propertyChangesArray = captureValues(propertyChangesArray, false);
};
propertyChangesArray = stripUnchangedValues(propertyChangesArray);
applyStartValues(propertyChangesArray, this.targets);
};
var _local3:Array = createInstances(_arg1);
var _local4:int = _local3.length;
var _local5:int;
while (_local5 < _local4) {
_local6 = IEffectInstance(_local3[_local5]);
Object(_local6).playReversed = _arg2;
_local6.startEffect();
_local5++;
};
return (_local3);
}
public function captureEndValues():void{
propertyChangesArray = captureValues(propertyChangesArray, false);
endValuesCaptured = true;
}
protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{
if (filterObject){
return (filterObject.filterInstance(_arg1, effectTargetHost, _arg2));
};
return (true);
}
public function get customFilter():EffectTargetFilter{
return (_customFilter);
}
public function get effectTargetHost():IEffectTargetHost{
return (_effectTargetHost);
}
public function set relevantProperties(_arg1:Array):void{
_relevantProperties = _arg1;
}
public function captureMoreStartValues(_arg1:Array):void{
var _local2:Array;
var _local3:int;
if (_arg1.length > 0){
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
_local2.push(new PropertyChanges(_arg1[_local3]));
_local3++;
};
_local2 = captureValues(_local2, true);
propertyChangesArray = propertyChangesArray.concat(_local2);
};
}
public function deleteInstance(_arg1:IEffectInstance):void{
EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
var _local2:int = _instances.length;
var _local3:int;
while (_local3 < _local2) {
if (_instances[_local3] === _arg1){
_instances.splice(_local3, 1);
};
_local3++;
};
}
public function get filter():String{
return (_filter);
}
public function set triggerEvent(_arg1:Event):void{
_triggerEvent = _arg1;
}
public function get target():Object{
if (_targets.length > 0){
return (_targets[0]);
};
return (null);
}
public function get duration():Number{
return (_duration);
}
public function set customFilter(_arg1:EffectTargetFilter):void{
_customFilter = _arg1;
filterObject = _arg1;
}
public function get perElementOffset():Number{
return (_perElementOffset);
}
public function set effectTargetHost(_arg1:IEffectTargetHost):void{
_effectTargetHost = _arg1;
}
public function get isPlaying():Boolean{
return (((_instances) && ((_instances.length > 0))));
}
protected function effectEndHandler(_arg1:EffectEvent):void{
var _local2:IEffectInstance = IEffectInstance(_arg1.effectInstance);
deleteInstance(_local2);
dispatchEvent(_arg1);
}
public function get relevantProperties():Array{
if (_relevantProperties){
return (_relevantProperties);
};
return (getAffectedProperties());
}
public function createInstance(_arg1:Object=null):IEffectInstance{
var _local6:int;
var _local7:int;
if (!_arg1){
_arg1 = this.target;
};
var _local2:IEffectInstance;
var _local3:PropertyChanges;
var _local4:Boolean;
var _local5:Boolean;
if (propertyChangesArray){
_local5 = true;
_local4 = filterInstance(propertyChangesArray, _arg1);
};
if (_local4){
_local2 = IEffectInstance(new instanceClass(_arg1));
initInstance(_local2);
if (_local5){
_local6 = propertyChangesArray.length;
_local7 = 0;
while (_local7 < _local6) {
if (propertyChangesArray[_local7].target == _arg1){
_local2.propertyChanges = propertyChangesArray[_local7];
};
_local7++;
};
};
EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_instances.push(_local2);
if (triggerEvent){
_local2.initEffect(triggerEvent);
};
};
return (_local2);
}
protected function effectStartHandler(_arg1:EffectEvent):void{
dispatchEvent(_arg1);
}
public function getAffectedProperties():Array{
return ([]);
}
public function set relevantStyles(_arg1:Array):void{
_relevantStyles = _arg1;
}
public function get triggerEvent():Event{
return (_triggerEvent);
}
protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{
var target = _arg1;
var property = _arg2;
var value = _arg3;
var props = _arg4;
if ((property in target)){
try {
if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "height")))){
target.setActualSize(target.width, value);
} else {
if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "width")))){
target.setActualSize(value, target.height);
} else {
target[property] = value;
};
};
} catch(e:Error) {
};
};
}
protected function initInstance(_arg1:IEffectInstance):void{
_arg1.duration = duration;
Object(_arg1).durationExplicitlySet = durationExplicitlySet;
_arg1.effect = this;
_arg1.effectTargetHost = effectTargetHost;
_arg1.hideFocusRing = hideFocusRing;
_arg1.repeatCount = repeatCount;
_arg1.repeatDelay = repeatDelay;
_arg1.startDelay = startDelay;
_arg1.suspendBackgroundProcessing = suspendBackgroundProcessing;
}
mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:Boolean;
var _local3:Array = relevantProperties;
var _local4:int = _arg1.length;
var _local5:int;
while (_local5 < _local4) {
_local8 = _arg1[_local5].target;
_local9 = false;
_local6 = _arg2.length;
_local7 = 0;
while (_local7 < _local6) {
if (_arg2[_local7] == _local8){
_local9 = filterInstance(_arg1, _local8);
break;
};
_local7++;
};
if (_local9){
_local6 = _local3.length;
_local7 = 0;
while (_local7 < _local6) {
if ((((_local3[_local7] in _arg1[_local5].start)) && ((_local3[_local7] in _local8)))){
applyValueToTarget(_local8, _local3[_local7], _arg1[_local5].start[_local3[_local7]], _arg1[_local5].start);
};
_local7++;
};
_local6 = relevantStyles.length;
_local7 = 0;
while (_local7 < _local6) {
if ((relevantStyles[_local7] in _arg1[_local5].start)){
_local8.setStyle(relevantStyles[_local7], _arg1[_local5].start[relevantStyles[_local7]]);
};
_local7++;
};
};
_local5++;
};
}
public function end(_arg1:IEffectInstance=null):void{
var _local2:int;
var _local3:int;
var _local4:IEffectInstance;
if (_arg1){
_arg1.end();
} else {
_local2 = _instances.length;
_local3 = _local2;
while (_local3 >= 0) {
_local4 = IEffectInstance(_instances[_local3]);
if (_local4){
_local4.end();
};
_local3--;
};
};
}
public function get relevantStyles():Array{
return (_relevantStyles);
}
public function createInstances(_arg1:Array=null):Array{
var _local6:IEffectInstance;
if (!_arg1){
_arg1 = this.targets;
};
var _local2:Array = [];
var _local3:int = _arg1.length;
var _local4:Number = 0;
var _local5:int;
while (_local5 < _local3) {
_local6 = createInstance(_arg1[_local5]);
if (_local6){
_local6.startDelay = (_local6.startDelay + _local4);
_local4 = (_local4 + perElementOffset);
_local2.push(_local6);
};
_local5++;
};
triggerEvent = null;
return (_local2);
}
public function pause():void{
var _local1:int;
var _local2:int;
if (((isPlaying) && (!(isPaused)))){
isPaused = true;
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).pause();
_local2++;
};
};
}
public function set filter(_arg1:String):void{
if (!customFilter){
_filter = _arg1;
switch (_arg1){
case "add":
case "remove":
filterObject = new AddRemoveEffectTargetFilter();
AddRemoveEffectTargetFilter(filterObject).add = (_arg1 == "add");
break;
case "hide":
case "show":
filterObject = new HideShowEffectTargetFilter();
HideShowEffectTargetFilter(filterObject).show = (_arg1 == "show");
break;
case "move":
filterObject = new EffectTargetFilter();
filterObject.filterProperties = ["x", "y"];
break;
case "resize":
filterObject = new EffectTargetFilter();
filterObject.filterProperties = ["width", "height"];
break;
case "addItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {added:true};
break;
case "removeItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {removed:true};
break;
case "replacedItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {replaced:true};
break;
case "replacementItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {replacement:true};
break;
default:
filterObject = null;
break;
};
};
}
public function reverse():void{
var _local1:int;
var _local2:int;
if (isPlaying){
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).reverse();
_local2++;
};
};
}
private static function mergeArrays(_arg1:Array, _arg2:Array):Array{
var _local3:int;
var _local4:Boolean;
var _local5:int;
if (_arg2){
_local3 = 0;
while (_local3 < _arg2.length) {
_local4 = true;
_local5 = 0;
while (_local5 < _arg1.length) {
if (_arg1[_local5] == _arg2[_local3]){
_local4 = false;
break;
};
_local5++;
};
if (_local4){
_arg1.push(_arg2[_local3]);
};
_local3++;
};
};
return (_arg1);
}
private static function stripUnchangedValues(_arg1:Array):Array{
var _local3:Object;
var _local2:int;
while (_local2 < _arg1.length) {
for (_local3 in _arg1[_local2].start) {
if ((((_arg1[_local2].start[_local3] == _arg1[_local2].end[_local3])) || ((((((((typeof(_arg1[_local2].start[_local3]) == "number")) && ((typeof(_arg1[_local2].end[_local3]) == "number")))) && (isNaN(_arg1[_local2].start[_local3])))) && (isNaN(_arg1[_local2].end[_local3])))))){
delete _arg1[_local2].start[_local3];
delete _arg1[_local2].end[_local3];
};
};
_local2++;
};
return (_arg1);
}
}
}//package mx.effects
Section 322
//EffectInstance (mx.effects.EffectInstance)
package mx.effects {
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.effects.effectClasses.*;
import flash.utils.*;
public class EffectInstance extends EventDispatcher implements IEffectInstance {
private var _hideFocusRing:Boolean;
private var delayStartTime:Number;// = 0
mx_internal var stopRepeat:Boolean;// = false
private var playCount:int;// = 0
private var _repeatCount:int;// = 0
private var _suspendBackgroundProcessing:Boolean;// = false
mx_internal var delayTimer:Timer;
private var _triggerEvent:Event;
private var _effectTargetHost:IEffectTargetHost;
mx_internal var parentCompositeEffectInstance:EffectInstance;
mx_internal var durationExplicitlySet:Boolean;// = false
private var _effect:IEffect;
private var _target:Object;
mx_internal var hideOnEffectEnd:Boolean;// = false
private var _startDelay:int;// = 0
private var delayElapsedTime:Number;// = 0
private var _repeatDelay:int;// = 0
private var _propertyChanges:PropertyChanges;
private var _duration:Number;// = 500
private var _playReversed:Boolean;
mx_internal static const VERSION:String = "3.2.0.3958";
public function EffectInstance(_arg1:Object){
this.target = _arg1;
}
public function get playheadTime():Number{
return ((((Math.max((playCount - 1), 0) * duration) + (Math.max((playCount - 2), 0) * repeatDelay)) + (playReversed) ? 0 : startDelay));
}
public function get hideFocusRing():Boolean{
return (_hideFocusRing);
}
public function stop():void{
if (delayTimer){
delayTimer.reset();
};
stopRepeat = true;
finishEffect();
}
public function finishEffect():void{
playCount = 0;
dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this));
if (target){
target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this));
};
if ((target is UIComponent)){
UIComponent(target).effectFinished(this);
};
EffectManager.effectFinished(this);
}
public function set hideFocusRing(_arg1:Boolean):void{
_hideFocusRing = _arg1;
}
public function finishRepeat():void{
if (((((!(stopRepeat)) && (!((playCount == 0))))) && ((((playCount < repeatCount)) || ((repeatCount == 0)))))){
if (repeatDelay > 0){
delayTimer = new Timer(repeatDelay, 1);
delayStartTime = getTimer();
delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler);
delayTimer.start();
} else {
play();
};
} else {
finishEffect();
};
}
mx_internal function get playReversed():Boolean{
return (_playReversed);
}
public function set effect(_arg1:IEffect):void{
_effect = _arg1;
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function set duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
mx_internal function set playReversed(_arg1:Boolean):void{
_playReversed = _arg1;
}
public function resume():void{
if (((((delayTimer) && (!(delayTimer.running)))) && (!(isNaN(delayElapsedTime))))){
delayTimer.delay = (playReversed) ? delayElapsedTime : (delayTimer.delay - delayElapsedTime);
delayTimer.start();
};
}
public function get propertyChanges():PropertyChanges{
return (_propertyChanges);
}
public function set target(_arg1:Object):void{
_target = _arg1;
}
public function get repeatCount():int{
return (_repeatCount);
}
mx_internal function playWithNoDuration():void{
duration = 0;
repeatCount = 1;
repeatDelay = 0;
startDelay = 0;
startEffect();
}
public function get startDelay():int{
return (_startDelay);
}
mx_internal function get actualDuration():Number{
var _local1:Number = NaN;
if (repeatCount > 0){
_local1 = (((duration * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay);
};
return (_local1);
}
public function play():void{
playCount++;
dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this));
if (target){
target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this));
};
}
public function get suspendBackgroundProcessing():Boolean{
return (_suspendBackgroundProcessing);
}
public function get effectTargetHost():IEffectTargetHost{
return (_effectTargetHost);
}
public function set repeatDelay(_arg1:int):void{
_repeatDelay = _arg1;
}
public function set propertyChanges(_arg1:PropertyChanges):void{
_propertyChanges = _arg1;
}
mx_internal function eventHandler(_arg1:Event):void{
if ((((_arg1.type == FlexEvent.SHOW)) && ((hideOnEffectEnd == true)))){
hideOnEffectEnd = false;
_arg1.target.removeEventListener(FlexEvent.SHOW, eventHandler);
};
}
public function set repeatCount(_arg1:int):void{
_repeatCount = _arg1;
}
private function delayTimerHandler(_arg1:TimerEvent):void{
delayTimer.reset();
delayStartTime = NaN;
delayElapsedTime = NaN;
play();
}
public function set suspendBackgroundProcessing(_arg1:Boolean):void{
_suspendBackgroundProcessing = _arg1;
}
public function set triggerEvent(_arg1:Event):void{
_triggerEvent = _arg1;
}
public function set startDelay(_arg1:int):void{
_startDelay = _arg1;
}
public function get effect():IEffect{
return (_effect);
}
public function set effectTargetHost(_arg1:IEffectTargetHost):void{
_effectTargetHost = _arg1;
}
public function get target():Object{
return (_target);
}
public function startEffect():void{
EffectManager.effectStarted(this);
if ((target is UIComponent)){
UIComponent(target).effectStarted(this);
};
if ((((startDelay > 0)) && (!(playReversed)))){
delayTimer = new Timer(startDelay, 1);
delayStartTime = getTimer();
delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler);
delayTimer.start();
} else {
play();
};
}
public function get repeatDelay():int{
return (_repeatDelay);
}
public function get duration():Number{
if (((!(durationExplicitlySet)) && (parentCompositeEffectInstance))){
return (parentCompositeEffectInstance.duration);
};
return (_duration);
}
public function initEffect(_arg1:Event):void{
triggerEvent = _arg1;
switch (_arg1.type){
case "resizeStart":
case "resizeEnd":
if (!durationExplicitlySet){
duration = 250;
};
break;
case FlexEvent.HIDE:
target.setVisible(true, true);
hideOnEffectEnd = true;
target.addEventListener(FlexEvent.SHOW, eventHandler);
break;
};
}
public function get triggerEvent():Event{
return (_triggerEvent);
}
public function end():void{
if (delayTimer){
delayTimer.reset();
};
stopRepeat = true;
finishEffect();
}
public function reverse():void{
if (repeatCount > 0){
playCount = ((repeatCount - playCount) + 1);
};
}
public function pause():void{
if (((((delayTimer) && (delayTimer.running))) && (!(isNaN(delayStartTime))))){
delayTimer.stop();
delayElapsedTime = (getTimer() - delayStartTime);
};
}
}
}//package mx.effects
Section 323
//EffectManager (mx.effects.EffectManager)
package mx.effects {
import flash.display.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.resources.*;
import flash.utils.*;
public class EffectManager extends EventDispatcher {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var _resourceManager:IResourceManager;
private static var effects:Dictionary = new Dictionary(true);
mx_internal static var effectsPlaying:Array = [];
private static var targetsInfo:Array = [];
private static var effectTriggersForEvent:Object = {};
mx_internal static var lastEffectCreated:Effect;
private static var eventHandlingSuspendCount:Number = 0;
private static var eventsForEffectTriggers:Object = {};
public static function suspendEventHandling():void{
eventHandlingSuspendCount++;
}
mx_internal static function registerEffectTrigger(_arg1:String, _arg2:String):void{
var _local3:Number;
if (_arg1 != ""){
if (_arg2 == ""){
_local3 = _arg1.length;
if ((((_local3 > 6)) && ((_arg1.substring((_local3 - 6)) == "Effect")))){
_arg2 = _arg1.substring(0, (_local3 - 6));
};
};
if (_arg2 != ""){
effectTriggersForEvent[_arg2] = _arg1;
eventsForEffectTriggers[_arg1] = _arg2;
};
};
}
private static function removedEffectHandler(_arg1:DisplayObject, _arg2:DisplayObjectContainer, _arg3:int, _arg4:Event):void{
suspendEventHandling();
_arg2.addChildAt(_arg1, _arg3);
resumeEventHandling();
createAndPlayEffect(_arg4, _arg1);
}
private static function createAndPlayEffect(_arg1:Event, _arg2:Object):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local9:String;
var _local10:String;
var _local11:Array;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:EffectInstance;
var _local3:Effect = createEffectForType(_arg2, _arg1.type);
if (!_local3){
return;
};
if ((((_local3 is Zoom)) && ((_arg1.type == MoveEvent.MOVE)))){
_local9 = resourceManager.getString("effects", "incorrectTrigger");
throw (new Error(_local9));
};
if (_arg2.initialized == false){
_local10 = _arg1.type;
if ((((((((((_local10 == MoveEvent.MOVE)) || ((_local10 == ResizeEvent.RESIZE)))) || ((_local10 == FlexEvent.SHOW)))) || ((_local10 == FlexEvent.HIDE)))) || ((_local10 == Event.CHANGE)))){
_local3 = null;
return;
};
};
if ((_local3.target is IUIComponent)){
_local11 = IUIComponent(_local3.target).tweeningProperties;
if (((_local11) && ((_local11.length > 0)))){
_local12 = _local3.getAffectedProperties();
_local4 = _local11.length;
_local6 = _local12.length;
_local5 = 0;
while (_local5 < _local4) {
_local7 = 0;
while (_local7 < _local6) {
if (_local11[_local5] == _local12[_local7]){
_local3 = null;
return;
};
_local7++;
};
_local5++;
};
};
};
if ((((_local3.target is UIComponent)) && (UIComponent(_local3.target).isEffectStarted))){
_local13 = _local3.getAffectedProperties();
_local5 = 0;
while (_local5 < _local13.length) {
_local14 = _local3.target.getEffectsForProperty(_local13[_local5]);
if (_local14.length > 0){
if (_arg1.type == ResizeEvent.RESIZE){
return;
};
_local7 = 0;
while (_local7 < _local14.length) {
_local15 = _local14[_local7];
if ((((_arg1.type == FlexEvent.SHOW)) && (_local15.hideOnEffectEnd))){
_local15.target.removeEventListener(FlexEvent.SHOW, _local15.eventHandler);
_local15.hideOnEffectEnd = false;
};
_local15.end();
_local7++;
};
};
_local5++;
};
};
_local3.triggerEvent = _arg1;
_local3.addEventListener(EffectEvent.EFFECT_END, EffectManager.effectEndHandler);
lastEffectCreated = _local3;
var _local8:Array = _local3.play();
_local4 = _local8.length;
_local5 = 0;
while (_local5 < _local4) {
effectsPlaying.push(new EffectNode(_local3, _local8[_local5]));
_local5++;
};
if (_local3.suspendBackgroundProcessing){
UIComponent.suspendBackgroundProcessing();
};
}
public static function endEffectsForTarget(_arg1:IUIComponent):void{
var _local4:EffectInstance;
var _local2:int = effectsPlaying.length;
var _local3:int = (_local2 - 1);
while (_local3 >= 0) {
_local4 = effectsPlaying[_local3].instance;
if (_local4.target == _arg1){
_local4.end();
};
_local3--;
};
}
private static function cacheOrUncacheTargetAsBitmap(_arg1:IUIComponent, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local4:int;
var _local5:int;
var _local6:Object;
_local4 = targetsInfo.length;
_local5 = 0;
while (_local5 < _local4) {
if (targetsInfo[_local5].target == _arg1){
_local6 = targetsInfo[_local5];
break;
};
_local5++;
};
if (!_local6){
_local6 = {target:_arg1, bitmapEffectsCount:0, vectorEffectsCount:0};
targetsInfo.push(_local6);
};
if (_arg2){
if (_arg3){
_local6.bitmapEffectsCount++;
if ((((_local6.vectorEffectsCount == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true;
};
} else {
if ((((((_local6.vectorEffectsCount++ == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))) && ((IDeferredInstantiationUIComponent(_arg1).cachePolicy == UIComponentCachePolicy.AUTO)))){
_arg1.cacheAsBitmap = false;
};
};
} else {
if (_arg3){
if (_local6.bitmapEffectsCount != 0){
_local6.bitmapEffectsCount--;
};
if ((_arg1 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = false;
};
} else {
if (_local6.vectorEffectsCount != 0){
if ((((--_local6.vectorEffectsCount == 0)) && (!((_local6.bitmapEffectsCount == 0))))){
_local4 = _local6.bitmapEffectsCount;
_local5 = 0;
while (_local5 < _local4) {
if ((_arg1 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true;
};
_local5++;
};
};
};
};
if ((((_local6.bitmapEffectsCount == 0)) && ((_local6.vectorEffectsCount == 0)))){
_local4 = targetsInfo.length;
_local5 = 0;
while (_local5 < _local4) {
if (targetsInfo[_local5].target == _arg1){
targetsInfo.splice(_local5, 1);
break;
};
_local5++;
};
};
};
}
mx_internal static function eventHandler(_arg1:Event):void{
var _local2:FocusEvent;
var _local3:DisplayObject;
var _local4:int;
var _local5:DisplayObjectContainer;
var _local6:int;
if (!(_arg1.currentTarget is IFlexDisplayObject)){
return;
};
if (eventHandlingSuspendCount > 0){
return;
};
if ((((_arg1 is FocusEvent)) && ((((_arg1.type == FocusEvent.FOCUS_OUT)) || ((_arg1.type == FocusEvent.FOCUS_IN)))))){
_local2 = FocusEvent(_arg1);
if (((_local2.relatedObject) && (((_local2.currentTarget.contains(_local2.relatedObject)) || ((_local2.currentTarget == _local2.relatedObject)))))){
return;
};
};
if ((((((_arg1.type == Event.ADDED)) || ((_arg1.type == Event.REMOVED)))) && (!((_arg1.target == _arg1.currentTarget))))){
return;
};
if (_arg1.type == Event.REMOVED){
if ((_arg1.target is UIComponent)){
if (UIComponent(_arg1.target).initialized == false){
return;
};
if (UIComponent(_arg1.target).isEffectStarted){
_local4 = 0;
while (_local4 < UIComponent(_arg1.target)._effectsStarted.length) {
if (UIComponent(_arg1.target)._effectsStarted[_local4].triggerEvent.type == Event.REMOVED){
return;
};
_local4++;
};
};
};
_local3 = (_arg1.target as DisplayObject);
if (_local3 != null){
_local5 = (_local3.parent as DisplayObjectContainer);
if (_local5 != null){
_local6 = _local5.getChildIndex(_local3);
if (_local6 >= 0){
if ((_local3 is UIComponent)){
UIComponent(_local3).callLater(removedEffectHandler, [_local3, _local5, _local6, _arg1]);
};
};
};
};
} else {
createAndPlayEffect(_arg1, _arg1.currentTarget);
};
}
mx_internal static function endBitmapEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, true);
}
private static function animateSameProperty(_arg1:Effect, _arg2:Effect, _arg3:EffectInstance):Boolean{
var _local4:Array;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
if (_arg1.target == _arg3.target){
_local4 = _arg1.getAffectedProperties();
_local5 = _arg2.getAffectedProperties();
_local6 = _local4.length;
_local7 = _local5.length;
_local8 = 0;
while (_local8 < _local6) {
_local9 = 0;
while (_local9 < _local7) {
if (_local4[_local8] == _local5[_local9]){
return (true);
};
_local9++;
};
_local8++;
};
};
return (false);
}
mx_internal static function effectFinished(_arg1:EffectInstance):void{
delete effects[_arg1];
}
mx_internal static function effectsInEffect():Boolean{
var _local1:*;
for (_local1 in effects) {
return (true);
};
return (false);
}
mx_internal static function effectEndHandler(_arg1:EffectEvent):void{
var _local5:DisplayObject;
var _local6:DisplayObjectContainer;
var _local2:IEffectInstance = _arg1.effectInstance;
var _local3:int = effectsPlaying.length;
var _local4:int = (_local3 - 1);
while (_local4 >= 0) {
if (effectsPlaying[_local4].instance == _local2){
effectsPlaying.splice(_local4, 1);
break;
};
_local4--;
};
if (Object(_local2).hideOnEffectEnd == true){
_local2.target.removeEventListener(FlexEvent.SHOW, Object(_local2).eventHandler);
_local2.target.setVisible(false, true);
};
if (((_local2.triggerEvent) && ((_local2.triggerEvent.type == Event.REMOVED)))){
_local5 = (_local2.target as DisplayObject);
if (_local5 != null){
_local6 = (_local5.parent as DisplayObjectContainer);
if (_local6 != null){
suspendEventHandling();
_local6.removeChild(_local5);
resumeEventHandling();
};
};
};
if (_local2.suspendBackgroundProcessing){
UIComponent.resumeBackgroundProcessing();
};
}
mx_internal static function startBitmapEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, true);
}
mx_internal static function setStyle(_arg1:String, _arg2):void{
var _local3:String = eventsForEffectTriggers[_arg1];
if (((!((_local3 == null))) && (!((_local3 == ""))))){
_arg2.addEventListener(_local3, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
}
mx_internal static function getEventForEffectTrigger(_arg1:String):String{
var effectTrigger = _arg1;
if (eventsForEffectTriggers){
try {
return (eventsForEffectTriggers[effectTrigger]);
} catch(e:Error) {
return ("");
};
};
return ("");
}
mx_internal static function createEffectForType(_arg1:Object, _arg2:String):Effect{
var cls:Class;
var effectObj:Effect;
var doc:Object;
var target = _arg1;
var type = _arg2;
var trigger:String = effectTriggersForEvent[type];
if (trigger == ""){
trigger = (type + "Effect");
};
var value:Object = target.getStyle(trigger);
if (!value){
return (null);
};
if ((value is Class)){
cls = Class(value);
return (new cls(target));
};
try {
if ((value is String)){
doc = target.parentDocument;
if (!doc){
doc = ApplicationGlobals.application;
};
effectObj = doc[value];
} else {
if ((value is Effect)){
effectObj = Effect(value);
};
};
if (effectObj){
effectObj.target = target;
return (effectObj);
};
} catch(e:Error) {
};
var effectClass:Class = Class(target.systemManager.getDefinitionByName(("mx.effects." + value)));
if (effectClass){
return (new effectClass(target));
};
return (null);
}
mx_internal static function effectStarted(_arg1:EffectInstance):void{
effects[_arg1] = 1;
}
public static function resumeEventHandling():void{
eventHandlingSuspendCount--;
}
mx_internal static function startVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, false);
}
mx_internal static function endVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, false);
}
private static function get resourceManager():IResourceManager{
if (!_resourceManager){
_resourceManager = ResourceManager.getInstance();
};
return (_resourceManager);
}
}
}//package mx.effects
class EffectNode {
public var factory:Effect;
public var instance:EffectInstance;
private function EffectNode(_arg1:Effect, _arg2:EffectInstance){
this.factory = _arg1;
this.instance = _arg2;
}
}
Section 324
//EffectTargetFilter (mx.effects.EffectTargetFilter)
package mx.effects {
import mx.effects.effectClasses.*;
public class EffectTargetFilter {
public var filterFunction:Function;
public var filterStyles:Array;
public var filterProperties:Array;
public var requiredSemantics:Object;// = null
mx_internal static const VERSION:String = "3.2.0.3958";
public function EffectTargetFilter(){
filterFunction = defaultFilterFunctionEx;
filterProperties = [];
filterStyles = [];
super();
}
protected function defaultFilterFunctionEx(_arg1:Array, _arg2:IEffectTargetHost, _arg3:Object):Boolean{
var _local4:String;
if (requiredSemantics){
for (_local4 in requiredSemantics) {
if (!_arg2){
return (false);
};
if (_arg2.getRendererSemanticValue(_arg3, _local4) != requiredSemantics[_local4]){
return (false);
};
};
return (true);
};
return (defaultFilterFunction(_arg1, _arg3));
}
protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local6:Array;
var _local7:int;
var _local8:int;
var _local3:int = _arg1.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
_local6 = filterProperties.concat(filterStyles);
_local7 = _local6.length;
_local8 = 0;
while (_local8 < _local7) {
if (((!((_local5.start[_local6[_local8]] === undefined))) && (!((_local5.end[_local6[_local8]] == _local5.start[_local6[_local8]]))))){
return (true);
};
_local8++;
};
};
_local4++;
};
return (false);
}
public function filterInstance(_arg1:Array, _arg2:IEffectTargetHost, _arg3:Object):Boolean{
if (filterFunction.length == 2){
return (filterFunction(_arg1, _arg3));
};
return (filterFunction(_arg1, _arg2, _arg3));
}
}
}//package mx.effects
Section 325
//IAbstractEffect (mx.effects.IAbstractEffect)
package mx.effects {
import flash.events.*;
public interface IAbstractEffect extends IEventDispatcher {
}
}//package mx.effects
Section 326
//IEffect (mx.effects.IEffect)
package mx.effects {
import flash.events.*;
public interface IEffect extends IAbstractEffect {
function captureMoreStartValues(_arg1:Array):void;
function get triggerEvent():Event;
function set targets(_arg1:Array):void;
function captureStartValues():void;
function get hideFocusRing():Boolean;
function get customFilter():EffectTargetFilter;
function get effectTargetHost():IEffectTargetHost;
function set triggerEvent(_arg1:Event):void;
function set hideFocusRing(_arg1:Boolean):void;
function captureEndValues():void;
function get target():Object;
function set customFilter(_arg1:EffectTargetFilter):void;
function get duration():Number;
function get perElementOffset():Number;
function get targets():Array;
function set effectTargetHost(_arg1:IEffectTargetHost):void;
function get relevantStyles():Array;
function set relevantProperties(_arg1:Array):void;
function set target(_arg1:Object):void;
function get className():String;
function get isPlaying():Boolean;
function deleteInstance(_arg1:IEffectInstance):void;
function set duration(_arg1:Number):void;
function createInstances(_arg1:Array=null):Array;
function end(_arg1:IEffectInstance=null):void;
function set perElementOffset(_arg1:Number):void;
function resume():void;
function stop():void;
function set filter(_arg1:String):void;
function createInstance(_arg1:Object=null):IEffectInstance;
function play(_arg1:Array=null, _arg2:Boolean=false):Array;
function pause():void;
function get relevantProperties():Array;
function get filter():String;
function reverse():void;
function getAffectedProperties():Array;
function set relevantStyles(_arg1:Array):void;
}
}//package mx.effects
Section 327
//IEffectInstance (mx.effects.IEffectInstance)
package mx.effects {
import flash.events.*;
import mx.effects.effectClasses.*;
public interface IEffectInstance {
function get playheadTime():Number;
function get triggerEvent():Event;
function set triggerEvent(_arg1:Event):void;
function get hideFocusRing():Boolean;
function initEffect(_arg1:Event):void;
function set startDelay(_arg1:int):void;
function get effectTargetHost():IEffectTargetHost;
function finishEffect():void;
function set hideFocusRing(_arg1:Boolean):void;
function finishRepeat():void;
function set repeatDelay(_arg1:int):void;
function get effect():IEffect;
function startEffect():void;
function get duration():Number;
function get target():Object;
function get startDelay():int;
function stop():void;
function set effectTargetHost(_arg1:IEffectTargetHost):void;
function set propertyChanges(_arg1:PropertyChanges):void;
function set effect(_arg1:IEffect):void;
function get className():String;
function set duration(_arg1:Number):void;
function set target(_arg1:Object):void;
function end():void;
function resume():void;
function get propertyChanges():PropertyChanges;
function set repeatCount(_arg1:int):void;
function reverse():void;
function get repeatCount():int;
function pause():void;
function get repeatDelay():int;
function set suspendBackgroundProcessing(_arg1:Boolean):void;
function play():void;
function get suspendBackgroundProcessing():Boolean;
}
}//package mx.effects
Section 328
//IEffectTargetHost (mx.effects.IEffectTargetHost)
package mx.effects {
public interface IEffectTargetHost {
function unconstrainRenderer(_arg1:Object):void;
function removeDataEffectItem(_arg1:Object):void;
function getRendererSemanticValue(_arg1:Object, _arg2:String):Object;
function addDataEffectItem(_arg1:Object):void;
}
}//package mx.effects
Section 329
//Tween (mx.effects.Tween)
package mx.effects {
import mx.core.*;
import flash.events.*;
import mx.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var started:Boolean;// = false
private var previousUpdateTime:Number;
public var duration:Number;// = 3000
private var id:int;
private var arrayMode:Boolean;
private var _isPlaying:Boolean;// = true
private var startValue:Object;
public var listener:Object;
private var userEquation:Function;
mx_internal var needToLayout:Boolean;// = false
private var updateFunction:Function;
private var _doSeek:Boolean;// = false
mx_internal var startTime:Number;
private var endFunction:Function;
private var endValue:Object;
private var _doReverse:Boolean;// = false
private var _playheadTime:Number;// = 0
private var _invertValues:Boolean;// = false
private var maxDelay:Number;// = 87.5
mx_internal static const VERSION:String = "3.2.0.3958";
private static var timer:Timer = null;
private static var interval:Number = 10;
mx_internal static var activeTweens:Array = [];
mx_internal static var intervalTime:Number = NAN;
public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1, _arg6:Function=null, _arg7:Function=null){
userEquation = defaultEasingFunction;
super();
if (!_arg1){
return;
};
if ((_arg2 is Array)){
arrayMode = true;
};
this.listener = _arg1;
this.startValue = _arg2;
this.endValue = _arg3;
if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){
this.duration = _arg4;
};
if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){
maxDelay = (1000 / _arg5);
};
this.updateFunction = _arg6;
this.endFunction = _arg7;
if (_arg4 == 0){
id = -1;
endTween();
} else {
Tween.addTween(this);
};
}
mx_internal function get playheadTime():Number{
return (_playheadTime);
}
public function stop():void{
if (id >= 0){
Tween.removeTweenAt(id);
};
}
mx_internal function get playReversed():Boolean{
return (_invertValues);
}
mx_internal function set playReversed(_arg1:Boolean):void{
_invertValues = _arg1;
}
public function resume():void{
_isPlaying = true;
startTime = (intervalTime - _playheadTime);
if (_doReverse){
reverse();
_doReverse = false;
};
}
public function setTweenHandlers(_arg1:Function, _arg2:Function):void{
this.updateFunction = _arg1;
this.endFunction = _arg2;
}
private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2));
}
public function set easingFunction(_arg1:Function):void{
userEquation = _arg1;
}
public function endTween():void{
var _local1:TweenEvent = new TweenEvent(TweenEvent.TWEEN_END);
var _local2:Object = getCurrentValue(duration);
_local1.value = _local2;
dispatchEvent(_local1);
if (endFunction != null){
endFunction(_local2);
} else {
listener.onTweenEnd(_local2);
};
if (id >= 0){
Tween.removeTweenAt(id);
};
}
public function reverse():void{
if (_isPlaying){
_doReverse = false;
seek((duration - _playheadTime));
_invertValues = !(_invertValues);
} else {
_doReverse = !(_doReverse);
};
}
mx_internal function getCurrentValue(_arg1:Number):Object{
var _local2:Array;
var _local3:int;
var _local4:int;
if (duration == 0){
return (endValue);
};
if (_invertValues){
_arg1 = (duration - _arg1);
};
if (arrayMode){
_local2 = [];
_local3 = startValue.length;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration);
_local4++;
};
return (_local2);
//unresolved jump
};
return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration));
}
mx_internal function doInterval():Boolean{
var _local2:Number;
var _local3:Object;
var _local4:TweenEvent;
var _local5:TweenEvent;
var _local1:Boolean;
previousUpdateTime = intervalTime;
if (((_isPlaying) || (_doSeek))){
_local2 = (intervalTime - startTime);
_playheadTime = _local2;
_local3 = getCurrentValue(_local2);
if ((((_local2 >= duration)) && (!(_doSeek)))){
endTween();
_local1 = true;
} else {
if (!started){
_local5 = new TweenEvent(TweenEvent.TWEEN_START);
dispatchEvent(_local5);
started = true;
};
_local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE);
_local4.value = _local3;
dispatchEvent(_local4);
if (updateFunction != null){
updateFunction(_local3);
} else {
listener.onTweenUpdate(_local3);
};
};
_doSeek = false;
};
return (_local1);
}
public function pause():void{
_isPlaying = false;
}
public function seek(_arg1:Number):void{
var _local2:Number = intervalTime;
previousUpdateTime = _local2;
startTime = (_local2 - _arg1);
_doSeek = true;
}
mx_internal static function removeTween(_arg1:Tween):void{
removeTweenAt(_arg1.id);
}
private static function addTween(_arg1:Tween):void{
_arg1.id = activeTweens.length;
activeTweens.push(_arg1);
if (!timer){
timer = new Timer(interval);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
} else {
timer.start();
};
if (isNaN(intervalTime)){
intervalTime = getTimer();
};
_arg1.startTime = (_arg1.previousUpdateTime = intervalTime);
}
private static function timerHandler(_arg1:TimerEvent):void{
var _local6:Tween;
var _local2:Boolean;
var _local3:Number = intervalTime;
intervalTime = getTimer();
var _local4:int = activeTweens.length;
var _local5:int = _local4;
while (_local5 >= 0) {
_local6 = Tween(activeTweens[_local5]);
if (_local6){
_local6.needToLayout = false;
_local6.doInterval();
if (_local6.needToLayout){
_local2 = true;
};
};
_local5--;
};
if (_local2){
UIComponentGlobals.layoutManager.validateNow();
};
_arg1.updateAfterEvent();
}
private static function removeTweenAt(_arg1:int):void{
var _local4:Tween;
if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){
return;
};
activeTweens.splice(_arg1, 1);
var _local2:int = activeTweens.length;
var _local3:int = _arg1;
while (_local3 < _local2) {
_local4 = Tween(activeTweens[_local3]);
_local4.id--;
_local3++;
};
if (_local2 == 0){
intervalTime = NaN;
timer.reset();
};
}
}
}//package mx.effects
Section 330
//TweenEffect (mx.effects.TweenEffect)
package mx.effects {
import flash.events.*;
import mx.events.*;
import mx.effects.effectClasses.*;
public class TweenEffect extends Effect {
public var easingFunction:Function;// = null
mx_internal static const VERSION:String = "3.2.0.3958";
public function TweenEffect(_arg1:Object=null){
super(_arg1);
instanceClass = TweenEffectInstance;
}
protected function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
override protected function initInstance(_arg1:IEffectInstance):void{
super.initInstance(_arg1);
TweenEffectInstance(_arg1).easingFunction = easingFunction;
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
}
}
}//package mx.effects
Section 331
//Zoom (mx.effects.Zoom)
package mx.effects {
import mx.effects.effectClasses.*;
public class Zoom extends TweenEffect {
public var zoomHeightFrom:Number;
public var zoomWidthTo:Number;
public var originX:Number;
public var zoomHeightTo:Number;
public var originY:Number;
public var captureRollEvents:Boolean;
public var zoomWidthFrom:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var AFFECTED_PROPERTIES:Array = ["scaleX", "scaleY", "x", "y", "width", "height"];
public function Zoom(_arg1:Object=null){
super(_arg1);
instanceClass = ZoomInstance;
applyActualDimensions = false;
relevantProperties = ["scaleX", "scaleY", "width", "height", "visible"];
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:ZoomInstance;
super.initInstance(_arg1);
_local2 = ZoomInstance(_arg1);
_local2.zoomWidthFrom = zoomWidthFrom;
_local2.zoomWidthTo = zoomWidthTo;
_local2.zoomHeightFrom = zoomHeightFrom;
_local2.zoomHeightTo = zoomHeightTo;
_local2.originX = originX;
_local2.originY = originY;
_local2.captureRollEvents = captureRollEvents;
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
}
}//package mx.effects
Section 332
//ChildExistenceChangedEvent (mx.events.ChildExistenceChangedEvent)
package mx.events {
import flash.display.*;
import flash.events.*;
public class ChildExistenceChangedEvent extends Event {
public var relatedObject:DisplayObject;
public static const CHILD_REMOVE:String = "childRemove";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const OVERLAY_CREATED:String = "overlayCreated";
public static const CHILD_ADD:String = "childAdd";
public function ChildExistenceChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3);
this.relatedObject = _arg4;
}
override public function clone():Event{
return (new ChildExistenceChangedEvent(type, bubbles, cancelable, relatedObject));
}
}
}//package mx.events
Section 333
//CollectionEvent (mx.events.CollectionEvent)
package mx.events {
import flash.events.*;
public class CollectionEvent extends Event {
public var kind:String;
public var location:int;
public var items:Array;
public var oldLocation:int;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const COLLECTION_CHANGE:String = "collectionChange";
public function CollectionEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:int=-1, _arg6:int=-1, _arg7:Array=null){
super(_arg1, _arg2, _arg3);
this.kind = _arg4;
this.location = _arg5;
this.oldLocation = _arg6;
this.items = (_arg7) ? _arg7 : [];
}
override public function toString():String{
return (formatToString("CollectionEvent", "kind", "location", "oldLocation", "type", "bubbles", "cancelable", "eventPhase"));
}
override public function clone():Event{
return (new CollectionEvent(type, bubbles, cancelable, kind, location, oldLocation, items));
}
}
}//package mx.events
Section 334
//CollectionEventKind (mx.events.CollectionEventKind)
package mx.events {
public final class CollectionEventKind {
public static const ADD:String = "add";
public static const REMOVE:String = "remove";
public static const UPDATE:String = "update";
public static const MOVE:String = "move";
mx_internal static const EXPAND:String = "expand";
public static const REPLACE:String = "replace";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const REFRESH:String = "refresh";
public static const RESET:String = "reset";
}
}//package mx.events
Section 335
//DragEvent (mx.events.DragEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class DragEvent extends MouseEvent {
public var draggedItem:Object;
public var action:String;
public var dragInitiator:IUIComponent;
public var dragSource:DragSource;
public static const DRAG_DROP:String = "dragDrop";
public static const DRAG_COMPLETE:String = "dragComplete";
public static const DRAG_EXIT:String = "dragExit";
public static const DRAG_ENTER:String = "dragEnter";
public static const DRAG_START:String = "dragStart";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const DRAG_OVER:String = "dragOver";
public function DragEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:IUIComponent=null, _arg5:DragSource=null, _arg6:String=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false){
super(_arg1, _arg2, _arg3);
this.dragInitiator = _arg4;
this.dragSource = _arg5;
this.action = _arg6;
this.ctrlKey = _arg7;
this.altKey = _arg8;
this.shiftKey = _arg9;
}
override public function clone():Event{
var _local1:DragEvent = new DragEvent(type, bubbles, cancelable, dragInitiator, dragSource, action, ctrlKey, altKey, shiftKey);
_local1.relatedObject = this.relatedObject;
_local1.localX = this.localX;
_local1.localY = this.localY;
return (_local1);
}
}
}//package mx.events
Section 336
//DynamicEvent (mx.events.DynamicEvent)
package mx.events {
import flash.events.*;
public dynamic class DynamicEvent extends Event {
mx_internal static const VERSION:String = "3.2.0.3958";
public function DynamicEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
var _local2:String;
var _local1:DynamicEvent = new DynamicEvent(type, bubbles, cancelable);
for (_local2 in this) {
_local1[_local2] = this[_local2];
};
return (_local1);
}
}
}//package mx.events
Section 337
//EffectEvent (mx.events.EffectEvent)
package mx.events {
import flash.events.*;
import mx.effects.*;
public class EffectEvent extends Event {
public var effectInstance:IEffectInstance;
public static const EFFECT_START:String = "effectStart";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const EFFECT_END:String = "effectEnd";
public function EffectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEffectInstance=null){
super(_arg1, _arg2, _arg3);
this.effectInstance = _arg4;
}
override public function clone():Event{
return (new EffectEvent(type, bubbles, cancelable, effectInstance));
}
}
}//package mx.events
Section 338
//EventListenerRequest (mx.events.EventListenerRequest)
package mx.events {
import mx.core.*;
import flash.events.*;
public class EventListenerRequest extends SWFBridgeRequest {
private var _priority:int;
private var _useWeakReference:Boolean;
private var _eventType:String;
private var _useCapture:Boolean;
public static const REMOVE_EVENT_LISTENER_REQUEST:String = "removeEventListenerRequest";
public static const ADD_EVENT_LISTENER_REQUEST:String = "addEventListenerRequest";
mx_internal static const VERSION:String = "3.2.0.3958";
public function EventListenerRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:String=null, _arg5:Boolean=false, _arg6:int=0, _arg7:Boolean=false){
super(_arg1, false, false);
_eventType = _arg4;
_useCapture = _arg5;
_priority = _arg6;
_useWeakReference = _arg7;
}
public function get priority():int{
return (_priority);
}
public function get useWeakReference():Boolean{
return (_useWeakReference);
}
public function get eventType():String{
return (_eventType);
}
override public function clone():Event{
return (new EventListenerRequest(type, bubbles, cancelable, eventType, useCapture, priority, useWeakReference));
}
public function get useCapture():Boolean{
return (_useCapture);
}
public static function marshal(_arg1:Event):EventListenerRequest{
var _local2:Object = _arg1;
return (new EventListenerRequest(_local2.type, _local2.bubbles, _local2.cancelable, _local2.eventType, _local2.useCapture, _local2.priority, _local2.useWeakReference));
}
}
}//package mx.events
Section 339
//FlexEvent (mx.events.FlexEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class FlexEvent extends Event {
public static const ADD:String = "add";
public static const TRANSFORM_CHANGE:String = "transformChange";
public static const ENTER_FRAME:String = "flexEventEnterFrame";
public static const INIT_COMPLETE:String = "initComplete";
public static const REMOVE:String = "remove";
public static const BUTTON_DOWN:String = "buttonDown";
public static const EXIT_STATE:String = "exitState";
public static const CREATION_COMPLETE:String = "creationComplete";
public static const REPEAT:String = "repeat";
public static const LOADING:String = "loading";
public static const RENDER:String = "flexEventRender";
public static const REPEAT_START:String = "repeatStart";
public static const INITIALIZE:String = "initialize";
public static const ENTER_STATE:String = "enterState";
public static const URL_CHANGED:String = "urlChanged";
public static const REPEAT_END:String = "repeatEnd";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const HIDE:String = "hide";
public static const ENTER:String = "enter";
public static const PRELOADER_DONE:String = "preloaderDone";
public static const CURSOR_UPDATE:String = "cursorUpdate";
public static const PREINITIALIZE:String = "preinitialize";
public static const INVALID:String = "invalid";
public static const IDLE:String = "idle";
public static const VALID:String = "valid";
public static const DATA_CHANGE:String = "dataChange";
public static const APPLICATION_COMPLETE:String = "applicationComplete";
public static const VALUE_COMMIT:String = "valueCommit";
public static const UPDATE_COMPLETE:String = "updateComplete";
public static const INIT_PROGRESS:String = "initProgress";
public static const SHOW:String = "show";
public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new FlexEvent(type, bubbles, cancelable));
}
}
}//package mx.events
Section 340
//FlexMouseEvent (mx.events.FlexMouseEvent)
package mx.events {
import flash.display.*;
import flash.events.*;
public class FlexMouseEvent extends MouseEvent {
public static const MOUSE_DOWN_OUTSIDE:String = "mouseDownOutside";
public static const MOUSE_WHEEL_OUTSIDE:String = "mouseWheelOutside";
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11);
}
override public function clone():Event{
return (new FlexMouseEvent(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta));
}
}
}//package mx.events
Section 341
//FocusRequestDirection (mx.events.FocusRequestDirection)
package mx.events {
public final class FocusRequestDirection {
public static const BACKWARD:String = "backward";
public static const FORWARD:String = "forward";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const BOTTOM:String = "bottom";
public static const TOP:String = "top";
}
}//package mx.events
Section 342
//IndexChangedEvent (mx.events.IndexChangedEvent)
package mx.events {
import flash.display.*;
import flash.events.*;
public class IndexChangedEvent extends Event {
public var newIndex:Number;
public var triggerEvent:Event;
public var relatedObject:DisplayObject;
public var oldIndex:Number;
public static const HEADER_SHIFT:String = "headerShift";
public static const CHANGE:String = "change";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const CHILD_INDEX_CHANGE:String = "childIndexChange";
public function IndexChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null, _arg5:Number=-1, _arg6:Number=-1, _arg7:Event=null){
super(_arg1, _arg2, _arg3);
this.relatedObject = _arg4;
this.oldIndex = _arg5;
this.newIndex = _arg6;
this.triggerEvent = _arg7;
}
override public function clone():Event{
return (new IndexChangedEvent(type, bubbles, cancelable, relatedObject, oldIndex, newIndex, triggerEvent));
}
}
}//package mx.events
Section 343
//InterManagerRequest (mx.events.InterManagerRequest)
package mx.events {
import mx.core.*;
import flash.events.*;
public class InterManagerRequest extends Event {
public var value:Object;
public var name:String;
public static const TOOLTIP_MANAGER_REQUEST:String = "tooltipManagerRequest";
public static const SYSTEM_MANAGER_REQUEST:String = "systemManagerRequest";
public static const INIT_MANAGER_REQUEST:String = "initManagerRequest";
public static const DRAG_MANAGER_REQUEST:String = "dragManagerRequest";
public static const CURSOR_MANAGER_REQUEST:String = "cursorManagerRequest";
mx_internal static const VERSION:String = "3.2.0.3958";
public function InterManagerRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null){
super(_arg1, _arg2, _arg3);
this.name = _arg4;
this.value = _arg5;
}
override public function clone():Event{
var _local1:InterManagerRequest = new InterManagerRequest(type, bubbles, cancelable, name, value);
return (_local1);
}
}
}//package mx.events
Section 344
//InvalidateRequestData (mx.events.InvalidateRequestData)
package mx.events {
import mx.core.*;
public final class InvalidateRequestData {
public static const SIZE:uint = 4;
public static const PROPERTIES:uint = 2;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const DISPLAY_LIST:uint = 1;
}
}//package mx.events
Section 345
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
this._module = _arg7;
}
public function get module():IModuleInfo{
if (_module){
return (_module);
};
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module));
}
}
}//package mx.events
Section 346
//MoveEvent (mx.events.MoveEvent)
package mx.events {
import flash.events.*;
public class MoveEvent extends Event {
public var oldX:Number;
public var oldY:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const MOVE:String = "move";
public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldX = _arg4;
this.oldY = _arg5;
}
override public function clone():Event{
return (new MoveEvent(type, bubbles, cancelable, oldX, oldY));
}
}
}//package mx.events
Section 347
//PropertyChangeEvent (mx.events.PropertyChangeEvent)
package mx.events {
import flash.events.*;
public class PropertyChangeEvent extends Event {
public var newValue:Object;
public var kind:String;
public var property:Object;
public var oldValue:Object;
public var source:Object;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const PROPERTY_CHANGE:String = "propertyChange";
public function PropertyChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null){
super(_arg1, _arg2, _arg3);
this.kind = _arg4;
this.property = _arg5;
this.oldValue = _arg6;
this.newValue = _arg7;
this.source = _arg8;
}
override public function clone():Event{
return (new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source));
}
public static function createUpdateEvent(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Object):PropertyChangeEvent{
var _local5:PropertyChangeEvent = new PropertyChangeEvent(PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.UPDATE;
_local5.oldValue = _arg3;
_local5.newValue = _arg4;
_local5.source = _arg1;
_local5.property = _arg2;
return (_local5);
}
}
}//package mx.events
Section 348
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind)
package mx.events {
public final class PropertyChangeEventKind {
mx_internal static const VERSION:String = "3.2.0.3958";
public static const UPDATE:String = "update";
public static const DELETE:String = "delete";
}
}//package mx.events
Section 349
//ResizeEvent (mx.events.ResizeEvent)
package mx.events {
import flash.events.*;
public class ResizeEvent extends Event {
public var oldHeight:Number;
public var oldWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const RESIZE:String = "resize";
public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldWidth = _arg4;
this.oldHeight = _arg5;
}
override public function clone():Event{
return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight));
}
}
}//package mx.events
Section 350
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 351
//RSLEvent (mx.events.RSLEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
import flash.net.*;
public class RSLEvent extends ProgressEvent {
public var errorText:String;
public var rslIndex:int;
public var rslTotal:int;
public var url:URLRequest;
public static const RSL_PROGRESS:String = "rslProgress";
public static const RSL_ERROR:String = "rslError";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const RSL_COMPLETE:String = "rslComplete";
public function RSLEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:int=-1, _arg8:URLRequest=null, _arg9:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.rslIndex = _arg6;
this.rslTotal = _arg7;
this.url = _arg8;
this.errorText = _arg9;
}
override public function clone():Event{
return (new RSLEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, rslIndex, rslTotal, url, errorText));
}
}
}//package mx.events
Section 352
//SandboxMouseEvent (mx.events.SandboxMouseEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class SandboxMouseEvent extends Event {
public var buttonDown:Boolean;
public var altKey:Boolean;
public var ctrlKey:Boolean;
public var shiftKey:Boolean;
public static const CLICK_SOMEWHERE:String = "clickSomewhere";
public static const MOUSE_UP_SOMEWHERE:String = "mouseUpSomewhere";
public static const DOUBLE_CLICK_SOMEWHERE:String = "coubleClickSomewhere";
public static const MOUSE_WHEEL_SOMEWHERE:String = "mouseWheelSomewhere";
public static const MOUSE_DOWN_SOMEWHERE:String = "mouseDownSomewhere";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const MOUSE_MOVE_SOMEWHERE:String = "mouseMoveSomewhere";
public function SandboxMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false, _arg7:Boolean=false){
super(_arg1, _arg2, _arg3);
this.ctrlKey = _arg4;
this.altKey = _arg5;
this.shiftKey = _arg6;
this.buttonDown = _arg7;
}
override public function clone():Event{
return (new SandboxMouseEvent(type, bubbles, cancelable, ctrlKey, altKey, shiftKey, buttonDown));
}
public static function marshal(_arg1:Event):SandboxMouseEvent{
var _local2:Object = _arg1;
return (new SandboxMouseEvent(_local2.type, _local2.bubbles, _local2.cancelable, _local2.ctrlKey, _local2.altKey, _local2.shiftKey, _local2.buttonDown));
}
}
}//package mx.events
Section 353
//ScrollEvent (mx.events.ScrollEvent)
package mx.events {
import flash.events.*;
public class ScrollEvent extends Event {
public var detail:String;
public var delta:Number;
public var position:Number;
public var direction:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Number=NaN, _arg6:String=null, _arg7:Number=NaN){
super(_arg1, _arg2, _arg3);
this.detail = _arg4;
this.position = _arg5;
this.direction = _arg6;
this.delta = _arg7;
}
override public function clone():Event{
return (new ScrollEvent(type, bubbles, cancelable, detail, position, direction, delta));
}
}
}//package mx.events
Section 354
//ScrollEventDetail (mx.events.ScrollEventDetail)
package mx.events {
public final class ScrollEventDetail {
public static const LINE_UP:String = "lineUp";
public static const AT_RIGHT:String = "atRight";
public static const PAGE_UP:String = "pageUp";
public static const LINE_DOWN:String = "lineDown";
public static const PAGE_DOWN:String = "pageDown";
public static const AT_LEFT:String = "atLeft";
public static const PAGE_RIGHT:String = "pageRight";
public static const THUMB_POSITION:String = "thumbPosition";
public static const AT_TOP:String = "atTop";
public static const LINE_LEFT:String = "lineLeft";
public static const AT_BOTTOM:String = "atBottom";
public static const LINE_RIGHT:String = "lineRight";
public static const THUMB_TRACK:String = "thumbTrack";
public static const PAGE_LEFT:String = "pageLeft";
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.events
Section 355
//ScrollEventDirection (mx.events.ScrollEventDirection)
package mx.events {
public final class ScrollEventDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.events
Section 356
//StateChangeEvent (mx.events.StateChangeEvent)
package mx.events {
import flash.events.*;
public class StateChangeEvent extends Event {
public var newState:String;
public var oldState:String;
public static const CURRENT_STATE_CHANGING:String = "currentStateChanging";
public static const CURRENT_STATE_CHANGE:String = "currentStateChange";
mx_internal static const VERSION:String = "3.2.0.3958";
public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){
super(_arg1, _arg2, _arg3);
this.oldState = _arg4;
this.newState = _arg5;
}
override public function clone():Event{
return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState));
}
}
}//package mx.events
Section 357
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 358
//SWFBridgeEvent (mx.events.SWFBridgeEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class SWFBridgeEvent extends Event {
public var data:Object;
public static const BRIDGE_FOCUS_MANAGER_ACTIVATE:String = "bridgeFocusManagerActivate";
public static const BRIDGE_WINDOW_ACTIVATE:String = "bridgeWindowActivate";
public static const BRIDGE_WINDOW_DEACTIVATE:String = "brdigeWindowDeactivate";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const BRIDGE_NEW_APPLICATION:String = "bridgeNewApplication";
public static const BRIDGE_APPLICATION_UNLOADING:String = "bridgeApplicationUnloading";
public static const BRIDGE_APPLICATION_ACTIVATE:String = "bridgeApplicationActivate";
public function SWFBridgeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.data = _arg4;
}
override public function clone():Event{
return (new SWFBridgeEvent(type, bubbles, cancelable, data));
}
public static function marshal(_arg1:Event):SWFBridgeEvent{
var _local2:Object = _arg1;
return (new SWFBridgeEvent(_local2.type, _local2.bubbles, _local2.cancelable, _local2.data));
}
}
}//package mx.events
Section 359
//SWFBridgeRequest (mx.events.SWFBridgeRequest)
package mx.events {
import mx.core.*;
import flash.events.*;
public class SWFBridgeRequest extends Event {
public var requestor:IEventDispatcher;
public var data:Object;
public static const SHOW_MOUSE_CURSOR_REQUEST:String = "showMouseCursorRequest";
public static const DEACTIVATE_POP_UP_REQUEST:String = "deactivatePopUpRequest";
public static const SET_ACTUAL_SIZE_REQUEST:String = "setActualSizeRequest";
public static const MOVE_FOCUS_REQUEST:String = "moveFocusRequest";
public static const GET_VISIBLE_RECT_REQUEST:String = "getVisibleRectRequest";
public static const ADD_POP_UP_PLACE_HOLDER_REQUEST:String = "addPopUpPlaceHolderRequest";
public static const REMOVE_POP_UP_PLACE_HOLDER_REQUEST:String = "removePopUpPlaceHolderRequest";
public static const RESET_MOUSE_CURSOR_REQUEST:String = "resetMouseCursorRequest";
public static const ADD_POP_UP_REQUEST:String = "addPopUpRequest";
public static const GET_SIZE_REQUEST:String = "getSizeRequest";
public static const SHOW_MODAL_WINDOW_REQUEST:String = "showModalWindowRequest";
public static const ACTIVATE_FOCUS_REQUEST:String = "activateFocusRequest";
public static const DEACTIVATE_FOCUS_REQUEST:String = "deactivateFocusRequest";
public static const HIDE_MOUSE_CURSOR_REQUEST:String = "hideMouseCursorRequest";
public static const ACTIVATE_POP_UP_REQUEST:String = "activatePopUpRequest";
public static const IS_BRIDGE_CHILD_REQUEST:String = "isBridgeChildRequest";
public static const CAN_ACTIVATE_POP_UP_REQUEST:String = "canActivateRequestPopUpRequest";
public static const HIDE_MODAL_WINDOW_REQUEST:String = "hideModalWindowRequest";
public static const INVALIDATE_REQUEST:String = "invalidateRequest";
public static const SET_SHOW_FOCUS_INDICATOR_REQUEST:String = "setShowFocusIndicatorRequest";
public static const CREATE_MODAL_WINDOW_REQUEST:String = "createModalWindowRequest";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const REMOVE_POP_UP_REQUEST:String = "removePopUpRequest";
public function SWFBridgeRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEventDispatcher=null, _arg5:Object=null){
super(_arg1, _arg2, _arg3);
this.requestor = _arg4;
this.data = _arg5;
}
override public function clone():Event{
return (new SWFBridgeRequest(type, bubbles, cancelable, requestor, data));
}
public static function marshal(_arg1:Event):SWFBridgeRequest{
var _local2:Object = _arg1;
return (new SWFBridgeRequest(_local2.type, _local2.bubbles, _local2.cancelable, _local2.requestor, _local2.data));
}
}
}//package mx.events
Section 360
//ToolTipEvent (mx.events.ToolTipEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class ToolTipEvent extends Event {
public var toolTip:IToolTip;
public static const TOOL_TIP_SHOWN:String = "toolTipShown";
public static const TOOL_TIP_CREATE:String = "toolTipCreate";
public static const TOOL_TIP_SHOW:String = "toolTipShow";
public static const TOOL_TIP_HIDE:String = "toolTipHide";
public static const TOOL_TIP_END:String = "toolTipEnd";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const TOOL_TIP_START:String = "toolTipStart";
public function ToolTipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IToolTip=null){
super(_arg1, _arg2, _arg3);
this.toolTip = _arg4;
}
override public function clone():Event{
return (new ToolTipEvent(type, bubbles, cancelable, toolTip));
}
}
}//package mx.events
Section 361
//TweenEvent (mx.events.TweenEvent)
package mx.events {
import flash.events.*;
public class TweenEvent extends Event {
public var value:Object;
public static const TWEEN_END:String = "tweenEnd";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const TWEEN_UPDATE:String = "tweenUpdate";
public static const TWEEN_START:String = "tweenStart";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.value = _arg4;
}
override public function clone():Event{
return (new TweenEvent(type, bubbles, cancelable, value));
}
}
}//package mx.events
Section 362
//ValidationResultEvent (mx.events.ValidationResultEvent)
package mx.events {
import flash.events.*;
public class ValidationResultEvent extends Event {
public var results:Array;
public var field:String;
public static const INVALID:String = "invalid";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const VALID:String = "valid";
public function ValidationResultEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){
super(_arg1, _arg2, _arg3);
this.field = _arg4;
this.results = _arg5;
}
public function get message():String{
var _local1 = "";
var _local2:int = results.length;
var _local3:int;
while (_local3 < _local2) {
if (results[_local3].isError){
_local1 = (_local1 + ((_local1 == "")) ? "" : "\n");
_local1 = (_local1 + results[_local3].errorMessage);
};
_local3++;
};
return (_local1);
}
override public function clone():Event{
return (new ValidationResultEvent(type, bubbles, cancelable, field, results));
}
}
}//package mx.events
Section 363
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.2.0.3958";
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
var _local6:int = (leftShadow) ? leftShadow.width : 0;
var _local7:int = (rightShadow) ? rightShadow.width : 0;
var _local8:int = (topShadow) ? topShadow.height : 0;
var _local9:int = (bottomShadow) ? bottomShadow.height : 0;
var _local10:int = (_local6 + _local7);
var _local11:int = (_local8 + _local9);
var _local12:Number = ((_arg5 + _local11) / 2);
var _local13:Number = ((_arg4 + _local10) / 2);
var _local14:Matrix = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
var _local3:Shape = new FlexShape();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2);
var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6);
var _local9:Number = (_local7.left - _local8.left);
var _local10:Number = (_local8.right - _local7.right);
var _local11:Number = (_local7.top - _local8.top);
var _local12:Number = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
var _local13:Point = new Point(0, 0);
var _local14:Rectangle = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 364
//RoundedRectangle (mx.graphics.RoundedRectangle)
package mx.graphics {
import flash.geom.*;
import mx.core.*;
public class RoundedRectangle extends Rectangle {
public var cornerRadius:Number;// = 0
mx_internal static const VERSION:String = "3.2.0.3958";
public function RoundedRectangle(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){
super(_arg1, _arg2, _arg3, _arg4);
this.cornerRadius = _arg5;
}
}
}//package mx.graphics
Section 365
//PriorityQueue (mx.managers.layoutClasses.PriorityQueue)
package mx.managers.layoutClasses {
import flash.display.*;
import mx.core.*;
import mx.managers.*;
public class PriorityQueue {
private var maxPriority:int;// = -1
private var arrayOfArrays:Array;
private var minPriority:int;// = 0
mx_internal static const VERSION:String = "3.2.0.3958";
public function PriorityQueue(){
arrayOfArrays = [];
super();
}
public function addObject(_arg1:Object, _arg2:int):void{
if (!arrayOfArrays[_arg2]){
arrayOfArrays[_arg2] = [];
};
arrayOfArrays[_arg2].push(_arg1);
if (maxPriority < minPriority){
minPriority = (maxPriority = _arg2);
} else {
if (_arg2 < minPriority){
minPriority = _arg2;
};
if (_arg2 > maxPriority){
maxPriority = _arg2;
};
};
}
public function removeSmallest():Object{
var _local1:Object;
if (minPriority <= maxPriority){
while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) {
minPriority++;
if (minPriority > maxPriority){
return (null);
};
};
_local1 = arrayOfArrays[minPriority].shift();
while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) {
minPriority++;
if (minPriority > maxPriority){
break;
};
};
};
return (_local1);
}
public function removeLargestChild(_arg1:ILayoutManagerClient):Object{
var _local5:int;
var _local2:Object;
var _local3:int = maxPriority;
var _local4:int = _arg1.nestLevel;
while (_local4 <= _local3) {
if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){
_local5 = 0;
while (_local5 < arrayOfArrays[_local3].length) {
if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local5])){
_local2 = arrayOfArrays[_local3][_local5];
arrayOfArrays[_local3].splice(_local5, 1);
return (_local2);
};
_local5++;
};
_local3--;
} else {
if (_local3 == maxPriority){
maxPriority--;
};
_local3--;
if (_local3 < _local4){
break;
};
};
};
return (_local2);
}
public function isEmpty():Boolean{
return ((minPriority > maxPriority));
}
public function removeLargest():Object{
var _local1:Object;
if (minPriority <= maxPriority){
while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) {
maxPriority--;
if (maxPriority < minPriority){
return (null);
};
};
_local1 = arrayOfArrays[maxPriority].shift();
while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) {
maxPriority--;
if (maxPriority < minPriority){
break;
};
};
};
return (_local1);
}
public function removeSmallestChild(_arg1:ILayoutManagerClient):Object{
var _local4:int;
var _local2:Object;
var _local3:int = _arg1.nestLevel;
while (_local3 <= maxPriority) {
if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){
_local4 = 0;
while (_local4 < arrayOfArrays[_local3].length) {
if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local4])){
_local2 = arrayOfArrays[_local3][_local4];
arrayOfArrays[_local3].splice(_local4, 1);
return (_local2);
};
_local4++;
};
_local3++;
} else {
if (_local3 == minPriority){
minPriority++;
};
_local3++;
if (_local3 > maxPriority){
break;
};
};
};
return (_local2);
}
public function removeAll():void{
arrayOfArrays.splice(0);
minPriority = 0;
maxPriority = -1;
}
private function contains(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{
var _local3:IChildList;
if ((_arg1 is IRawChildrenContainer)){
_local3 = IRawChildrenContainer(_arg1).rawChildren;
return (_local3.contains(_arg2));
};
if ((_arg1 is DisplayObjectContainer)){
return (DisplayObjectContainer(_arg1).contains(_arg2));
};
return ((_arg1 == _arg2));
}
}
}//package mx.managers.layoutClasses
Section 366
//EventProxy (mx.managers.systemClasses.EventProxy)
package mx.managers.systemClasses {
import mx.managers.*;
import flash.events.*;
import mx.events.*;
import mx.utils.*;
public class EventProxy extends EventDispatcher {
private var systemManager:ISystemManager;
public function EventProxy(_arg1:ISystemManager){
this.systemManager = _arg1;
}
public function marshalListener(_arg1:Event):void{
var _local2:MouseEvent;
var _local3:SandboxMouseEvent;
if ((_arg1 is MouseEvent)){
_local2 = (_arg1 as MouseEvent);
_local3 = new SandboxMouseEvent(EventUtil.mouseEventMap[_arg1.type], false, false, _local2.ctrlKey, _local2.altKey, _local2.shiftKey, _local2.buttonDown);
systemManager.dispatchEventFromSWFBridges(_local3, null, true, true);
};
}
}
}//package mx.managers.systemClasses
Section 367
//PlaceholderData (mx.managers.systemClasses.PlaceholderData)
package mx.managers.systemClasses {
import flash.events.*;
public class PlaceholderData {
public var bridge:IEventDispatcher;
public var data:Object;
public var id:String;
public function PlaceholderData(_arg1:String, _arg2:IEventDispatcher, _arg3:Object){
this.id = _arg1;
this.bridge = _arg2;
this.data = _arg3;
}
}
}//package mx.managers.systemClasses
Section 368
//RemotePopUp (mx.managers.systemClasses.RemotePopUp)
package mx.managers.systemClasses {
public class RemotePopUp {
public var window:Object;
public var bridge:Object;
public function RemotePopUp(_arg1:Object, _arg2:Object){
this.window = _arg1;
this.bridge = _arg2;
}
}
}//package mx.managers.systemClasses
Section 369
//StageEventProxy (mx.managers.systemClasses.StageEventProxy)
package mx.managers.systemClasses {
import flash.display.*;
import flash.events.*;
public class StageEventProxy {
private var listener:Function;
public function StageEventProxy(_arg1:Function){
this.listener = _arg1;
}
public function stageListener(_arg1:Event):void{
if ((_arg1.target is Stage)){
listener(_arg1);
};
}
}
}//package mx.managers.systemClasses
Section 370
//CursorManager (mx.managers.CursorManager)
package mx.managers {
import mx.core.*;
public class CursorManager {
mx_internal static const VERSION:String = "3.2.0.3958";
public static const NO_CURSOR:int = 0;
private static var _impl:ICursorManager;
private static var implClassDependency:CursorManagerImpl;
public static function set currentCursorYOffset(_arg1:Number):void{
impl.currentCursorYOffset = _arg1;
}
mx_internal static function registerToUseBusyCursor(_arg1:Object):void{
impl.registerToUseBusyCursor(_arg1);
}
public static function get currentCursorID():int{
return (impl.currentCursorID);
}
public static function getInstance():ICursorManager{
return (impl);
}
public static function removeBusyCursor():void{
impl.removeBusyCursor();
}
public static function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{
return (impl.setCursor(_arg1, _arg2, _arg3, _arg4));
}
public static function set currentCursorID(_arg1:int):void{
impl.currentCursorID = _arg1;
}
mx_internal static function unRegisterToUseBusyCursor(_arg1:Object):void{
impl.unRegisterToUseBusyCursor(_arg1);
}
private static function get impl():ICursorManager{
if (!_impl){
_impl = ICursorManager(Singleton.getInstance("mx.managers::ICursorManager"));
};
return (_impl);
}
public static function removeAllCursors():void{
impl.removeAllCursors();
}
public static function setBusyCursor():void{
impl.setBusyCursor();
}
public static function showCursor():void{
impl.showCursor();
}
public static function hideCursor():void{
impl.hideCursor();
}
public static function removeCursor(_arg1:int):void{
impl.removeCursor(_arg1);
}
public static function get currentCursorXOffset():Number{
return (impl.currentCursorXOffset);
}
public static function get currentCursorYOffset():Number{
return (impl.currentCursorYOffset);
}
public static function set currentCursorXOffset(_arg1:Number):void{
impl.currentCursorXOffset = _arg1;
}
}
}//package mx.managers
Section 371
//CursorManagerImpl (mx.managers.CursorManagerImpl)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.styles.*;
import flash.ui.*;
public class CursorManagerImpl implements ICursorManager {
private var showSystemCursor:Boolean;// = false
private var nextCursorID:int;// = 1
private var systemManager:ISystemManager;// = null
private var cursorList:Array;
private var _currentCursorYOffset:Number;// = 0
private var cursorHolder:Sprite;
private var currentCursor:DisplayObject;
private var sandboxRoot:IEventDispatcher;// = null
private var showCustomCursor:Boolean;// = false
private var listenForContextMenu:Boolean;// = false
private var _currentCursorID:int;// = 0
private var initialized:Boolean;// = false
private var overTextField:Boolean;// = false
private var _currentCursorXOffset:Number;// = 0
private var busyCursorList:Array;
private var overLink:Boolean;// = false
private var sourceArray:Array;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var instance:ICursorManager;
public function CursorManagerImpl(_arg1:ISystemManager=null){
cursorList = [];
busyCursorList = [];
sourceArray = [];
super();
if (((instance) && (!(_arg1)))){
throw (new Error("Instance already exists."));
};
if (_arg1){
this.systemManager = (_arg1 as ISystemManager);
} else {
this.systemManager = (SystemManagerGlobals.topLevelSystemManagers[0] as ISystemManager);
};
sandboxRoot = this.systemManager.getSandboxRoot();
sandboxRoot.addEventListener(InterManagerRequest.CURSOR_MANAGER_REQUEST, marshalCursorManagerHandler, false, 0, true);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "update";
sandboxRoot.dispatchEvent(_local2);
}
public function set currentCursorYOffset(_arg1:Number):void{
var _local2:InterManagerRequest;
_currentCursorYOffset = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorYOffset";
_local2.value = currentCursorYOffset;
sandboxRoot.dispatchEvent(_local2);
};
}
public function get currentCursorXOffset():Number{
return (_currentCursorXOffset);
}
public function removeCursor(_arg1:int):void{
var _local2:Object;
var _local3:InterManagerRequest;
var _local4:CursorQueueItem;
if (((initialized) && (!(cursorHolder)))){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "removeCursor";
_local3.value = _arg1;
sandboxRoot.dispatchEvent(_local3);
return;
};
for (_local2 in cursorList) {
_local4 = cursorList[_local2];
if (_local4.cursorID == _arg1){
cursorList.splice(_local2, 1);
showCurrentCursor();
break;
};
};
}
public function get currentCursorID():int{
return (_currentCursorID);
}
private function marshalMouseMoveHandler(_arg1:Event):void{
var _local2:SWFBridgeRequest;
var _local3:IEventDispatcher;
if (cursorHolder.visible){
cursorHolder.visible = false;
_local2 = new SWFBridgeRequest(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST);
if (systemManager.useSWFBridge()){
_local3 = systemManager.swfBridgeGroup.parentBridge;
} else {
_local3 = systemManager;
};
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
if (_local2.data){
Mouse.show();
};
};
}
public function set currentCursorID(_arg1:int):void{
var _local2:InterManagerRequest;
_currentCursorID = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorID";
_local2.value = currentCursorID;
sandboxRoot.dispatchEvent(_local2);
};
}
public function removeAllCursors():void{
var _local1:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "removeAllCursors";
sandboxRoot.dispatchEvent(_local1);
return;
};
cursorList.splice(0);
showCurrentCursor();
}
private function priorityCompare(_arg1:CursorQueueItem, _arg2:CursorQueueItem):int{
if (_arg1.priority < _arg2.priority){
return (-1);
};
if (_arg1.priority == _arg2.priority){
return (0);
};
return (1);
}
public function setBusyCursor():void{
var _local3:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "setBusyCursor";
sandboxRoot.dispatchEvent(_local3);
return;
};
var _local1:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager");
var _local2:Class = _local1.getStyle("busyCursor");
busyCursorList.push(setCursor(_local2, CursorManagerPriority.LOW));
}
public function showCursor():void{
var _local1:InterManagerRequest;
if (cursorHolder){
cursorHolder.visible = true;
} else {
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "showCursor";
sandboxRoot.dispatchEvent(_local1);
};
}
private function findSource(_arg1:Object):int{
var _local2:int = sourceArray.length;
var _local3:int;
while (_local3 < _local2) {
if (sourceArray[_local3] === _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
private function showCurrentCursor():void{
var _local1:InteractiveObject;
var _local2:InteractiveObject;
var _local3:CursorQueueItem;
var _local4:InterManagerRequest;
var _local5:Point;
if (cursorList.length > 0){
if (!initialized){
cursorHolder = new FlexSprite();
cursorHolder.name = "cursorHolder";
cursorHolder.mouseEnabled = false;
cursorHolder.mouseChildren = false;
systemManager.addChildToSandboxRoot("cursorChildren", cursorHolder);
initialized = true;
_local4 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local4.name = "initialized";
sandboxRoot.dispatchEvent(_local4);
};
_local3 = cursorList[0];
if (currentCursorID == CursorManager.NO_CURSOR){
Mouse.hide();
};
if (_local3.cursorID != currentCursorID){
if (cursorHolder.numChildren > 0){
cursorHolder.removeChildAt(0);
};
currentCursor = new _local3.cursorClass();
if (currentCursor){
if ((currentCursor is InteractiveObject)){
InteractiveObject(currentCursor).mouseEnabled = false;
};
if ((currentCursor is DisplayObjectContainer)){
DisplayObjectContainer(currentCursor).mouseChildren = false;
};
cursorHolder.addChild(currentCursor);
if (!listenForContextMenu){
_local1 = (systemManager.document as InteractiveObject);
if (((_local1) && (_local1.contextMenu))){
_local1.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler);
listenForContextMenu = true;
};
_local2 = (systemManager as InteractiveObject);
if (((_local2) && (_local2.contextMenu))){
_local2.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler);
listenForContextMenu = true;
};
};
if ((systemManager is SystemManager)){
_local5 = new Point((SystemManager(systemManager).mouseX + _local3.x), (SystemManager(systemManager).mouseY + _local3.y));
_local5 = SystemManager(systemManager).localToGlobal(_local5);
_local5 = cursorHolder.parent.globalToLocal(_local5);
cursorHolder.x = _local5.x;
cursorHolder.y = _local5.y;
} else {
if ((systemManager is DisplayObject)){
_local5 = new Point((DisplayObject(systemManager).mouseX + _local3.x), (DisplayObject(systemManager).mouseY + _local3.y));
_local5 = DisplayObject(systemManager).localToGlobal(_local5);
_local5 = cursorHolder.parent.globalToLocal(_local5);
cursorHolder.x = (DisplayObject(systemManager).mouseX + _local3.x);
cursorHolder.y = (DisplayObject(systemManager).mouseY + _local3.y);
} else {
cursorHolder.x = _local3.x;
cursorHolder.y = _local3.y;
};
};
if (systemManager.useSWFBridge()){
sandboxRoot.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT);
} else {
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT);
};
sandboxRoot.addEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, marshalMouseMoveHandler, false, EventPriority.CURSOR_MANAGEMENT);
};
currentCursorID = _local3.cursorID;
currentCursorXOffset = _local3.x;
currentCursorYOffset = _local3.y;
};
} else {
if (currentCursorID != CursorManager.NO_CURSOR){
currentCursorID = CursorManager.NO_CURSOR;
currentCursorXOffset = 0;
currentCursorYOffset = 0;
if (systemManager.useSWFBridge()){
sandboxRoot.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
} else {
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
};
sandboxRoot.removeEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, marshalMouseMoveHandler, false);
cursorHolder.removeChild(currentCursor);
if (listenForContextMenu){
_local1 = (systemManager.document as InteractiveObject);
if (((_local1) && (_local1.contextMenu))){
_local1.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler);
};
_local2 = (systemManager as InteractiveObject);
if (((_local2) && (_local2.contextMenu))){
_local2.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler);
};
listenForContextMenu = false;
};
};
Mouse.show();
};
}
public function get currentCursorYOffset():Number{
return (_currentCursorYOffset);
}
private function contextMenu_menuSelectHandler(_arg1:ContextMenuEvent):void{
showCustomCursor = true;
sandboxRoot.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
}
public function hideCursor():void{
var _local1:InterManagerRequest;
if (cursorHolder){
cursorHolder.visible = false;
} else {
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "hideCursor";
sandboxRoot.dispatchEvent(_local1);
};
}
private function marshalCursorManagerHandler(_arg1:Event):void{
var _local3:InterManagerRequest;
if ((_arg1 is InterManagerRequest)){
return;
};
var _local2:Object = _arg1;
switch (_local2.name){
case "initialized":
initialized = _local2.value;
break;
case "currentCursorID":
_currentCursorID = _local2.value;
break;
case "currentCursorXOffset":
_currentCursorXOffset = _local2.value;
break;
case "currentCursorYOffset":
_currentCursorYOffset = _local2.value;
break;
case "showCursor":
if (cursorHolder){
cursorHolder.visible = true;
};
break;
case "hideCursor":
if (cursorHolder){
cursorHolder.visible = false;
};
break;
case "setCursor":
if (cursorHolder){
_local2.value = setCursor.apply(this, _local2.value);
};
break;
case "removeCursor":
if (cursorHolder){
removeCursor.apply(this, [_local2.value]);
};
break;
case "removeAllCursors":
if (cursorHolder){
removeAllCursors();
};
break;
case "setBusyCursor":
if (cursorHolder){
setBusyCursor();
};
break;
case "removeBusyCursor":
if (cursorHolder){
removeBusyCursor();
};
break;
case "registerToUseBusyCursor":
if (cursorHolder){
registerToUseBusyCursor.apply(this, _local2.value);
};
break;
case "unRegisterToUseBusyCursor":
if (cursorHolder){
unRegisterToUseBusyCursor.apply(this, _local2.value);
};
break;
case "update":
if (cursorHolder){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "initialized";
_local3.value = true;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorID";
_local3.value = currentCursorID;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorXOffset";
_local3.value = currentCursorXOffset;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorYOffset";
_local3.value = currentCursorYOffset;
sandboxRoot.dispatchEvent(_local3);
};
};
}
public function registerToUseBusyCursor(_arg1:Object):void{
var _local2:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "registerToUseBusyCursor";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
return;
};
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
private function completeHandler(_arg1:Event):void{
var _local2:int = findSource(_arg1.target);
if (_local2 != -1){
sourceArray.splice(_local2, 1);
removeBusyCursor();
};
}
public function removeBusyCursor():void{
var _local1:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "removeBusyCursor";
sandboxRoot.dispatchEvent(_local1);
return;
};
if (busyCursorList.length > 0){
removeCursor(int(busyCursorList.pop()));
};
}
public function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{
var _local7:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local7 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local7.name = "setCursor";
_local7.value = [_arg1, _arg2, _arg3, _arg4];
sandboxRoot.dispatchEvent(_local7);
return ((_local7.value as int));
};
var _local5:int = nextCursorID++;
var _local6:CursorQueueItem = new CursorQueueItem();
_local6.cursorID = _local5;
_local6.cursorClass = _arg1;
_local6.priority = _arg2;
_local6.x = _arg3;
_local6.y = _arg4;
if (systemManager){
_local6.systemManager = systemManager;
} else {
_local6.systemManager = ApplicationGlobals.application.systemManager;
};
cursorList.push(_local6);
cursorList.sort(priorityCompare);
showCurrentCursor();
return (_local5);
}
private function progressHandler(_arg1:ProgressEvent):void{
var _local2:int = findSource(_arg1.target);
if (_local2 == -1){
sourceArray.push(_arg1.target);
setBusyCursor();
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
var _local4:SWFBridgeRequest;
var _local5:IEventDispatcher;
var _local2:Point = new Point(_arg1.stageX, _arg1.stageY);
_local2 = cursorHolder.parent.globalToLocal(_local2);
_local2.x = (_local2.x + currentCursorXOffset);
_local2.y = (_local2.y + currentCursorYOffset);
cursorHolder.x = _local2.x;
cursorHolder.y = _local2.y;
var _local3:Object = _arg1.target;
if (((((!(overTextField)) && ((_local3 is TextField)))) && ((_local3.type == TextFieldType.INPUT)))){
overTextField = true;
showSystemCursor = true;
} else {
if (((overTextField) && (!((((_local3 is TextField)) && ((_local3.type == TextFieldType.INPUT))))))){
overTextField = false;
showCustomCursor = true;
} else {
showCustomCursor = true;
};
};
if (showSystemCursor){
showSystemCursor = false;
cursorHolder.visible = false;
Mouse.show();
};
if (showCustomCursor){
showCustomCursor = false;
cursorHolder.visible = true;
Mouse.hide();
_local4 = new SWFBridgeRequest(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST);
if (systemManager.useSWFBridge()){
_local5 = systemManager.swfBridgeGroup.parentBridge;
} else {
_local5 = systemManager;
};
_local4.requestor = _local5;
_local5.dispatchEvent(_local4);
};
}
public function unRegisterToUseBusyCursor(_arg1:Object):void{
var _local2:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "unRegisterToUseBusyCursor";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
return;
};
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.removeEventListener(Event.COMPLETE, completeHandler);
_arg1.removeEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
private function mouseOverHandler(_arg1:MouseEvent):void{
sandboxRoot.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
mouseMoveHandler(_arg1);
}
public function set currentCursorXOffset(_arg1:Number):void{
var _local2:InterManagerRequest;
_currentCursorXOffset = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorXOffset";
_local2.value = currentCursorXOffset;
sandboxRoot.dispatchEvent(_local2);
};
}
public static function getInstance():ICursorManager{
if (!instance){
instance = new (CursorManagerImpl);
};
return (instance);
}
}
}//package mx.managers
class CursorQueueItem {
public var priority:int;// = 2
public var cursorClass:Class;// = null
public var cursorID:int;// = 0
public var x:Number;
public var y:Number;
public var systemManager:ISystemManager;
mx_internal static const VERSION:String = "3.2.0.3958";
private function CursorQueueItem(){
}
}
Section 372
//CursorManagerPriority (mx.managers.CursorManagerPriority)
package mx.managers {
public final class CursorManagerPriority {
public static const HIGH:int = 1;
public static const MEDIUM:int = 2;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const LOW:int = 3;
}
}//package mx.managers
Section 373
//FocusManager (mx.managers.FocusManager)
package mx.managers {
import flash.display.*;
import flash.text.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import flash.ui.*;
import flash.system.*;
public class FocusManager implements IFocusManager {
private var lastActiveFocusManager:FocusManager;
private var _showFocusIndicator:Boolean;// = false
private var focusableCandidates:Array;
private var LARGE_TAB_INDEX:int;// = 99999
private var browserFocusComponent:InteractiveObject;
private var calculateCandidates:Boolean;// = true
private var _lastFocus:IFocusManagerComponent;
private var lastAction:String;
private var focusSetLocally:Boolean;
private var focusableObjects:Array;
private var swfBridgeGroup:SWFBridgeGroup;
private var defButton:IButton;
private var _form:IFocusManagerContainer;
private var popup:Boolean;
private var focusChanged:Boolean;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:IButton;
private var fauxFocus:DisplayObject;
private var _focusPane:Sprite;
private var skipBridge:IEventDispatcher;
public var browserMode:Boolean;
mx_internal static const VERSION:String = "3.2.0.3958";
private static const FROM_INDEX_UNSPECIFIED:int = -2;
public function FocusManager(_arg1:IFocusManagerContainer, _arg2:Boolean=false){
var sm:ISystemManager;
var bridge:IEventDispatcher;
var container = _arg1;
var popup = _arg2;
super();
this.popup = popup;
browserMode = (((Capabilities.playerType == "ActiveX")) && (!(popup)));
container.focusManager = this;
_form = container;
focusableObjects = [];
focusPane = new FlexSprite();
focusPane.name = "focusPane";
addFocusables(DisplayObject(container));
container.addEventListener(Event.ADDED, addedHandler);
container.addEventListener(Event.REMOVED, removedHandler);
container.addEventListener(FlexEvent.SHOW, showHandler);
container.addEventListener(FlexEvent.HIDE, hideHandler);
if ((container.systemManager is SystemManager)){
if (container != SystemManager(container.systemManager).application){
container.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
};
try {
container.systemManager.addFocusManager(container);
sm = form.systemManager;
swfBridgeGroup = new SWFBridgeGroup(sm);
if (!popup){
swfBridgeGroup.parentBridge = sm.swfBridgeGroup.parentBridge;
};
if (sm.useSWFBridge()){
sm.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, removeFromParentBridge);
bridge = swfBridgeGroup.parentBridge;
if (bridge){
bridge.addEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
bridge.addEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST, setShowFocusIndicatorRequestHandler);
};
if (((bridge) && (!((form.systemManager is SystemManagerProxy))))){
bridge.addEventListener(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST, focusRequestActivateHandler);
bridge.addEventListener(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST, focusRequestDeactivateHandler);
bridge.addEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE, bridgeEventActivateHandler);
};
container.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
};
} catch(e:Error) {
};
}
private function dispatchSetShowFocusIndicatorRequest(_arg1:Boolean, _arg2:IEventDispatcher):void{
var _local3:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST, false, false, null, _arg1);
dispatchEventFromSWFBridges(_local3, _arg2);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
if (((DisplayObject(form).visible) && (!(activated)))){
form.systemManager.activate(form);
};
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var addToFocusables:Boolean;
var focusable:IFocusManagerComponent;
var doc:DisplayObjectContainer;
var rawChildren:IChildList;
var i:int;
var o = _arg1;
var skipTopLevel = _arg2;
if ((((o is IFocusManagerComponent)) && (!(skipTopLevel)))){
addToFocusables = false;
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
addToFocusables = true;
};
};
};
if (addToFocusables){
if (focusableObjects.indexOf(o) == -1){
focusableObjects.push(o);
calculateCandidates = true;
};
o.addEventListener("tabEnabledChange", tabEnabledChangeHandler);
o.addEventListener("tabIndexChange", tabIndexChangeHandler);
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener("tabChildrenChange", tabChildrenChangeHandler);
if (doc.tabChildren){
if ((o is IRawChildrenContainer)){
rawChildren = IRawChildrenContainer(o).rawChildren;
i = 0;
while (i < rawChildren.numChildren) {
try {
addFocusables(rawChildren.getChildAt(i));
} catch(error:SecurityError) {
};
i = (i + 1);
};
} else {
i = 0;
while (i < doc.numChildren) {
try {
addFocusables(doc.getChildAt(i));
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
calculateCandidates = true;
var _local2:InteractiveObject = InteractiveObject(_arg1.target);
var _local3:int = focusableObjects.length;
var _local4:int;
while (_local4 < _local3) {
if (focusableObjects[_local4] == _local2){
break;
};
_local4++;
};
if (_local2.tabEnabled){
if ((((_local4 == _local3)) && (isTabVisible(_local2)))){
if (focusableObjects.indexOf(_local2) == -1){
focusableObjects.push(_local2);
};
};
} else {
if (_local4 < _local3){
focusableObjects.splice(_local4, 1);
};
};
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
var _local2:TextField;
if ((((((_arg1.relatedObject == null)) && (("isRelatedObjectInaccessible" in _arg1)))) && ((_arg1["isRelatedObjectInaccessible"] == true)))){
return;
};
if ((_arg1.relatedObject is TextField)){
_local2 = (_arg1.relatedObject as TextField);
if ((((_local2.type == "input")) || (_local2.selectable))){
return;
};
};
_arg1.preventDefault();
}
public function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void{
if (!_arg2){
return;
};
var _local3:ISystemManager = _form.systemManager;
if (focusableObjects.indexOf(_arg2) == -1){
focusableObjects.push(_arg2);
calculateCandidates = true;
};
swfBridgeGroup.addChildBridge(_arg1, ISWFBridgeProvider(_arg2));
_arg1.addEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
_arg1.addEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST, setShowFocusIndicatorRequestHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE, bridgeEventActivateHandler);
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
var parent = _arg1;
var child = _arg2;
try {
return (parent.getChildIndex(child));
} catch(e:Error) {
if ((parent is IRawChildrenContainer)){
return (IRawChildrenContainer(parent).rawChildren.getChildIndex(child));
};
throw (e);
};
throw (new Error("FocusManager.getChildIndex failed"));
}
private function bridgeEventActivateHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeEvent)){
return;
};
lastActiveFocusManager = null;
_lastFocus = null;
dispatchActivatedFocusManagerEvent(IEventDispatcher(_arg1.target));
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject = InteractiveObject(_arg1.target);
}
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);
}
private function removeFocusables(_arg1:DisplayObject, _arg2:Boolean):void{
var _local3:int;
if ((_arg1 is DisplayObjectContainer)){
if (!_arg2){
_arg1.removeEventListener("tabChildrenChange", tabChildrenChangeHandler);
};
_local3 = 0;
while (_local3 < focusableObjects.length) {
if (isParent(DisplayObjectContainer(_arg1), focusableObjects[_local3])){
if (focusableObjects[_local3] == _lastFocus){
_lastFocus.drawFocus(false);
_lastFocus = null;
};
focusableObjects[_local3].removeEventListener("tabEnabledChange", tabEnabledChangeHandler);
focusableObjects[_local3].removeEventListener("tabIndexChange", tabIndexChangeHandler);
focusableObjects.splice(_local3, 1);
_local3--;
calculateCandidates = true;
};
_local3++;
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function tabChildrenChangeHandler(_arg1:Event):void{
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2, true);
};
}
private function sortByDepth(_arg1:DisplayObject, _arg2:DisplayObject):Number{
var _local5:int;
var _local6:String;
var _local7:String;
var _local3 = "";
var _local4 = "";
var _local8 = "0000";
var _local9:DisplayObject = DisplayObject(_arg1);
var _local10:DisplayObject = 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);
}
mx_internal function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent("click"));
}
public function getFocus():IFocusManagerComponent{
var _local1:InteractiveObject = form.systemManager.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function deactivateHandler(_arg1:Event):void{
}
private function setFocusToBottom():void{
setFocusToNextIndex(focusableObjects.length, true);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local3:InteractiveObject;
focusableCandidates = [];
var _local1:int = focusableObjects.length;
var _local2:int;
while (_local2 < _local1) {
_local3 = focusableObjects[_local2];
if (((((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))) && ((_local3.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local3);
_local2++;
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
var _local2:ISystemManager = form.systemManager;
if (_local2.isDisplayObjectInABridgedApplication(DisplayObject(_arg1.target))){
return;
};
showFocusIndicator = true;
focusChanged = false;
if ((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))){
if (browserFocusComponent){
if (browserFocusComponent.tabIndex == LARGE_TAB_INDEX){
browserFocusComponent.tabIndex = -1;
};
browserFocusComponent = null;
if (SystemManager(form.systemManager).useSWFBridge()){
moveFocusToParent(_arg1.shiftKey);
if (focusChanged){
_arg1.preventDefault();
};
};
return;
};
setFocusToNextObject(_arg1);
if (focusChanged){
_arg1.preventDefault();
};
};
}
private function getNextFocusManagerComponent2(_arg1:Boolean=false, _arg2:DisplayObject=null, _arg3:int=-2):FocusInfo{
var _local10:DisplayObject;
var _local11:String;
var _local12:IFocusManagerGroup;
if (focusableObjects.length == 0){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
var _local4:int = _arg3;
if (_arg3 == FROM_INDEX_UNSPECIFIED){
_local10 = _arg2;
if (!_local10){
_local10 = form.systemManager.stage.focus;
};
_local10 = DisplayObject(findFocusManagerComponent2(InteractiveObject(_local10)));
_local11 = "";
if ((_local10 is IFocusManagerGroup)){
_local12 = IFocusManagerGroup(_local10);
_local11 = _local12.groupName;
};
_local4 = getIndexOfFocusedObject(_local10);
};
var _local5:Boolean;
var _local6:int = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
var _local7:int = getIndexOfNextObject(_local4, _arg1, _local5, _local11);
var _local8:Boolean;
if (_arg1){
if (_local7 >= _local4){
_local8 = true;
};
} else {
if (_local7 <= _local4){
_local8 = true;
};
};
var _local9:FocusInfo = new FocusInfo();
_local9.displayObject = findFocusManagerComponent2(focusableCandidates[_local7]);
_local9.wrapped = _local8;
return (_local9);
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local4:IUIComponent;
if (!_arg1){
return (-1);
};
var _local2:int = focusableCandidates.length;
var _local3:int;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
_local3 = 0;
while (_local3 < _local2) {
_local4 = (focusableCandidates[_local3] as IUIComponent);
if (((_local4) && (_local4.owns(_arg1)))){
return (_local3);
};
_local3++;
};
return (-1);
}
private function focusRequestActivateHandler(_arg1:Event):void{
skipBridge = IEventDispatcher(_arg1.target);
activate();
skipBridge = null;
}
private function removeFromParentBridge(_arg1:Event):void{
var _local3:IEventDispatcher;
var _local2:ISystemManager = form.systemManager;
if (_local2.useSWFBridge()){
_local2.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, removeFromParentBridge);
_local3 = swfBridgeGroup.parentBridge;
if (_local3){
_local3.removeEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
_local3.removeEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST, setShowFocusIndicatorRequestHandler);
};
if (((_local3) && (!((form.systemManager is SystemManagerProxy))))){
_local3.removeEventListener(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST, focusRequestActivateHandler);
_local3.removeEventListener(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST, focusRequestDeactivateHandler);
_local3.removeEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE, bridgeEventActivateHandler);
};
};
}
private function getParentBridge():IEventDispatcher{
if (swfBridgeGroup){
return (swfBridgeGroup.parentBridge);
};
return (null);
}
private function setFocusToComponent(_arg1:Object, _arg2:Boolean):void{
var _local3:SWFBridgeRequest;
var _local4:IEventDispatcher;
focusChanged = false;
if (_arg1){
if ((((_arg1 is ISWFLoader)) && (ISWFLoader(_arg1).swfBridge))){
_local3 = new SWFBridgeRequest(SWFBridgeRequest.MOVE_FOCUS_REQUEST, false, true, null, (_arg2) ? FocusRequestDirection.BOTTOM : FocusRequestDirection.TOP);
_local4 = ISWFLoader(_arg1).swfBridge;
if (_local4){
_local4.dispatchEvent(_local3);
focusChanged = _local3.data;
};
} else {
if ((_arg1 is IFocusManagerComplexComponent)){
IFocusManagerComplexComponent(_arg1).assignFocus((_arg2) ? "bottom" : "top");
focusChanged = true;
} else {
if ((_arg1 is IFocusManagerComponent)){
setFocus(IFocusManagerComponent(_arg1));
focusChanged = true;
};
};
};
};
}
private function focusRequestMoveHandler(_arg1:Event):void{
var _local3:DisplayObject;
if ((_arg1 is SWFBridgeRequest)){
return;
};
focusSetLocally = false;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if ((((_local2.data == FocusRequestDirection.TOP)) || ((_local2.data == FocusRequestDirection.BOTTOM)))){
if (focusableObjects.length == 0){
moveFocusToParent(((_local2.data == FocusRequestDirection.TOP)) ? false : true);
_arg1["data"] = focusChanged;
return;
};
if (_local2.data == FocusRequestDirection.TOP){
setFocusToTop();
} else {
setFocusToBottom();
};
_arg1["data"] = focusChanged;
} else {
_local3 = DisplayObject(_form.systemManager.swfBridgeGroup.getChildBridgeProvider(IEventDispatcher(_arg1.target)));
moveFocus((_local2.data as String), _local3);
_arg1["data"] = focusChanged;
};
if (focusSetLocally){
dispatchActivatedFocusManagerEvent(null);
lastActiveFocusManager = this;
};
}
public function get nextTabIndex():int{
return ((getMaxTabIndex() + 1));
}
private function dispatchActivatedFocusManagerEvent(_arg1:IEventDispatcher=null):void{
if (lastActiveFocusManager == this){
return;
};
var _local2:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE);
dispatchEventFromSWFBridges(_local2, _arg1);
}
private function focusRequestDeactivateHandler(_arg1:Event):void{
skipBridge = IEventDispatcher(_arg1.target);
deactivate();
skipBridge = null;
}
public function get focusPane():Sprite{
return (_focusPane);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
var _local3:DisplayObject;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:IFocusManagerGroup;
var _local2:ISystemManager = form.systemManager;
if (_local2.isDisplayObjectInABridgedApplication(DisplayObject(_arg1.target))){
return;
};
if ((_local2 is SystemManager)){
SystemManager(_local2).idleCounter = 0;
};
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (browserMode){
if ((((_arg1.keyCode == Keyboard.TAB)) && ((focusableCandidates.length > 0)))){
_local3 = fauxFocus;
if (!_local3){
_local3 = form.systemManager.stage.focus;
};
_local3 = DisplayObject(findFocusManagerComponent2(InteractiveObject(_local3)));
_local4 = "";
if ((_local3 is IFocusManagerGroup)){
_local7 = IFocusManagerGroup(_local3);
_local4 = _local7.groupName;
};
_local5 = getIndexOfFocusedObject(_local3);
_local6 = getIndexOfNextObject(_local5, _arg1.shiftKey, false, _local4);
if (_arg1.shiftKey){
if (_local6 >= _local5){
browserFocusComponent = getBrowserFocusComponent(_arg1.shiftKey);
if (browserFocusComponent.tabIndex == -1){
browserFocusComponent.tabIndex = 0;
};
};
} else {
if (_local6 <= _local5){
browserFocusComponent = getBrowserFocusComponent(_arg1.shiftKey);
if (browserFocusComponent.tabIndex == -1){
browserFocusComponent.tabIndex = LARGE_TAB_INDEX;
};
};
};
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
defButton.callLater(sendDefaultButtonEvent);
};
}
private function mouseDownHandler(_arg1:MouseEvent):void{
if (_arg1.isDefaultPrevented()){
return;
};
var _local2:ISystemManager = form.systemManager;
var _local3:DisplayObject = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local3){
return;
};
showFocusIndicator = false;
if (((((!((_local3 == _lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local3 is TextField))))){
setFocus(IFocusManagerComponent(_local3));
} else {
if (_lastFocus){
if (((((!(_lastFocus)) && ((_local3 is IEventDispatcher)))) && (SystemManager(form.systemManager).useSWFBridge()))){
IEventDispatcher(_local3).dispatchEvent(new FocusEvent(FocusEvent.FOCUS_IN));
};
};
};
lastAction = "MOUSEDOWN";
dispatchActivatedFocusManagerEvent(null);
lastActiveFocusManager = this;
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local4:IButton;
var _local2:InteractiveObject = InteractiveObject(_arg1.target);
var _local3:ISystemManager = form.systemManager;
if (_local3.isDisplayObjectInABridgedApplication(DisplayObject(_arg1.target))){
return;
};
if (isParent(DisplayObjectContainer(form), _local2)){
_lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((_lastFocus is IButton)){
_local4 = (_lastFocus as IButton);
if (defButton){
defButton.emphasized = false;
defButton = _local4;
_local4.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
public function toString():String{
return ((Object(form).toString() + ".focusManager"));
}
public function deactivate():void{
var _local1:ISystemManager = form.systemManager;
if (_local1){
if (_local1.isTopLevelRoot()){
_local1.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
_local1.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
_local1.stage.removeEventListener(Event.ACTIVATE, activateHandler);
_local1.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
} else {
_local1.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
_local1.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
_local1.removeEventListener(Event.ACTIVATE, activateHandler);
_local1.removeEventListener(Event.DEACTIVATE, deactivateHandler);
};
};
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
dispatchEventFromSWFBridges(new SWFBridgeRequest(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST), skipBridge);
}
private function findFocusManagerComponent2(_arg1:InteractiveObject):DisplayObject{
var o = _arg1;
try {
while (o) {
if ((((((o is IFocusManagerComponent)) && (IFocusManagerComponent(o).focusEnabled))) || ((o is ISWFLoader)))){
return (o);
};
o = o.parent;
};
} catch(error:SecurityError) {
};
return (null);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
var _local5:int = focusableCandidates.length;
var _local6:int = _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(findFocusManagerComponent2(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))){
if (((!((InteractiveObject(_local10).tabIndex == InteractiveObject(_local7).tabIndex))) && (!(_local8.selected)))){
return (getIndexOfNextObject(_arg1, _arg2, _arg3, _arg4));
};
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function moveFocus(_arg1:String, _arg2:DisplayObject=null):void{
if (_arg1 == FocusRequestDirection.TOP){
setFocusToTop();
return;
};
if (_arg1 == FocusRequestDirection.BOTTOM){
setFocusToBottom();
return;
};
var _local3:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN);
_local3.keyCode = Keyboard.TAB;
_local3.shiftKey = ((_arg1)==FocusRequestDirection.FORWARD) ? false : true;
fauxFocus = _arg2;
keyDownHandler(_local3);
var _local4:FocusEvent = new FocusEvent(FocusEvent.KEY_FOCUS_CHANGE);
_local4.keyCode = Keyboard.TAB;
_local4.shiftKey = ((_arg1)==FocusRequestDirection.FORWARD) ? false : true;
keyFocusChangeHandler(_local4);
fauxFocus = null;
}
private function getMaxTabIndex():int{
var _local4:Number;
var _local1:Number = 0;
var _local2:int = focusableObjects.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = focusableObjects[_local3].tabIndex;
if (!isNaN(_local4)){
_local1 = Math.max(_local1, _local4);
};
_local3++;
};
return (_local1);
}
private function isParent(_arg1:DisplayObjectContainer, _arg2:DisplayObject):Boolean{
if ((_arg1 is IRawChildrenContainer)){
return (IRawChildrenContainer(_arg1).rawChildren.contains(_arg2));
};
return (_arg1.contains(_arg2));
}
private function showHandler(_arg1:Event):void{
form.systemManager.activate(form);
}
mx_internal function set form(_arg1:IFocusManagerContainer):void{
_form = _arg1;
}
public function setFocus(_arg1:IFocusManagerComponent):void{
_arg1.setFocus();
focusSetLocally = true;
}
public function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent{
return ((findFocusManagerComponent2(_arg1) as IFocusManagerComponent));
}
public function removeSWFBridge(_arg1:IEventDispatcher):void{
var _local4:int;
var _local2:ISystemManager = _form.systemManager;
var _local3:DisplayObject = DisplayObject(swfBridgeGroup.getChildBridgeProvider(_arg1));
if (_local3){
_local4 = focusableObjects.indexOf(_local3);
if (_local4 != -1){
focusableObjects.splice(_local4, 1);
calculateCandidates = true;
};
} else {
throw (new Error());
};
_arg1.removeEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
_arg1.removeEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST, setShowFocusIndicatorRequestHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE, bridgeEventActivateHandler);
swfBridgeGroup.removeChildBridge(_arg1);
}
private function sortFocusableObjectsTabIndex():void{
var _local3:IFocusManagerComponent;
focusableCandidates = [];
var _local1:int = focusableObjects.length;
var _local2:int;
while (_local2 < _local1) {
_local3 = (focusableObjects[_local2] as IFocusManagerComponent);
if (((((((_local3) && (_local3.tabIndex))) && (!(isNaN(Number(_local3.tabIndex)))))) || ((focusableObjects[_local2] is ISWFLoader)))){
focusableCandidates.push(focusableObjects[_local2]);
};
_local2++;
};
focusableCandidates.sort(sortByTabIndex);
}
public function set defaultButton(_arg1:IButton):void{
var _local2:IButton = (_arg1) ? IButton(_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 setFocusToNextObject(_arg1:FocusEvent):void{
focusChanged = false;
if (focusableObjects.length == 0){
return;
};
var _local2:FocusInfo = getNextFocusManagerComponent2(_arg1.shiftKey, fauxFocus);
if (((!(popup)) && (_local2.wrapped))){
if (getParentBridge()){
moveFocusToParent(_arg1.shiftKey);
return;
};
};
setFocusToComponent(_local2.displayObject, _arg1.shiftKey);
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).enabled : true))){
return (_arg1);
};
if ((_arg1.parent is ISWFLoader)){
if (ISWFLoader(_arg1.parent).swfBridge){
return (null);
};
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function addedToStageHandler(_arg1:Event):void{
_form.removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
if (focusableObjects.length == 0){
addFocusables(DisplayObject(_form));
calculateCandidates = true;
};
}
private function hideHandler(_arg1:Event):void{
form.systemManager.deactivate(form);
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is IUIComponent)){
if (!IUIComponent(_arg1).enabled){
return (false);
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function hideFocus():void{
if (showFocusIndicator){
showFocusIndicator = false;
if (_lastFocus){
_lastFocus.drawFocus(false);
};
};
}
private function getBrowserFocusComponent(_arg1:Boolean):InteractiveObject{
var _local3:int;
var _local2:InteractiveObject = form.systemManager.stage.focus;
if (!_local2){
_local3 = (_arg1) ? 0 : (focusableCandidates.length - 1);
_local2 = focusableCandidates[_local3];
};
return (_local2);
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function moveFocusToParent(_arg1:Boolean):Boolean{
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.MOVE_FOCUS_REQUEST, false, true, null, (_arg1) ? FocusRequestDirection.BACKWARD : FocusRequestDirection.FORWARD);
var _local3:IEventDispatcher = _form.systemManager.swfBridgeGroup.parentBridge;
_local3.dispatchEvent(_local2);
focusChanged = _local2.data;
return (focusChanged);
}
public function set focusPane(_arg1:Sprite):void{
_focusPane = _arg1;
}
mx_internal function get form():IFocusManagerContainer{
return (_form);
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject = DisplayObject(_arg1.target);
if ((_local3 is IFocusManagerComponent)){
_local2 = 0;
while (_local2 < focusableObjects.length) {
if (_local3 == focusableObjects[_local2]){
if (_local3 == _lastFocus){
_lastFocus.drawFocus(false);
_lastFocus = null;
};
_local3.removeEventListener("tabEnabledChange", tabEnabledChangeHandler);
_local3.removeEventListener("tabIndexChange", tabIndexChangeHandler);
focusableObjects.splice(_local2, 1);
calculateCandidates = true;
break;
};
_local2++;
};
};
removeFocusables(_local3, false);
}
private function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null):void{
var _local3:Event;
var _local7:IEventDispatcher;
var _local4:ISystemManager = form.systemManager;
if (!popup){
_local7 = swfBridgeGroup.parentBridge;
if (((_local7) && (!((_local7 == _arg2))))){
_local3 = _arg1.clone();
if ((_local3 is SWFBridgeRequest)){
SWFBridgeRequest(_local3).requestor = _local7;
};
_local7.dispatchEvent(_local3);
};
};
var _local5:Array = swfBridgeGroup.getChildBridges();
var _local6:int;
while (_local6 < _local5.length) {
if (_local5[_local6] != _arg2){
_local3 = _arg1.clone();
if ((_local3 is SWFBridgeRequest)){
SWFBridgeRequest(_local3).requestor = IEventDispatcher(_local5[_local6]);
};
IEventDispatcher(_local5[_local6]).dispatchEvent(_local3);
};
_local6++;
};
}
public function get defaultButton():IButton{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
if (((_lastFocus) && (!(browserMode)))){
_lastFocus.setFocus();
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
if (!showFocusIndicator){
showFocusIndicator = true;
if (_lastFocus){
_lastFocus.drawFocus(true);
};
};
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent{
return ((getNextFocusManagerComponent2(false, fauxFocus) as IFocusManagerComponent));
}
private function setShowFocusIndicatorRequestHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
_showFocusIndicator = _local2.data;
dispatchSetShowFocusIndicatorRequest(_showFocusIndicator, IEventDispatcher(_arg1.target));
}
private function setFocusToTop():void{
setFocusToNextIndex(-1, false);
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObject = DisplayObject(form.systemManager);
if (!_local2){
return (false);
};
var _local3:DisplayObjectContainer = _arg1.parent;
while (((_local3) && (!((_local3 == _local2))))) {
if (!_local3.tabChildren){
return (false);
};
_local3 = _local3.parent;
};
return (true);
}
mx_internal function get lastFocus():IFocusManagerComponent{
return (_lastFocus);
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
public function set showFocusIndicator(_arg1:Boolean):void{
var _local2 = !((_showFocusIndicator == _arg1));
_showFocusIndicator = _arg1;
if (((((_local2) && (!(popup)))) && (form.systemManager.swfBridgeGroup))){
dispatchSetShowFocusIndicatorRequest(_arg1, null);
};
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
var _local3:int = _arg1.tabIndex;
var _local4:int = _arg2.tabIndex;
if (_local3 == -1){
_local3 = int.MAX_VALUE;
};
if (_local4 == -1){
_local4 = int.MAX_VALUE;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : sortByDepth(DisplayObject(_arg1), DisplayObject(_arg2)));
}
public function activate():void{
if (activated){
return;
};
var _local1:ISystemManager = form.systemManager;
if (_local1){
if (_local1.isTopLevelRoot()){
_local1.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
_local1.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
_local1.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
_local1.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
} else {
_local1.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
_local1.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
_local1.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
_local1.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
};
};
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (_lastFocus){
setFocus(_lastFocus);
};
dispatchEventFromSWFBridges(new SWFBridgeRequest(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST), skipBridge);
}
private function setFocusToNextIndex(_arg1:int, _arg2:Boolean):void{
if (focusableObjects.length == 0){
return;
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
var _local3:FocusInfo = getNextFocusManagerComponent2(_arg2, null, _arg1);
if (((!(popup)) && (_local3.wrapped))){
if (getParentBridge()){
moveFocusToParent(_arg2);
return;
};
};
setFocusToComponent(_local3.displayObject, _arg2);
}
}
}//package mx.managers
import flash.display.*;
class FocusInfo {
public var displayObject:DisplayObject;
public var wrapped:Boolean;
private function FocusInfo(){
}
}
Section 374
//ICursorManager (mx.managers.ICursorManager)
package mx.managers {
public interface ICursorManager {
function removeAllCursors():void;
function set currentCursorYOffset(_arg1:Number):void;
function removeBusyCursor():void;
function unRegisterToUseBusyCursor(_arg1:Object):void;
function hideCursor():void;
function get currentCursorID():int;
function registerToUseBusyCursor(_arg1:Object):void;
function setBusyCursor():void;
function showCursor():void;
function set currentCursorID(_arg1:int):void;
function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int;
function removeCursor(_arg1:int):void;
function get currentCursorXOffset():Number;
function get currentCursorYOffset():Number;
function set currentCursorXOffset(_arg1:Number):void;
}
}//package mx.managers
Section 375
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.display.*;
import mx.core.*;
import flash.events.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function moveFocus(_arg1:String, _arg2:DisplayObject=null):void;
function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function removeSWFBridge(_arg1:IEventDispatcher):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 376
//IFocusManagerComplexComponent (mx.managers.IFocusManagerComplexComponent)
package mx.managers {
public interface IFocusManagerComplexComponent extends IFocusManagerComponent {
function assignFocus(_arg1:String):void;
function get hasFocusableContent():Boolean;
}
}//package mx.managers
Section 377
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.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 mx.managers
Section 378
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.display.*;
import flash.events.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(_arg1:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.managers
Section 379
//IFocusManagerGroup (mx.managers.IFocusManagerGroup)
package mx.managers {
public interface IFocusManagerGroup {
function get groupName():String;
function get selected():Boolean;
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
}
}//package mx.managers
Section 380
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function validateNow():void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function isInvalid():Boolean;
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
}
}//package mx.managers
Section 381
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function set processedDescriptors(_arg1:Boolean):void;
}
}//package mx.managers
Section 382
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.text.*;
import flash.events.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function set focusPane(_arg1:Sprite):void;
function get toolTipChildren():IChildList;
function useSWFBridge():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function deployMouseShields(_arg1:Boolean):void;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void;
function getSandboxRoot():DisplayObject;
function get swfBridgeGroup():ISWFBridgeGroup;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function get document():Object;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function getTopLevelRoot():DisplayObject;
function removeChildBridge(_arg1:IEventDispatcher):void;
function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function deactivate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(_arg1:int):void;
function isTopLevel():Boolean;
function isTopLevelRoot():Boolean;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle;
}
}//package mx.managers
Section 383
//IToolTipManager2 (mx.managers.IToolTipManager2)
package mx.managers {
import flash.display.*;
import mx.core.*;
import mx.effects.*;
public interface IToolTipManager2 {
function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function get scrubDelay():Number;
function set hideEffect(_arg1:IAbstractEffect):void;
function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip;
function set scrubDelay(_arg1:Number):void;
function set hideDelay(_arg1:Number):void;
function get currentTarget():DisplayObject;
function set showDelay(_arg1:Number):void;
function get showDelay():Number;
function get showEffect():IAbstractEffect;
function get hideDelay():Number;
function get currentToolTip():IToolTip;
function get hideEffect():IAbstractEffect;
function set currentToolTip(_arg1:IToolTip):void;
function get toolTipClass():Class;
function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void;
function destroyToolTip(_arg1:IToolTip):void;
function set toolTipClass(_arg1:Class):void;
function sizeTip(_arg1:IToolTip):void;
function set currentTarget(_arg1:DisplayObject):void;
function set showEffect(_arg1:IAbstractEffect):void;
}
}//package mx.managers
Section 384
//IToolTipManagerClient (mx.managers.IToolTipManagerClient)
package mx.managers {
import mx.core.*;
public interface IToolTipManagerClient extends IFlexDisplayObject {
function get toolTip():String;
function set toolTip(_arg1:String):void;
}
}//package mx.managers
Section 385
//LayoutManager (mx.managers.LayoutManager)
package mx.managers {
import flash.display.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.managers.layoutClasses.*;
public class LayoutManager extends EventDispatcher implements ILayoutManager {
private var invalidateClientPropertiesFlag:Boolean;// = false
private var invalidateDisplayListQueue:PriorityQueue;
private var updateCompleteQueue:PriorityQueue;
private var invalidateDisplayListFlag:Boolean;// = false
private var invalidateClientSizeFlag:Boolean;// = false
private var invalidateSizeQueue:PriorityQueue;
private var originalFrameRate:Number;
private var invalidatePropertiesFlag:Boolean;// = false
private var invalidatePropertiesQueue:PriorityQueue;
private var invalidateSizeFlag:Boolean;// = false
private var callLaterPending:Boolean;// = false
private var _usePhasedInstantiation:Boolean;// = false
private var callLaterObject:UIComponent;
private var targetLevel:int;// = 2147483647
mx_internal static const VERSION:String = "3.2.0.3958";
private static var instance:LayoutManager;
public function LayoutManager(){
updateCompleteQueue = new PriorityQueue();
invalidatePropertiesQueue = new PriorityQueue();
invalidateSizeQueue = new PriorityQueue();
invalidateDisplayListQueue = new PriorityQueue();
super();
}
public function set usePhasedInstantiation(_arg1:Boolean):void{
var sm:ISystemManager;
var stage:Stage;
var value = _arg1;
if (_usePhasedInstantiation != value){
_usePhasedInstantiation = value;
try {
sm = SystemManagerGlobals.topLevelSystemManagers[0];
stage = SystemManagerGlobals.topLevelSystemManagers[0].stage;
if (stage){
if (value){
originalFrameRate = stage.frameRate;
stage.frameRate = 1000;
} else {
stage.frameRate = originalFrameRate;
};
};
} catch(e:SecurityError) {
};
};
}
private function waitAFrame():void{
callLaterObject.callLater(doPhasedInstantiation);
}
public function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void{
var _local3:ILayoutManagerClient;
var _local4:int;
var _local5:Boolean;
var _local6:int = targetLevel;
if (targetLevel == int.MAX_VALUE){
targetLevel = _arg1.nestLevel;
};
while (!(_local5)) {
_local5 = true;
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
while (_local3) {
_local3.validateProperties();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
};
if (invalidatePropertiesQueue.isEmpty()){
invalidatePropertiesFlag = false;
invalidateClientPropertiesFlag = false;
};
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
while (_local3) {
_local3.validateSize();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
if (invalidateClientPropertiesFlag){
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
if (_local3){
invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
};
if (invalidateSizeQueue.isEmpty()){
invalidateSizeFlag = false;
invalidateClientSizeFlag = false;
};
if (!_arg2){
_local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1));
while (_local3) {
_local3.validateDisplayList();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
if (invalidateClientPropertiesFlag){
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
if (_local3){
invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
if (invalidateClientSizeFlag){
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
if (_local3){
invalidateSizeQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
_local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1));
};
if (invalidateDisplayListQueue.isEmpty()){
invalidateDisplayListFlag = false;
};
};
};
if (_local6 == int.MAX_VALUE){
targetLevel = int.MAX_VALUE;
if (!_arg2){
_local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1));
while (_local3) {
if (!_local3.initialized){
_local3.initialized = true;
};
_local3.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
_local3.updateCompletePendingFlag = false;
_local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1));
};
};
};
}
private function validateProperties():void{
var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest());
while (_local1) {
_local1.validateProperties();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest());
};
if (invalidatePropertiesQueue.isEmpty()){
invalidatePropertiesFlag = false;
};
}
public function invalidateProperties(_arg1:ILayoutManagerClient):void{
if (((!(invalidatePropertiesFlag)) && (ApplicationGlobals.application.systemManager))){
invalidatePropertiesFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientPropertiesFlag = true;
};
invalidatePropertiesQueue.addObject(_arg1, _arg1.nestLevel);
}
public function invalidateDisplayList(_arg1:ILayoutManagerClient):void{
if (((!(invalidateDisplayListFlag)) && (ApplicationGlobals.application.systemManager))){
invalidateDisplayListFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
} else {
if (((!(invalidateDisplayListFlag)) && (!(ApplicationGlobals.application.systemManager)))){
};
};
invalidateDisplayListQueue.addObject(_arg1, _arg1.nestLevel);
}
private function validateDisplayList():void{
var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest());
while (_local1) {
_local1.validateDisplayList();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest());
};
if (invalidateDisplayListQueue.isEmpty()){
invalidateDisplayListFlag = false;
};
}
public function validateNow():void{
var _local1:int;
if (!usePhasedInstantiation){
_local1 = 0;
while (((callLaterPending) && ((_local1 < 100)))) {
doPhasedInstantiation();
};
};
}
private function validateSize():void{
var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidateSizeQueue.removeLargest());
while (_local1) {
_local1.validateSize();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest());
};
if (invalidateSizeQueue.isEmpty()){
invalidateSizeFlag = false;
};
}
private function doPhasedInstantiation():void{
var _local1:ILayoutManagerClient;
if (usePhasedInstantiation){
if (invalidatePropertiesFlag){
validateProperties();
ApplicationGlobals.application.dispatchEvent(new Event("validatePropertiesComplete"));
} else {
if (invalidateSizeFlag){
validateSize();
ApplicationGlobals.application.dispatchEvent(new Event("validateSizeComplete"));
} else {
if (invalidateDisplayListFlag){
validateDisplayList();
ApplicationGlobals.application.dispatchEvent(new Event("validateDisplayListComplete"));
};
};
};
} else {
if (invalidatePropertiesFlag){
validateProperties();
};
if (invalidateSizeFlag){
validateSize();
};
if (invalidateDisplayListFlag){
validateDisplayList();
};
};
if (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))){
callLaterObject.callLater(doPhasedInstantiation);
} else {
usePhasedInstantiation = false;
callLaterPending = false;
_local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest());
while (_local1) {
if (((!(_local1.initialized)) && (_local1.processedDescriptors))){
_local1.initialized = true;
};
_local1.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
_local1.updateCompletePendingFlag = false;
_local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest());
};
dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
};
}
public function isInvalid():Boolean{
return (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag)));
}
public function get usePhasedInstantiation():Boolean{
return (_usePhasedInstantiation);
}
public function invalidateSize(_arg1:ILayoutManagerClient):void{
if (((!(invalidateSizeFlag)) && (ApplicationGlobals.application.systemManager))){
invalidateSizeFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientSizeFlag = true;
};
invalidateSizeQueue.addObject(_arg1, _arg1.nestLevel);
}
public static function getInstance():LayoutManager{
if (!instance){
instance = new (LayoutManager);
};
return (instance);
}
}
}//package mx.managers
Section 386
//PopUpManagerChildList (mx.managers.PopUpManagerChildList)
package mx.managers {
import mx.core.*;
public final class PopUpManagerChildList {
public static const PARENT:String = "parent";
public static const APPLICATION:String = "application";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const POPUP:String = "popup";
}
}//package mx.managers
Section 387
//SystemChildrenList (mx.managers.SystemChildrenList)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
public class SystemChildrenList implements IChildList {
private var lowerBoundReference:QName;
private var upperBoundReference:QName;
private var owner:SystemManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function SystemChildrenList(_arg1:SystemManager, _arg2:QName, _arg3:QName){
this.owner = _arg1;
this.lowerBoundReference = _arg2;
this.upperBoundReference = _arg3;
}
public function getChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = owner.mx_internal::rawChildren_getChildAt((owner[lowerBoundReference] + _arg1));
return (_local2);
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = owner.mx_internal::rawChildren_removeChildAt((_arg1 + owner[lowerBoundReference]));
var _local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
return (_local2);
}
public function getChildIndex(_arg1:DisplayObject):int{
var _local2:int = owner.mx_internal::rawChildren_getChildIndex(_arg1);
_local2 = (_local2 - owner[lowerBoundReference]);
return (_local2);
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
var _local3 = owner;
_local3.mx_internal::rawChildren_addChildAt(_arg1, (owner[lowerBoundReference] + _arg2));
_local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
return (_arg1);
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, (owner[lowerBoundReference] + _arg2));
}
public function get numChildren():int{
return ((owner[upperBoundReference] - owner[lowerBoundReference]));
}
public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
if (((!((_arg1 == owner))) && (owner.mx_internal::rawChildren_contains(_arg1)))){
while (_arg1.parent != owner) {
_arg1 = _arg1.parent;
};
_local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1);
if ((((_local2 >= owner[lowerBoundReference])) && ((_local2 < owner[upperBoundReference])))){
return (true);
};
};
return (false);
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
var _local2:int = owner.mx_internal::rawChildren_getChildIndex(_arg1);
if ((((owner[lowerBoundReference] <= _local2)) && ((_local2 < owner[upperBoundReference])))){
var _local3 = owner;
_local3.mx_internal::rawChildren_removeChild(_arg1);
_local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
};
return (_arg1);
}
public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2 = owner;
_local2.mx_internal::rawChildren_addChildAt(_arg1, owner[upperBoundReference]);
_local2 = owner;
var _local3 = upperBoundReference;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
return (_arg1);
}
}
}//package mx.managers
Section 388
//SystemManager (mx.managers.SystemManager)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.text.*;
import flash.events.*;
import mx.managers.systemClasses.*;
import mx.events.*;
import mx.styles.*;
import mx.resources.*;
import flash.system.*;
import mx.preloaders.*;
import flash.utils.*;
import mx.messaging.config.*;
import mx.utils.*;
public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager, ISWFBridgeProvider {
private var _stage:Stage;
mx_internal var nestLevel:int;// = 0
private var currentSandboxEvent:Event;
private var forms:Array;
private var mouseCatcher:Sprite;
private var _height:Number;
private var dispatchingToSystemManagers:Boolean;// = false
private var preloader:Preloader;
private var lastFrame:int;
private var _document:Object;
private var strongReferenceProxies:Dictionary;
private var _rawChildren:SystemRawChildrenList;
private var _topLevelSystemManager:ISystemManager;
private var _toolTipIndex:int;// = 0
private var _explicitHeight:Number;
private var idToPlaceholder:Object;
private var _swfBridgeGroup:ISWFBridgeGroup;
private var _toolTipChildren:SystemChildrenList;
private var form:Object;
private var _width:Number;
private var initialized:Boolean;// = false
private var _focusPane:Sprite;
private var _fontList:Object;// = null
private var isStageRoot:Boolean;// = true
private var _popUpChildren:SystemChildrenList;
private var rslSizes:Array;// = null
private var _topMostIndex:int;// = 0
private var nextFrameTimer:Timer;// = null
mx_internal var topLevel:Boolean;// = true
private var weakReferenceProxies:Dictionary;
private var _cursorIndex:int;// = 0
private var isBootstrapRoot:Boolean;// = false
mx_internal var _mouseY;
private var _numModalWindows:int;// = 0
mx_internal var _mouseX;
private var _screen:Rectangle;
mx_internal var idleCounter:int;// = 0
private var _cursorChildren:SystemChildrenList;
private var initCallbackFunctions:Array;
private var bridgeToFocusManager:Dictionary;
private var _noTopMostIndex:int;// = 0
private var _applicationIndex:int;// = 1
private var isDispatchingResizeEvent:Boolean;
private var idleTimer:Timer;
private var doneExecutingInitCallbacks:Boolean;// = false
private var _explicitWidth:Number;
private var eventProxy:EventProxy;
mx_internal var topLevelWindow:IUIComponent;
private static const IDLE_THRESHOLD:Number = 1000;
private static const IDLE_INTERVAL:Number = 100;
mx_internal static const VERSION:String = "3.2.0.3958";
mx_internal static var lastSystemManager:SystemManager;
mx_internal static var allSystemManagers:Dictionary = new Dictionary(true);
public function SystemManager(){
initCallbackFunctions = [];
forms = [];
weakReferenceProxies = new Dictionary(true);
strongReferenceProxies = new Dictionary(false);
super();
if (stage){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
};
if ((((SystemManagerGlobals.topLevelSystemManagers.length > 0)) && (!(stage)))){
topLevel = false;
};
if (!stage){
isStageRoot = false;
};
if (topLevel){
SystemManagerGlobals.topLevelSystemManagers.push(this);
};
lastSystemManager = this;
var _local1:Array = info()["compiledLocales"];
ResourceBundle.locale = (((!((_local1 == null))) && ((_local1.length > 0)))) ? _local1[0] : "en_US";
executeCallbacks();
stop();
if (((topLevel) && (!((currentFrame == 1))))){
throw (new Error((("The SystemManager constructor was called when the currentFrame was at " + currentFrame) + " Please add this SWF to bug 129782.")));
};
if (((root) && (root.loaderInfo))){
root.loaderInfo.addEventListener(Event.INIT, initHandler);
};
}
private function removeEventListenerFromSandboxes(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:IEventDispatcher=null):void{
var _local8:int;
if (!swfBridgeGroup){
return;
};
var _local5:EventListenerRequest = new EventListenerRequest(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, false, false, _arg1, _arg3);
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local6) && (!((_local6 == _arg4))))){
_local6.removeEventListener(_arg1, _arg2, _arg3);
};
var _local7:Array = swfBridgeGroup.getChildBridges();
while (_local8 < _local7.length) {
if (_local7[_local8] != _arg4){
IEventDispatcher(_local7[_local8]).removeEventListener(_arg1, _arg2, _arg3);
};
_local8++;
};
dispatchEventFromSWFBridges(_local5, _arg4);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
var _local4:DisplayObjectContainer;
var _local2 = 1;
if (((!(topLevel)) && (parent))){
_local4 = parent.parent;
while (_local4) {
if ((_local4 is ILayoutManagerClient)){
_local2 = (ILayoutManagerClient(_local4).nestLevel + 1);
break;
};
_local4 = _local4.parent;
};
};
nestLevel = _local2;
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).systemManager = this;
};
var _local3:Class = Class(getDefinitionByName("mx.core.UIComponent"));
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = document;
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
};
if ((_arg1 is InteractiveObject)){
if (doubleClickEnabled){
InteractiveObject(_arg1).doubleClickEnabled = true;
};
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).regenerateStyleCache(true);
};
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleChanged(null);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).notifyStyleChangeInChildren(null, true);
};
if (((_local3) && ((_arg1 is _local3)))){
_local3(_arg1).initThemeColor();
};
if (((_local3) && ((_arg1 is _local3)))){
_local3(_arg1).stylesInitialized();
};
}
private function dispatchEventToOtherSystemManagers(_arg1:Event):void{
dispatchingToSystemManagers = true;
var _local2:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
if (_local2[_local4] != this){
_local2[_local4].dispatchEvent(_arg1);
};
_local4++;
};
dispatchingToSystemManagers = false;
}
private function idleTimer_timerHandler(_arg1:TimerEvent):void{
idleCounter++;
if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){
dispatchEvent(new FlexEvent(FlexEvent.IDLE));
};
}
private function initManagerHandler(_arg1:Event):void{
var event = _arg1;
if (!dispatchingToSystemManagers){
dispatchEventToOtherSystemManagers(event);
};
if ((event is InterManagerRequest)){
return;
};
var name:String = event["name"];
try {
Singleton.getInstance(name);
} catch(e:Error) {
};
}
private function getSizeRequestHandler(_arg1:Event):void{
var _local2:Object = Object(_arg1);
_local2.data = {width:measuredWidth, height:measuredHeight};
}
private function beforeUnloadHandler(_arg1:Event):void{
var _local2:DisplayObject;
if (((topLevel) && (stage))){
_local2 = getSandboxRoot();
if (_local2 != this){
_local2.removeEventListener(Event.RESIZE, Stage_resizeHandler);
};
};
removeParentBridgeListeners();
dispatchEvent(_arg1);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function getVisibleRectRequestHandler(_arg1:Event):void{
var _local5:Rectangle;
var _local7:Point;
var _local8:IEventDispatcher;
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Rectangle = Rectangle(_local2.data);
var _local4:DisplayObject = DisplayObject(swfBridgeGroup.getChildBridgeProvider(_local2.requestor));
var _local6:Boolean;
if (!DisplayObjectContainer(document).contains(_local4)){
_local6 = false;
};
if ((_local4 is ISWFLoader)){
_local5 = ISWFLoader(_local4).getVisibleApplicationRect();
} else {
_local5 = _local4.getBounds(this);
_local7 = localToGlobal(_local5.topLeft);
_local5.x = _local7.x;
_local5.y = _local7.y;
};
_local3 = _local3.intersection(_local5);
_local2.data = _local3;
if (((_local6) && (useSWFBridge()))){
_local8 = swfBridgeGroup.parentBridge;
_local2.requestor = _local8;
_local8.dispatchEvent(_local2);
};
Object(_arg1).data = _local2.data;
}
mx_internal function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local6:IStyleClient;
var _local3:Boolean;
var _local4:int = rawChildren.numChildren;
var _local5:int;
while (_local5 < _local4) {
_local6 = (rawChildren.getChildAt(_local5) as IStyleClient);
if (_local6){
_local6.styleChanged(_arg1);
_local6.notifyStyleChangeInChildren(_arg1, _arg2);
};
if (isTopLevelWindow(DisplayObject(_local6))){
_local3 = true;
};
_local4 = rawChildren.numChildren;
_local5++;
};
if (((!(_local3)) && ((topLevelWindow is IStyleClient)))){
IStyleClient(topLevelWindow).styleChanged(_arg1);
IStyleClient(topLevelWindow).notifyStyleChangeInChildren(_arg1, _arg2);
};
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
private function initHandler(_arg1:Event):void{
var bridgeEvent:SWFBridgeEvent;
var event = _arg1;
if (!isStageRoot){
if (root.loaderInfo.parentAllowsChild){
try {
if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true))){
isBootstrapRoot = true;
};
} catch(e:Error) {
};
};
};
allSystemManagers[this] = this.loaderInfo.url;
root.loaderInfo.removeEventListener(Event.INIT, initHandler);
if (useSWFBridge()){
swfBridgeGroup = new SWFBridgeGroup(this);
swfBridgeGroup.parentBridge = loaderInfo.sharedEvents;
addParentBridgeListeners();
bridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_NEW_APPLICATION);
bridgeEvent.data = swfBridgeGroup.parentBridge;
swfBridgeGroup.parentBridge.dispatchEvent(bridgeEvent);
addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
root.loaderInfo.addEventListener(Event.UNLOAD, unloadHandler, false, 0, true);
};
getSandboxRoot().addEventListener(InterManagerRequest.INIT_MANAGER_REQUEST, initManagerHandler, false, 0, true);
if (getSandboxRoot() == this){
addEventListener(InterManagerRequest.SYSTEM_MANAGER_REQUEST, systemManagerHandler);
addEventListener(InterManagerRequest.DRAG_MANAGER_REQUEST, multiWindowRedispatcher);
addEventListener("dispatchDragEvent", multiWindowRedispatcher);
addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
};
var docFrame:int = ((totalFrames)==1) ? 0 : 1;
addEventListener(Event.ENTER_FRAME, docFrameListener);
initialize();
}
mx_internal function findFocusManagerContainer(_arg1:SystemManagerProxy):IFocusManagerContainer{
var _local5:DisplayObject;
var _local2:IChildList = _arg1.rawChildren;
var _local3:int = _local2.numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = _local2.getChildAt(_local4);
if ((_local5 is IFocusManagerContainer)){
return (IFocusManagerContainer(_local5));
};
_local4++;
};
return (null);
}
private function addPlaceholderPopupRequestHandler(_arg1:Event):void{
var _local3:RemotePopUp;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (((!((_arg1.target == this))) && ((_arg1 is SWFBridgeRequest)))){
return;
};
if (!forwardPlaceholderRequest(_local2, true)){
_local3 = new RemotePopUp(_local2.data.placeHolderId, _local2.requestor);
forms.push(_local3);
};
}
override public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
if (super.contains(_arg1)){
if (_arg1.parent == this){
_local2 = super.getChildIndex(_arg1);
if (_local2 < noTopMostIndex){
return (true);
};
} else {
_local3 = 0;
while (_local3 < noTopMostIndex) {
_local4 = super.getChildAt(_local3);
if ((_local4 is IRawChildrenContainer)){
if (IRawChildrenContainer(_local4).rawChildren.contains(_arg1)){
return (true);
};
};
if ((_local4 is DisplayObjectContainer)){
if (DisplayObjectContainer(_local4).contains(_arg1)){
return (true);
};
};
_local3++;
};
};
};
return (false);
}
private function modalWindowRequestHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!preProcessModalWindowRequest(_local2, getSandboxRoot())){
return;
};
Singleton.getInstance("mx.managers::IPopUpManager");
dispatchEvent(_local2);
}
private function activateApplicationSandboxEventHandler(_arg1:Event):void{
if (!isTopLevelRoot()){
swfBridgeGroup.parentBridge.dispatchEvent(_arg1);
return;
};
activateForm(document);
}
public function getDefinitionByName(_arg1:String):Object{
var _local3:Object;
var _local2:ApplicationDomain = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : (info()["currentDomain"] as ApplicationDomain);
if (_local2.hasDefinition(_arg1)){
_local3 = _local2.getDefinition(_arg1);
};
return (_local3);
}
public function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void{
var _local3:InterManagerRequest;
if (getSandboxRoot() == this){
this[_arg1].removeChild(_arg2);
} else {
removingChild(_arg2);
_local3 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = (_arg1 + ".removeChild");
_local3.value = _arg2;
getSandboxRoot().dispatchEvent(_local3);
childRemoved(_arg2);
};
}
private function removeEventListenerFromOtherSystemManagers(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
var _local4:Array = SystemManagerGlobals.topLevelSystemManagers;
if (_local4.length < 2){
return;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
var _local5:int = _local4.length;
var _local6:int;
while (_local6 < _local5) {
if (_local4[_local6] != this){
_local4[_local6].removeEventListener(_arg1, _arg2, _arg3);
};
_local6++;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
}
private function addEventListenerToOtherSystemManagers(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
var _local6:Array = SystemManagerGlobals.topLevelSystemManagers;
if (_local6.length < 2){
return;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
if (_local6[_local8] != this){
_local6[_local8].addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
};
_local8++;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
}
public function get embeddedFontList():Object{
var _local1:Object;
var _local2:String;
var _local3:Object;
if (_fontList == null){
_fontList = {};
_local1 = info()["fonts"];
for (_local2 in _local1) {
_fontList[_local2] = _local1[_local2];
};
if (((!(topLevel)) && (_topLevelSystemManager))){
_local3 = _topLevelSystemManager.embeddedFontList;
for (_local2 in _local3) {
_fontList[_local2] = _local3[_local2];
};
};
};
return (_fontList);
}
mx_internal function set cursorIndex(_arg1:int):void{
var _local2:int = (_arg1 - _cursorIndex);
_cursorIndex = _arg1;
}
mx_internal function addChildBridgeListeners(_arg1:IEventDispatcher):void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).addChildBridgeListeners(_arg1);
return;
};
_arg1.addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
_arg1.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
_arg1.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
_arg1.addEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
override public function getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt((applicationIndex + _arg1)));
}
public function get rawChildren():IChildList{
if (!_rawChildren){
_rawChildren = new SystemRawChildrenList(this);
};
return (_rawChildren);
}
private function findLastActiveForm(_arg1:Object):Object{
var _local2:int = forms.length;
var _local3:int = (forms.length - 1);
while (_local3 >= 0) {
if (((!((forms[_local3] == _arg1))) && (canActivatePopUp(forms[_local3])))){
return (forms[_local3]);
};
_local3--;
};
return (null);
}
private function multiWindowRedispatcher(_arg1:Event):void{
if (!dispatchingToSystemManagers){
dispatchEventToOtherSystemManagers(_arg1);
};
}
public function deployMouseShields(_arg1:Boolean):void{
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST, false, false, "mouseShield", _arg1);
getSandboxRoot().dispatchEvent(_local2);
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
var newListener:StageEventProxy;
var actualType:String;
var type = _arg1;
var listener = _arg2;
var useCapture = _arg3;
var priority = _arg4;
var useWeakReference = _arg5;
if ((((type == FlexEvent.RENDER)) || ((type == FlexEvent.ENTER_FRAME)))){
if (type == FlexEvent.RENDER){
type = Event.RENDER;
} else {
type = Event.ENTER_FRAME;
};
try {
if (stage){
stage.addEventListener(type, listener, useCapture, priority, useWeakReference);
} else {
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
};
} catch(error:SecurityError) {
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
};
if (((stage) && ((type == Event.RENDER)))){
stage.invalidate();
};
return;
};
if ((((((((((type == MouseEvent.MOUSE_MOVE)) || ((type == MouseEvent.MOUSE_UP)))) || ((type == MouseEvent.MOUSE_DOWN)))) || ((type == Event.ACTIVATE)))) || ((type == Event.DEACTIVATE)))){
try {
if (stage){
newListener = new StageEventProxy(listener);
stage.addEventListener(type, newListener.stageListener, false, priority, useWeakReference);
if (useWeakReference){
weakReferenceProxies[listener] = newListener;
} else {
strongReferenceProxies[listener] = newListener;
};
};
} catch(error:SecurityError) {
};
};
if (((hasSWFBridges()) || ((SystemManagerGlobals.topLevelSystemManagers.length > 1)))){
if (!eventProxy){
eventProxy = new EventProxy(this);
};
actualType = EventUtil.sandboxMouseEventMap[type];
if (actualType){
if (isTopLevelRoot()){
stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
addEventListenerToSandboxes(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
} else {
super.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
};
addEventListenerToSandboxes(type, sandboxMouseListener, useCapture, priority, useWeakReference);
if (!SystemManagerGlobals.changingListenersInOtherSystemManagers){
addEventListenerToOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture, priority, useWeakReference);
};
if (getSandboxRoot() == this){
super.addEventListener(actualType, eventProxy.marshalListener, useCapture, priority, useWeakReference);
};
super.addEventListener(type, listener, false, priority, useWeakReference);
return;
};
};
if ((((type == FlexEvent.IDLE)) && (!(idleTimer)))){
idleTimer = new Timer(IDLE_INTERVAL);
idleTimer.addEventListener(TimerEvent.TIMER, idleTimer_timerHandler);
idleTimer.start();
addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true);
};
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
}
private function activateForm(_arg1:Object):void{
var _local2:IFocusManagerContainer;
if (form){
if (((!((form == _arg1))) && ((forms.length > 1)))){
if (isRemotePopUp(form)){
if (!areRemotePopUpsEqual(form, _arg1)){
deactivateRemotePopUp(form);
};
} else {
_local2 = IFocusManagerContainer(form);
_local2.focusManager.deactivate();
};
};
};
form = _arg1;
if (isRemotePopUp(_arg1)){
activateRemotePopUp(_arg1);
} else {
if (_arg1.focusManager){
_arg1.focusManager.activate();
};
};
updateLastActiveForm();
}
public function removeFocusManager(_arg1:IFocusManagerContainer):void{
var _local2:int = forms.length;
var _local3:int;
while (_local3 < _local2) {
if (forms[_local3] == _arg1){
if (form == _arg1){
deactivate(_arg1);
};
dispatchDeactivatedWindowEvent(DisplayObject(_arg1));
forms.splice(_local3, 1);
return;
};
_local3++;
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
private function getSandboxScreen():Rectangle{
var _local2:Rectangle;
var _local3:DisplayObject;
var _local4:InterManagerRequest;
var _local1:DisplayObject = getSandboxRoot();
if (_local1 == this){
_local2 = new Rectangle(0, 0, width, height);
} else {
if (_local1 == topLevelSystemManager){
_local3 = DisplayObject(topLevelSystemManager);
_local2 = new Rectangle(0, 0, _local3.width, _local3.height);
} else {
_local4 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false, "screen");
_local1.dispatchEvent(_local4);
_local2 = Rectangle(_local4.value);
};
};
return (_local2);
}
public function get focusPane():Sprite{
return (_focusPane);
}
override public function get mouseX():Number{
if (_mouseX === undefined){
return (super.mouseX);
};
return (_mouseX);
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local3:int;
var _local4:DisplayObject;
var _local5:Boolean;
var _local6:int;
var _local7:Object;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:IChildList;
var _local12:DisplayObject;
var _local13:Boolean;
var _local14:int;
idleCounter = 0;
var _local2:IEventDispatcher = getSWFBridgeOfDisplayObject((_arg1.target as DisplayObject));
if (((_local2) && ((bridgeToFocusManager[_local2] == document.focusManager)))){
if (isTopLevelRoot()){
activateForm(document);
} else {
dispatchActivatedApplicationEvent();
};
return;
};
if (numModalWindows == 0){
if (((!(isTopLevelRoot())) || ((forms.length > 1)))){
_local3 = forms.length;
_local4 = DisplayObject(_arg1.target);
_local5 = document.rawChildren.contains(_local4);
while (_local4) {
_local6 = 0;
while (_local6 < _local3) {
_local7 = (isRemotePopUp(forms[_local6])) ? forms[_local6].window : forms[_local6];
if (_local7 == _local4){
_local8 = 0;
if (((((!((_local4 == form))) && ((_local4 is IFocusManagerContainer)))) || (((!(isTopLevelRoot())) && ((_local4 == form)))))){
if (isTopLevelRoot()){
activate(IFocusManagerContainer(_local4));
};
if (_local4 == document){
dispatchActivatedApplicationEvent();
} else {
if ((_local4 is DisplayObject)){
dispatchActivatedWindowEvent(DisplayObject(_local4));
};
};
};
if (popUpChildren.contains(_local4)){
_local11 = popUpChildren;
} else {
_local11 = this;
};
_local9 = _local11.getChildIndex(_local4);
_local10 = _local9;
_local3 = forms.length;
_local8 = 0;
for (;_local8 < _local3;_local8++) {
_local13 = isRemotePopUp(forms[_local8]);
if (_local13){
if ((forms[_local8].window is String)){
continue;
};
_local12 = forms[_local8].window;
} else {
_local12 = forms[_local8];
};
if (_local13){
_local14 = getChildListIndex(_local11, _local12);
if (_local14 > _local9){
_local10 = Math.max(_local14, _local10);
};
} else {
if (_local11.contains(_local12)){
if (_local11.getChildIndex(_local12) > _local9){
_local10 = Math.max(_local11.getChildIndex(_local12), _local10);
};
};
};
};
if ((((_local10 > _local9)) && (!(_local5)))){
_local11.setChildIndex(_local4, _local10);
};
return;
};
_local6++;
};
_local4 = _local4.parent;
};
} else {
dispatchActivatedApplicationEvent();
};
};
}
private function removePopupRequestHandler(_arg1:Event):void{
var _local3:SWFBridgeRequest;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (((swfBridgeGroup.parentBridge) && (SecurityUtil.hasMutualTrustBetweenParentAndChild(this)))){
_local2.requestor = swfBridgeGroup.parentBridge;
getSandboxRoot().dispatchEvent(_local2);
return;
};
if (popUpChildren.contains(_local2.data.window)){
popUpChildren.removeChild(_local2.data.window);
} else {
removeChild(DisplayObject(_local2.data.window));
};
if (_local2.data.modal){
numModalWindows--;
};
removeRemotePopUp(new RemotePopUp(_local2.data.window, _local2.requestor));
if (((!(isTopLevelRoot())) && (swfBridgeGroup))){
_local3 = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false, _local2.requestor, {placeHolderId:NameUtil.displayObjectToString(_local2.data.window)});
dispatchEvent(_local3);
};
}
public function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void{
var _local3:IFocusManager;
var _local4:DisplayObject = _arg2;
while (_local4) {
if ((_local4 is IFocusManagerContainer)){
_local3 = IFocusManagerContainer(_local4).focusManager;
break;
};
_local4 = _local4.parent;
};
if (!_local3){
return;
};
if (!swfBridgeGroup){
swfBridgeGroup = new SWFBridgeGroup(this);
};
swfBridgeGroup.addChildBridge(_arg1, ISWFBridgeProvider(_arg2));
_local3.addSWFBridge(_arg1, _arg2);
if (!bridgeToFocusManager){
bridgeToFocusManager = new Dictionary();
};
bridgeToFocusManager[_arg1] = _local3;
addChildBridgeListeners(_arg1);
}
public function get screen():Rectangle{
if (!_screen){
Stage_resizeHandler();
};
if (!isStageRoot){
Stage_resizeHandler();
};
return (_screen);
}
private function resetMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
} else {
if (eventProxy){
SystemManagerGlobals.showMouseCursor = true;
};
};
}
mx_internal function set topMostIndex(_arg1:int):void{
var _local2:int = (_arg1 - _topMostIndex);
_topMostIndex = _arg1;
toolTipIndex = (toolTipIndex + _local2);
}
mx_internal function docFrameHandler(_arg1:Event=null):void{
var _local2:TextFieldFactory;
var _local4:int;
var _local5:int;
var _local6:Class;
Singleton.registerClass("mx.managers::IBrowserManager", Class(getDefinitionByName("mx.managers::BrowserManagerImpl")));
Singleton.registerClass("mx.managers::ICursorManager", Class(getDefinitionByName("mx.managers::CursorManagerImpl")));
Singleton.registerClass("mx.managers::IHistoryManager", Class(getDefinitionByName("mx.managers::HistoryManagerImpl")));
Singleton.registerClass("mx.managers::ILayoutManager", Class(getDefinitionByName("mx.managers::LayoutManager")));
Singleton.registerClass("mx.managers::IPopUpManager", Class(getDefinitionByName("mx.managers::PopUpManagerImpl")));
Singleton.registerClass("mx.managers::IToolTipManager2", Class(getDefinitionByName("mx.managers::ToolTipManagerImpl")));
if (Capabilities.playerType == "Desktop"){
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::NativeDragManagerImpl")));
if (Singleton.getClass("mx.managers::IDragManager") == null){
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl")));
};
} else {
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl")));
};
Singleton.registerClass("mx.core::ITextFieldFactory", Class(getDefinitionByName("mx.core::TextFieldFactory")));
executeCallbacks();
doneExecutingInitCallbacks = true;
var _local3:Array = info()["mixins"];
if (((_local3) && ((_local3.length > 0)))){
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = Class(getDefinitionByName(_local3[_local5]));
var _local7 = _local6;
_local7["init"](this);
_local5++;
};
};
installCompiledResourceBundles();
initializeTopLevelWindow(null);
deferredNextFrame();
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function get preloaderBackgroundSize():String{
return (info()["backgroundSize"]);
}
public function isTopLevel():Boolean{
return (topLevel);
}
override public function get mouseY():Number{
if (_mouseY === undefined){
return (super.mouseY);
};
return (_mouseY);
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function deactivate(_arg1:IFocusManagerContainer):void{
deactivateForm(Object(_arg1));
}
private function preProcessModalWindowRequest(_arg1:SWFBridgeRequest, _arg2:DisplayObject):Boolean{
var _local3:IEventDispatcher;
var _local4:ISWFLoader;
var _local5:Rectangle;
if (_arg1.data.skip){
_arg1.data.skip = false;
if (useSWFBridge()){
_local3 = swfBridgeGroup.parentBridge;
_arg1.requestor = _local3;
_local3.dispatchEvent(_arg1);
};
return (false);
};
if (this != _arg2){
if ((((_arg1.type == SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST)) || ((_arg1.type == SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST)))){
_local4 = (swfBridgeGroup.getChildBridgeProvider(_arg1.requestor) as ISWFLoader);
if (_local4){
_local5 = ISWFLoader(_local4).getVisibleApplicationRect();
_arg1.data.excludeRect = _local5;
if (!DisplayObjectContainer(document).contains(DisplayObject(_local4))){
_arg1.data.useExclude = false;
};
};
};
_local3 = swfBridgeGroup.parentBridge;
_arg1.requestor = _local3;
if (_arg1.type == SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST){
_arg2.dispatchEvent(_arg1);
} else {
_local3.dispatchEvent(_arg1);
};
return (false);
};
_arg1.data.skip = false;
return (true);
}
private function resetMouseCursorTracking(_arg1:Event):void{
var _local2:SWFBridgeRequest;
var _local3:IEventDispatcher;
if (isTopLevelRoot()){
SystemManagerGlobals.showMouseCursor = true;
} else {
if (swfBridgeGroup.parentBridge){
_local2 = new SWFBridgeRequest(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST);
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
};
};
}
mx_internal function addParentBridgeListeners():void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).addParentBridgeListeners();
return;
};
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
_local1.addEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
_local1.addEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
_local1.addEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, activateRequestHandler);
_local1.addEventListener(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, deactivateRequestHandler);
_local1.addEventListener(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, isBridgeChildHandler);
_local1.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.addEventListener(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, canActivateHandler);
_local1.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, beforeUnloadHandler);
}
public function get swfBridgeGroup():ISWFBridgeGroup{
if (topLevel){
return (_swfBridgeGroup);
};
if (topLevelSystemManager){
return (topLevelSystemManager.swfBridgeGroup);
};
return (null);
}
override public function getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
public function get measuredWidth():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width);
}
public function removeChildBridge(_arg1:IEventDispatcher):void{
var _local2:IFocusManager = IFocusManager(bridgeToFocusManager[_arg1]);
_local2.removeSWFBridge(_arg1);
swfBridgeGroup.removeChildBridge(_arg1);
delete bridgeToFocusManager[_arg1];
removeChildBridgeListeners(_arg1);
}
mx_internal function removeChildBridgeListeners(_arg1:IEventDispatcher):void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).removeChildBridgeListeners(_arg1);
return;
};
_arg1.removeEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
_arg1.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_arg1.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2)));
}
private function Stage_resizeHandler(_arg1:Event=null):void{
var m:Number;
var n:Number;
var sandboxScreen:Rectangle;
var event = _arg1;
if (isDispatchingResizeEvent){
return;
};
var w:Number = 0;
var h:Number = 0;
try {
m = loaderInfo.width;
n = loaderInfo.height;
} catch(error:Error) {
return;
};
var align:String = StageAlign.TOP_LEFT;
try {
if (stage){
w = stage.stageWidth;
h = stage.stageHeight;
align = stage.align;
};
} catch(error:SecurityError) {
sandboxScreen = getSandboxScreen();
w = sandboxScreen.width;
h = sandboxScreen.height;
};
var x:Number = ((m - w) / 2);
var y:Number = ((n - h) / 2);
if (align == StageAlign.TOP){
y = 0;
} else {
if (align == StageAlign.BOTTOM){
y = (n - h);
} else {
if (align == StageAlign.LEFT){
x = 0;
} else {
if (align == StageAlign.RIGHT){
x = (m - w);
} else {
if ((((align == StageAlign.TOP_LEFT)) || ((align == "LT")))){
y = 0;
x = 0;
} else {
if (align == StageAlign.TOP_RIGHT){
y = 0;
x = (m - w);
} else {
if (align == StageAlign.BOTTOM_LEFT){
y = (n - h);
x = 0;
} else {
if (align == StageAlign.BOTTOM_RIGHT){
y = (n - h);
x = (m - w);
};
};
};
};
};
};
};
};
if (!_screen){
_screen = new Rectangle();
};
_screen.x = x;
_screen.y = y;
_screen.width = w;
_screen.height = h;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
};
if (event){
resizeMouseCatcher();
isDispatchingResizeEvent = true;
dispatchEvent(event);
isDispatchingResizeEvent = false;
};
}
public function get swfBridge():IEventDispatcher{
if (swfBridgeGroup){
return (swfBridgeGroup.parentBridge);
};
return (null);
}
private function findRemotePopUp(_arg1:Object, _arg2:IEventDispatcher):RemotePopUp{
var _local5:RemotePopUp;
var _local3:int = forms.length;
var _local4:int;
while (_local4 < _local3) {
if (isRemotePopUp(forms[_local4])){
_local5 = RemotePopUp(forms[_local4]);
if ((((_local5.window == _arg1)) && ((_local5.bridge == _arg2)))){
return (_local5);
};
};
_local4++;
};
return (null);
}
public function info():Object{
return ({});
}
mx_internal function get toolTipIndex():int{
return (_toolTipIndex);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (isStageRoot){
return;
};
_width = _arg1;
_height = _arg2;
if (mouseCatcher){
mouseCatcher.width = _arg1;
mouseCatcher.height = _arg2;
};
dispatchEvent(new Event(Event.RESIZE));
}
private function removePlaceholderPopupRequestHandler(_arg1:Event):void{
var _local3:int;
var _local4:int;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!forwardPlaceholderRequest(_local2, false)){
_local3 = forms.length;
_local4 = 0;
while (_local4 < _local3) {
if (isRemotePopUp(forms[_local4])){
if ((((forms[_local4].window == _local2.data.placeHolderId)) && ((forms[_local4].bridge == _local2.requestor)))){
forms.splice(_local4, 1);
break;
};
};
_local4++;
};
};
}
public function set focusPane(_arg1:Sprite):void{
if (_arg1){
addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
removeChild(_focusPane);
_focusPane = null;
};
}
mx_internal function removeParentBridgeListeners():void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).removeParentBridgeListeners();
return;
};
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
_local1.removeEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, activateRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, deactivateRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, isBridgeChildHandler);
_local1.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, canActivateHandler);
_local1.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, beforeUnloadHandler);
}
override public function get parent():DisplayObjectContainer{
try {
return (super.parent);
} catch(e:SecurityError) {
};
return (null);
}
private function eventListenerRequestHandler(_arg1:Event):void{
var _local2:String;
if ((_arg1 is EventListenerRequest)){
return;
};
var _local3:EventListenerRequest = EventListenerRequest.marshal(_arg1);
if (_arg1.type == EventListenerRequest.ADD_EVENT_LISTENER_REQUEST){
if (!eventProxy){
eventProxy = new EventProxy(this);
};
_local2 = EventUtil.sandboxMouseEventMap[_local3.eventType];
if (_local2){
if (isTopLevelRoot()){
stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
} else {
super.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
};
addEventListenerToSandboxes(_local3.eventType, sandboxMouseListener, true, _local3.priority, _local3.useWeakReference, (_arg1.target as IEventDispatcher));
addEventListenerToOtherSystemManagers(_local3.eventType, otherSystemManagerMouseListener, true, _local3.priority, _local3.useWeakReference);
if (getSandboxRoot() == this){
if (((isTopLevelRoot()) && ((((_local2 == MouseEvent.MOUSE_UP)) || ((_local2 == MouseEvent.MOUSE_MOVE)))))){
stage.addEventListener(_local2, eventProxy.marshalListener, false, _local3.priority, _local3.useWeakReference);
};
super.addEventListener(_local2, eventProxy.marshalListener, true, _local3.priority, _local3.useWeakReference);
};
};
} else {
if (_arg1.type == EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST){
_local2 = EventUtil.sandboxMouseEventMap[_local3.eventType];
if (_local2){
removeEventListenerFromOtherSystemManagers(_local3.eventType, otherSystemManagerMouseListener, true);
removeEventListenerFromSandboxes(_local3.eventType, sandboxMouseListener, true, (_arg1.target as IEventDispatcher));
if (getSandboxRoot() == this){
if (((isTopLevelRoot()) && ((((_local2 == MouseEvent.MOUSE_UP)) || ((_local2 == MouseEvent.MOUSE_MOVE)))))){
stage.removeEventListener(_local2, eventProxy.marshalListener);
};
super.removeEventListener(_local2, eventProxy.marshalListener, true);
};
};
};
};
}
mx_internal function set applicationIndex(_arg1:int):void{
_applicationIndex = _arg1;
}
private function showMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
Object(_arg1).data = _local2.data;
} else {
if (eventProxy){
Object(_arg1).data = SystemManagerGlobals.showMouseCursor;
};
};
}
public function get childAllowsParent():Boolean{
try {
return (loaderInfo.childAllowsParent);
} catch(error:Error) {
};
return (false);
}
public function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void{
var _local5:Event;
if (_arg4){
dispatchEventToOtherSystemManagers(_arg1);
};
if (!swfBridgeGroup){
return;
};
_local5 = _arg1.clone();
if (_arg3){
currentSandboxEvent = _local5;
};
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local6) && (!((_local6 == _arg2))))){
if ((_local5 is SWFBridgeRequest)){
SWFBridgeRequest(_local5).requestor = _local6;
};
_local6.dispatchEvent(_local5);
};
var _local7:Array = swfBridgeGroup.getChildBridges();
var _local8:int;
while (_local8 < _local7.length) {
if (_local7[_local8] != _arg2){
_local5 = _arg1.clone();
if (_arg3){
currentSandboxEvent = _local5;
};
if ((_local5 is SWFBridgeRequest)){
SWFBridgeRequest(_local5).requestor = IEventDispatcher(_local7[_local8]);
};
IEventDispatcher(_local7[_local8]).dispatchEvent(_local5);
};
_local8++;
};
currentSandboxEvent = null;
}
private function setActualSizeRequestHandler(_arg1:Event):void{
var _local2:Object = Object(_arg1);
setActualSize(_local2.data.width, _local2.data.height);
}
private function executeCallbacks():void{
var _local1:Function;
if (((!(parent)) && (parentAllowsChild))){
return;
};
while (initCallbackFunctions.length > 0) {
_local1 = initCallbackFunctions.shift();
_local1(this);
};
}
private function addPlaceholderId(_arg1:String, _arg2:String, _arg3:IEventDispatcher, _arg4:Object):void{
if (!_arg3){
throw (new Error());
};
if (!idToPlaceholder){
idToPlaceholder = [];
};
idToPlaceholder[_arg1] = new PlaceholderData(_arg2, _arg3, _arg4);
}
private function canActivateHandler(_arg1:Event):void{
var _local3:SWFBridgeRequest;
var _local6:PlaceholderData;
var _local7:RemotePopUp;
var _local8:SystemManagerProxy;
var _local9:IFocusManagerContainer;
var _local10:IEventDispatcher;
var _local2:Object = Object(_arg1);
var _local4:Object = _local2.data;
var _local5:String;
if ((_local2.data is String)){
_local6 = idToPlaceholder[_local2.data];
_local4 = _local6.data;
_local5 = _local6.id;
if (_local5 == null){
_local7 = findRemotePopUp(_local4, _local6.bridge);
if (_local7){
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, IEventDispatcher(_local7.bridge), _local7.window);
if (_local7.bridge){
_local7.bridge.dispatchEvent(_local3);
_local2.data = _local3.data;
};
return;
};
};
};
if ((_local4 is SystemManagerProxy)){
_local8 = SystemManagerProxy(_local4);
_local9 = findFocusManagerContainer(_local8);
_local2.data = ((((_local8) && (_local9))) && (canActivateLocalComponent(_local9)));
} else {
if ((_local4 is IFocusManagerContainer)){
_local2.data = canActivateLocalComponent(_local4);
} else {
if ((_local4 is IEventDispatcher)){
_local10 = IEventDispatcher(_local4);
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, _local10, _local5);
if (_local10){
_local10.dispatchEvent(_local3);
_local2.data = _local3.data;
};
} else {
throw (new Error());
};
};
};
}
private function docFrameListener(_arg1:Event):void{
if (currentFrame == 2){
removeEventListener(Event.ENTER_FRAME, docFrameListener);
if (totalFrames > 2){
addEventListener(Event.ENTER_FRAME, extraFrameListener);
};
docFrameHandler();
};
}
public function get popUpChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.popUpChildren);
};
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
return (_popUpChildren);
}
private function addEventListenerToSandboxes(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false, _arg6:IEventDispatcher=null):void{
var _local10:int;
var _local11:IEventDispatcher;
if (!swfBridgeGroup){
return;
};
var _local7:EventListenerRequest = new EventListenerRequest(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, false, false, _arg1, _arg3, _arg4, _arg5);
var _local8:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local8) && (!((_local8 == _arg6))))){
_local8.addEventListener(_arg1, _arg2, false, _arg4, _arg5);
};
var _local9:Array = swfBridgeGroup.getChildBridges();
while (_local10 < _local9.length) {
_local11 = IEventDispatcher(_local9[_local10]);
if (_local11 != _arg6){
_local11.addEventListener(_arg1, _arg2, false, _arg4, _arg5);
};
_local10++;
};
dispatchEventFromSWFBridges(_local7, _arg6);
}
private function forwardFormEvent(_arg1:SWFBridgeEvent):Boolean{
var _local3:DisplayObject;
if (isTopLevelRoot()){
return (false);
};
var _local2:IEventDispatcher = swfBridgeGroup.parentBridge;
if (_local2){
_local3 = getSandboxRoot();
_arg1.data.notifier = _local2;
if (_local3 == this){
if (!(_arg1.data.window is String)){
_arg1.data.window = NameUtil.displayObjectToString(DisplayObject(_arg1.data.window));
} else {
_arg1.data.window = ((NameUtil.displayObjectToString(DisplayObject(this)) + ".") + _arg1.data.window);
};
_local2.dispatchEvent(_arg1);
} else {
if ((_arg1.data.window is String)){
_arg1.data.window = ((NameUtil.displayObjectToString(DisplayObject(this)) + ".") + _arg1.data.window);
};
_local3.dispatchEvent(_arg1);
};
};
return (true);
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChild(_arg1));
}
mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
super.removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
final mx_internal function get $numChildren():int{
return (super.numChildren);
}
public function get toolTipChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.toolTipChildren);
};
if (!_toolTipChildren){
_toolTipChildren = new SystemChildrenList(this, new QName(mx_internal, "topMostIndex"), new QName(mx_internal, "toolTipIndex"));
};
return (_toolTipChildren);
}
public function create(... _args):Object{
var _local4:String;
var _local5:int;
var _local6:int;
var _local2:String = info()["mainClassName"];
if (_local2 == null){
_local4 = loaderInfo.loaderURL;
_local5 = _local4.lastIndexOf(".");
_local6 = _local4.lastIndexOf("/");
_local2 = _local4.substring((_local6 + 1), _local5);
};
var _local3:Class = Class(getDefinitionByName(_local2));
return ((_local3) ? new (_local3) : null);
}
override public function get stage():Stage{
var _local2:DisplayObject;
if (_stage){
return (_stage);
};
var _local1:Stage = super.stage;
if (_local1){
_stage = _local1;
return (_local1);
};
if (((!(topLevel)) && (_topLevelSystemManager))){
_stage = _topLevelSystemManager.stage;
return (_stage);
};
if (((!(isStageRoot)) && (topLevel))){
_local2 = getTopLevelRoot();
if (_local2){
_stage = _local2.stage;
return (_stage);
};
};
return (null);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1)));
}
private function removeRemotePopUp(_arg1:RemotePopUp):void{
var _local2:int = forms.length;
var _local3:int;
while (_local3 < _local2) {
if (isRemotePopUp(forms[_local3])){
if ((((forms[_local3].window == _arg1.window)) && ((forms[_local3].bridge == _arg1.bridge)))){
if (forms[_local3] == _arg1){
deactivateForm(_arg1);
};
forms.splice(_local3, 1);
break;
};
};
_local3++;
};
}
private function deactivateRemotePopUp(_arg1:Object):void{
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, false, false, _arg1.bridge, _arg1.window);
var _local3:Object = _arg1.bridge;
if (_local3){
_local3.dispatchEvent(_local2);
};
}
override public function getChildIndex(_arg1:DisplayObject):int{
return ((super.getChildIndex(_arg1) - applicationIndex));
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
public function activate(_arg1:IFocusManagerContainer):void{
activateForm(_arg1);
}
public function getSandboxRoot():DisplayObject{
var parent:DisplayObject;
var lastParent:DisplayObject;
var loader:Loader;
var loaderInfo:LoaderInfo;
var sm:ISystemManager = this;
try {
if (sm.topLevelSystemManager){
sm = sm.topLevelSystemManager;
};
parent = DisplayObject(sm).parent;
if ((parent is Stage)){
return (DisplayObject(sm));
};
if (((parent) && (!(parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)))))){
return (this);
};
lastParent = parent;
while (parent) {
if ((parent is Stage)){
return (lastParent);
};
if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true))){
return (lastParent);
};
if ((parent is Loader)){
loader = Loader(parent);
loaderInfo = loader.contentLoaderInfo;
if (!loaderInfo.childAllowsParent){
return (loaderInfo.content);
};
};
lastParent = parent;
parent = parent.parent;
};
} catch(error:SecurityError) {
};
return (((lastParent)!=null) ? lastParent : DisplayObject(sm));
}
private function deferredNextFrame():void{
if ((currentFrame + 1) > totalFrames){
return;
};
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
} else {
nextFrameTimer = new Timer(100);
nextFrameTimer.addEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.start();
};
}
mx_internal function get cursorIndex():int{
return (_cursorIndex);
}
mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{
return (super.contains(_arg1));
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, (applicationIndex + _arg2));
}
public function get document():Object{
return (_document);
}
private function resizeMouseCatcher():void{
var g:Graphics;
var s:Rectangle;
if (mouseCatcher){
try {
g = mouseCatcher.graphics;
s = screen;
g.clear();
g.beginFill(0, 0);
g.drawRect(0, 0, s.width, s.height);
g.endFill();
} catch(e:SecurityError) {
};
};
}
private function extraFrameListener(_arg1:Event):void{
if (lastFrame == currentFrame){
return;
};
lastFrame = currentFrame;
if ((currentFrame + 1) > totalFrames){
removeEventListener(Event.ENTER_FRAME, extraFrameListener);
};
extraFrameHandler();
}
private function addPopupRequestHandler(_arg1:Event):void{
var _local3:Boolean;
var _local4:IChildList;
var _local6:ISWFBridgeProvider;
var _local7:SWFBridgeRequest;
if (((!((_arg1.target == this))) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (_arg1.target != this){
_local6 = swfBridgeGroup.getChildBridgeProvider(IEventDispatcher(_arg1.target));
if (!SecurityUtil.hasMutualTrustBetweenParentAndChild(_local6)){
return;
};
};
if (((swfBridgeGroup.parentBridge) && (SecurityUtil.hasMutualTrustBetweenParentAndChild(this)))){
_local2.requestor = swfBridgeGroup.parentBridge;
getSandboxRoot().dispatchEvent(_local2);
return;
};
if (((!(_local2.data.childList)) || ((_local2.data.childList == PopUpManagerChildList.PARENT)))){
_local3 = ((_local2.data.parent) && (popUpChildren.contains(_local2.data.parent)));
} else {
_local3 = (_local2.data.childList == PopUpManagerChildList.POPUP);
};
_local4 = (_local3) ? popUpChildren : this;
_local4.addChild(DisplayObject(_local2.data.window));
if (_local2.data.modal){
numModalWindows++;
};
var _local5:RemotePopUp = new RemotePopUp(_local2.data.window, _local2.requestor);
forms.push(_local5);
if (((!(isTopLevelRoot())) && (swfBridgeGroup))){
_local7 = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false, _local2.requestor, {window:_local2.data.window});
_local7.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(_local2.data.window));
dispatchEvent(_local7);
};
}
override public function get height():Number{
return (_height);
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
private function systemManagerHandler(_arg1:Event):void{
if (_arg1["name"] == "sameSandbox"){
_arg1["value"] = (currentSandboxEvent == _arg1["value"]);
return;
};
if (_arg1["name"] == "hasSWFBridges"){
_arg1["value"] = hasSWFBridges();
return;
};
if ((_arg1 is InterManagerRequest)){
return;
};
var _local2:String = _arg1["name"];
switch (_local2){
case "popUpChildren.addChild":
popUpChildren.addChild(_arg1["value"]);
break;
case "popUpChildren.removeChild":
popUpChildren.removeChild(_arg1["value"]);
break;
case "cursorChildren.addChild":
cursorChildren.addChild(_arg1["value"]);
break;
case "cursorChildren.removeChild":
cursorChildren.removeChild(_arg1["value"]);
break;
case "toolTipChildren.addChild":
toolTipChildren.addChild(_arg1["value"]);
break;
case "toolTipChildren.removeChild":
toolTipChildren.removeChild(_arg1["value"]);
break;
case "screen":
_arg1["value"] = screen;
break;
case "application":
_arg1["value"] = application;
break;
case "isTopLevelRoot":
_arg1["value"] = isTopLevelRoot();
break;
case "getVisibleApplicationRect":
_arg1["value"] = getVisibleApplicationRect();
break;
case "bringToFront":
if (_arg1["value"].topMost){
popUpChildren.setChildIndex(DisplayObject(_arg1["value"].popUp), (popUpChildren.numChildren - 1));
} else {
setChildIndex(DisplayObject(_arg1["value"].popUp), (numChildren - 1));
};
break;
};
}
private function activateRemotePopUp(_arg1:Object):void{
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, false, false, _arg1.bridge, _arg1.window);
var _local3:Object = _arg1.bridge;
if (_local3){
_local3.dispatchEvent(_local2);
};
}
mx_internal function set noTopMostIndex(_arg1:int):void{
var _local2:int = (_arg1 - _noTopMostIndex);
_noTopMostIndex = _arg1;
topMostIndex = (topMostIndex + _local2);
}
override public function getObjectsUnderPoint(_arg1:Point):Array{
var _local5:DisplayObject;
var _local6:Array;
var _local2:Array = [];
var _local3:int = topMostIndex;
var _local4:int;
while (_local4 < _local3) {
_local5 = super.getChildAt(_local4);
if ((_local5 is DisplayObjectContainer)){
_local6 = DisplayObjectContainer(_local5).getObjectsUnderPoint(_arg1);
if (_local6){
_local2 = _local2.concat(_local6);
};
};
_local4++;
};
return (_local2);
}
mx_internal function get topMostIndex():int{
return (_topMostIndex);
}
mx_internal function regenerateStyleCache(_arg1:Boolean):void{
var _local5:IStyleClient;
var _local2:Boolean;
var _local3:int = rawChildren.numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = (rawChildren.getChildAt(_local4) as IStyleClient);
if (_local5){
_local5.regenerateStyleCache(_arg1);
};
if (isTopLevelWindow(DisplayObject(_local5))){
_local2 = true;
};
_local3 = rawChildren.numChildren;
_local4++;
};
if (((!(_local2)) && ((topLevelWindow is IStyleClient)))){
IStyleClient(topLevelWindow).regenerateStyleCache(_arg1);
};
}
public function addFocusManager(_arg1:IFocusManagerContainer):void{
forms.push(_arg1);
}
private function deactivateFormSandboxEventHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeEvent = SWFBridgeEvent.marshal(_arg1);
if (!forwardFormEvent(_local2)){
if (((((isRemotePopUp(form)) && ((RemotePopUp(form).window == _local2.data.window)))) && ((RemotePopUp(form).bridge == _local2.data.notifier)))){
deactivateForm(form);
};
};
}
public function set swfBridgeGroup(_arg1:ISWFBridgeGroup):void{
if (topLevel){
_swfBridgeGroup = _arg1;
} else {
if (topLevelSystemManager){
SystemManager(topLevelSystemManager).swfBridgeGroup = _arg1;
};
};
}
mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, _arg2);
}
private function mouseUpHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
mx_internal function childAdded(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
}
public function isFontFaceEmbedded(_arg1:TextFormat):Boolean{
var _local6:Font;
var _local7:String;
var _local2:String = _arg1.font;
var _local3:Array = Font.enumerateFonts();
var _local4:int;
while (_local4 < _local3.length) {
_local6 = Font(_local3[_local4]);
if (_local6.fontName == _local2){
_local7 = "regular";
if (((_arg1.bold) && (_arg1.italic))){
_local7 = "boldItalic";
} else {
if (_arg1.bold){
_local7 = "bold";
} else {
if (_arg1.italic){
_local7 = "italic";
};
};
};
if (_local6.fontStyle == _local7){
return (true);
};
};
_local4++;
};
if (((((!(_local2)) || (!(embeddedFontList)))) || (!(embeddedFontList[_local2])))){
return (false);
};
var _local5:Object = embeddedFontList[_local2];
return (!(((((((_arg1.bold) && (!(_local5.bold)))) || (((_arg1.italic) && (!(_local5.italic)))))) || (((((!(_arg1.bold)) && (!(_arg1.italic)))) && (!(_local5.regular)))))));
}
private function forwardPlaceholderRequest(_arg1:SWFBridgeRequest, _arg2:Boolean):Boolean{
if (isTopLevelRoot()){
return (false);
};
var _local3:Object;
var _local4:String;
if (_arg1.data.window){
_local3 = _arg1.data.window;
_arg1.data.window = null;
} else {
_local3 = _arg1.requestor;
_local4 = _arg1.data.placeHolderId;
_arg1.data.placeHolderId = ((NameUtil.displayObjectToString(this) + ".") + _arg1.data.placeHolderId);
};
if (_arg2){
addPlaceholderId(_arg1.data.placeHolderId, _local4, _arg1.requestor, _local3);
} else {
removePlaceholderId(_arg1.data.placeHolderId);
};
var _local5:DisplayObject = getSandboxRoot();
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
_arg1.requestor = _local6;
if (_local5 == this){
_local6.dispatchEvent(_arg1);
} else {
_local5.dispatchEvent(_arg1);
};
return (true);
}
public function getTopLevelRoot():DisplayObject{
var sm:ISystemManager;
var parent:DisplayObject;
var lastParent:DisplayObject;
try {
sm = this;
if (sm.topLevelSystemManager){
sm = sm.topLevelSystemManager;
};
parent = DisplayObject(sm).parent;
lastParent = parent;
while (parent) {
if ((parent is Stage)){
return (lastParent);
};
lastParent = parent;
parent = parent.parent;
};
} catch(error:SecurityError) {
};
return (null);
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
var newListener:StageEventProxy;
var actualType:String;
var type = _arg1;
var listener = _arg2;
var useCapture = _arg3;
if ((((type == FlexEvent.RENDER)) || ((type == FlexEvent.ENTER_FRAME)))){
if (type == FlexEvent.RENDER){
type = Event.RENDER;
} else {
type = Event.ENTER_FRAME;
};
try {
if (stage){
stage.removeEventListener(type, listener, useCapture);
};
super.removeEventListener(type, listener, useCapture);
} catch(error:SecurityError) {
super.removeEventListener(type, listener, useCapture);
};
return;
};
if ((((((((((type == MouseEvent.MOUSE_MOVE)) || ((type == MouseEvent.MOUSE_UP)))) || ((type == MouseEvent.MOUSE_DOWN)))) || ((type == Event.ACTIVATE)))) || ((type == Event.DEACTIVATE)))){
try {
if (stage){
newListener = weakReferenceProxies[listener];
if (!newListener){
newListener = strongReferenceProxies[listener];
if (newListener){
delete strongReferenceProxies[listener];
};
};
if (newListener){
stage.removeEventListener(type, newListener.stageListener, false);
};
};
} catch(error:SecurityError) {
};
};
if (((hasSWFBridges()) || ((SystemManagerGlobals.topLevelSystemManagers.length > 1)))){
actualType = EventUtil.sandboxMouseEventMap[type];
if (actualType){
if ((((getSandboxRoot() == this)) && (eventProxy))){
super.removeEventListener(actualType, eventProxy.marshalListener, useCapture);
};
if (!SystemManagerGlobals.changingListenersInOtherSystemManagers){
removeEventListenerFromOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture);
};
removeEventListenerFromSandboxes(type, sandboxMouseListener, useCapture);
super.removeEventListener(type, listener, false);
return;
};
};
if (type == FlexEvent.IDLE){
super.removeEventListener(type, listener, useCapture);
if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){
idleTimer.stop();
idleTimer = null;
removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
};
} else {
super.removeEventListener(type, listener, useCapture);
};
}
private function extraFrameHandler(_arg1:Event=null):void{
var _local3:Class;
var _local2:Object = info()["frames"];
if (((_local2) && (_local2[currentLabel]))){
_local3 = Class(getDefinitionByName(_local2[currentLabel]));
var _local4 = _local3;
_local4["frame"](this);
};
deferredNextFrame();
}
public function isTopLevelRoot():Boolean{
return (((isStageRoot) || (isBootstrapRoot)));
}
public function get application():IUIComponent{
return (IUIComponent(_document));
}
override public function removeChildAt(_arg1:int):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChildAt((applicationIndex + _arg1)));
}
mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = super.getChildAt(_arg1);
removingChild(_local2);
super.removeChildAt(_arg1);
childRemoved(_local2);
return (_local2);
}
private function getSWFBridgeOfDisplayObject(_arg1:DisplayObject):IEventDispatcher{
var _local2:SWFBridgeRequest;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:IEventDispatcher;
var _local7:ISWFBridgeProvider;
if (swfBridgeGroup){
_local2 = new SWFBridgeRequest(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, false, false, null, _arg1);
_local3 = swfBridgeGroup.getChildBridges();
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = IEventDispatcher(_local3[_local5]);
_local7 = swfBridgeGroup.getChildBridgeProvider(_local6);
if (SecurityUtil.hasMutualTrustBetweenParentAndChild(_local7)){
_local6.dispatchEvent(_local2);
if (_local2.data == true){
return (_local6);
};
_local2.data = _arg1;
};
_local5++;
};
};
return (null);
}
private function deactivateRequestHandler(_arg1:Event):void{
var _local5:PlaceholderData;
var _local6:RemotePopUp;
var _local7:SystemManagerProxy;
var _local8:IFocusManagerContainer;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Object = _local2.data;
var _local4:String;
if ((_local2.data is String)){
_local5 = idToPlaceholder[_local2.data];
_local3 = _local5.data;
_local4 = _local5.id;
if (_local4 == null){
_local6 = findRemotePopUp(_local3, _local5.bridge);
if (_local6){
deactivateRemotePopUp(_local6);
return;
};
};
};
if ((_local3 is SystemManagerProxy)){
_local7 = SystemManagerProxy(_local3);
_local8 = findFocusManagerContainer(_local7);
if (((_local7) && (_local8))){
_local7.deactivateByProxy(_local8);
};
} else {
if ((_local3 is IFocusManagerContainer)){
IFocusManagerContainer(_local3).focusManager.deactivate();
} else {
if ((_local3 is IEventDispatcher)){
_local2.data = _local4;
_local2.requestor = IEventDispatcher(_local3);
IEventDispatcher(_local3).dispatchEvent(_local2);
return;
};
throw (new Error());
};
};
}
private function installCompiledResourceBundles():void{
var _local1:Object = this.info();
var _local2:ApplicationDomain = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : _local1["currentDomain"];
var _local3:Array = _local1["compiledLocales"];
var _local4:Array = _local1["compiledResourceBundleNames"];
var _local5:IResourceManager = ResourceManager.getInstance();
_local5.installCompiledResourceBundles(_local2, _local3, _local4);
if (!_local5.localeChain){
_local5.initializeLocaleChain(_local3);
};
}
private function deactivateForm(_arg1:Object):void{
if (form){
if ((((form == _arg1)) && ((forms.length > 1)))){
if (isRemotePopUp(form)){
deactivateRemotePopUp(form);
} else {
form.focusManager.deactivate();
};
form = findLastActiveForm(_arg1);
if (form){
if (isRemotePopUp(form)){
activateRemotePopUp(form);
} else {
form.focusManager.activate();
};
};
};
};
}
private function unloadHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
mx_internal function removingChild(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
}
mx_internal function get applicationIndex():int{
return (_applicationIndex);
}
mx_internal function set toolTipIndex(_arg1:int):void{
var _local2:int = (_arg1 - _toolTipIndex);
_toolTipIndex = _arg1;
cursorIndex = (cursorIndex + _local2);
}
private function hasSWFBridges():Boolean{
if (swfBridgeGroup){
return (true);
};
return (false);
}
private function updateLastActiveForm():void{
var _local1:int = forms.length;
if (_local1 < 2){
return;
};
var _local2 = -1;
var _local3:int;
while (_local3 < _local1) {
if (areFormsEqual(form, forms[_local3])){
_local2 = _local3;
break;
};
_local3++;
};
if (_local2 >= 0){
forms.splice(_local2, 1);
forms.push(form);
} else {
throw (new Error());
};
}
public function get cursorChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.cursorChildren);
};
if (!_cursorChildren){
_cursorChildren = new SystemChildrenList(this, new QName(mx_internal, "toolTipIndex"), new QName(mx_internal, "cursorIndex"));
};
return (_cursorChildren);
}
private function sandboxMouseListener(_arg1:Event):void{
if ((_arg1 is SandboxMouseEvent)){
return;
};
var _local2:Event = SandboxMouseEvent.marshal(_arg1);
dispatchEventFromSWFBridges(_local2, (_arg1.target as IEventDispatcher));
var _local3:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = "sameSandbox";
_local3.value = _arg1;
getSandboxRoot().dispatchEvent(_local3);
if (!_local3.value){
dispatchEvent(_local2);
};
}
public function get preloaderBackgroundImage():Object{
return (info()["backgroundImage"]);
}
public function set numModalWindows(_arg1:int):void{
_numModalWindows = _arg1;
}
public function get preloaderBackgroundAlpha():Number{
return (info()["backgroundAlpha"]);
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
private function dispatchInvalidateRequest():void{
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.INVALIDATE_REQUEST, false, false, _local1, (InvalidateRequestData.SIZE | InvalidateRequestData.DISPLAY_LIST));
_local1.dispatchEvent(_local2);
}
public function get preloaderBackgroundColor():uint{
var _local1:* = info()["backgroundColor"];
if (_local1 == undefined){
return (StyleManager.NOT_A_COLOR);
};
return (StyleManager.getColorName(_local1));
}
public function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle{
var _local2:Rectangle;
var _local3:Point;
var _local4:IEventDispatcher;
var _local5:SWFBridgeRequest;
if (!_arg1){
_arg1 = getBounds(DisplayObject(this));
_local2 = screen;
_local3 = new Point(Math.max(0, _arg1.x), Math.max(0, _arg1.y));
_local3 = localToGlobal(_local3);
_arg1.x = _local3.x;
_arg1.y = _local3.y;
_arg1.width = _local2.width;
_arg1.height = _local2.height;
};
if (useSWFBridge()){
_local4 = swfBridgeGroup.parentBridge;
_local5 = new SWFBridgeRequest(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, false, false, _local4, _arg1);
_local4.dispatchEvent(_local5);
_arg1 = Rectangle(_local5.data);
};
return (_arg1);
}
public function get topLevelSystemManager():ISystemManager{
if (topLevel){
return (this);
};
return (_topLevelSystemManager);
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
var _local2:DisplayObjectContainer;
if (((!(topLevel)) && (parent))){
_local2 = parent.parent;
while (_local2) {
if ((_local2 is IInvalidating)){
IInvalidating(_local2).invalidateSize();
IInvalidating(_local2).invalidateDisplayList();
return;
};
_local2 = _local2.parent;
};
};
if (((topLevel) && (useSWFBridge()))){
dispatchInvalidateRequest();
};
}
public function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void{
var _local3:InterManagerRequest;
if (getSandboxRoot() == this){
this[_arg1].addChild(_arg2);
} else {
addingChild(_arg2);
_local3 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = (_arg1 + ".addChild");
_local3.value = _arg2;
getSandboxRoot().dispatchEvent(_local3);
childAdded(_arg2);
};
}
private function dispatchDeactivatedWindowEvent(_arg1:DisplayObject):void{
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = getSandboxRoot();
_local4 = !((_local3 == this));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, false, false, {notifier:_local2, window:(_local4) ? _arg1 : NameUtil.displayObjectToString(_arg1)});
if (_local4){
_local3.dispatchEvent(_local5);
} else {
_local2.dispatchEvent(_local5);
};
};
}
private function isBridgeChildHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:Object = Object(_arg1);
_local2.data = ((_local2.data) && (rawChildren.contains((_local2.data as DisplayObject))));
}
public function get measuredHeight():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height);
}
private function activateRequestHandler(_arg1:Event):void{
var _local5:PlaceholderData;
var _local6:RemotePopUp;
var _local7:SystemManagerProxy;
var _local8:IFocusManagerContainer;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Object = _local2.data;
var _local4:String;
if ((_local2.data is String)){
_local5 = idToPlaceholder[_local2.data];
_local3 = _local5.data;
_local4 = _local5.id;
if (_local4 == null){
_local6 = findRemotePopUp(_local3, _local5.bridge);
if (_local6){
activateRemotePopUp(_local6);
return;
};
};
};
if ((_local3 is SystemManagerProxy)){
_local7 = SystemManagerProxy(_local3);
_local8 = findFocusManagerContainer(_local7);
if (((_local7) && (_local8))){
_local7.activateByProxy(_local8);
};
} else {
if ((_local3 is IFocusManagerContainer)){
IFocusManagerContainer(_local3).focusManager.activate();
} else {
if ((_local3 is IEventDispatcher)){
_local2.data = _local4;
_local2.requestor = IEventDispatcher(_local3);
IEventDispatcher(_local3).dispatchEvent(_local2);
} else {
throw (new Error());
};
};
};
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
addingChild(_arg1);
super.addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
mx_internal function initialize():void{
var _local6:int;
var _local7:int;
var _local9:EmbeddedFontRegistry;
var _local13:Class;
var _local14:Object;
var _local15:RSLItem;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
} else {
_width = loaderInfo.width;
_height = loaderInfo.height;
};
preloader = new Preloader();
preloader.addEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
preloader.addEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
_popUpChildren.addChild(preloader);
var _local1:Array = info()["rsls"];
var _local2:Array = info()["cdRsls"];
var _local3:Boolean;
if (info()["usePreloader"] != undefined){
_local3 = info()["usePreloader"];
};
var _local4:Class = (info()["preloader"] as Class);
if (((_local3) && (!(_local4)))){
_local4 = DownloadProgressBar;
};
var _local5:Array = [];
if (((_local2) && ((_local2.length > 0)))){
_local13 = Class(getDefinitionByName("mx.core::CrossDomainRSLItem"));
_local6 = _local2.length;
_local7 = 0;
while (_local7 < _local6) {
_local14 = new _local13(_local2[_local7]["rsls"], _local2[_local7]["policyFiles"], _local2[_local7]["digests"], _local2[_local7]["types"], _local2[_local7]["isSigned"], this.loaderInfo.url);
_local5.push(_local14);
_local7++;
};
};
if (((!((_local1 == null))) && ((_local1.length > 0)))){
_local6 = _local1.length;
_local7 = 0;
while (_local7 < _local6) {
_local15 = new RSLItem(_local1[_local7].url, this.loaderInfo.url);
_local5.push(_local15);
_local7++;
};
};
Singleton.registerClass("mx.resources::IResourceManager", Class(getDefinitionByName("mx.resources::ResourceManagerImpl")));
var _local8:IResourceManager = ResourceManager.getInstance();
Singleton.registerClass("mx.core::IEmbeddedFontRegistry", Class(getDefinitionByName("mx.core::EmbeddedFontRegistry")));
Singleton.registerClass("mx.styles::IStyleManager", Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
Singleton.registerClass("mx.styles::IStyleManager2", Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
var _local10:String = loaderInfo.parameters["localeChain"];
if (((!((_local10 == null))) && (!((_local10 == ""))))){
_local8.localeChain = _local10.split(",");
};
var _local11:String = loaderInfo.parameters["resourceModuleURLs"];
var _local12:Array = (_local11) ? _local11.split(",") : null;
preloader.initialize(_local3, _local4, preloaderBackgroundColor, preloaderBackgroundAlpha, preloaderBackgroundImage, preloaderBackgroundSize, (isStageRoot) ? stage.stageWidth : loaderInfo.width, (isStageRoot) ? stage.stageHeight : loaderInfo.height, null, null, _local5, _local12);
}
public function useSWFBridge():Boolean{
if (isStageRoot){
return (false);
};
if (((!(topLevel)) && (topLevelSystemManager))){
return (topLevelSystemManager.useSWFBridge());
};
if (((topLevel) && (!((getSandboxRoot() == this))))){
return (true);
};
if (getSandboxRoot() == this){
try {
root.loaderInfo.parentAllowsChild;
if (((parentAllowsChild) && (childAllowsParent))){
try {
if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isStageRoot", false, true))){
return (true);
};
} catch(e:Error) {
};
} else {
return (true);
};
} catch(e1:Error) {
return (false);
};
};
return (false);
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(null);
};
}
final mx_internal function $removeChildAt(_arg1:int):DisplayObject{
return (super.removeChildAt(_arg1));
}
private function canActivatePopUp(_arg1:Object):Boolean{
var _local2:RemotePopUp;
var _local3:SWFBridgeRequest;
if (isRemotePopUp(_arg1)){
_local2 = RemotePopUp(_arg1);
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, null, _local2.window);
IEventDispatcher(_local2.bridge).dispatchEvent(_local3);
return (_local3.data);
};
if (canActivateLocalComponent(_arg1)){
return (true);
};
return (false);
}
mx_internal function get noTopMostIndex():int{
return (_noTopMostIndex);
}
override public function get numChildren():int{
return ((noTopMostIndex - applicationIndex));
}
private function canActivateLocalComponent(_arg1:Object):Boolean{
if ((((((((_arg1 is Sprite)) && ((_arg1 is IUIComponent)))) && (Sprite(_arg1).visible))) && (IUIComponent(_arg1).enabled))){
return (true);
};
return (false);
}
private function preloader_preloaderDoneHandler(_arg1:Event):void{
var _local2:IUIComponent = topLevelWindow;
preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
_popUpChildren.removeChild(preloader);
preloader = null;
mouseCatcher = new FlexSprite();
mouseCatcher.name = "mouseCatcher";
noTopMostIndex++;
super.addChildAt(mouseCatcher, 0);
resizeMouseCatcher();
if (!topLevel){
mouseCatcher.visible = false;
mask = mouseCatcher;
};
noTopMostIndex++;
super.addChildAt(DisplayObject(_local2), 1);
_local2.dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
}
private function initializeTopLevelWindow(_arg1:Event):void{
var _local2:IUIComponent;
var _local3:DisplayObjectContainer;
var _local4:ISystemManager;
var _local5:DisplayObject;
initialized = true;
if (((!(parent)) && (parentAllowsChild))){
return;
};
if (!topLevel){
_local3 = parent.parent;
if (!_local3){
return;
};
while (_local3) {
if ((_local3 is IUIComponent)){
_local4 = IUIComponent(_local3).systemManager;
if (((_local4) && (!(_local4.isTopLevel())))){
_local4 = _local4.topLevelSystemManager;
};
_topLevelSystemManager = _local4;
break;
};
_local3 = _local3.parent;
};
};
if (((isTopLevelRoot()) || ((getSandboxRoot() == this)))){
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true);
};
if (((isTopLevelRoot()) && (stage))){
stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
} else {
if (((topLevel) && (stage))){
_local5 = getSandboxRoot();
if (_local5 != this){
_local5.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
};
};
};
_local2 = (topLevelWindow = IUIComponent(create()));
document = _local2;
if (document){
IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
if (!LoaderConfig._url){
LoaderConfig._url = loaderInfo.url;
LoaderConfig._parameters = loaderInfo.parameters;
};
if (((isStageRoot) && (stage))){
_width = stage.stageWidth;
_height = stage.stageHeight;
IFlexDisplayObject(_local2).setActualSize(_width, _height);
} else {
IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height);
};
if (preloader){
preloader.registerApplication(_local2);
};
addingChild(DisplayObject(_local2));
childAdded(DisplayObject(_local2));
} else {
document = this;
};
}
final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (super.addChildAt(_arg1, _arg2));
}
mx_internal function dispatchActivatedWindowEvent(_arg1:DisplayObject):void{
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = getSandboxRoot();
_local4 = !((_local3 == this));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, false, false, {notifier:_local2, window:(_local4) ? _arg1 : NameUtil.displayObjectToString(_arg1)});
if (_local4){
_local3.dispatchEvent(_local5);
} else {
_local2.dispatchEvent(_local5);
};
};
}
private function nextFrameTimerHandler(_arg1:TimerEvent):void{
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.reset();
};
}
public function get numModalWindows():int{
return (_numModalWindows);
}
private function areFormsEqual(_arg1:Object, _arg2:Object):Boolean{
if (_arg1 == _arg2){
return (true);
};
if ((((_arg1 is RemotePopUp)) && ((_arg2 is RemotePopUp)))){
return (areRemotePopUpsEqual(_arg1, _arg2));
};
return (false);
}
public function isTopLevelWindow(_arg1:DisplayObject):Boolean{
return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow))));
}
private function removePlaceholderId(_arg1:String):void{
delete idToPlaceholder[_arg1];
}
override public function get width():Number{
return (_width);
}
private function dispatchActivatedApplicationEvent():void{
var _local2:SWFBridgeEvent;
var _local1:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local1){
_local2 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, false, false);
_local1.dispatchEvent(_local2);
};
}
private function otherSystemManagerMouseListener(_arg1:SandboxMouseEvent):void{
if (dispatchingToSystemManagers){
return;
};
dispatchEventFromSWFBridges(_arg1);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local2.name = "sameSandbox";
_local2.value = _arg1;
getSandboxRoot().dispatchEvent(_local2);
if (!_local2.value){
dispatchEvent(_arg1);
};
}
private function hideMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
} else {
if (eventProxy){
SystemManagerGlobals.showMouseCursor = false;
};
};
}
private function getTopLevelSystemManager(_arg1:DisplayObject):ISystemManager{
var _local3:ISystemManager;
var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.root);
if (((((!(_local2)) || ((_local2 is Stage)))) && ((_arg1 is IUIComponent)))){
_local2 = DisplayObjectContainer(IUIComponent(_arg1).systemManager);
};
if ((_local2 is ISystemManager)){
_local3 = ISystemManager(_local2);
if (!_local3.isTopLevel()){
_local3 = _local3.topLevelSystemManager;
};
};
return (_local3);
}
public function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean{
return (!((getSWFBridgeOfDisplayObject(_arg1) == null)));
}
public function move(_arg1:Number, _arg2:Number):void{
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
public function get parentAllowsChild():Boolean{
try {
return (loaderInfo.parentAllowsChild);
} catch(error:Error) {
};
return (false);
}
private function preloader_initProgressHandler(_arg1:Event):void{
preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
deferredNextFrame();
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
private function activateFormSandboxEventHandler(_arg1:Event):void{
var _local2:SWFBridgeEvent = SWFBridgeEvent.marshal(_arg1);
if (!forwardFormEvent(_local2)){
activateForm(new RemotePopUp(_local2.data.window, _local2.data.notifier));
};
}
mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{
addingChild(_arg1);
super.addChild(_arg1);
childAdded(_arg1);
return (_arg1);
}
public static function getSWFRoot(_arg1:Object):DisplayObject{
var p:*;
var sm:ISystemManager;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for (p in allSystemManagers) {
sm = (p as ISystemManager);
domain = sm.loaderInfo.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return ((sm as DisplayObject));
};
} catch(e:Error) {
};
};
return (null);
}
private static function areRemotePopUpsEqual(_arg1:Object, _arg2:Object):Boolean{
if (!(_arg1 is RemotePopUp)){
return (false);
};
if (!(_arg2 is RemotePopUp)){
return (false);
};
var _local3:RemotePopUp = RemotePopUp(_arg1);
var _local4:RemotePopUp = RemotePopUp(_arg2);
if ((((((_local3.window == _local4.window)) && (_local3.bridge))) && (_local4.bridge))){
return (true);
};
return (false);
}
private static function getChildListIndex(_arg1:IChildList, _arg2:Object):int{
var childList = _arg1;
var f = _arg2;
var index = -1;
try {
index = childList.getChildIndex(DisplayObject(f));
} catch(e:ArgumentError) {
};
return (index);
}
mx_internal static function registerInitCallback(_arg1:Function):void{
if (((!(allSystemManagers)) || (!(lastSystemManager)))){
return;
};
var _local2:SystemManager = lastSystemManager;
if (_local2.doneExecutingInitCallbacks){
_arg1(_local2);
} else {
_local2.initCallbackFunctions.push(_arg1);
};
}
private static function isRemotePopUp(_arg1:Object):Boolean{
return (!((_arg1 is IFocusManagerContainer)));
}
}
}//package mx.managers
Section 389
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var changingListenersInOtherSystemManagers:Boolean;
public static var bootstrapLoaderInfoURL:String;
public static var showMouseCursor:Boolean;
}
}//package mx.managers
Section 390
//SystemManagerProxy (mx.managers.SystemManagerProxy)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.utils.*;
public class SystemManagerProxy extends SystemManager {
private var _systemManager:ISystemManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function SystemManagerProxy(_arg1:ISystemManager){
_systemManager = _arg1;
topLevel = true;
super.addEventListener(MouseEvent.MOUSE_DOWN, proxyMouseDownHandler, true);
}
override public function create(... _args):Object{
return (IFlexModuleFactory(_systemManager).create.apply(this, _args));
}
public function get systemManager():ISystemManager{
return (_systemManager);
}
override public function activate(_arg1:IFocusManagerContainer):void{
var _local3:Boolean;
var _local4:SWFBridgeEvent;
var _local2:IEventDispatcher = (_systemManager.swfBridgeGroup) ? _systemManager.swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = SecurityUtil.hasMutualTrustBetweenParentAndChild(ISWFBridgeProvider(_systemManager));
_local4 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, false, false, {notifier:_local2, window:(_local3) ? this : NameUtil.displayObjectToString(this)});
_systemManager.getSandboxRoot().dispatchEvent(_local4);
};
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
_systemManager.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function deactivateByProxy(_arg1:IFocusManagerContainer):void{
if (_arg1){
_arg1.focusManager.deactivate();
};
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
_systemManager.removeEventListener(_arg1, _arg2, _arg3);
}
override public function get document():Object{
return (findFocusManagerContainer(this));
}
public function activateByProxy(_arg1:IFocusManagerContainer):void{
super.activate(_arg1);
}
override public function removeChildBridge(_arg1:IEventDispatcher):void{
_systemManager.removeChildBridge(_arg1);
}
override public function get swfBridgeGroup():ISWFBridgeGroup{
return (_systemManager.swfBridgeGroup);
}
override public function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void{
_systemManager.addChildBridge(_arg1, _arg2);
}
override public function useSWFBridge():Boolean{
return (_systemManager.useSWFBridge());
}
override public function get screen():Rectangle{
return (_systemManager.screen);
}
override public function set swfBridgeGroup(_arg1:ISWFBridgeGroup):void{
}
private function proxyMouseDownHandler(_arg1:MouseEvent):void{
if (findFocusManagerContainer(this)){
SystemManager(_systemManager).dispatchActivatedWindowEvent(this);
};
}
override public function deactivate(_arg1:IFocusManagerContainer):void{
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:ISystemManager = _systemManager;
var _local3:IEventDispatcher = (_local2.swfBridgeGroup) ? _local2.swfBridgeGroup.parentBridge : null;
if (_local3){
_local4 = SecurityUtil.hasMutualTrustBetweenParentAndChild(ISWFBridgeProvider(_systemManager));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, false, false, {notifier:_local3, window:(_local4) ? this : NameUtil.displayObjectToString(this)});
_systemManager.getSandboxRoot().dispatchEvent(_local5);
};
}
override public function set document(_arg1:Object):void{
}
override public function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle{
return (_systemManager.getVisibleApplicationRect(_arg1));
}
override public function getDefinitionByName(_arg1:String):Object{
return (_systemManager.getDefinitionByName(_arg1));
}
}
}//package mx.managers
Section 391
//SystemRawChildrenList (mx.managers.SystemRawChildrenList)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
public class SystemRawChildrenList implements IChildList {
private var owner:SystemManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function SystemRawChildrenList(_arg1:SystemManager){
this.owner = _arg1;
}
public function getChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_getChildAt(_arg1));
}
public function addChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_addChild(_arg1));
}
public function getChildIndex(_arg1:DisplayObject):int{
return (owner.mx_internal::rawChildren_getChildIndex(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2);
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_removeChildAt(_arg1));
}
public function get numChildren():int{
return (owner.mx_internal::$numChildren);
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2));
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function contains(_arg1:DisplayObject):Boolean{
return (owner.mx_internal::rawChildren_contains(_arg1));
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_removeChild(_arg1));
}
}
}//package mx.managers
Section 392
//ToolTipManager (mx.managers.ToolTipManager)
package mx.managers {
import flash.display.*;
import mx.core.*;
import flash.events.*;
import mx.effects.*;
public class ToolTipManager extends EventDispatcher {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var implClassDependency:ToolTipManagerImpl;
private static var _impl:IToolTipManager2;
mx_internal static function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
impl.registerToolTip(_arg1, _arg2, _arg3);
}
public static function get enabled():Boolean{
return (impl.enabled);
}
public static function set enabled(_arg1:Boolean):void{
impl.enabled = _arg1;
}
public static function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{
return (impl.createToolTip(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public static function set hideDelay(_arg1:Number):void{
impl.hideDelay = _arg1;
}
public static function set showDelay(_arg1:Number):void{
impl.showDelay = _arg1;
}
public static function get showDelay():Number{
return (impl.showDelay);
}
public static function destroyToolTip(_arg1:IToolTip):void{
return (impl.destroyToolTip(_arg1));
}
public static function get scrubDelay():Number{
return (impl.scrubDelay);
}
public static function get toolTipClass():Class{
return (impl.toolTipClass);
}
mx_internal static function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
impl.registerErrorString(_arg1, _arg2, _arg3);
}
mx_internal static function sizeTip(_arg1:IToolTip):void{
impl.sizeTip(_arg1);
}
public static function set currentTarget(_arg1:DisplayObject):void{
impl.currentTarget = _arg1;
}
public static function set showEffect(_arg1:IAbstractEffect):void{
impl.showEffect = _arg1;
}
private static function get impl():IToolTipManager2{
if (!_impl){
_impl = IToolTipManager2(Singleton.getInstance("mx.managers::IToolTipManager2"));
};
return (_impl);
}
public static function get hideDelay():Number{
return (impl.hideDelay);
}
public static function set hideEffect(_arg1:IAbstractEffect):void{
impl.hideEffect = _arg1;
}
public static function set scrubDelay(_arg1:Number):void{
impl.scrubDelay = _arg1;
}
public static function get currentToolTip():IToolTip{
return (impl.currentToolTip);
}
public static function set currentToolTip(_arg1:IToolTip):void{
impl.currentToolTip = _arg1;
}
public static function get showEffect():IAbstractEffect{
return (impl.showEffect);
}
public static function get currentTarget():DisplayObject{
return (impl.currentTarget);
}
public static function get hideEffect():IAbstractEffect{
return (impl.hideEffect);
}
public static function set toolTipClass(_arg1:Class):void{
impl.toolTipClass = _arg1;
}
}
}//package mx.managers
Section 393
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.styles.*;
import mx.controls.*;
import mx.effects.*;
import flash.utils.*;
import mx.validators.*;
public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager2 {
private var _enabled:Boolean;// = true
private var _showDelay:Number;// = 500
private var _hideEffect:IAbstractEffect;
mx_internal var hideTimer:Timer;
private var _scrubDelay:Number;// = 100
private var _toolTipClass:Class;
mx_internal var showTimer:Timer;
private var sandboxRoot:IEventDispatcher;// = null
mx_internal var currentText:String;
private var _currentToolTip:DisplayObject;
mx_internal var scrubTimer:Timer;
mx_internal var previousTarget:DisplayObject;
private var _currentTarget:DisplayObject;
private var systemManager:ISystemManager;// = null
private var _showEffect:IAbstractEffect;
private var _hideDelay:Number;// = 10000
mx_internal var initialized:Boolean;// = false
mx_internal var isError:Boolean;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var instance:IToolTipManager2;
public function ToolTipManagerImpl(){
_toolTipClass = ToolTip;
super();
if (instance){
throw (new Error("Instance already exists."));
};
this.systemManager = (SystemManagerGlobals.topLevelSystemManagers[0] as ISystemManager);
sandboxRoot = this.systemManager.getSandboxRoot();
sandboxRoot.addEventListener(InterManagerRequest.TOOLTIP_MANAGER_REQUEST, marshalToolTipManagerHandler, false, 0, true);
var _local1:InterManagerRequest = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local1.name = "update";
sandboxRoot.dispatchEvent(_local1);
}
mx_internal function systemManager_mouseDownHandler(_arg1:MouseEvent):void{
reset();
}
public function set showDelay(_arg1:Number):void{
_showDelay = _arg1;
}
mx_internal function showTimer_timerHandler(_arg1:TimerEvent):void{
if (currentTarget){
createTip();
initializeTip();
positionTip();
showTip();
};
}
mx_internal function hideEffectEnded():void{
var _local1:ToolTipEvent;
reset();
if (previousTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_END);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
}
public function set scrubDelay(_arg1:Number):void{
_scrubDelay = _arg1;
}
public function get currentToolTip():IToolTip{
return ((_currentToolTip as IToolTip));
}
private function mouseIsOver(_arg1:DisplayObject):Boolean{
if (((!(_arg1)) || (!(_arg1.stage)))){
return (false);
};
if ((((_arg1.stage.mouseX == 0)) && ((_arg1.stage.mouseY == 0)))){
return (false);
};
return (_arg1.hitTestPoint(_arg1.stage.mouseX, _arg1.stage.mouseY, true));
}
mx_internal function toolTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
public function get enabled():Boolean{
return (_enabled);
}
public function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{
var _local6:ToolTip = new ToolTip();
var _local7:ISystemManager = (_arg5) ? (_arg5.systemManager as ISystemManager) : (ApplicationGlobals.application.systemManager as ISystemManager);
_local7.topLevelSystemManager.addChildToSandboxRoot("toolTipChildren", (_local6 as DisplayObject));
if (_arg4){
_local6.setStyle("styleName", "errorTip");
_local6.setStyle("borderStyle", _arg4);
};
_local6.text = _arg1;
sizeTip(_local6);
_local6.move(_arg2, _arg3);
return ((_local6 as IToolTip));
}
mx_internal function reset():void{
var _local1:ISystemManager;
showTimer.reset();
hideTimer.reset();
if (currentToolTip){
if (((showEffect) || (hideEffect))){
currentToolTip.removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
EffectManager.endEffectsForTarget(currentToolTip);
_local1 = (currentToolTip.systemManager as ISystemManager);
_local1.topLevelSystemManager.removeChildFromSandboxRoot("toolTipChildren", (currentToolTip as DisplayObject));
currentToolTip = null;
scrubTimer.delay = scrubDelay;
scrubTimer.reset();
if (scrubDelay > 0){
scrubTimer.delay = scrubDelay;
scrubTimer.start();
};
};
}
public function set currentToolTip(_arg1:IToolTip):void{
_currentToolTip = (_arg1 as DisplayObject);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = "currentToolTip";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
}
public function get toolTipClass():Class{
return (_toolTipClass);
}
private function hideImmediately(_arg1:DisplayObject):void{
checkIfTargetChanged(null);
}
mx_internal function showTip():void{
var _local2:ISystemManager;
var _local1:ToolTipEvent = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW);
_local1.toolTip = currentToolTip;
currentTarget.dispatchEvent(_local1);
if (isError){
currentTarget.addEventListener("change", changeHandler);
} else {
_local2 = getSystemManager(currentTarget);
_local2.addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
};
currentToolTip.visible = true;
if (!showEffect){
showEffectEnded();
};
}
mx_internal function effectEndHandler(_arg1:EffectEvent):void{
if (_arg1.effectInstance.effect == showEffect){
showEffectEnded();
} else {
if (_arg1.effectInstance.effect == hideEffect){
hideEffectEnded();
};
};
}
public function get hideDelay():Number{
return (_hideDelay);
}
public function get currentTarget():DisplayObject{
return (_currentTarget);
}
mx_internal function showEffectEnded():void{
var _local1:ToolTipEvent;
if (hideDelay == 0){
hideTip();
} else {
if (hideDelay < Infinity){
hideTimer.delay = hideDelay;
hideTimer.start();
};
};
if (currentTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN);
_local1.toolTip = currentToolTip;
currentTarget.dispatchEvent(_local1);
};
}
public function get hideEffect():IAbstractEffect{
return (_hideEffect);
}
mx_internal function changeHandler(_arg1:Event):void{
reset();
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
}
mx_internal function errorTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
public function get showDelay():Number{
return (_showDelay);
}
public function get scrubDelay():Number{
return (_scrubDelay);
}
public function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
if (((!(_arg2)) && (_arg3))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
if (mouseIsOver(_arg1)){
showImmediately(_arg1);
};
} else {
if (((_arg2) && (!(_arg3)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
if (mouseIsOver(_arg1)){
hideImmediately(_arg1);
};
};
};
}
mx_internal function initialize():void{
if (!showTimer){
showTimer = new Timer(0, 1);
showTimer.addEventListener(TimerEvent.TIMER, showTimer_timerHandler);
};
if (!hideTimer){
hideTimer = new Timer(0, 1);
hideTimer.addEventListener(TimerEvent.TIMER, hideTimer_timerHandler);
};
if (!scrubTimer){
scrubTimer = new Timer(0, 1);
};
initialized = true;
}
public function destroyToolTip(_arg1:IToolTip):void{
var _local2:ISystemManager = (_arg1.systemManager as ISystemManager);
_local2.topLevelSystemManager.removeChildFromSandboxRoot("toolTipChildren", DisplayObject(_arg1));
}
mx_internal function checkIfTargetChanged(_arg1:DisplayObject):void{
if (!enabled){
return;
};
findTarget(_arg1);
if (currentTarget != previousTarget){
targetChanged();
previousTarget = currentTarget;
};
}
private function marshalToolTipManagerHandler(_arg1:Event):void{
var _local2:InterManagerRequest;
if ((_arg1 is InterManagerRequest)){
return;
};
var _local3:Object = _arg1;
switch (_local3.name){
case "currentToolTip":
_currentToolTip = _local3.value;
break;
case ToolTipEvent.TOOL_TIP_HIDE:
if ((_currentToolTip is IToolTip)){
hideTip();
};
break;
case "update":
_arg1.stopImmediatePropagation();
_local2 = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = "currentToolTip";
_local2.value = _currentToolTip;
sandboxRoot.dispatchEvent(_local2);
};
}
public function set toolTipClass(_arg1:Class):void{
_toolTipClass = _arg1;
}
private function getGlobalBounds(_arg1:DisplayObject, _arg2:DisplayObject):Rectangle{
var _local3:Point = new Point(0, 0);
_local3 = _arg1.localToGlobal(_local3);
_local3 = _arg2.globalToLocal(_local3);
return (new Rectangle(_local3.x, _local3.y, _arg1.width, _arg1.height));
}
mx_internal function positionTip():void{
var _local1:Number;
var _local2:Number;
var _local5:Rectangle;
var _local6:Point;
var _local7:IToolTip;
var _local8:Number;
var _local9:Number;
var _local10:ISystemManager;
var _local11:Number;
var _local12:Number;
var _local3:Number = currentToolTip.screen.width;
var _local4:Number = currentToolTip.screen.height;
if (isError){
_local5 = getGlobalBounds(currentTarget, currentToolTip.root);
_local1 = (_local5.right + 4);
_local2 = (_local5.top - 1);
if ((_local1 + currentToolTip.width) > _local3){
_local8 = NaN;
_local9 = NaN;
_local1 = (_local5.left - 2);
if (((_local1 + currentToolTip.width) + 4) > _local3){
_local8 = ((_local3 - _local1) - 4);
_local9 = Object(toolTipClass).maxWidth;
Object(toolTipClass).maxWidth = _local8;
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
Object(toolTipClass).maxWidth = _local9;
} else {
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
};
if ((currentToolTip.height + 2) < _local5.top){
_local2 = (_local5.top - (currentToolTip.height + 2));
} else {
_local2 = (_local5.bottom + 2);
if (!isNaN(_local8)){
Object(toolTipClass).maxWidth = _local8;
};
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow");
};
currentToolTip["text"] = currentToolTip["text"];
if (!isNaN(_local9)){
Object(toolTipClass).maxWidth = _local9;
};
};
};
sizeTip(currentToolTip);
_local6 = new Point(_local1, _local2);
_local7 = currentToolTip;
_local1 = _local6.x;
_local2 = _local6.y;
} else {
_local10 = getSystemManager(currentTarget);
_local1 = (DisplayObject(_local10).mouseX + 11);
_local2 = (DisplayObject(_local10).mouseY + 22);
_local11 = currentToolTip.width;
if ((_local1 + _local11) > _local3){
_local1 = (_local3 - _local11);
};
_local12 = currentToolTip.height;
if ((_local2 + _local12) > _local4){
_local2 = (_local4 - _local12);
};
_local6 = new Point(_local1, _local2);
_local6 = DisplayObject(_local10).localToGlobal(_local6);
_local6 = DisplayObject(sandboxRoot).globalToLocal(_local6);
_local1 = _local6.x;
_local2 = _local6.y;
};
currentToolTip.move(_local1, _local2);
}
mx_internal function errorTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
mx_internal function findTarget(_arg1:DisplayObject):void{
while (_arg1) {
if ((_arg1 is IValidatorListener)){
currentText = IValidatorListener(_arg1).errorString;
if (((!((currentText == null))) && (!((currentText == ""))))){
currentTarget = _arg1;
isError = true;
return;
};
};
if ((_arg1 is IToolTipManagerClient)){
currentText = IToolTipManagerClient(_arg1).toolTip;
if (currentText != null){
currentTarget = _arg1;
isError = false;
return;
};
};
_arg1 = _arg1.parent;
};
currentText = null;
currentTarget = null;
}
public function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
if (((!(_arg2)) && (_arg3))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
if (mouseIsOver(_arg1)){
showImmediately(_arg1);
};
} else {
if (((_arg2) && (!(_arg3)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
if (mouseIsOver(_arg1)){
hideImmediately(_arg1);
};
};
};
}
private function showImmediately(_arg1:DisplayObject):void{
var _local2:Number = ToolTipManager.showDelay;
ToolTipManager.showDelay = 0;
checkIfTargetChanged(_arg1);
ToolTipManager.showDelay = _local2;
}
public function set hideDelay(_arg1:Number):void{
_hideDelay = _arg1;
}
private function getSystemManager(_arg1:DisplayObject):ISystemManager{
return (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).systemManager : null);
}
public function set currentTarget(_arg1:DisplayObject):void{
_currentTarget = _arg1;
}
public function sizeTip(_arg1:IToolTip):void{
if ((_arg1 is IInvalidating)){
IInvalidating(_arg1).validateNow();
};
_arg1.setActualSize(_arg1.getExplicitOrMeasuredWidth(), _arg1.getExplicitOrMeasuredHeight());
}
public function set showEffect(_arg1:IAbstractEffect):void{
_showEffect = (_arg1 as IAbstractEffect);
}
mx_internal function targetChanged():void{
var _local1:ToolTipEvent;
var _local2:InterManagerRequest;
if (!initialized){
initialize();
};
if (((previousTarget) && (currentToolTip))){
if ((currentToolTip is IToolTip)){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
} else {
_local2 = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = ToolTipEvent.TOOL_TIP_HIDE;
sandboxRoot.dispatchEvent(_local2);
};
};
reset();
if (currentTarget){
if (currentText == ""){
return;
};
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START);
currentTarget.dispatchEvent(_local1);
if ((((showDelay == 0)) || (scrubTimer.running))){
createTip();
initializeTip();
positionTip();
showTip();
} else {
showTimer.delay = showDelay;
showTimer.start();
};
};
}
public function set hideEffect(_arg1:IAbstractEffect):void{
_hideEffect = (_arg1 as IAbstractEffect);
}
mx_internal function hideTimer_timerHandler(_arg1:TimerEvent):void{
hideTip();
}
mx_internal function initializeTip():void{
if ((currentToolTip is IToolTip)){
IToolTip(currentToolTip).text = currentText;
};
if (((isError) && ((currentToolTip is IStyleClient)))){
IStyleClient(currentToolTip).setStyle("styleName", "errorTip");
};
sizeTip(currentToolTip);
if ((currentToolTip is IStyleClient)){
if (showEffect){
IStyleClient(currentToolTip).setStyle("showEffect", showEffect);
};
if (hideEffect){
IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect);
};
};
if (((showEffect) || (hideEffect))){
currentToolTip.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
}
public function get showEffect():IAbstractEffect{
return (_showEffect);
}
mx_internal function toolTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
mx_internal function hideTip():void{
var _local1:ToolTipEvent;
var _local2:ISystemManager;
if (previousTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
if (currentToolTip){
currentToolTip.visible = false;
};
if (isError){
if (currentTarget){
currentTarget.removeEventListener("change", changeHandler);
};
} else {
if (previousTarget){
_local2 = getSystemManager(previousTarget);
_local2.removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
};
};
if (!hideEffect){
hideEffectEnded();
};
}
mx_internal function createTip():void{
var _local1:ToolTipEvent = new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE);
currentTarget.dispatchEvent(_local1);
if (_local1.toolTip){
currentToolTip = _local1.toolTip;
} else {
currentToolTip = new toolTipClass();
};
currentToolTip.visible = false;
var _local2:ISystemManager = (getSystemManager(currentTarget) as ISystemManager);
_local2.topLevelSystemManager.addChildToSandboxRoot("toolTipChildren", (currentToolTip as DisplayObject));
}
public static function getInstance():IToolTipManager2{
if (!instance){
instance = new (ToolTipManagerImpl);
};
return (instance);
}
}
}//package mx.managers
Section 394
//LoaderConfig (mx.messaging.config.LoaderConfig)
package mx.messaging.config {
import mx.core.*;
public class LoaderConfig {
mx_internal static const VERSION:String = "3.2.0.3958";
mx_internal static var _url:String = null;
mx_internal static var _parameters:Object;
public static function get url():String{
return (_url);
}
public static function get parameters():Object{
return (_parameters);
}
}
}//package mx.messaging.config
Section 395
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import mx.core.*;
import flash.events.*;
import flash.system.*;
import flash.utils.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 396
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.display.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
var _local4:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local4 = new ModuleEvent(ModuleEvent.PROGRESS);
_local4.bytesLoaded = info.size;
_local4.bytesTotal = info.size;
dispatchEvent(_local4);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2, _arg3);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
loader.content.removeEventListener("error", moduleErrorHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
loader.content.addEventListener("error", moduleErrorHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
private function loadBytes(_arg1:ApplicationDomain, _arg2:ByteArray):void{
var _local3:LoaderContext = new LoaderContext();
_local3.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local3)){
_local3["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.loadBytes(_arg2, _local3);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_arg3){
loadBytes(_arg1, _arg3);
return;
};
if (_url.indexOf("published://") == 0){
return;
};
var _local4:URLRequest = new URLRequest(_url);
var _local5:LoaderContext = new LoaderContext();
_local5.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local5.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local5.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local4, _local5);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function moduleErrorHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
if ((_arg1 is ModuleEvent)){
_local2 = ModuleEvent(_arg1);
} else {
_local2 = new ModuleEvent(ModuleEvent.ERROR);
};
dispatchEvent(_local2);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 397
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 398
//DownloadProgressBar (mx.preloaders.DownloadProgressBar)
package mx.preloaders {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.text.*;
import flash.events.*;
import mx.events.*;
import flash.system.*;
import mx.graphics.*;
import flash.net.*;
import flash.utils.*;
public class DownloadProgressBar extends Sprite implements IPreloaderDisplay {
protected var MINIMUM_DISPLAY_TIME:uint;// = 0
private var _barFrameRect:RoundedRectangle;
private var _stageHeight:Number;// = 375
private var _stageWidth:Number;// = 500
private var _percentRect:Rectangle;
private var _percentObj:TextField;
private var _downloadingLabel:String;// = "Loading"
private var _showProgressBar:Boolean;// = true
private var _yOffset:Number;// = 20
private var _initProgressCount:uint;// = 0
private var _barSprite:Sprite;
private var _visible:Boolean;// = false
private var _barRect:RoundedRectangle;
private var _showingDisplay:Boolean;// = false
private var _backgroundSize:String;// = ""
private var _initProgressTotal:uint;// = 12
private var _startedInit:Boolean;// = false
private var _showLabel:Boolean;// = true
private var _value:Number;// = 0
private var _labelRect:Rectangle;
private var _backgroundImage:Object;
private var _backgroundAlpha:Number;// = 1
private var _backgroundColor:uint;
private var _startedLoading:Boolean;// = false
private var _showPercentage:Boolean;// = false
private var _barFrameSprite:Sprite;
protected var DOWNLOAD_PERCENTAGE:uint;// = 60
private var _displayStartCount:uint;// = 0
private var _labelObj:TextField;
private var _borderRect:RoundedRectangle;
private var _maximum:Number;// = 0
private var _displayTime:int;
private var _label:String;// = ""
private var _preloader:Sprite;
private var _xOffset:Number;// = 20
private var _startTime:int;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var _initializingLabel:String = "Initializing";
public function DownloadProgressBar(){
_labelRect = labelRect;
_percentRect = percentRect;
_borderRect = borderRect;
_barFrameRect = barFrameRect;
_barRect = barRect;
super();
}
protected function getPercentLoaded(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
if ((((((((_arg1 == 0)) || ((_arg2 == 0)))) || (isNaN(_arg2)))) || (isNaN(_arg1)))){
return (0);
};
_local3 = ((100 * _arg1) / _arg2);
if (((isNaN(_local3)) || ((_local3 <= 0)))){
return (0);
};
if (_local3 > 99){
return (99);
};
return (Math.round(_local3));
}
protected function get labelFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0x333333;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
private function calcScale():void{
var _local1:Number;
if ((((stageWidth < 160)) || ((stageHeight < 120)))){
scaleX = 1;
scaleY = 1;
} else {
if ((((stageWidth < 240)) || ((stageHeight < 150)))){
createChildren();
_local1 = Math.min((stageWidth / 240), (stageHeight / 150));
scaleX = _local1;
scaleY = _local1;
} else {
createChildren();
};
};
}
protected function get percentRect():Rectangle{
return (new Rectangle(108, 4, 34, 16));
}
protected function set showLabel(_arg1:Boolean):void{
_showLabel = _arg1;
draw();
}
private function calcBackgroundSize():Number{
var _local2:int;
var _local1:Number = NaN;
if (backgroundSize){
_local2 = backgroundSize.indexOf("%");
if (_local2 != -1){
_local1 = Number(backgroundSize.substr(0, _local2));
};
};
return (_local1);
}
private function show():void{
_showingDisplay = true;
calcScale();
draw();
_displayTime = getTimer();
}
private function loadBackgroundImage(_arg1:Object):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var classOrString = _arg1;
if (((classOrString) && ((classOrString as Class)))){
cls = Class(classOrString);
initBackgroundImage(new (cls));
} else {
if (((classOrString) && ((classOrString is String)))){
try {
cls = Class(getDefinitionByName(String(classOrString)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(classOrString)), loaderContext);
};
};
};
}
protected function set showPercentage(_arg1:Boolean):void{
_showPercentage = _arg1;
draw();
}
protected function get barFrameRect():RoundedRectangle{
return (new RoundedRectangle(14, 40, 154, 4));
}
private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{
}
protected function rslErrorHandler(_arg1:RSLEvent):void{
_preloader.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_preloader.removeEventListener(Event.COMPLETE, completeHandler);
_preloader.removeEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
_preloader.removeEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);
_preloader.removeEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);
_preloader.removeEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
_preloader.removeEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
if (!_showingDisplay){
show();
_showingDisplay = true;
};
label = ((("RSL Error " + (_arg1.rslIndex + 1)) + " of ") + _arg1.rslTotal);
var _local2:ErrorField = new ErrorField(this);
_local2.show(_arg1.errorText);
}
protected function rslCompleteHandler(_arg1:RSLEvent):void{
label = ((("Loaded library " + _arg1.rslIndex) + " of ") + _arg1.rslTotal);
}
protected function get borderRect():RoundedRectangle{
return (new RoundedRectangle(0, 0, 182, 60, 4));
}
protected function showDisplayForDownloading(_arg1:int, _arg2:ProgressEvent):Boolean{
return ((((_arg1 > 700)) && ((_arg2.bytesLoaded < (_arg2.bytesTotal / 2)))));
}
protected function createChildren():void{
var _local2:TextField;
var _local3:TextField;
var _local1:Graphics = graphics;
if (backgroundColor != 4294967295){
_local1.beginFill(backgroundColor, backgroundAlpha);
_local1.drawRect(0, 0, stageWidth, stageHeight);
};
if (backgroundImage != null){
loadBackgroundImage(backgroundImage);
};
_barFrameSprite = new Sprite();
_barSprite = new Sprite();
addChild(_barFrameSprite);
addChild(_barSprite);
_local1.beginFill(0xCCCCCC, 0.4);
_local1.drawRoundRect(calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height, (_borderRect.cornerRadius * 2), (_borderRect.cornerRadius * 2));
_local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2)));
_local1.endFill();
_local1.beginFill(0xCCCCCC, 0.4);
_local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2)));
_local1.endFill();
var _local4:Graphics = _barFrameSprite.graphics;
var _local5:Matrix = new Matrix();
_local5.createGradientBox(_barFrameRect.width, _barFrameRect.height, (Math.PI / 2), calcX(_barFrameRect.x), calcY(_barFrameRect.y));
_local4.beginGradientFill(GradientType.LINEAR, [6054502, 11909306], [1, 1], [0, 0xFF], _local5);
_local4.drawRoundRect(calcX(_barFrameRect.x), calcY(_barFrameRect.y), _barFrameRect.width, _barFrameRect.height, (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2));
_local4.drawRoundRect(calcX((_barFrameRect.x + 1)), calcY((_barFrameRect.y + 1)), (_barFrameRect.width - 2), (_barFrameRect.height - 2), (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2));
_local4.endFill();
_labelObj = new TextField();
_labelObj.x = calcX(_labelRect.x);
_labelObj.y = calcY(_labelRect.y);
_labelObj.width = _labelRect.width;
_labelObj.height = _labelRect.height;
_labelObj.selectable = false;
_labelObj.defaultTextFormat = labelFormat;
addChild(_labelObj);
_percentObj = new TextField();
_percentObj.x = calcX(_percentRect.x);
_percentObj.y = calcY(_percentRect.y);
_percentObj.width = _percentRect.width;
_percentObj.height = _percentRect.height;
_percentObj.selectable = false;
_percentObj.defaultTextFormat = percentFormat;
addChild(_percentObj);
var _local6:RectangularDropShadow = new RectangularDropShadow();
_local6.color = 0;
_local6.angle = 90;
_local6.alpha = 0.6;
_local6.distance = 2;
_local6.tlRadius = (_local6.trRadius = (_local6.blRadius = (_local6.brRadius = _borderRect.cornerRadius)));
_local6.drawShadow(_local1, calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height);
_local1.lineStyle(1, 0xFFFFFF, 0.3);
_local1.moveTo((calcX(_borderRect.x) + _borderRect.cornerRadius), calcY(_borderRect.y));
_local1.lineTo(((calcX(_borderRect.x) - _borderRect.cornerRadius) + _borderRect.width), calcY(_borderRect.y));
}
private function draw():void{
var _local1:Number;
if (_startedLoading){
if (!_startedInit){
_local1 = Math.round(((getPercentLoaded(_value, _maximum) * DOWNLOAD_PERCENTAGE) / 100));
} else {
_local1 = Math.round((((getPercentLoaded(_value, _maximum) * (100 - DOWNLOAD_PERCENTAGE)) / 100) + DOWNLOAD_PERCENTAGE));
};
} else {
_local1 = getPercentLoaded(_value, _maximum);
};
if (_labelObj){
_labelObj.text = _label;
};
if (_percentObj){
if (!_showPercentage){
_percentObj.visible = false;
_percentObj.text = "";
} else {
_percentObj.text = (String(_local1) + "%");
};
};
if (((_barSprite) && (_barFrameSprite))){
if (!_showProgressBar){
_barSprite.visible = false;
_barFrameSprite.visible = false;
} else {
drawProgressBar(_local1);
};
};
}
private function timerHandler(_arg1:Event=null):void{
dispatchEvent(new Event(Event.COMPLETE));
}
private function hide():void{
}
public function get backgroundSize():String{
return (_backgroundSize);
}
protected function center(_arg1:Number, _arg2:Number):void{
_xOffset = Math.floor(((_arg1 - _borderRect.width) / 2));
_yOffset = Math.floor(((_arg2 - _borderRect.height) / 2));
}
protected function progressHandler(_arg1:ProgressEvent):void{
var _local2:uint = _arg1.bytesLoaded;
var _local3:uint = _arg1.bytesTotal;
var _local4:int = (getTimer() - _startTime);
if (((_showingDisplay) || (showDisplayForDownloading(_local4, _arg1)))){
if (!_startedLoading){
show();
label = downloadingLabel;
_startedLoading = true;
};
setProgress(_arg1.bytesLoaded, _arg1.bytesTotal);
};
}
protected function initProgressHandler(_arg1:Event):void{
var _local3:Number;
var _local2:int = (getTimer() - _startTime);
_initProgressCount++;
if (((!(_showingDisplay)) && (showDisplayForInit(_local2, _initProgressCount)))){
_displayStartCount = _initProgressCount;
show();
} else {
if (_showingDisplay){
if (!_startedInit){
_startedInit = true;
label = initializingLabel;
};
_local3 = ((100 * _initProgressCount) / (_initProgressTotal - _displayStartCount));
setProgress(_local3, 100);
};
};
}
protected function set downloadingLabel(_arg1:String):void{
_downloadingLabel = _arg1;
}
public function get stageWidth():Number{
return (_stageWidth);
}
protected function get showPercentage():Boolean{
return (_showPercentage);
}
override public function get visible():Boolean{
return (_visible);
}
public function set stageHeight(_arg1:Number):void{
_stageHeight = _arg1;
}
public function initialize():void{
_startTime = getTimer();
center(stageWidth, stageHeight);
}
protected function rslProgressHandler(_arg1:RSLEvent):void{
}
protected function get barRect():RoundedRectangle{
return (new RoundedRectangle(14, 39, 154, 6, 0));
}
protected function get percentFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.align = "right";
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
public function set backgroundImage(_arg1:Object):void{
_backgroundImage = _arg1;
}
private function calcX(_arg1:Number):Number{
return ((_arg1 + _xOffset));
}
private function calcY(_arg1:Number):Number{
return ((_arg1 + _yOffset));
}
public function set backgroundAlpha(_arg1:Number):void{
_backgroundAlpha = _arg1;
}
private function initCompleteHandler(_arg1:Event):void{
var _local3:Timer;
var _local2:int = (getTimer() - _displayTime);
if (((_showingDisplay) && ((_local2 < MINIMUM_DISPLAY_TIME)))){
_local3 = new Timer((MINIMUM_DISPLAY_TIME - _local2), 1);
_local3.addEventListener(TimerEvent.TIMER, timerHandler);
_local3.start();
} else {
timerHandler();
};
}
public function set backgroundColor(_arg1:uint):void{
_backgroundColor = _arg1;
}
private function initBackgroundImage(_arg1:DisplayObject):void{
var _local7:Number;
var _local8:Number;
var _local9:Number;
addChildAt(_arg1, 0);
var _local2:Number = _arg1.width;
var _local3:Number = _arg1.height;
var _local4:Number = calcBackgroundSize();
if (isNaN(_local4)){
_local7 = 1;
_local8 = 1;
} else {
_local9 = (_local4 * 0.01);
_local7 = ((_local9 * stageWidth) / _local2);
_local8 = ((_local9 * stageHeight) / _local3);
};
_arg1.scaleX = _local7;
_arg1.scaleY = _local8;
var _local5:Number = Math.round((0.5 * (stageWidth - (_local2 * _local7))));
var _local6:Number = Math.round((0.5 * (stageHeight - (_local3 * _local8))));
_arg1.x = _local5;
_arg1.y = _local6;
if (!isNaN(backgroundAlpha)){
_arg1.alpha = backgroundAlpha;
};
}
public function set backgroundSize(_arg1:String):void{
_backgroundSize = _arg1;
}
protected function showDisplayForInit(_arg1:int, _arg2:int):Boolean{
return ((((_arg1 > 300)) && ((_arg2 == 2))));
}
protected function get downloadingLabel():String{
return (_downloadingLabel);
}
private function loader_completeHandler(_arg1:Event):void{
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
}
protected function setProgress(_arg1:Number, _arg2:Number):void{
if (((((((!(isNaN(_arg1))) && (!(isNaN(_arg2))))) && ((_arg1 >= 0)))) && ((_arg2 > 0)))){
_value = Number(_arg1);
_maximum = Number(_arg2);
draw();
};
}
public function get stageHeight():Number{
return (_stageHeight);
}
public function get backgroundImage():Object{
return (_backgroundImage);
}
public function get backgroundAlpha():Number{
if (!isNaN(_backgroundAlpha)){
return (_backgroundAlpha);
};
return (1);
}
private function drawProgressBar(_arg1:Number):void{
var _local11:Number;
var _local2:Graphics = _barSprite.graphics;
_local2.clear();
var _local3:Array = [0xFFFFFF, 0xFFFFFF];
var _local4:Array = [0, 0xFF];
var _local5:Matrix = new Matrix();
var _local6:Number = ((_barRect.width * _arg1) / 100);
var _local7:Number = (_local6 / 2);
var _local8:Number = (_barRect.height - 4);
var _local9:Number = calcX(_barRect.x);
var _local10:Number = (calcY(_barRect.y) + 2);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.39, 0.85], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, _local8);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.85, 1], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, _local8);
_local7 = (_local6 / 3);
_local8 = _barRect.height;
_local10 = calcY(_barRect.y);
_local11 = ((_local10 + _local8) - 1);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.05, 0.15], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, 1);
_local2.drawRect(_local9, _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.25], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, 1);
_local2.drawRect((_local9 + _local7), _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.25, 0.1], _local4, _local5);
_local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1);
_local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1);
_local7 = (_local6 / 3);
_local8 = _barRect.height;
_local10 = (calcY(_barRect.y) + 1);
_local11 = ((calcY(_barRect.y) + _local8) - 2);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.3], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, 1);
_local2.drawRect(_local9, _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.3, 0.4], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, 1);
_local2.drawRect((_local9 + _local7), _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.4, 0.25], _local4, _local5);
_local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1);
_local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1);
}
public function get backgroundColor():uint{
return (_backgroundColor);
}
public function set stageWidth(_arg1:Number):void{
_stageWidth = _arg1;
}
protected function completeHandler(_arg1:Event):void{
}
protected function set label(_arg1:String):void{
if (!(_arg1 is Function)){
_label = _arg1;
};
draw();
}
public function set preloader(_arg1:Sprite):void{
_preloader = _arg1;
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
_arg1.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);
_arg1.addEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);
_arg1.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
_arg1.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
}
protected function get label():String{
return (_label);
}
protected function get labelRect():Rectangle{
return (new Rectangle(14, 17, 100, 16));
}
override public function set visible(_arg1:Boolean):void{
if (((!(_visible)) && (_arg1))){
show();
} else {
if (((_visible) && (!(_arg1)))){
hide();
};
};
_visible = _arg1;
}
protected function get showLabel():Boolean{
return (_showLabel);
}
public static function get initializingLabel():String{
return (_initializingLabel);
}
public static function set initializingLabel(_arg1:String):void{
_initializingLabel = _arg1;
}
}
}//package mx.preloaders
import flash.display.*;
import flash.text.*;
import flash.system.*;
class ErrorField extends Sprite {
private const TEXT_MARGIN_PX:int = 10;
private const MAX_WIDTH_INCHES:int = 6;
private const MIN_WIDTH_INCHES:int = 2;
private var downloadProgressBar:DownloadProgressBar;
private function ErrorField(_arg1:DownloadProgressBar){
this.downloadProgressBar = _arg1;
}
protected function get labelFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
public function show(_arg1:String):void{
if ((((_arg1 == null)) || ((_arg1.length == 0)))){
return;
};
var _local2:Number = downloadProgressBar.stageWidth;
var _local3:Number = downloadProgressBar.stageHeight;
var _local4:TextField = new TextField();
_local4.autoSize = TextFieldAutoSize.LEFT;
_local4.multiline = true;
_local4.wordWrap = true;
_local4.background = true;
_local4.defaultTextFormat = labelFormat;
_local4.text = _arg1;
_local4.width = Math.max((MIN_WIDTH_INCHES * Capabilities.screenDPI), (_local2 - (TEXT_MARGIN_PX * 2)));
_local4.width = Math.min((MAX_WIDTH_INCHES * Capabilities.screenDPI), _local4.width);
_local4.y = Math.max(0, ((_local3 - TEXT_MARGIN_PX) - _local4.height));
_local4.x = ((_local2 - _local4.width) / 2);
downloadProgressBar.parent.addChild(this);
this.addChild(_local4);
}
}
Section 399
//IPreloaderDisplay (mx.preloaders.IPreloaderDisplay)
package mx.preloaders {
import flash.display.*;
import flash.events.*;
public interface IPreloaderDisplay extends IEventDispatcher {
function set backgroundAlpha(_arg1:Number):void;
function get stageHeight():Number;
function get stageWidth():Number;
function set backgroundColor(_arg1:uint):void;
function set preloader(_arg1:Sprite):void;
function get backgroundImage():Object;
function get backgroundSize():String;
function get backgroundAlpha():Number;
function set stageHeight(_arg1:Number):void;
function get backgroundColor():uint;
function set stageWidth(_arg1:Number):void;
function set backgroundImage(_arg1:Object):void;
function set backgroundSize(_arg1:String):void;
function initialize():void;
}
}//package mx.preloaders
Section 400
//Preloader (mx.preloaders.Preloader)
package mx.preloaders {
import flash.display.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import flash.utils.*;
public class Preloader extends Sprite {
private var app:IEventDispatcher;// = null
private var showDisplay:Boolean;
private var timer:Timer;
private var rslDone:Boolean;// = false
private var displayClass:IPreloaderDisplay;// = null
private var rslListLoader:RSLListLoader;
mx_internal static const VERSION:String = "3.2.0.3958";
private function getByteValues():Object{
var _local1:LoaderInfo = root.loaderInfo;
var _local2:int = _local1.bytesLoaded;
var _local3:int = _local1.bytesTotal;
var _local4:int = (rslListLoader) ? rslListLoader.getItemCount() : 0;
var _local5:int;
while (_local5 < _local4) {
_local2 = (_local2 + rslListLoader.getItem(_local5).loaded);
_local3 = (_local3 + rslListLoader.getItem(_local5).total);
_local5++;
};
return ({loaded:_local2, total:_local3});
}
private function appProgressHandler(_arg1:Event):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
}
private function dispatchAppEndEvent(_arg1:Object=null):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE));
if (!showDisplay){
displayClassCompleteHandler(null);
};
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
dispatchAppEndEvent();
}
mx_internal function rslErrorHandler(_arg1:ErrorEvent):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_ERROR);
_local4.bytesLoaded = 0;
_local4.bytesTotal = 0;
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
_local4.errorText = decodeURI(_arg1.text);
dispatchEvent(_local4);
}
public function initialize(_arg1:Boolean, _arg2:Class, _arg3:uint, _arg4:Number, _arg5:Object, _arg6:String, _arg7:Number, _arg8:Number, _arg9:Array=null, _arg10:Array=null, _arg11:Array=null, _arg12:Array=null):void{
var _local13:int;
var _local14:int;
var _local15:RSLItem;
var _local16:ResourceModuleRSLItem;
if (((((!((_arg9 == null))) || (!((_arg10 == null))))) && (!((_arg11 == null))))){
throw (new Error("RSLs may only be specified by using libs and sizes or rslList, not both."));
};
root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
if (((_arg9) && ((_arg9.length > 0)))){
if (_arg11 == null){
_arg11 = [];
};
_local13 = _arg9.length;
_local14 = 0;
while (_local14 < _local13) {
_local15 = new RSLItem(_arg9[_local14]);
_arg11.push(_local15);
_local14++;
};
};
if (((_arg12) && ((_arg12.length > 0)))){
_local13 = _arg12.length;
_local14 = 0;
while (_local14 < _local13) {
_local16 = new ResourceModuleRSLItem(_arg12[_local14]);
_arg11.push(_local16);
_local14++;
};
};
rslListLoader = new RSLListLoader(_arg11);
this.showDisplay = _arg1;
timer = new Timer(10);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
if (_arg1){
displayClass = new (_arg2);
displayClass.addEventListener(Event.COMPLETE, displayClassCompleteHandler);
addChild(DisplayObject(displayClass));
displayClass.backgroundColor = _arg3;
displayClass.backgroundAlpha = _arg4;
displayClass.backgroundImage = _arg5;
displayClass.backgroundSize = _arg6;
displayClass.stageWidth = _arg7;
displayClass.stageHeight = _arg8;
displayClass.initialize();
displayClass.preloader = this;
};
if (rslListLoader.getItemCount() > 0){
rslListLoader.load(mx_internal::rslProgressHandler, mx_internal::rslCompleteHandler, mx_internal::rslErrorHandler, mx_internal::rslErrorHandler, mx_internal::rslErrorHandler);
} else {
rslDone = true;
};
}
mx_internal function rslProgressHandler(_arg1:ProgressEvent):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_PROGRESS);
_local4.bytesLoaded = _arg1.bytesLoaded;
_local4.bytesTotal = _arg1.bytesTotal;
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
dispatchEvent(_local4);
}
public function registerApplication(_arg1:IEventDispatcher):void{
_arg1.addEventListener("validatePropertiesComplete", appProgressHandler);
_arg1.addEventListener("validateSizeComplete", appProgressHandler);
_arg1.addEventListener("validateDisplayListComplete", appProgressHandler);
_arg1.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
this.app = _arg1;
}
mx_internal function rslCompleteHandler(_arg1:Event):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_COMPLETE);
_local4.bytesLoaded = _local3.total;
_local4.bytesTotal = _local3.total;
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
dispatchEvent(_local4);
rslDone = ((_local2 + 1) == _local4.rslTotal);
}
private function timerHandler(_arg1:TimerEvent):void{
if (!root){
return;
};
var _local2:Object = getByteValues();
var _local3:int = _local2.loaded;
var _local4:int = _local2.total;
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _local3, _local4));
if (((rslDone) && ((((((((_local3 >= _local4)) && ((_local4 > 0)))) || ((((_local4 == 0)) && ((_local3 > 0)))))) || ((((((root is MovieClip)) && ((MovieClip(root).totalFrames > 2)))) && ((MovieClip(root).framesLoaded >= 2)))))))){
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.reset();
dispatchEvent(new Event(Event.COMPLETE));
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
};
}
private function displayClassCompleteHandler(_arg1:Event):void{
if (displayClass){
displayClass.removeEventListener(Event.COMPLETE, displayClassCompleteHandler);
};
if (root){
root.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
};
if (app){
app.removeEventListener("validatePropertiesComplete", appProgressHandler);
app.removeEventListener("validateSizeComplete", appProgressHandler);
app.removeEventListener("validateDisplayListComplete", appProgressHandler);
app.removeEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
app = null;
};
dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE));
}
}
}//package mx.preloaders
Section 401
//IResourceBundle (mx.resources.IResourceBundle)
package mx.resources {
public interface IResourceBundle {
function get content():Object;
function get locale():String;
function get bundleName():String;
}
}//package mx.resources
Section 402
//IResourceManager (mx.resources.IResourceManager)
package mx.resources {
import flash.events.*;
import flash.system.*;
public interface IResourceManager extends IEventDispatcher {
function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean;
function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class;
function getLocales():Array;
function removeResourceBundlesForLocale(_arg1:String):void;
function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle;
function get localeChain():Array;
function getInt(_arg1:String, _arg2:String, _arg3:String=null):int;
function update():void;
function set localeChain(_arg1:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(_arg1:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(_arg1:String):Array;
function removeResourceBundle(_arg1:String, _arg2:String):void;
function getObject(_arg1:String, _arg2:String, _arg3:String=null);
function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String;
function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void;
function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void;
function getPreferredLocaleChain():Array;
function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function initializeLocaleChain(_arg1:Array):void;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 403
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 404
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
import mx.core.*;
public class LocaleSorter {
mx_internal static const VERSION:String = "3.2.0.3958";
private static function normalizeLocale(_arg1:String):String{
return (_arg1.toLowerCase().replace(/-/g, "_"));
}
public static function sortLocalesByPreference(_arg1:Array, _arg2:Array, _arg3:String=null, _arg4:Boolean=false):Array{
var result:Array;
var hasLocale:Object;
var i:int;
var j:int;
var k:int;
var l:int;
var locale:String;
var plocale:LocaleID;
var appLocales = _arg1;
var systemPreferences = _arg2;
var ultimateFallbackLocale = _arg3;
var addAll = _arg4;
var promote:Function = function (_arg1:String):void{
if (typeof(hasLocale[_arg1]) != "undefined"){
result.push(appLocales[hasLocale[_arg1]]);
delete hasLocale[_arg1];
};
};
result = [];
hasLocale = {};
var locales:Array = trimAndNormalize(appLocales);
var preferenceLocales:Array = trimAndNormalize(systemPreferences);
addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale);
j = 0;
while (j < locales.length) {
hasLocale[locales[j]] = j;
j = (j + 1);
};
i = 0;
l = preferenceLocales.length;
while (i < l) {
plocale = LocaleID.fromString(preferenceLocales[i]);
promote(preferenceLocales[i]);
promote(plocale.toString());
while (plocale.transformToParent()) {
promote(plocale.toString());
};
plocale = LocaleID.fromString(preferenceLocales[i]);
j = 0;
while (j < l) {
locale = preferenceLocales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
j = 0;
k = locales.length;
while (j < k) {
locale = locales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
i = (i + 1);
};
if (addAll){
j = 0;
k = locales.length;
while (j < k) {
promote(locales[j]);
j = (j + 1);
};
};
return (result);
}
private static function addUltimateFallbackLocale(_arg1:Array, _arg2:String):void{
var _local3:String;
if (((!((_arg2 == null))) && (!((_arg2 == ""))))){
_local3 = normalizeLocale(_arg2);
if (_arg1.indexOf(_local3) == -1){
_arg1.push(_local3);
};
};
}
private static function trimAndNormalize(_arg1:Array):Array{
var _local2:Array = [];
var _local3:int;
while (_local3 < _arg1.length) {
_local2.push(normalizeLocale(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package mx.resources
class LocaleID {
private var privateLangs:Boolean;// = false
private var script:String;// = ""
private var variants:Array;
private var privates:Array;
private var extensions:Object;
private var lang:String;// = ""
private var region:String;// = ""
private var extended_langs:Array;
public static const STATE_PRIMARY_LANGUAGE:int = 0;
public static const STATE_REGION:int = 3;
public static const STATE_EXTENDED_LANGUAGES:int = 1;
public static const STATE_EXTENSIONS:int = 5;
public static const STATE_SCRIPT:int = 2;
public static const STATE_VARIANTS:int = 4;
public static const STATE_PRIVATES:int = 6;
private function LocaleID(){
extended_langs = [];
variants = [];
extensions = {};
privates = [];
super();
}
public function equals(_arg1:LocaleID):Boolean{
return ((toString() == _arg1.toString()));
}
public function canonicalize():void{
var _local1:String;
for (_local1 in extensions) {
if (extensions.hasOwnProperty(_local1)){
if (extensions[_local1].length == 0){
delete extensions[_local1];
} else {
extensions[_local1] = extensions[_local1].sort();
};
};
};
extended_langs = extended_langs.sort();
variants = variants.sort();
privates = privates.sort();
if (script == ""){
script = LocaleRegistry.getScriptByLang(lang);
};
if ((((script == "")) && (!((region == ""))))){
script = LocaleRegistry.getScriptByLangAndRegion(lang, region);
};
if ((((region == "")) && (!((script == ""))))){
region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
};
}
public function toString():String{
var _local2:String;
var _local1:Array = [lang];
Array.prototype.push.apply(_local1, extended_langs);
if (script != ""){
_local1.push(script);
};
if (region != ""){
_local1.push(region);
};
Array.prototype.push.apply(_local1, variants);
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1.push(_local2);
Array.prototype.push.apply(_local1, extensions[_local2]);
};
};
if (privates.length > 0){
_local1.push("x");
Array.prototype.push.apply(_local1, privates);
};
return (_local1.join("_"));
}
public function isSiblingOf(_arg1:LocaleID):Boolean{
return ((((lang == _arg1.lang)) && ((script == _arg1.script))));
}
public function transformToParent():Boolean{
var _local2:String;
var _local3:Array;
var _local4:String;
if (privates.length > 0){
privates.splice((privates.length - 1), 1);
return (true);
};
var _local1:String;
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1 = _local2;
};
};
if (_local1){
_local3 = extensions[_local1];
if (_local3.length == 1){
delete extensions[_local1];
return (true);
};
_local3.splice((_local3.length - 1), 1);
return (true);
};
if (variants.length > 0){
variants.splice((variants.length - 1), 1);
return (true);
};
if (script != ""){
if (LocaleRegistry.getScriptByLang(lang) != ""){
script = "";
return (true);
};
if (region == ""){
_local4 = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
if (_local4 != ""){
region = _local4;
script = "";
return (true);
};
};
};
if (region != ""){
if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){
region = "";
return (true);
};
};
if (extended_langs.length > 0){
extended_langs.splice((extended_langs.length - 1), 1);
return (true);
};
return (false);
}
public static function fromString(_arg1:String):LocaleID{
var _local5:Array;
var _local8:String;
var _local9:int;
var _local10:String;
var _local2:LocaleID = new (LocaleID);
var _local3:int = STATE_PRIMARY_LANGUAGE;
var _local4:Array = _arg1.replace(/-/g, "_").split("_");
var _local6:int;
var _local7:int = _local4.length;
while (_local6 < _local7) {
_local8 = _local4[_local6].toLowerCase();
if (_local3 == STATE_PRIMARY_LANGUAGE){
if (_local8 == "x"){
_local2.privateLangs = true;
} else {
if (_local8 == "i"){
_local2.lang = (_local2.lang + "i-");
} else {
_local2.lang = (_local2.lang + _local8);
_local3 = STATE_EXTENDED_LANGUAGES;
};
};
} else {
_local9 = _local8.length;
if (_local9 == 0){
} else {
_local10 = _local8.charAt(0).toLowerCase();
if ((((_local3 <= STATE_EXTENDED_LANGUAGES)) && ((_local9 == 3)))){
_local2.extended_langs.push(_local8);
if (_local2.extended_langs.length == 3){
_local3 = STATE_SCRIPT;
};
} else {
if ((((_local3 <= STATE_SCRIPT)) && ((_local9 == 4)))){
_local2.script = _local8;
_local3 = STATE_REGION;
} else {
if ((((_local3 <= STATE_REGION)) && ((((_local9 == 2)) || ((_local9 == 3)))))){
_local2.region = _local8;
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 <= STATE_VARIANTS)) && ((((((((_local10 >= "a")) && ((_local10 <= "z")))) && ((_local9 >= 5)))) || ((((((_local10 >= "0")) && ((_local10 <= "9")))) && ((_local9 >= 4)))))))){
_local2.variants.push(_local8);
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 < STATE_PRIVATES)) && ((_local9 == 1)))){
if (_local8 == "x"){
_local3 = STATE_PRIVATES;
_local5 = _local2.privates;
} else {
_local3 = STATE_EXTENSIONS;
_local5 = ((_local2.extensions[_local8]) || ([]));
_local2.extensions[_local8] = _local5;
};
} else {
if (_local3 >= STATE_EXTENSIONS){
_local5.push(_local8);
};
};
};
};
};
};
};
};
_local6++;
};
_local2.canonicalize();
return (_local2);
}
}
class LocaleRegistry {
private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28};
private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"];
private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}};
private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32};
private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}};
private function LocaleRegistry(){
}
public static function getScriptByLangAndRegion(_arg1:String, _arg2:String):String{
var _local3:Object = SCRIPT_ID_BY_LANG_AND_REGION[_arg1];
if (_local3 == null){
return ("");
};
var _local4:Object = _local3[_arg2];
if (_local4 == null){
return ("");
};
return (SCRIPTS[int(_local4)].toLowerCase());
}
public static function getScriptByLang(_arg1:String):String{
var _local2:Object = SCRIPT_ID_BY_LANG[_arg1];
if (_local2 == null){
return ("");
};
return (SCRIPTS[int(_local2)].toLowerCase());
}
public static function getDefaultRegionForLangAndScript(_arg1:String, _arg2:String):String{
var _local3:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[_arg1];
var _local4:Object = SCRIPT_BY_ID[_arg2];
if ((((_local3 == null)) || ((_local4 == null)))){
return ("");
};
return (((_local3[int(_local4)]) || ("")));
}
}
Section 405
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle implements IResourceBundle {
mx_internal var _locale:String;
private var _content:Object;
mx_internal var _bundleName:String;
mx_internal static const VERSION:String = "3.2.0.3958";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(_arg1:String=null, _arg2:String=null){
_content = {};
super();
mx_internal::_locale = _arg1;
mx_internal::_bundleName = _arg2;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(_arg1:String):String{
return (String(_getObject(_arg1)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String = _getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array = _getObject(_arg1).split(",");
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getObject(_arg1:String):Object{
return (_getObject(_arg1));
}
private function _getObject(_arg1:String):Object{
var _local2:Object = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(_arg1:String):Number{
return (Number(_getObject(_arg1)));
}
private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{
var _local3:Class;
if (_arg2.hasDefinition(_arg1)){
_local3 = (_arg2.getDefinition(_arg1) as Class);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:String;
var _local4:Class;
var _local5:Object;
var _local6:ResourceBundle;
if (!_arg2){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = (((mx_internal::locale + "$") + _arg1) + "_properties");
_local4 = getClassByName(_local3, _arg2);
if (!_local4){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, _arg2);
};
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, _arg2);
};
if (((!(_local4)) && (mx_internal::backupApplicationDomain))){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
};
};
if (_local4){
_local5 = new (_local4);
if ((_local5 is ResourceBundle)){
_local6 = ResourceBundle(_local5);
return (_local6);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 406
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
try {
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
} catch(e:Error) {
instance = new ResourceManagerImpl();
};
};
return (instance);
}
}
}//package mx.resources
Section 407
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import mx.core.*;
import flash.events.*;
import mx.events.*;
import flash.system.*;
import mx.modules.*;
import flash.utils.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function getPreferredLocaleChain():Array{
return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function initializeLocaleChain(_arg1:Array):void{
localeChain = LocaleSorter.sortLocalesByPreference(_arg1, getSystemPreferredLocales(), null, true);
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
private function getSystemPreferredLocales():Array{
var _local1:Array;
if (Capabilities["languages"]){
_local1 = Capabilities["languages"];
} else {
_local1 = [Capabilities.language];
};
return (_local1);
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
throw (new Error("unloadResourceModule() is not yet implemented."));
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.events.*;
import mx.modules.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 408
//IResponder (mx.rpc.IResponder)
package mx.rpc {
public interface IResponder {
function fault(_arg1:Object):void;
function result(_arg1:Object):void;
}
}//package mx.rpc
Section 409
//ApplicationBackground (mx.skins.halo.ApplicationBackground)
package mx.skins.halo {
import flash.display.*;
import mx.utils.*;
import mx.skins.*;
public class ApplicationBackground extends ProgrammaticSkin {
mx_internal static const VERSION:String = "3.2.0.3958";
override public function get measuredWidth():Number{
return (8);
}
override public function get measuredHeight():Number{
return (8);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local6:uint;
super.updateDisplayList(_arg1, _arg2);
var _local3:Graphics = graphics;
var _local4:Array = getStyle("backgroundGradientColors");
var _local5:Array = getStyle("backgroundGradientAlphas");
if (!_local4){
_local6 = getStyle("backgroundColor");
if (isNaN(_local6)){
_local6 = 0xFFFFFF;
};
_local4 = [];
_local4[0] = ColorUtil.adjustBrightness(_local6, 15);
_local4[1] = ColorUtil.adjustBrightness(_local6, -25);
};
if (!_local5){
_local5 = [1, 1];
};
_local3.clear();
drawRoundRect(0, 0, _arg1, _arg2, 0, _local4, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
}
}
}//package mx.skins.halo
Section 410
//BusyCursor (mx.skins.halo.BusyCursor)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import flash.events.*;
import mx.styles.*;
public class BusyCursor extends FlexSprite {
private var hourHand:Shape;
private var minuteHand:Shape;
mx_internal static const VERSION:String = "3.2.0.3958";
public function BusyCursor(){
var _local6:Graphics;
super();
var _local1:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager");
var _local2:Class = _local1.getStyle("busyCursorBackground");
var _local3:DisplayObject = new (_local2);
if ((_local3 is InteractiveObject)){
InteractiveObject(_local3).mouseEnabled = false;
};
addChild(_local3);
var _local4:Number = -0.5;
var _local5:Number = -0.5;
minuteHand = new FlexShape();
minuteHand.name = "minuteHand";
_local6 = minuteHand.graphics;
_local6.beginFill(0);
_local6.moveTo(_local4, _local5);
_local6.lineTo((1 + _local4), (0 + _local5));
_local6.lineTo((1 + _local4), (5 + _local5));
_local6.lineTo((0 + _local4), (5 + _local5));
_local6.lineTo((0 + _local4), (0 + _local5));
_local6.endFill();
addChild(minuteHand);
hourHand = new FlexShape();
hourHand.name = "hourHand";
_local6 = hourHand.graphics;
_local6.beginFill(0);
_local6.moveTo(_local4, _local5);
_local6.lineTo((4 + _local4), (0 + _local5));
_local6.lineTo((4 + _local4), (1 + _local5));
_local6.lineTo((0 + _local4), (1 + _local5));
_local6.lineTo((0 + _local4), (0 + _local5));
_local6.endFill();
addChild(hourHand);
addEventListener(Event.ADDED, handleAdded);
addEventListener(Event.REMOVED, handleRemoved);
}
private function enterFrameHandler(_arg1:Event):void{
minuteHand.rotation = (minuteHand.rotation + 12);
hourHand.rotation = (hourHand.rotation + 1);
}
private function handleAdded(_arg1:Event):void{
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function handleRemoved(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
}
}//package mx.skins.halo
Section 411
//ButtonSkin (mx.skins.halo.ButtonSkin)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class ButtonSkin extends Border {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var cache:Object = {};
override public function get measuredWidth():Number{
return (UIComponent.DEFAULT_MEASURED_MIN_WIDTH);
}
override public function get measuredHeight():Number{
return (UIComponent.DEFAULT_MEASURED_MIN_HEIGHT);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local16:Number;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
var _local21:Array;
var _local22:Array;
super.updateDisplayList(_arg1, _arg2);
var _local3:uint = getStyle("borderColor");
var _local4:Number = getStyle("cornerRadius");
var _local5:Array = getStyle("fillAlphas");
var _local6:Array = getStyle("fillColors");
StyleManager.getColorNames(_local6);
var _local7:Array = getStyle("highlightAlphas");
var _local8:uint = getStyle("themeColor");
var _local9:Object = calcDerivedStyles(_local8, _local6[0], _local6[1]);
var _local10:Number = ColorUtil.adjustBrightness2(_local3, -50);
var _local11:Number = ColorUtil.adjustBrightness2(_local8, -25);
var _local12:Boolean;
if ((parent is IButton)){
_local12 = IButton(parent).emphasized;
};
var _local13:Number = Math.max(0, _local4);
var _local14:Number = Math.max(0, (_local4 - 1));
var _local15:Number = Math.max(0, (_local4 - 2));
graphics.clear();
switch (name){
case "selectedUpSkin":
case "selectedOverSkin":
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, [_local6[1], _local6[1]], 1, verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)));
break;
case "upSkin":
_local17 = [_local6[0], _local6[1]];
_local18 = [_local5[0], _local5[1]];
if (_local12){
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:2, y:2, w:(_arg1 - 4), h:(_arg2 - 4), r:(_local4 - 2)});
drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _local15, _local17, _local18, verticalGradientMatrix(2, 2, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(2, 2, (_arg1 - 4), ((_arg2 - 4) / 2), {tl:_local15, tr:_local15, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
} else {
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local3, _local10], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local17, _local18, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
};
break;
case "overSkin":
if (_local6.length > 2){
_local19 = [_local6[2], _local6[3]];
} else {
_local19 = [_local6[0], _local6[1]];
};
if (_local5.length > 2){
_local20 = [_local5[2], _local5[3]];
} else {
_local20 = [_local5[0], _local5[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local19, _local20, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "downSkin":
case "selectedDownSkin":
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, [_local9.fillColorPress1, _local9.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(2, 2, (_arg1 - 4), ((_arg2 - 4) / 2), {tl:_local15, tr:_local15, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "disabledSkin":
case "selectedDisabledSkin":
_local21 = [_local6[0], _local6[1]];
_local22 = [Math.max(0, (_local5[0] - 0.15)), Math.max(0, (_local5[1] - 0.15))];
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local3, _local10], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local21, _local22, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
break;
};
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint):Object{
var _local5:Object;
var _local4:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3);
if (!cache[_local4]){
_local5 = (cache[_local4] = {});
HaloColors.addHaloColors(_local5, _arg1, _arg2, _arg3);
};
return (cache[_local4]);
}
}
}//package mx.skins.halo
Section 412
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.styles.*;
import mx.graphics.*;
import mx.utils.*;
import mx.skins.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = (bRoundedCorners) ? radius : 0;
radiusObj = {tl:radius, tr:radius, bl:_local9, br:_local9};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local10 = getStyle("highlightAlphas");
_local11 = (_local10) ? _local10[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local11, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 413
//HaloColors (mx.skins.halo.HaloColors)
package mx.skins.halo {
import mx.utils.*;
public class HaloColors {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var cache:Object = {};
public static function getCacheKey(... _args):String{
return (_args.join(","));
}
public static function addHaloColors(_arg1:Object, _arg2:uint, _arg3:uint, _arg4:uint):void{
var _local5:String = getCacheKey(_arg2, _arg3, _arg4);
var _local6:Object = cache[_local5];
if (!_local6){
_local6 = (cache[_local5] = {});
_local6.themeColLgt = ColorUtil.adjustBrightness(_arg2, 100);
_local6.themeColDrk1 = ColorUtil.adjustBrightness(_arg2, -75);
_local6.themeColDrk2 = ColorUtil.adjustBrightness(_arg2, -25);
_local6.fillColorBright1 = ColorUtil.adjustBrightness2(_arg3, 15);
_local6.fillColorBright2 = ColorUtil.adjustBrightness2(_arg4, 15);
_local6.fillColorPress1 = ColorUtil.adjustBrightness2(_arg2, 85);
_local6.fillColorPress2 = ColorUtil.adjustBrightness2(_arg2, 60);
_local6.bevelHighlight1 = ColorUtil.adjustBrightness2(_arg3, 40);
_local6.bevelHighlight2 = ColorUtil.adjustBrightness2(_arg4, 40);
};
_arg1.themeColLgt = _local6.themeColLgt;
_arg1.themeColDrk1 = _local6.themeColDrk1;
_arg1.themeColDrk2 = _local6.themeColDrk2;
_arg1.fillColorBright1 = _local6.fillColorBright1;
_arg1.fillColorBright2 = _local6.fillColorBright2;
_arg1.fillColorPress1 = _local6.fillColorPress1;
_arg1.fillColorPress2 = _local6.fillColorPress2;
_arg1.bevelHighlight1 = _local6.bevelHighlight1;
_arg1.bevelHighlight2 = _local6.bevelHighlight2;
}
}
}//package mx.skins.halo
Section 414
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(_arg1:Object):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function registerEffects(_arg1:Array):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function getClassStyleDeclarations():Array{
return ([]);
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("focusBlendMode");
var _local4:Number = getStyle("focusAlpha");
var _local5:Number = getStyle("focusColor");
var _local6:Number = getStyle("cornerRadius");
var _local7:Number = getStyle("focusThickness");
var _local8:String = getStyle("focusRoundedCorners");
var _local9:Number = getStyle("themeColor");
var _local10:Number = _local5;
if (isNaN(_local10)){
_local10 = _local9;
};
var _local11:Graphics = graphics;
_local11.clear();
blendMode = _local3;
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 415
//PanelSkin (mx.skins.halo.PanelSkin)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class PanelSkin extends HaloBorder {
private var oldControlBarHeight:Number;
protected var _panelBorderMetrics:EdgeMetrics;
private var oldHeaderHeight:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var panels:Object = {};
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((((((((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderThicknessTop")))) || ((_arg1 == "borderThicknessBottom")))) || ((_arg1 == "borderThicknessLeft")))) || ((_arg1 == "borderThicknessRight")))) || ((_arg1 == "borderSides")))){
_panelBorderMetrics = null;
};
invalidateDisplayList();
}
override mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Graphics;
var _local8:IContainer;
var _local9:EdgeMetrics;
super.drawBorder(_arg1, _arg2);
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
return;
};
var _local3:String = getStyle("borderStyle");
if (_local3 == "default"){
_local4 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radiusObj = null;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local6 = (bRoundedCorners) ? radius : 0;
_local7 = graphics;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local6, _local6);
if (!bRoundedCorners){
radiusObj = {};
};
_local8 = (parent as IContainer);
if (_local8){
_local9 = _local8.viewMetrics;
backgroundHole = {x:_local9.left, y:_local9.top, w:Math.max(0, ((_arg1 - _local9.left) - _local9.right)), h:Math.max(0, ((_arg2 - _local9.top) - _local9.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local4 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local7.beginFill(Number(backgroundColor), _local4);
_local7.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local7.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
}
override public function get borderMetrics():EdgeMetrics{
var _local4:Number;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
return (super.borderMetrics);
};
var _local1:Boolean = isPanel(parent);
var _local2:IUIComponent = (_local1) ? Object(parent)._controlBar : null;
var _local3:Number = (_local1) ? Object(parent).getHeaderHeightProxy() : NaN;
if (((_local2) && (_local2.includeInLayout))){
_local4 = _local2.getExplicitOrMeasuredHeight();
};
if (((!((_local4 == oldControlBarHeight))) && (!(((isNaN(oldControlBarHeight)) && (isNaN(_local4))))))){
_panelBorderMetrics = null;
};
if (((!((_local3 == oldHeaderHeight))) && (!(((isNaN(_local3)) && (isNaN(oldHeaderHeight))))))){
_panelBorderMetrics = null;
};
if (_panelBorderMetrics){
return (_panelBorderMetrics);
};
var _local5:EdgeMetrics = super.borderMetrics;
var _local6:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
var _local7:Number = getStyle("borderThickness");
var _local8:Number = getStyle("borderThicknessLeft");
var _local9:Number = getStyle("borderThicknessTop");
var _local10:Number = getStyle("borderThicknessRight");
var _local11:Number = getStyle("borderThicknessBottom");
_local6.left = (_local5.left + (isNaN(_local8)) ? _local7 : _local8);
_local6.top = (_local5.top + (isNaN(_local9)) ? _local7 : _local9);
_local6.right = (_local5.bottom + (isNaN(_local10)) ? _local7 : _local10);
_local6.bottom = (_local5.bottom + (isNaN(_local11)) ? (((_local2) && (!(isNaN(_local9))))) ? _local9 : (isNaN(_local8)) ? _local7 : _local8 : _local11);
oldHeaderHeight = _local3;
if (!isNaN(_local3)){
_local6.top = (_local6.top + _local3);
};
oldControlBarHeight = _local4;
if (!isNaN(_local4)){
_local6.bottom = (_local6.bottom + _local4);
};
_panelBorderMetrics = _local6;
return (_panelBorderMetrics);
}
override mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local3:Array;
var _local4:Number;
super.drawBackground(_arg1, _arg2);
if ((((getStyle("headerColors") == null)) && ((getStyle("borderStyle") == "default")))){
_local3 = getStyle("highlightAlphas");
_local4 = (_local3) ? _local3[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local4, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
override mx_internal function getBackgroundColorMetrics():EdgeMetrics{
if (getStyle("borderStyle") == "default"){
return (EdgeMetrics.EMPTY);
};
return (super.borderMetrics);
}
private static function isPanel(_arg1:Object):Boolean{
var s:String;
var x:XML;
var parent = _arg1;
s = getQualifiedClassName(parent);
if (panels[s] == 1){
return (true);
};
if (panels[s] == 0){
return (false);
};
if (s == "mx.containers::Panel"){
(panels[s] == 1);
return (true);
};
x = describeType(parent);
var xmllist:XMLList = x.extendsClass.(@type == "mx.containers::Panel");
if (xmllist.length() == 0){
panels[s] = 0;
return (false);
};
panels[s] = 1;
return (true);
}
}
}//package mx.skins.halo
Section 416
//ScrollArrowSkin (mx.skins.halo.ScrollArrowSkin)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.styles.*;
import mx.controls.scrollClasses.*;
import mx.utils.*;
import mx.skins.*;
public class ScrollArrowSkin extends Border {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var cache:Object = {};
override public function get measuredWidth():Number{
return (ScrollBar.THICKNESS);
}
override public function get measuredHeight():Number{
return (ScrollBar.THICKNESS);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local13:Array;
var _local15:Array;
var _local16:Array;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
super.updateDisplayList(_arg1, _arg2);
var _local3:Number = getStyle("backgroundColor");
var _local4:uint = getStyle("borderColor");
var _local5:Array = getStyle("fillAlphas");
var _local6:Array = getStyle("fillColors");
StyleManager.getColorNames(_local6);
var _local7:Array = getStyle("highlightAlphas");
var _local8:uint = getStyle("themeColor");
var _local9 = (name.charAt(0) == "u");
var _local10:uint = getStyle("iconColor");
var _local11:Object = calcDerivedStyles(_local8, _local4, _local6[0], _local6[1]);
var _local12:Boolean = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0))));
if (((_local9) && (!(_local12)))){
_local13 = [_local4, _local11.borderColorDrk1];
} else {
_local13 = [_local11.borderColorDrk1, _local11.borderColorDrk2];
};
var _local14:Graphics = graphics;
_local14.clear();
if (isNaN(_local3)){
_local3 = 0xFFFFFF;
};
if ((((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)) || ((name.indexOf("Disabled") == -1)))){
drawRoundRect(0, 0, _arg1, _arg2, 0, _local3, 1);
};
switch (name){
case "upArrowUpSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowUpSkin":
_local15 = [_local6[0], _local6[1]];
_local16 = [_local5[0], _local5[1]];
drawRoundRect(0, 0, _arg1, _arg2, 0, _local13, 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local15, _local16, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
case "upArrowOverSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowOverSkin":
if (_local6.length > 2){
_local17 = [_local6[2], _local6[3]];
} else {
_local17 = [_local6[0], _local6[1]];
};
if (_local5.length > 2){
_local18 = [_local5[2], _local5[3]];
} else {
_local18 = [_local5[0], _local5[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 1);
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local17, _local18, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
case "upArrowDownSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local12) ? horizontalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8) : verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowDownSkin":
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
case "upArrowDisabledSkin":
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [0.5, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
};
case "downArrowDisabledSkin":
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
_local19 = [_local6[0], _local6[1]];
_local20 = [(_local5[0] - 0.15), (_local5[1] - 0.15)];
drawRoundRect(0, 0, _arg1, _arg2, 0, _local13, 0.5, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local19, _local20, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
_local10 = getStyle("disabledIconColor");
} else {
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
return;
};
break;
default:
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
return;
};
_local14.beginFill(_local10);
if (_local9){
_local14.moveTo((_arg1 / 2), 6);
_local14.lineTo((_arg1 - 5), (_arg2 - 6));
_local14.lineTo(5, (_arg2 - 6));
_local14.lineTo((_arg1 / 2), 6);
} else {
_local14.moveTo((_arg1 / 2), (_arg2 - 6));
_local14.lineTo((_arg1 - 5), 6);
_local14.lineTo(5, 6);
_local14.lineTo((_arg1 / 2), (_arg2 - 6));
};
_local14.endFill();
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{
var _local6:Object;
var _local5:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4);
if (!cache[_local5]){
_local6 = (cache[_local5] = {});
HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4);
_local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -25);
_local6.borderColorDrk2 = ColorUtil.adjustBrightness2(_arg2, -50);
};
return (cache[_local5]);
}
}
}//package mx.skins.halo
Section 417
//ScrollThumbSkin (mx.skins.halo.ScrollThumbSkin)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class ScrollThumbSkin extends Border {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var cache:Object = {};
override public function get measuredWidth():Number{
return (16);
}
override public function get measuredHeight():Number{
return (10);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
super.updateDisplayList(_arg1, _arg2);
var _local3:Number = getStyle("backgroundColor");
var _local4:uint = getStyle("borderColor");
var _local5:Number = getStyle("cornerRadius");
var _local6:Array = getStyle("fillAlphas");
var _local7:Array = getStyle("fillColors");
StyleManager.getColorNames(_local7);
var _local8:Array = getStyle("highlightAlphas");
var _local9:uint = getStyle("themeColor");
var _local10:uint = 7305079;
var _local11:Object = calcDerivedStyles(_local9, _local4, _local7[0], _local7[1]);
var _local12:Number = Math.max((_local5 - 1), 0);
var _local13:Object = {tl:0, tr:_local12, bl:0, br:_local12};
_local12 = Math.max((_local12 - 1), 0);
var _local14:Object = {tl:0, tr:_local12, bl:0, br:_local12};
var _local15:Boolean = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0))));
if (isNaN(_local3)){
_local3 = 0xFFFFFF;
};
graphics.clear();
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, _local3, 1);
switch (name){
case "thumbUpSkin":
default:
_local17 = [_local7[0], _local7[1]];
_local18 = [_local6[0], _local6[1]];
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local4, _local11.borderColorDrk1], 1, (_local15) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local17, _local18, (_local15) ? horizontalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2)));
if (_local15){
drawRoundRect(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2), 0, [0xFFFFFF, 0xFFFFFF], _local8, horizontalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2)));
} else {
drawRoundRect(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2), _local14, [0xFFFFFF, 0xFFFFFF], _local8, (_local15) ? horizontalGradientMatrix(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2)) : verticalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2)));
};
break;
case "thumbOverSkin":
if (_local7.length > 2){
_local19 = [_local7[2], _local7[3]];
} else {
_local19 = [_local7[0], _local7[1]];
};
if (_local6.length > 2){
_local20 = [_local6[2], _local6[3]];
} else {
_local20 = [_local6[0], _local6[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk1], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local19, _local20, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2));
break;
case "thumbDownSkin":
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local13, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2));
break;
case "thumbDisabledSkin":
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, 0x999999, 0.5);
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, 0xFFFFFF, 0.5);
break;
};
var _local16:Number = Math.floor(((_arg1 / 2) - 4));
drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 4)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor((_arg2 / 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 4)), 5, 1, 0, 0, 0.4);
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{
var _local6:Object;
var _local5:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4);
if (!cache[_local5]){
_local6 = (cache[_local5] = {});
HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4);
_local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50);
};
return (cache[_local5]);
}
}
}//package mx.skins.halo
Section 418
//ScrollTrackSkin (mx.skins.halo.ScrollTrackSkin)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class ScrollTrackSkin extends Border {
mx_internal static const VERSION:String = "3.2.0.3958";
override public function get measuredWidth():Number{
return (16);
}
override public function get measuredHeight():Number{
return (1);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:Array = getStyle("trackColors");
StyleManager.getColorNames(_local3);
var _local4:uint = ColorUtil.adjustBrightness2(getStyle("borderColor"), -20);
var _local5:uint = ColorUtil.adjustBrightness2(_local4, -30);
graphics.clear();
var _local6:Number = 1;
if ((((name == "trackDisabledSkin")) && ((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)))){
_local6 = 0.2;
};
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local4, _local5], _local6, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local3, _local6, horizontalGradientMatrix(1, 1, ((_arg1 / 3) * 2), (_arg2 - 2)));
}
}
}//package mx.skins.halo
Section 419
//TitleBackground (mx.skins.halo.TitleBackground)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class TitleBackground extends ProgrammaticSkin {
mx_internal static const VERSION:String = "3.2.0.3958";
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:Number = getStyle("borderAlpha");
var _local4:Number = getStyle("cornerRadius");
var _local5:Array = getStyle("highlightAlphas");
var _local6:Array = getStyle("headerColors");
var _local7 = !((_local6 == null));
StyleManager.getColorNames(_local6);
var _local8:Number = ColorUtil.adjustBrightness2((_local6) ? _local6[1] : 0xFFFFFF, -20);
var _local9:Graphics = graphics;
_local9.clear();
if (_arg2 < 3){
return;
};
if (_local7){
_local9.lineStyle(0, _local8, _local3);
_local9.moveTo(0, _arg2);
_local9.lineTo(_arg1, _arg2);
_local9.lineStyle(0, 0, 0);
drawRoundRect(0, 0, _arg1, _arg2, {tl:_local4, tr:_local4, bl:0, br:0}, _local6, _local3, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 0, _arg1, (_arg2 / 2), {tl:_local4, tr:_local4, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, (_arg2 / 2)));
drawRoundRect(0, 0, _arg1, _arg2, {tl:_local4, tr:_local4, bl:0, br:0}, 0xFFFFFF, _local5[0], null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:_local4, tr:_local4, bl:0, br:0}});
};
}
}
}//package mx.skins.halo
Section 420
//ToolTipBorder (mx.skins.halo.ToolTipBorder)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.graphics.*;
import mx.skins.*;
import flash.filters.*;
public class ToolTipBorder extends RectangularBorder {
private var _borderMetrics:EdgeMetrics;
private var dropShadow:RectangularDropShadow;
mx_internal static const VERSION:String = "3.2.0.3958";
override public function get borderMetrics():EdgeMetrics{
if (_borderMetrics){
return (_borderMetrics);
};
var _local1:String = getStyle("borderStyle");
switch (_local1){
case "errorTipRight":
_borderMetrics = new EdgeMetrics(15, 1, 3, 3);
break;
case "errorTipAbove":
_borderMetrics = new EdgeMetrics(3, 1, 3, 15);
break;
case "errorTipBelow":
_borderMetrics = new EdgeMetrics(3, 13, 3, 3);
break;
default:
_borderMetrics = new EdgeMetrics(3, 1, 3, 3);
break;
};
return (_borderMetrics);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("borderStyle");
var _local4:uint = getStyle("backgroundColor");
var _local5:Number = getStyle("backgroundAlpha");
var _local6:uint = getStyle("borderColor");
var _local7:Number = getStyle("cornerRadius");
var _local8:uint = getStyle("shadowColor");
var _local9:Number = 0.1;
var _local10:Graphics = graphics;
_local10.clear();
filters = [];
switch (_local3){
case "toolTip":
drawRoundRect(3, 1, (_arg1 - 6), (_arg2 - 4), _local7, _local4, _local5);
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = 3;
dropShadow.angle = 90;
dropShadow.color = 0;
dropShadow.alpha = 0.4;
dropShadow.tlRadius = (_local7 + 2);
dropShadow.trRadius = (_local7 + 2);
dropShadow.blRadius = (_local7 + 2);
dropShadow.brRadius = (_local7 + 2);
dropShadow.drawShadow(graphics, 3, 0, (_arg1 - 6), (_arg2 - 4));
break;
case "errorTipRight":
drawRoundRect(11, 0, (_arg1 - 11), (_arg2 - 2), 3, _local6, _local5);
_local10.beginFill(_local6, _local5);
_local10.moveTo(11, 7);
_local10.lineTo(0, 13);
_local10.lineTo(11, 19);
_local10.moveTo(11, 7);
_local10.endFill();
filters = [new DropShadowFilter(2, 90, 0, 0.4)];
break;
case "errorTipAbove":
drawRoundRect(0, 0, _arg1, (_arg2 - 13), 3, _local6, _local5);
_local10.beginFill(_local6, _local5);
_local10.moveTo(9, (_arg2 - 13));
_local10.lineTo(15, (_arg2 - 2));
_local10.lineTo(21, (_arg2 - 13));
_local10.moveTo(9, (_arg2 - 13));
_local10.endFill();
filters = [new DropShadowFilter(2, 90, 0, 0.4)];
break;
case "errorTipBelow":
drawRoundRect(0, 11, _arg1, (_arg2 - 13), 3, _local6, _local5);
_local10.beginFill(_local6, _local5);
_local10.moveTo(9, 11);
_local10.lineTo(15, 0);
_local10.lineTo(21, 11);
_local10.moveTo(10, 11);
_local10.endFill();
filters = [new DropShadowFilter(2, 90, 0, 0.4)];
break;
};
}
override public function styleChanged(_arg1:String):void{
if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){
_borderMetrics = null;
};
invalidateDisplayList();
}
}
}//package mx.skins.halo
Section 421
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.2.0.3958";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 422
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import mx.managers.*;
import mx.styles.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return ((_styleName) ? _styleName.getStyle(_arg1) : null);
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function get measuredHeight():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Object;
var _local12:Graphics = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
override public function get width():Number{
return (_width);
}
public function invalidateProperties():void{
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get styleName():Object{
return (_styleName);
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
public function invalidateSize():void{
}
public function validateProperties():void{
}
}
}//package mx.skins
Section 423
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.events.*;
import mx.resources.*;
import mx.styles.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 424
//IOverride (mx.states.IOverride)
package mx.states {
import mx.core.*;
public interface IOverride {
function initialize():void;
function remove(_arg1:UIComponent):void;
function apply(_arg1:UIComponent):void;
}
}//package mx.states
Section 425
//State (mx.states.State)
package mx.states {
import flash.events.*;
import mx.events.*;
public class State extends EventDispatcher {
public var basedOn:String;
private var initialized:Boolean;// = false
public var overrides:Array;
public var name:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public function State(){
overrides = [];
super();
}
mx_internal function initialize():void{
var _local1:int;
if (!initialized){
initialized = true;
_local1 = 0;
while (_local1 < overrides.length) {
IOverride(overrides[_local1]).initialize();
_local1++;
};
};
}
mx_internal function dispatchExitState():void{
dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
}
mx_internal function dispatchEnterState():void{
dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
}
}
}//package mx.states
Section 426
//Transition (mx.states.Transition)
package mx.states {
import mx.effects.*;
public class Transition {
public var effect:IEffect;
public var toState:String;// = "*"
public var fromState:String;// = "*"
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.states
Section 427
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.display.*;
import mx.core.*;
import mx.managers.*;
import flash.events.*;
import flash.utils.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.2.0.3958";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
super();
if (_arg1){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = _arg1;
var target = _arg2;
var filterMap = _arg3;
var nodeAddedToChain:Boolean;
var originalChain:Object = chain;
if (filterMap){
chain = {};
};
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (filterMap){
if (nodeAddedToChain){
filteredChain = {};
filterObjectFactory = function ():void{
};
filterObjectFactory.prototype = originalChain;
filteredChain = new (filterObjectFactory);
for (i in chain) {
if (filterMap[i] != null){
filteredChain[filterMap[i]] = chain[i];
};
};
chain = filteredChain;
chain[FILTERMAP_PROP] = filterMap;
} else {
chain = originalChain;
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local7:int;
var _local8:Object;
var _local3:Object = getStyle(_arg1);
var _local4:Boolean;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
var _local5:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local6:int = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
var _local6:Object;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
_local5 = styleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local6 = _local4[FILTERMAP_PROP];
if (_local6){
if (_local6[_arg1] != null){
_local4[_local6[_arg1]] = _arg2;
};
} else {
_local4[_arg1] = _arg2;
};
};
}
}
}//package mx.styles
Section 428
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(_arg1:Object):void;
function styleChanged(_arg1:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 429
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function get className():String;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(_arg1:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function getStyle(_arg1:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 430
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function registerInheritingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(_arg1):Boolean;
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function set typeSelectorCache(_arg1:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(_arg1:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 431
//IStyleManager2 (mx.styles.IStyleManager2)
package mx.styles {
import flash.events.*;
import flash.system.*;
public interface IStyleManager2 extends IStyleManager {
function get selectors():Array;
function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
}
}//package mx.styles
Section 432
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 433
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import mx.core.*;
import flash.events.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.2.0.3958";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function get selectors():Array{
return (impl.selectors);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 434
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import mx.core.*;
import mx.managers.*;
import flash.events.*;
import mx.events.*;
import mx.resources.*;
import flash.system.*;
import mx.modules.*;
import flash.utils.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.events.*;
import mx.modules.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 435
//StyleProtoChain (mx.styles.StyleProtoChain)
package mx.styles {
import flash.display.*;
import mx.core.*;
public class StyleProtoChain {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function initProtoChainForUIComponentStyleName(_arg1:IStyleClient):void{
var _local9:CSSStyleDeclaration;
var _local2:IStyleClient = IStyleClient(_arg1.styleName);
var _local3:DisplayObject = (_arg1 as DisplayObject);
var _local4:Object = _local2.nonInheritingStyles;
if (((!(_local4)) || ((_local4 == UIComponent.STYLE_UNINITIALIZED)))){
_local4 = StyleManager.stylesRoot;
if (_local4.effects){
_arg1.registerEffects(_local4.effects);
};
};
var _local5:Object = _local2.inheritingStyles;
if (((!(_local5)) || ((_local5 == UIComponent.STYLE_UNINITIALIZED)))){
_local5 = StyleManager.stylesRoot;
};
var _local6:Array = _arg1.getClassStyleDeclarations();
var _local7:int = _local6.length;
if ((_local2 is StyleProxy)){
if (_local7 == 0){
_local4 = addProperties(_local4, _local2, false);
};
_local3 = (StyleProxy(_local2).source as DisplayObject);
};
var _local8:int;
while (_local8 < _local7) {
_local9 = _local6[_local8];
_local5 = _local9.addStyleToProtoChain(_local5, _local3);
_local5 = addProperties(_local5, _local2, true);
_local4 = _local9.addStyleToProtoChain(_local4, _local3);
_local4 = addProperties(_local4, _local2, false);
if (_local9.effects){
_arg1.registerEffects(_local9.effects);
};
_local8++;
};
_arg1.inheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local5, _local3) : _local5;
_arg1.nonInheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local4, _local3) : _local4;
}
private static function addProperties(_arg1:Object, _arg2:IStyleClient, _arg3:Boolean):Object{
var _local11:CSSStyleDeclaration;
var _local12:CSSStyleDeclaration;
var _local4:Object = ((((_arg2 is StyleProxy)) && (!(_arg3)))) ? StyleProxy(_arg2).filterMap : null;
var _local5:IStyleClient = _arg2;
while ((_local5 is StyleProxy)) {
_local5 = StyleProxy(_local5).source;
};
var _local6:DisplayObject = (_local5 as DisplayObject);
var _local7:Array = _arg2.getClassStyleDeclarations();
var _local8:int = _local7.length;
var _local9:int;
while (_local9 < _local8) {
_local11 = _local7[_local9];
_arg1 = _local11.addStyleToProtoChain(_arg1, _local6, _local4);
if (_local11.effects){
_arg2.registerEffects(_local11.effects);
};
_local9++;
};
var _local10:Object = _arg2.styleName;
if (_local10){
if (typeof(_local10) == "object"){
if ((_local10 is CSSStyleDeclaration)){
_local12 = CSSStyleDeclaration(_local10);
} else {
_arg1 = addProperties(_arg1, IStyleClient(_local10), _arg3);
};
} else {
_local12 = StyleManager.getStyleDeclaration(("." + _local10));
};
if (_local12){
_arg1 = _local12.addStyleToProtoChain(_arg1, _local6, _local4);
if (_local12.effects){
_arg2.registerEffects(_local12.effects);
};
};
};
if (_arg2.styleDeclaration){
_arg1 = _arg2.styleDeclaration.addStyleToProtoChain(_arg1, _local6, _local4);
};
return (_arg1);
}
public static function initTextField(_arg1:IUITextField):void{
var _local3:CSSStyleDeclaration;
var _local2:Object = _arg1.styleName;
if (_local2){
if (typeof(_local2) == "object"){
if ((_local2 is CSSStyleDeclaration)){
_local3 = CSSStyleDeclaration(_local2);
} else {
if ((_local2 is StyleProxy)){
_arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles;
_arg1.nonInheritingStyles = addProperties(StyleManager.stylesRoot, IStyleClient(_local2), false);
return;
};
_arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles;
_arg1.nonInheritingStyles = IStyleClient(_local2).nonInheritingStyles;
return;
};
} else {
_local3 = StyleManager.getStyleDeclaration(("." + _local2));
};
};
var _local4:Object = IStyleClient(_arg1.parent).inheritingStyles;
var _local5:Object = StyleManager.stylesRoot;
if (!_local4){
_local4 = StyleManager.stylesRoot;
};
if (_local3){
_local4 = _local3.addStyleToProtoChain(_local4, DisplayObject(_arg1));
_local5 = _local3.addStyleToProtoChain(_local5, DisplayObject(_arg1));
};
_arg1.inheritingStyles = _local4;
_arg1.nonInheritingStyles = _local5;
}
}
}//package mx.styles
Section 436
//StyleProxy (mx.styles.StyleProxy)
package mx.styles {
import mx.core.*;
public class StyleProxy implements IStyleClient {
private var _source:IStyleClient;
private var _filterMap:Object;
mx_internal static const VERSION:String = "3.2.0.3958";
public function StyleProxy(_arg1:IStyleClient, _arg2:Object){
this.filterMap = _arg2;
this.source = _arg1;
}
public function styleChanged(_arg1:String):void{
return (_source.styleChanged(_arg1));
}
public function get filterMap():Object{
return (((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? null : _filterMap);
}
public function set filterMap(_arg1:Object):void{
_filterMap = _arg1;
}
public function get styleDeclaration():CSSStyleDeclaration{
return (_source.styleDeclaration);
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
return (_source.notifyStyleChangeInChildren(_arg1, _arg2));
}
public function set inheritingStyles(_arg1:Object):void{
}
public function get source():IStyleClient{
return (_source);
}
public function get styleName():Object{
if ((_source.styleName is IStyleClient)){
return (new StyleProxy(IStyleClient(_source.styleName), filterMap));
};
return (_source.styleName);
}
public function registerEffects(_arg1:Array):void{
return (_source.registerEffects(_arg1));
}
public function regenerateStyleCache(_arg1:Boolean):void{
_source.regenerateStyleCache(_arg1);
}
public function get inheritingStyles():Object{
return (_source.inheritingStyles);
}
public function get className():String{
return (_source.className);
}
public function clearStyle(_arg1:String):void{
_source.clearStyle(_arg1);
}
public function getClassStyleDeclarations():Array{
return (_source.getClassStyleDeclarations());
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function setStyle(_arg1:String, _arg2):void{
_source.setStyle(_arg1, _arg2);
}
public function get nonInheritingStyles():Object{
return (((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? _source.nonInheritingStyles : null);
}
public function set styleName(_arg1:Object):void{
_source.styleName = _arg1;
}
public function getStyle(_arg1:String){
return (_source.getStyle(_arg1));
}
public function set source(_arg1:IStyleClient):void{
_source = _arg1;
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_source.styleDeclaration = styleDeclaration;
}
}
}//package mx.styles
Section 437
//ArrayUtil (mx.utils.ArrayUtil)
package mx.utils {
public class ArrayUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function getItemIndex(_arg1:Object, _arg2:Array):int{
var _local3:int = _arg2.length;
var _local4:int;
while (_local4 < _local3) {
if (_arg2[_local4] === _arg1){
return (_local4);
};
_local4++;
};
return (-1);
}
public static function toArray(_arg1:Object):Array{
if (!_arg1){
return ([]);
};
if ((_arg1 is Array)){
return ((_arg1 as Array));
};
return ([_arg1]);
}
}
}//package mx.utils
Section 438
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number = ((_arg1 >> 16) & 0xFF);
var _local4:Number = ((_arg1 >> 8) & 0xFF);
var _local5:Number = (_arg1 & 0xFF);
var _local6:Number = ((_arg2 >> 16) & 0xFF);
var _local7:Number = ((_arg2 >> 8) & 0xFF);
var _local8:Number = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 439
//DescribeTypeCache (mx.utils.DescribeTypeCache)
package mx.utils {
import mx.binding.*;
import flash.utils.*;
public class DescribeTypeCache {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var cacheHandlers:Object = {};
private static var typeCache:Object = {};
public static function describeType(_arg1):DescribeTypeCacheRecord{
var _local2:String;
var _local3:XML;
var _local4:DescribeTypeCacheRecord;
if ((_arg1 is String)){
_local2 = _arg1;
} else {
_local2 = getQualifiedClassName(_arg1);
};
if ((_local2 in typeCache)){
return (typeCache[_local2]);
};
if ((_arg1 is String)){
_arg1 = getDefinitionByName(_arg1);
};
_local3 = describeType(_arg1);
_local4 = new DescribeTypeCacheRecord();
_local4.typeDescription = _local3;
_local4.typeName = _local2;
typeCache[_local2] = _local4;
return (_local4);
}
public static function registerCacheHandler(_arg1:String, _arg2:Function):void{
cacheHandlers[_arg1] = _arg2;
}
static function extractValue(_arg1:String, _arg2:DescribeTypeCacheRecord){
if ((_arg1 in cacheHandlers)){
return (cacheHandlers[_arg1](_arg2));
};
return (undefined);
}
private static function bindabilityInfoHandler(_arg1:DescribeTypeCacheRecord){
return (new BindabilityInfo(_arg1.typeDescription));
}
registerCacheHandler("bindabilityInfo", bindabilityInfoHandler);
}
}//package mx.utils
Section 440
//DescribeTypeCacheRecord (mx.utils.DescribeTypeCacheRecord)
package mx.utils {
import flash.utils.*;
public dynamic class DescribeTypeCacheRecord extends Proxy {
public var typeDescription:XML;
public var typeName:String;
private var cache:Object;
public function DescribeTypeCacheRecord(){
cache = {};
super();
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
var _local2:* = cache[_arg1];
if (_local2 === undefined){
_local2 = DescribeTypeCache.extractValue(_arg1, this);
cache[_arg1] = _local2;
};
return (_local2);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if ((_arg1 in cache)){
return (true);
};
var _local2:* = DescribeTypeCache.extractValue(_arg1, this);
if (_local2 === undefined){
return (false);
};
cache[_arg1] = _local2;
return (true);
}
}
}//package mx.utils
Section 441
//EventUtil (mx.utils.EventUtil)
package mx.utils {
import mx.core.*;
import flash.events.*;
import mx.events.*;
public class EventUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var _sandboxEventMap:Object;
private static var _mouseEventMap:Object;
public static function get sandboxMouseEventMap():Object{
if (!_sandboxEventMap){
_sandboxEventMap = {};
_sandboxEventMap[SandboxMouseEvent.CLICK_SOMEWHERE] = MouseEvent.CLICK;
_sandboxEventMap[SandboxMouseEvent.DOUBLE_CLICK_SOMEWHERE] = MouseEvent.DOUBLE_CLICK;
_sandboxEventMap[SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE] = MouseEvent.MOUSE_DOWN;
_sandboxEventMap[SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE] = MouseEvent.MOUSE_MOVE;
_sandboxEventMap[SandboxMouseEvent.MOUSE_UP_SOMEWHERE] = MouseEvent.MOUSE_UP;
_sandboxEventMap[SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE] = MouseEvent.MOUSE_WHEEL;
};
return (_sandboxEventMap);
}
public static function get mouseEventMap():Object{
if (!_mouseEventMap){
_mouseEventMap = {};
_mouseEventMap[MouseEvent.CLICK] = SandboxMouseEvent.CLICK_SOMEWHERE;
_mouseEventMap[MouseEvent.DOUBLE_CLICK] = SandboxMouseEvent.DOUBLE_CLICK_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_DOWN] = SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_MOVE] = SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_UP] = SandboxMouseEvent.MOUSE_UP_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_WHEEL] = SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE;
};
return (_mouseEventMap);
}
}
}//package mx.utils
Section 442
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number = (_arg2 + _arg4);
var _local11:Number = (_arg3 + _arg5);
var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
var _local13:Number = (_arg9 * 0.292893218813453);
var _local14:Number = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 443
//IXMLNotifiable (mx.utils.IXMLNotifiable)
package mx.utils {
public interface IXMLNotifiable {
function xmlNotification(_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void;
}
}//package mx.utils
Section 444
//LoaderUtil (mx.utils.LoaderUtil)
package mx.utils {
import flash.display.*;
public class LoaderUtil {
public static function normalizeURL(_arg1:LoaderInfo):String{
var _local2:String = _arg1.url;
var _local3:Array = _local2.split("/[[DYNAMIC]]/");
return (_local3[0]);
}
public static function createAbsoluteURL(_arg1:String, _arg2:String):String{
var _local4:int;
var _local5:int;
var _local3:String = _arg2;
if (!(((((_arg2.indexOf(":") > -1)) || ((_arg2.indexOf("/") == 0)))) || ((_arg2.indexOf("\\") == 0)))){
if (_arg1){
_local4 = Math.max(_arg1.lastIndexOf("\\"), _arg1.lastIndexOf("/"));
if (_local4 <= 8){
_arg1 = (_arg1 + "/");
_local4 = (_arg1.length - 1);
};
if (_arg2.indexOf("./") == 0){
_arg2 = _arg2.substring(2);
} else {
while (_arg2.indexOf("../") == 0) {
_arg2 = _arg2.substring(3);
_local5 = Math.max(_arg1.lastIndexOf("\\", (_local4 - 1)), _arg1.lastIndexOf("/", (_local4 - 1)));
if (_local5 <= 8){
_local5 = _local4;
};
_local4 = _local5;
};
};
if (_local4 != -1){
_local3 = (_arg1.substr(0, (_local4 + 1)) + _arg2);
};
};
};
return (_local3);
}
}
}//package mx.utils
Section 445
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 446
//object_proxy (mx.utils.object_proxy)
package mx.utils {
public namespace object_proxy = "http://www.adobe.com/2006/actionscript/flash/objectproxy";
}//package mx.utils
Section 447
//ObjectProxy (mx.utils.ObjectProxy)
package mx.utils {
import mx.core.*;
import flash.events.*;
import mx.events.*;
import flash.utils.*;
public dynamic class ObjectProxy extends Proxy implements IExternalizable, IPropertyChangeNotifier {
private var _id:String;
protected var notifiers:Object;
protected var propertyList:Array;
private var _proxyLevel:int;
private var _type:QName;
protected var dispatcher:EventDispatcher;
protected var proxyClass:Class;
private var _item:Object;
public function ObjectProxy(_arg1:Object=null, _arg2:String=null, _arg3:int=-1){
proxyClass = ObjectProxy;
super();
if (!_arg1){
_arg1 = {};
};
_item = _arg1;
_proxyLevel = _arg3;
notifiers = {};
dispatcher = new EventDispatcher(this);
if (_arg2){
_id = _arg2;
};
}
public function dispatchEvent(_arg1:Event):Boolean{
return (dispatcher.dispatchEvent(_arg1));
}
public function hasEventListener(_arg1:String):Boolean{
return (dispatcher.hasEventListener(_arg1));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local4:IPropertyChangeNotifier;
var _local5:PropertyChangeEvent;
var _local3:* = _item[_arg1];
if (_local3 !== _arg2){
_item[_arg1] = _arg2;
_local4 = IPropertyChangeNotifier(notifiers[_arg1]);
if (_local4){
_local4.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
delete notifiers[_arg1];
};
if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)){
if ((_arg1 is QName)){
_arg1 = QName(_arg1).localName;
};
_local5 = PropertyChangeEvent.createUpdateEvent(this, _arg1.toString(), _local3, _arg2);
dispatcher.dispatchEvent(_local5);
};
};
}
public function willTrigger(_arg1:String):Boolean{
return (dispatcher.willTrigger(_arg1));
}
public function readExternal(_arg1:IDataInput):void{
var _local2:Object = _arg1.readObject();
_item = _local2;
}
public function writeExternal(_arg1:IDataOutput):void{
_arg1.writeObject(_item);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
var _local2:*;
if (notifiers[_arg1.toString()]){
return (notifiers[_arg1]);
};
_local2 = _item[_arg1];
if (_local2){
if ((((_proxyLevel == 0)) || (ObjectUtil.isSimple(_local2)))){
return (_local2);
};
_local2 = getComplexProperty(_arg1, _local2);
};
return (_local2);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
return ((_arg1 in _item));
}
public function get uid():String{
if (_id === null){
_id = UIDUtil.createUID();
};
return (_id);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
if (_arg1 == 0){
setupPropertyList();
};
if (_arg1 < propertyList.length){
return ((_arg1 + 1));
};
return (0);
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (propertyList[(_arg1 - 1)]);
}
public function set uid(_arg1:String):void{
_id = _arg1;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){
return (_item[_arg1].apply(_item, _args));
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
dispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
protected function setupPropertyList():void{
var _local1:String;
if (getQualifiedClassName(_item) == "Object"){
propertyList = [];
for (_local1 in _item) {
propertyList.push(_local1);
};
} else {
propertyList = ObjectUtil.getClassInfo(_item, null, {includeReadOnly:true, uris:["*"]}).properties;
};
}
object_proxy function getComplexProperty(_arg1, _arg2){
if ((_arg2 is IPropertyChangeNotifier)){
_arg2.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
notifiers[_arg1] = _arg2;
return (_arg2);
};
if (getQualifiedClassName(_arg2) == "Object"){
_arg2 = new proxyClass(_item[_arg1], null, ((_proxyLevel > 0)) ? (_proxyLevel - 1) : _proxyLevel);
_arg2.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
notifiers[_arg1] = _arg2;
return (_arg2);
};
return (_arg2);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
var _local5:PropertyChangeEvent;
var _local2:IPropertyChangeNotifier = IPropertyChangeNotifier(notifiers[_arg1]);
if (_local2){
_local2.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
delete notifiers[_arg1];
};
var _local3:* = _item[_arg1];
var _local4 = delete _item[_arg1];
if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)){
_local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.DELETE;
_local5.property = _arg1;
_local5.oldValue = _local3;
_local5.source = this;
dispatcher.dispatchEvent(_local5);
};
return (_local4);
}
object_proxy function get type():QName{
return (_type);
}
object_proxy function set type(_arg1:QName):void{
_type = _arg1;
}
public function propertyChangeHandler(_arg1:PropertyChangeEvent):void{
dispatcher.dispatchEvent(_arg1);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){
return (_item[propertyList[(_arg1 - 1)]]);
}
object_proxy function get object():Object{
return (_item);
}
}
}//package mx.utils
Section 448
//ObjectUtil (mx.utils.ObjectUtil)
package mx.utils {
import flash.utils.*;
import mx.collections.*;
import flash.xml.*;
public class ObjectUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var defaultToStringExcludes:Array = ["password", "credentials"];
private static var CLASS_INFO_CACHE:Object = {};
private static var refCount:int = 0;
public static function isSimple(_arg1:Object):Boolean{
var _local2 = typeof(_arg1);
switch (_local2){
case "number":
case "string":
case "boolean":
return (true);
case "object":
return ((((_arg1 is Date)) || ((_arg1 is Array))));
};
return (false);
}
private static function internalToString(_arg1:Object, _arg2:int=0, _arg3:Dictionary=null, _arg4:Array=null, _arg5:Array=null):String{
var str:String;
var classInfo:Object;
var properties:Array;
var id:Object;
var isArray:Boolean;
var isDict:Boolean;
var prop:*;
var j:int;
var value = _arg1;
var indent = _arg2;
var refs = _arg3;
var namespaceURIs = _arg4;
var exclude = _arg5;
var type:String = ((value == null)) ? "null" : typeof(value);
switch (type){
case "boolean":
case "number":
return (value.toString());
case "string":
return ((("\"" + value.toString()) + "\""));
case "object":
if ((value is Date)){
return (value.toString());
};
if ((value is XMLNode)){
return (value.toString());
};
if ((value is Class)){
return ((("(" + getQualifiedClassName(value)) + ")"));
};
classInfo = getClassInfo(value, exclude, {includeReadOnly:true, uris:namespaceURIs});
properties = classInfo.properties;
str = (("(" + classInfo.name) + ")");
if (refs == null){
refs = new Dictionary(true);
};
id = refs[value];
if (id != null){
str = (str + ("#" + int(id)));
return (str);
};
if (value != null){
str = (str + ("#" + refCount.toString()));
refs[value] = refCount;
refCount++;
};
isArray = (value is Array);
isDict = (value is Dictionary);
indent = (indent + 2);
j = 0;
while (j < properties.length) {
str = newline(str, indent);
prop = properties[j];
if (isArray){
str = (str + "[");
} else {
if (isDict){
str = (str + "{");
};
};
if (isDict){
str = (str + internalToString(prop, indent, refs, namespaceURIs, exclude));
} else {
str = (str + prop.toString());
};
if (isArray){
str = (str + "] ");
} else {
if (isDict){
str = (str + "} = ");
} else {
str = (str + " = ");
};
};
try {
str = (str + internalToString(value[prop], indent, refs, namespaceURIs, exclude));
} catch(e:Error) {
str = (str + "?");
};
j = (j + 1);
};
indent = (indent - 2);
return (str);
case "xml":
return (value.toString());
default:
return ((("(" + type) + ")"));
};
}
public static function getClassInfo(_arg1:Object, _arg2:Array=null, _arg3:Object=null):Object{
var n:int;
var i:int;
var result:Object;
var cacheKey:String;
var className:String;
var classAlias:String;
var properties:XMLList;
var prop:XML;
var metadataInfo:Object;
var classInfo:XML;
var numericIndex:Boolean;
var key:*;
var p:String;
var pi:Number;
var uris:Array;
var uri:String;
var qName:QName;
var j:int;
var obj = _arg1;
var excludes = _arg2;
var options = _arg3;
if ((obj is ObjectProxy)){
obj = ObjectProxy(obj).object_proxy::object;
};
if (options == null){
options = {includeReadOnly:true, uris:null, includeTransient:true};
};
var propertyNames:Array = [];
var dynamic:Boolean;
if (typeof(obj) == "xml"){
className = "XML";
properties = obj.text();
if (properties.length()){
propertyNames.push("*");
};
properties = obj.attributes();
} else {
classInfo = DescribeTypeCache.describeType(obj).typeDescription;
className = classInfo.@name.toString();
classAlias = classInfo.@alias.toString();
dynamic = (classInfo.@isDynamic.toString() == "true");
if (options.includeReadOnly){
properties = (classInfo..accessor.(@access != "writeonly") + classInfo..variable);
} else {
properties = (classInfo..accessor.(@access == "readwrite") + classInfo..variable);
};
numericIndex = false;
};
if (!dynamic){
cacheKey = getCacheKey(obj, excludes, options);
result = CLASS_INFO_CACHE[cacheKey];
if (result != null){
return (result);
};
};
result = {};
result["name"] = className;
result["alias"] = classAlias;
result["properties"] = propertyNames;
result["dynamic"] = dynamic;
var _local5 = recordMetadata(properties);
metadataInfo = _local5;
result["metadata"] = _local5;
var excludeObject:Object = {};
if (excludes){
n = excludes.length;
i = 0;
while (i < n) {
excludeObject[excludes[i]] = 1;
i = (i + 1);
};
};
var isArray = (className == "Array");
var isDict = (className == "flash.utils::Dictionary");
if (isDict){
for (key in obj) {
propertyNames.push(key);
};
} else {
if (dynamic){
for (p in obj) {
if (excludeObject[p] != 1){
if (isArray){
pi = parseInt(p);
if (isNaN(pi)){
propertyNames.push(new QName("", p));
} else {
propertyNames.push(pi);
};
} else {
propertyNames.push(new QName("", p));
};
};
};
numericIndex = ((isArray) && (!(isNaN(Number(p)))));
};
};
if (((((isArray) || (isDict))) || ((className == "Object")))){
} else {
if (className == "XML"){
n = properties.length();
i = 0;
while (i < n) {
p = properties[i].name();
if (excludeObject[p] != 1){
propertyNames.push(new QName("", ("@" + p)));
};
i = (i + 1);
};
} else {
n = properties.length();
uris = options.uris;
i = 0;
while (i < n) {
prop = properties[i];
p = prop.@name.toString();
uri = prop.@uri.toString();
if (excludeObject[p] == 1){
} else {
if (((!(options.includeTransient)) && (internalHasMetadata(metadataInfo, p, "Transient")))){
} else {
if (uris != null){
if ((((uris.length == 1)) && ((uris[0] == "*")))){
qName = new QName(uri, p);
try {
obj[qName];
propertyNames.push();
} catch(e:Error) {
};
} else {
j = 0;
while (j < uris.length) {
uri = uris[j];
if (prop.@uri.toString() == uri){
qName = new QName(uri, p);
try {
obj[qName];
propertyNames.push(qName);
} catch(e:Error) {
};
};
j = (j + 1);
};
};
} else {
if (uri.length == 0){
qName = new QName(uri, p);
try {
obj[qName];
propertyNames.push(qName);
} catch(e:Error) {
};
};
};
};
};
i = (i + 1);
};
};
};
propertyNames.sort((Array.CASEINSENSITIVE | (numericIndex) ? Array.NUMERIC : 0));
if (!isDict){
i = 0;
while (i < (propertyNames.length - 1)) {
if (propertyNames[i].toString() == propertyNames[(i + 1)].toString()){
propertyNames.splice(i, 1);
i = (i - 1);
};
i = (i + 1);
};
};
if (!dynamic){
cacheKey = getCacheKey(obj, excludes, options);
CLASS_INFO_CACHE[cacheKey] = result;
};
return (result);
}
private static function arrayCompare(_arg1:Array, _arg2:Array, _arg3:int, _arg4:int, _arg5:Dictionary):int{
var _local7:Object;
var _local6:int;
if (_arg1.length != _arg2.length){
if (_arg1.length < _arg2.length){
_local6 = -1;
} else {
_local6 = 1;
};
} else {
for (_local7 in _arg1) {
if (_arg2.hasOwnProperty(_local7)){
_local6 = internalCompare(_arg1[_local7], _arg2[_local7], _arg3, _arg4, _arg5);
if (_local6 != 0){
return (_local6);
};
} else {
return (-1);
};
};
for (_local7 in _arg2) {
if (!_arg1.hasOwnProperty(_local7)){
return (1);
};
};
};
return (_local6);
}
public static function stringCompare(_arg1:String, _arg2:String, _arg3:Boolean=false):int{
if ((((_arg1 == null)) && ((_arg2 == null)))){
return (0);
};
if (_arg1 == null){
return (1);
};
if (_arg2 == null){
return (-1);
};
if (_arg3){
_arg1 = _arg1.toLocaleLowerCase();
_arg2 = _arg2.toLocaleLowerCase();
};
var _local4:int = _arg1.localeCompare(_arg2);
if (_local4 < -1){
_local4 = -1;
} else {
if (_local4 > 1){
_local4 = 1;
};
};
return (_local4);
}
public static function dateCompare(_arg1:Date, _arg2:Date):int{
if ((((_arg1 == null)) && ((_arg2 == null)))){
return (0);
};
if (_arg1 == null){
return (1);
};
if (_arg2 == null){
return (-1);
};
var _local3:Number = _arg1.getTime();
var _local4:Number = _arg2.getTime();
if (_local3 < _local4){
return (-1);
};
if (_local3 > _local4){
return (1);
};
return (0);
}
public static function numericCompare(_arg1:Number, _arg2:Number):int{
if (((isNaN(_arg1)) && (isNaN(_arg2)))){
return (0);
};
if (isNaN(_arg1)){
return (1);
};
if (isNaN(_arg2)){
return (-1);
};
if (_arg1 < _arg2){
return (-1);
};
if (_arg1 > _arg2){
return (1);
};
return (0);
}
private static function newline(_arg1:String, _arg2:int=0):String{
var _local3:String = _arg1;
_local3 = (_local3 + "\n");
var _local4:int;
while (_local4 < _arg2) {
_local3 = (_local3 + " ");
_local4++;
};
return (_local3);
}
private static function recordMetadata(_arg1:XMLList):Object{
var prop:XML;
var propName:String;
var metadataList:XMLList;
var metadata:Object;
var md:XML;
var mdName:String;
var argsList:XMLList;
var value:Object;
var arg:XML;
var existing:Object;
var argKey:String;
var argValue:String;
var existingArray:Array;
var properties = _arg1;
var result:Object;
try {
for each (prop in properties) {
propName = prop.attribute("name").toString();
metadataList = prop.metadata;
if (metadataList.length() > 0){
if (result == null){
result = {};
};
metadata = {};
result[propName] = metadata;
for each (md in metadataList) {
mdName = md.attribute("name").toString();
argsList = md.arg;
value = {};
for each (arg in argsList) {
argKey = arg.attribute("key").toString();
if (argKey != null){
argValue = arg.attribute("value").toString();
value[argKey] = argValue;
};
};
existing = metadata[mdName];
if (existing != null){
if ((existing is Array)){
existingArray = (existing as Array);
} else {
existingArray = [];
};
existingArray.push(value);
existing = existingArray;
} else {
existing = value;
};
metadata[mdName] = existing;
};
};
};
} catch(e:Error) {
};
return (result);
}
public static function compare(_arg1:Object, _arg2:Object, _arg3:int=-1):int{
return (internalCompare(_arg1, _arg2, 0, _arg3, new Dictionary(true)));
}
private static function listCompare(_arg1:IList, _arg2:IList, _arg3:int, _arg4:int, _arg5:Dictionary):int{
var _local7:int;
var _local6:int;
if (_arg1.length != _arg2.length){
if (_arg1.length < _arg2.length){
_local6 = -1;
} else {
_local6 = 1;
};
} else {
_local7 = 0;
while (_local7 < _arg1.length) {
_local6 = internalCompare(_arg1.getItemAt(_local7), _arg2.getItemAt(_local7), (_arg3 + 1), _arg4, _arg5);
if (_local6 != 0){
_local7 = _arg1.length;
};
_local7++;
};
};
return (_local6);
}
private static function internalCompare(_arg1:Object, _arg2:Object, _arg3:int, _arg4:int, _arg5:Dictionary):int{
var _local9:int;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Array;
var _local13:Array;
var _local14:QName;
var _local15:Object;
var _local16:Object;
var _local17:int;
if ((((_arg1 == null)) && ((_arg2 == null)))){
return (0);
};
if (_arg1 == null){
return (1);
};
if (_arg2 == null){
return (-1);
};
if ((_arg1 is ObjectProxy)){
_arg1 = ObjectProxy(_arg1).object_proxy::object;
};
if ((_arg2 is ObjectProxy)){
_arg2 = ObjectProxy(_arg2).object_proxy::object;
};
var _local6 = typeof(_arg1);
var _local7 = typeof(_arg2);
var _local8:int;
if (_local6 == _local7){
switch (_local6){
case "boolean":
_local8 = numericCompare(Number(_arg1), Number(_arg2));
break;
case "number":
_local8 = numericCompare((_arg1 as Number), (_arg2 as Number));
break;
case "string":
_local8 = stringCompare((_arg1 as String), (_arg2 as String));
break;
case "object":
_local9 = ((_arg4 > 0)) ? (_arg4 - 1) : _arg4;
_local10 = _arg5[_arg1];
_local11 = _arg5[_arg2];
if (((_local10) && (!(_local11)))){
return (1);
};
if (((_local11) && (!(_local10)))){
return (-1);
};
if (((_local11) && (_local10))){
return (0);
};
_arg5[_arg1] = true;
_arg5[_arg2] = true;
if (((!((_arg4 == -1))) && ((_arg3 > _arg4)))){
_local8 = stringCompare(_arg1.toString(), _arg2.toString());
} else {
if ((((_arg1 is Array)) && ((_arg2 is Array)))){
_local8 = arrayCompare((_arg1 as Array), (_arg2 as Array), _arg3, _arg4, _arg5);
} else {
if ((((_arg1 is Date)) && ((_arg2 is Date)))){
_local8 = dateCompare((_arg1 as Date), (_arg2 as Date));
} else {
if ((((_arg1 is IList)) && ((_arg2 is IList)))){
_local8 = listCompare((_arg1 as IList), (_arg2 as IList), _arg3, _arg4, _arg5);
} else {
if ((((_arg1 is ByteArray)) && ((_arg2 is ByteArray)))){
_local8 = byteArrayCompare((_arg1 as ByteArray), (_arg2 as ByteArray));
} else {
if (getQualifiedClassName(_arg1) == getQualifiedClassName(_arg2)){
_local12 = getClassInfo(_arg1).properties;
if (getQualifiedClassName(_arg1) == "Object"){
_local13 = getClassInfo(_arg2).properties;
_local8 = arrayCompare(_local12, _local13, _arg3, _local9, _arg5);
};
if (_local8 != 0){
return (_local8);
};
_local17 = 0;
while (_local17 < _local12.length) {
_local14 = _local12[_local17];
_local15 = _arg1[_local14];
_local16 = _arg2[_local14];
_local8 = internalCompare(_local15, _local16, (_arg3 + 1), _local9, _arg5);
if (_local8 != 0){
_local17 = _local12.length;
};
_local17++;
};
} else {
return (1);
};
};
};
};
};
};
break;
};
} else {
return (stringCompare(_local6, _local7));
};
return (_local8);
}
public static function hasMetadata(_arg1:Object, _arg2:String, _arg3:String, _arg4:Array=null, _arg5:Object=null):Boolean{
var _local6:Object = getClassInfo(_arg1, _arg4, _arg5);
var _local7:Object = _local6["metadata"];
return (internalHasMetadata(_local7, _arg2, _arg3));
}
private static function internalHasMetadata(_arg1:Object, _arg2:String, _arg3:String):Boolean{
var _local4:Object;
if (_arg1 != null){
_local4 = _arg1[_arg2];
if (_local4 != null){
if (_local4[_arg3] != null){
return (true);
};
};
};
return (false);
}
public static function toString(_arg1:Object, _arg2:Array=null, _arg3:Array=null):String{
if (_arg3 == null){
_arg3 = defaultToStringExcludes;
};
refCount = 0;
return (internalToString(_arg1, 0, null, _arg2, _arg3));
}
private static function byteArrayCompare(_arg1:ByteArray, _arg2:ByteArray):int{
var _local4:int;
var _local3:int;
if (_arg1.length != _arg2.length){
if (_arg1.length < _arg2.length){
_local3 = -1;
} else {
_local3 = 1;
};
} else {
_arg1.position = 0;
_arg2.position = 0;
_local4 = 0;
while (_local4 < _arg1.length) {
_local3 = numericCompare(_arg1.readByte(), _arg2.readByte());
if (_local3 != 0){
_local4 = _arg1.length;
};
_local4++;
};
};
return (_local3);
}
public static function copy(_arg1:Object):Object{
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
var _local3:Object = _local2.readObject();
return (_local3);
}
private static function getCacheKey(_arg1:Object, _arg2:Array=null, _arg3:Object=null):String{
var _local5:uint;
var _local6:String;
var _local7:String;
var _local8:String;
var _local4:String = getQualifiedClassName(_arg1);
if (_arg2 != null){
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = (_arg2[_local5] as String);
if (_local6 != null){
_local4 = (_local4 + _local6);
};
_local5++;
};
};
if (_arg3 != null){
for (_local7 in _arg3) {
_local4 = (_local4 + _local7);
_local8 = (_arg3[_local7] as String);
if (_local8 != null){
_local4 = (_local4 + _local8);
};
};
};
return (_local4);
}
}
}//package mx.utils
Section 449
//SecurityUtil (mx.utils.SecurityUtil)
package mx.utils {
import mx.core.*;
public class SecurityUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function hasMutualTrustBetweenParentAndChild(_arg1:ISWFBridgeProvider):Boolean{
if (((((_arg1) && (_arg1.childAllowsParent))) && (_arg1.parentAllowsChild))){
return (true);
};
return (false);
}
}
}//package mx.utils
Section 450
//StringUtil (mx.utils.StringUtil)
package mx.utils {
import mx.core.*;
public class StringUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
var _local3:int = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local4:Array;
if (_arg1 == null){
return ("");
};
var _local3:uint = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
var _local5:int;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 451
//UIDUtil (mx.utils.UIDUtil)
package mx.utils {
import mx.core.*;
import flash.utils.*;
public class UIDUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
private static const ALPHA_CHAR_CODES:Array = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70];
private static var uidDictionary:Dictionary = new Dictionary(true);
public static function fromByteArray(_arg1:ByteArray):String{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:int;
if (((((!((_arg1 == null))) && ((_arg1.length >= 16)))) && ((_arg1.bytesAvailable >= 16)))){
_local2 = new Array(36);
_local3 = 0;
_local4 = 0;
while (_local4 < 16) {
if ((((((((_local4 == 4)) || ((_local4 == 6)))) || ((_local4 == 8)))) || ((_local4 == 10)))){
var _temp1 = _local3;
_local3 = (_local3 + 1);
var _local6 = _temp1;
_local2[_local6] = 45;
};
_local5 = _arg1.readByte();
var _temp2 = _local3;
_local3 = (_local3 + 1);
_local6 = _temp2;
_local2[_local6] = ALPHA_CHAR_CODES[((_local5 & 240) >>> 4)];
var _temp3 = _local3;
_local3 = (_local3 + 1);
var _local7 = _temp3;
_local2[_local7] = ALPHA_CHAR_CODES[(_local5 & 15)];
_local4++;
};
return (String.fromCharCode.apply(null, _local2));
};
return (null);
}
public static function isUID(_arg1:String):Boolean{
var _local2:uint;
var _local3:Number;
if (((!((_arg1 == null))) && ((_arg1.length == 36)))){
_local2 = 0;
while (_local2 < 36) {
_local3 = _arg1.charCodeAt(_local2);
if ((((((((_local2 == 8)) || ((_local2 == 13)))) || ((_local2 == 18)))) || ((_local2 == 23)))){
if (_local3 != 45){
return (false);
};
} else {
if ((((((_local3 < 48)) || ((_local3 > 70)))) || ((((_local3 > 57)) && ((_local3 < 65)))))){
return (false);
};
};
_local2++;
};
return (true);
};
return (false);
}
public static function createUID():String{
var _local3:int;
var _local4:int;
var _local1:Array = new Array(36);
var _local2:int;
_local3 = 0;
while (_local3 < 8) {
var _temp1 = _local2;
_local2 = (_local2 + 1);
var _local7 = _temp1;
_local1[_local7] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))];
_local3++;
};
_local3 = 0;
while (_local3 < 3) {
var _temp2 = _local2;
_local2 = (_local2 + 1);
_local7 = _temp2;
_local1[_local7] = 45;
_local4 = 0;
while (_local4 < 4) {
var _temp3 = _local2;
_local2 = (_local2 + 1);
var _local8 = _temp3;
_local1[_local8] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))];
_local4++;
};
_local3++;
};
var _temp4 = _local2;
_local2 = (_local2 + 1);
_local7 = _temp4;
_local1[_local7] = 45;
var _local5:Number = new Date().getTime();
var _local6:String = ("0000000" + _local5.toString(16).toUpperCase()).substr(-8);
_local3 = 0;
while (_local3 < 8) {
var _temp5 = _local2;
_local2 = (_local2 + 1);
_local8 = _temp5;
_local1[_local8] = _local6.charCodeAt(_local3);
_local3++;
};
_local3 = 0;
while (_local3 < 4) {
var _temp6 = _local2;
_local2 = (_local2 + 1);
_local8 = _temp6;
_local1[_local8] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))];
_local3++;
};
return (String.fromCharCode.apply(null, _local1));
}
public static function toByteArray(_arg1:String):ByteArray{
var _local2:ByteArray;
var _local3:uint;
var _local4:String;
var _local5:uint;
var _local6:uint;
if (isUID(_arg1)){
_local2 = new ByteArray();
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1.charAt(_local3);
if (_local4 == "-"){
} else {
_local5 = getDigit(_local4);
_local3++;
_local6 = getDigit(_arg1.charAt(_local3));
_local2.writeByte((((_local5 << 4) | _local6) & 0xFF));
};
_local3++;
};
_local2.position = 0;
return (_local2);
};
return (null);
}
private static function getDigit(_arg1:String):uint{
switch (_arg1){
case "A":
case "a":
return (10);
case "B":
case "b":
return (11);
case "C":
case "c":
return (12);
case "D":
case "d":
return (13);
case "E":
case "e":
return (14);
case "F":
case "f":
return (15);
default:
return (new uint(_arg1));
};
}
public static function getUID(_arg1:Object):String{
var result:String;
var xitem:XML;
var nodeKind:String;
var notificationFunction:Function;
var item = _arg1;
result = null;
if (item == null){
return (result);
};
if ((item is IUID)){
result = IUID(item).uid;
if ((((result == null)) || ((result.length == 0)))){
result = createUID();
IUID(item).uid = result;
};
} else {
if ((((item is IPropertyChangeNotifier)) && (!((item is IUIComponent))))){
result = IPropertyChangeNotifier(item).uid;
if ((((result == null)) || ((result.length == 0)))){
result = createUID();
IPropertyChangeNotifier(item).uid = result;
};
} else {
if ((item is String)){
return ((item as String));
};
try {
if ((((item is XMLList)) && ((item.length == 1)))){
item = item[0];
};
if ((item is XML)){
xitem = XML(item);
nodeKind = xitem.nodeKind();
if ((((nodeKind == "text")) || ((nodeKind == "attribute")))){
return (xitem.toString());
};
notificationFunction = xitem.notification();
if (!(notificationFunction is Function)){
notificationFunction = XMLNotifier.initializeXMLForNotification();
xitem.setNotification(notificationFunction);
};
if (notificationFunction["uid"] == undefined){
result = (notificationFunction["uid"] = createUID());
};
result = notificationFunction["uid"];
} else {
if (("mx_internal_uid" in item)){
return (item.mx_internal_uid);
};
if (("uid" in item)){
return (item.uid);
};
result = uidDictionary[item];
if (!result){
result = createUID();
try {
item.mx_internal_uid = result;
} catch(e:Error) {
uidDictionary[item] = result;
};
};
};
} catch(e:Error) {
result = item.toString();
};
};
};
return (result);
}
}
}//package mx.utils
Section 452
//XMLNotifier (mx.utils.XMLNotifier)
package mx.utils {
import flash.utils.*;
public class XMLNotifier {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var instance:XMLNotifier;
public function XMLNotifier(_arg1:XMLNotifierSingleton){
}
public function watchXML(_arg1:Object, _arg2:IXMLNotifiable, _arg3:String=null):void{
var _local6:Dictionary;
var _local4:XML = XML(_arg1);
var _local5:Object = _local4.notification();
if (!(_local5 is Function)){
_local5 = initializeXMLForNotification();
_local4.setNotification((_local5 as Function));
if (((_arg3) && ((_local5["uid"] == null)))){
_local5["uid"] = _arg3;
};
};
if (_local5["watched"] == undefined){
_local6 = new Dictionary(true);
_local5["watched"] = _local6;
} else {
_local6 = _local5["watched"];
};
_local6[_arg2] = true;
}
public function unwatchXML(_arg1:Object, _arg2:IXMLNotifiable):void{
var _local5:Dictionary;
var _local3:XML = XML(_arg1);
var _local4:Object = _local3.notification();
if (!(_local4 is Function)){
return;
};
if (_local4["watched"] != undefined){
_local5 = _local4["watched"];
delete _local5[_arg2];
};
}
public static function getInstance():XMLNotifier{
if (!instance){
instance = new XMLNotifier(new XMLNotifierSingleton());
};
return (instance);
}
mx_internal static function initializeXMLForNotification():Function{
var notificationFunction:Function = function (_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void{
var _local8:Object;
var _local7:Dictionary = arguments.callee.watched;
if (_local7 != null){
for (_local8 in _local7) {
IXMLNotifiable(_local8).xmlNotification(_arg1, _arg2, _arg3, _arg4, _arg5);
};
};
};
return (notificationFunction);
}
}
}//package mx.utils
class XMLNotifierSingleton {
private function XMLNotifierSingleton(){
}
}
Section 453
//IValidatorListener (mx.validators.IValidatorListener)
package mx.validators {
import mx.events.*;
public interface IValidatorListener {
function set errorString(_arg1:String):void;
function get validationSubField():String;
function validationResultHandler(_arg1:ValidationResultEvent):void;
function set validationSubField(_arg1:String):void;
function get errorString():String;
}
}//package mx.validators
Section 454
//ValidationResult (mx.validators.ValidationResult)
package mx.validators {
public class ValidationResult {
public var subField:String;
public var errorCode:String;
public var isError:Boolean;
public var errorMessage:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public function ValidationResult(_arg1:Boolean, _arg2:String="", _arg3:String="", _arg4:String=""){
this.isError = _arg1;
this.subField = _arg2;
this.errorMessage = _arg4;
this.errorCode = _arg3;
}
}
}//package mx.validators
Section 455
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 456
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 457
//_advancedDataGridStylesStyle (_advancedDataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _advancedDataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".advancedDataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".advancedDataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 458
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 459
//_AlertStyle (_AlertStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _AlertStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Alert");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Alert", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.borderColor = 8821927;
this.paddingLeft = 10;
this.color = 0xFFFFFF;
this.roundedBottomCorners = true;
this.paddingRight = 10;
this.backgroundAlpha = 0.9;
this.paddingBottom = 2;
this.borderAlpha = 0.9;
this.buttonStyleName = "alertButtonStyle";
this.backgroundColor = 8821927;
};
};
}
}
}//package
Section 460
//_ApplicationStyle (_ApplicationStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ApplicationStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Application");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Application", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 24;
this.paddingLeft = 24;
this.backgroundGradientAlphas = [1, 1];
this.horizontalAlign = "center";
this.paddingRight = 24;
this.backgroundImage = ApplicationBackground;
this.paddingBottom = 24;
this.backgroundSize = "100%";
this.backgroundColor = 8821927;
};
};
}
}
}//package
Section 461
//_ButtonStyle (_ButtonStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ButtonStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Button");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Button", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.textAlign = "center";
this.skin = ButtonSkin;
this.paddingLeft = 10;
this.fontWeight = "bold";
this.cornerRadius = 4;
this.paddingRight = 10;
this.verticalGap = 2;
this.horizontalGap = 2;
this.paddingBottom = 2;
};
};
}
}
}//package
Section 462
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropdown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingLeft = 5;
this.fontWeight = "normal";
this.cornerRadius = 0;
this.paddingRight = 5;
this.dropShadowEnabled = true;
this.shadowDirection = "center";
this.leading = 0;
this.borderThickness = 0;
this.shadowDistance = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 463
//_ContainerStyle (_ContainerStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _ContainerStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Container");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Container", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderStyle = "none";
};
};
}
}
}//package
Section 464
//_CursorManagerStyle (_CursorManagerStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _CursorManagerStyle {
private static var _embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1323221744:Class = _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1323221744;
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("CursorManager", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.busyCursor = BusyCursor;
this.busyCursorBackground = _embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1323221744;
};
};
}
}
}//package
Section 465
//_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1323221744 (_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1323221744)
package {
import mx.core.*;
public class _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1323221744 extends SpriteAsset {
}
}//package
Section 466
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 467
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.borderThickness = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 468
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 4;
this.borderColor = 13510953;
this.paddingLeft = 4;
this.color = 0xFFFFFF;
this.fontWeight = "bold";
this.paddingRight = 4;
this.shadowColor = 0;
this.fontSize = 9;
this.paddingBottom = 4;
this.borderStyle = "errorTipRight";
};
};
}
}
}//package
Section 469
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.modalTransparencyBlur = 3;
this.verticalGridLineColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.textAlign = "left";
this.disabledIconColor = 0x999999;
this.stroked = false;
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.fontStyle = "normal";
this.borderSides = "left top right bottom";
this.borderThickness = 1;
this.modalTransparencyDuration = 100;
this.useRollOver = true;
this.strokeWidth = 1;
this.filled = true;
this.borderColor = 12040892;
this.horizontalGridLines = false;
this.horizontalGridLineColor = 0xF7F7F7;
this.shadowCapColor = 14015965;
this.fontGridFitType = "pixel";
this.horizontalAlign = "left";
this.modalTransparencyColor = 0xDDDDDD;
this.disabledColor = 11187123;
this.borderSkin = HaloBorder;
this.dropShadowColor = 0;
this.paddingBottom = 0;
this.indentation = 17;
this.version = "3.0.0";
this.fontThickness = 0;
this.verticalGridLines = true;
this.embedFonts = false;
this.fontSharpness = 0;
this.shadowDirection = "center";
this.textDecoration = "none";
this.selectionDuration = 250;
this.bevel = true;
this.fillColor = 0xFFFFFF;
this.focusBlendMode = "normal";
this.dropShadowEnabled = false;
this.textRollOverColor = 2831164;
this.textIndent = 0;
this.fontSize = 10;
this.openDuration = 250;
this.closeDuration = 250;
this.kerning = false;
this.paddingTop = 0;
this.highlightAlphas = [0.3, 0];
this.cornerRadius = 0;
this.horizontalGap = 8;
this.textSelectedColor = 2831164;
this.paddingLeft = 0;
this.modalTransparency = 0.5;
this.roundedBottomCorners = true;
this.repeatDelay = 500;
this.selectionDisabledColor = 0xDDDDDD;
this.fontAntiAliasType = "advanced";
this.focusSkin = HaloFocusRect;
this.verticalGap = 6;
this.leading = 2;
this.shadowColor = 0xEEEEEE;
this.backgroundAlpha = 1;
this.iconColor = 0x111111;
this.focusAlpha = 0.4;
this.borderAlpha = 1;
this.focusThickness = 2;
this.themeColor = 40447;
this.backgroundSize = "auto";
this.indicatorGap = 14;
this.letterSpacing = 0;
this.fontFamily = "Verdana";
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.color = 734012;
this.paddingRight = 0;
this.errorColor = 0xFF0000;
this.verticalAlign = "top";
this.focusRoundedCorners = "tl tr bl br";
this.shadowDistance = 2;
this.repeatInterval = 35;
};
};
}
}
}//package
Section 470
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 471
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 472
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".linkButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.paddingLeft = 2;
this.paddingRight = 2;
this.paddingBottom = 2;
};
};
}
}
}//package
Section 473
//_main_FlexInit (_main_FlexInit)
package {
import mx.core.*;
import mx.styles.*;
import mx.effects.*;
import flash.net.*;
import flash.utils.*;
import mx.collections.*;
import mx.utils.*;
import flash.system.*;
public class _main_FlexInit {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var _local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("addedEffect", "added");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("creationCompleteEffect", "creationComplete");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("focusInEffect", "focusIn");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("focusOutEffect", "focusOut");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("hideEffect", "hide");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("mouseDownEffect", "mouseDown");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("mouseUpEffect", "mouseUp");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("moveEffect", "move");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("removedEffect", "removed");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("resizeEffect", "resize");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("rollOutEffect", "rollOut");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("rollOverEffect", "rollOver");
_local3 = EffectManager;
_local3.mx_internal::registerEffectTrigger("showEffect", "show");
try {
if (getClassByAlias("flex.messaging.io.ArrayCollection") == null){
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
};
} catch(e:Error) {
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
};
try {
if (getClassByAlias("flex.messaging.io.ArrayList") == null){
registerClassAlias("flex.messaging.io.ArrayList", ArrayList);
};
} catch(e:Error) {
registerClassAlias("flex.messaging.io.ArrayList", ArrayList);
};
try {
if (getClassByAlias("flex.messaging.io.ObjectProxy") == null){
registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy);
};
} catch(e:Error) {
registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy);
};
var styleNames:Array = ["fontWeight", "modalTransparencyBlur", "textRollOverColor", "backgroundDisabledColor", "textIndent", "barColor", "fontSize", "kerning", "textAlign", "fontStyle", "modalTransparencyDuration", "textSelectedColor", "modalTransparency", "fontGridFitType", "disabledColor", "fontAntiAliasType", "modalTransparencyColor", "leading", "dropShadowColor", "themeColor", "letterSpacing", "fontFamily", "color", "fontThickness", "errorColor", "fontSharpness", "textDecoration"];
var i:int;
while (i < styleNames.length) {
StyleManager.registerInheritingStyle(styleNames[i]);
i = (i + 1);
};
}
}
}//package
Section 474
//_main_mx_managers_SystemManager (_main_mx_managers_SystemManager)
package {
import mx.core.*;
import mx.managers.*;
import flash.system.*;
public class _main_mx_managers_SystemManager extends SystemManager implements IFlexModuleFactory {
override public function create(... _args):Object{
if ((((_args.length > 0)) && (!((_args[0] is String))))){
return (super.create.apply(this, _args));
};
var _local2:String = ((_args.length == 0)) ? "main" : String(_args[0]);
var _local3:Class = Class(getDefinitionByName(_local2));
if (!_local3){
return (null);
};
var _local4:Object = new (_local3);
if ((_local4 is IFlexModule)){
IFlexModule(_local4).moduleFactory = this;
};
if (_args.length == 0){
EmbeddedFontRegistry.registerFonts(info()["fonts"], this);
};
return (_local4);
}
override public function info():Object{
return ({applicationComplete:"creationComplete()", backgroundColor:"0x000000", compiledLocales:["en_US"], compiledResourceBundleNames:["collections", "containers", "core", "effects", "skins", "styles"], currentDomain:ApplicationDomain.currentDomain, enterFrame:"enterFrame(event)", fonts:{Default:{regular:true, bold:false, italic:false, boldItalic:false}, Default2:{regular:true, bold:false, italic:false, boldItalic:false}}, frameRate:"40", height:"450", horizontalAlign:"center", keyDown:"keyDown(event)", keyUp:"keyUp(event)", layout:"absolute", mainClassName:"main", mixins:["_main_FlexInit", "_alertButtonStyleStyle", "_ScrollBarStyle", "_activeTabStyleStyle", "_textAreaHScrollBarStyleStyle", "_ToolTipStyle", "_advancedDataGridStylesStyle", "_comboDropdownStyle", "_ContainerStyle", "_textAreaVScrollBarStyleStyle", "_linkButtonStyleStyle", "_globalStyle", "_windowStatusStyle", "_windowStylesStyle", "_PanelStyle", "_activeButtonStyleStyle", "_errorTipStyle", "_richTextEditorTextAreaStyleStyle", "_CursorManagerStyle", "_todayStyleStyle", "_dateFieldPopupStyle", "_plainStyle", "_dataGridStylesStyle", "_ApplicationStyle", "_headerDateTextStyle", "_ButtonStyle", "_popUpMenuStyle", "_AlertStyle", "_swatchPanelTextFieldStyle", "_opaquePanelStyle", "_weekDayStyleStyle", "_headerDragProxyStyleStyle"], mouseDown:"mouseDown(event)", mouseMove:"mouseMove(event)", preloader:Preloader, verticalAlign:"center", width:"550"});
}
}
}//package
Section 475
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.borderAlpha = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 476
//_PanelStyle (_PanelStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _PanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var effects:Array;
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Panel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Panel", style, false);
effects = style.mx_internal::effects;
if (!effects){
effects = (style.mx_internal::effects = new Array());
};
effects.push("resizeEndEffect");
effects.push("resizeStartEffect");
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderColor = 0xE2E2E2;
this.paddingLeft = 0;
this.roundedBottomCorners = false;
this.dropShadowEnabled = true;
this.resizeStartEffect = "Dissolve";
this.borderSkin = PanelSkin;
this.statusStyleName = "windowStatus";
this.borderAlpha = 0.4;
this.borderStyle = "default";
this.paddingBottom = 0;
this.resizeEndEffect = "Dissolve";
this.paddingTop = 0;
this.borderThicknessRight = 10;
this.titleStyleName = "windowStyles";
this.cornerRadius = 4;
this.paddingRight = 0;
this.borderThicknessLeft = 10;
this.titleBackgroundSkin = TitleBackground;
this.borderThickness = 0;
this.borderThicknessTop = 2;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 477
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.paddingLeft = 0;
this.horizontalAlign = "left";
this.paddingRight = 0;
this.backgroundImage = "";
this.paddingBottom = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 478
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".popUpMenu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "left";
this.fontWeight = "normal";
};
};
}
}
}//package
Section 479
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 480
//_ScrollBarStyle (_ScrollBarStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ScrollBarStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("ScrollBar");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("ScrollBar", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.trackColors = [9738651, 0xE7E7E7];
this.thumbOffset = 0;
this.paddingTop = 0;
this.downArrowSkin = ScrollArrowSkin;
this.borderColor = 12040892;
this.paddingLeft = 0;
this.cornerRadius = 4;
this.paddingRight = 0;
this.trackSkin = ScrollTrackSkin;
this.thumbSkin = ScrollThumbSkin;
this.paddingBottom = 0;
this.upArrowSkin = ScrollArrowSkin;
};
};
}
}
}//package
Section 481
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.highlightColor = 12897484;
this.borderColor = 14015965;
this.paddingLeft = 5;
this.shadowCapColor = 14015965;
this.paddingRight = 5;
this.shadowColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.backgroundColor = 0xFFFFFF;
this.borderCapColor = 9542041;
};
};
}
}
}//package
Section 482
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 483
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 484
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.color = 0xFFFFFF;
};
};
}
}
}//package
Section 485
//_ToolTipStyle (_ToolTipStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ToolTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("ToolTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("ToolTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.borderColor = 9542041;
this.paddingLeft = 4;
this.cornerRadius = 2;
this.paddingRight = 4;
this.shadowColor = 0;
this.fontSize = 9;
this.borderSkin = ToolTipBorder;
this.backgroundAlpha = 0.95;
this.paddingBottom = 2;
this.borderStyle = "toolTip";
this.backgroundColor = 16777164;
};
};
}
}
}//package
Section 486
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 487
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 488
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 489
//Carmack (Carmack)
package {
import mx.core.*;
import cotogames.carmack.core.*;
import cotogames.carmack.core.states.*;
import mx.collections.*;
import cotogames.carmack.resources.*;
public class Carmack extends GameObject {
public var rechargingBlaster:Boolean;// = false
public var timeOnTurn:Number;// = 0
public var gunOn:Boolean;// = true
public static const TIME_TO_BE_KILLED_BY_TURRET:Number = 1.4;
public static const TIME_TO_BE_KILLED_BY_ROBOT:Number = 3;
public static const TIME_TO_MOVE:Number = 0.5;
public static const TIME_TO_DIE_IN_ACID:Number = 1.6;
public static const TIME_TO_SHOOT:Number = 1.1;
public function Carmack(){
idleGraphics = ResourceManager.CarmackIdleGraphics.clone();
}
override public function update(_arg1:Number):void{
super.update(_arg1);
if (timeMoved == 0){
onCommandStart();
};
timeMoved = (timeMoved + _arg1);
var _local2:Number = (timeMoved / timeOnTurn);
if (_local2 > 1){
_local2 = 1;
};
progressThroughCommand(_local2);
if (timeMoved >= timeOnTurn){
onCommandComplete();
};
}
public function onCommandComplete():void{
var _local4:int;
var _local5:Tile;
var _local6:GameObject;
var _local1:Level = GameManager.Instance.currentLevel;
if ((((nextCommand == PlayerCommands.KILL_CARMACK)) || ((nextCommand == PlayerCommands.DIE_FROM_TURRET)))){
GameManager.Instance.pushState(new GameOverCoreState());
moved = true;
return;
};
if ((((((((nextCommand == PlayerCommands.MOVE_DOWN)) || ((nextCommand == PlayerCommands.MOVE_LEFT)))) || ((nextCommand == PlayerCommands.MOVE_RIGHT)))) || ((nextCommand == PlayerCommands.MOVE_UP)))){
if (GameManager.Instance.currentLevel.canDie(position.x, position.y)){
this.timeMoved = 0;
this.nextCommand = PlayerCommands.DIE_IN_ACID_DOWN;
GameManager.Instance.movingObject = this;
return;
};
if (nextCommand == PlayerCommands.MOVE_DOWN){
graphics = ResourceManager.RoboDownGraphics;
};
if (nextCommand == PlayerCommands.MOVE_LEFT){
graphics = ResourceManager.RoboLeftGraphics;
};
if (nextCommand == PlayerCommands.MOVE_RIGHT){
graphics = ResourceManager.RoboRightGraphics;
};
if (nextCommand == PlayerCommands.MOVE_UP){
graphics = ResourceManager.RoboUpGraphics;
};
_local4 = 0;
while (_local4 < GameManager.Instance.gameObjectsToMove.length) {
_local6 = (GameManager.Instance.gameObjectsToMove.getItemAt(_local4) as GameObject);
if (_local6 == this){
} else {
if (!(((position.x == _local6.position.x)) && ((position.y == _local6.position.y)))){
} else {
if (!(_local6 is Welder)){
} else {
_local6.shutdown();
this.timeMoved = 0;
this.nextCommand = PlayerCommands.KILL_CARMACK;
GameManager.Instance.movingObject = this;
return;
};
};
};
_local4++;
};
_local5 = _local1.tiles[Math.floor(position.x)][Math.floor(position.y)];
_local5.attachedGameObject = this;
if (_local5.onStepEvent != null){
_local5.onStepEvent.execute();
};
};
var _local2:GameObject;
var _local3:Boolean;
if (nextCommand == PlayerCommands.SHOOT_DOWN){
_local2 = _local1.findShootingHit(position, GameObject.DIRECTION_DOWN);
_local3 = true;
} else {
if (nextCommand == PlayerCommands.SHOOT_RIGHT){
_local2 = _local1.findShootingHit(position, GameObject.DIRECTION_RIGHT);
_local3 = true;
} else {
if (nextCommand == PlayerCommands.SHOOT_LEFT){
_local2 = _local1.findShootingHit(position, GameObject.DIRECTION_LEFT);
_local3 = true;
} else {
if (nextCommand == PlayerCommands.SHOOT_UP){
_local2 = _local1.findShootingHit(position, GameObject.DIRECTION_UP);
_local3 = true;
};
};
};
};
if (_local2 != null){
if ((_local2 is Welder)){
_local2.timeMoved = 0;
_local2.nextCommand = PlayerCommands.EXPLODE_DOWN;
GameManager.Instance.movingObject = _local2;
};
};
if ((((((((nextCommand == PlayerCommands.DIE_IN_ACID_DOWN)) || ((nextCommand == PlayerCommands.DIE_IN_ACID_LEFT)))) || ((nextCommand == PlayerCommands.DIE_IN_ACID_RIGHT)))) || ((nextCommand == PlayerCommands.DIE_IN_ACID_UP)))){
this.shutdown();
};
if (direction == DIRECTION_DOWN){
graphics = ResourceManager.RoboDownGraphics;
};
if (direction == DIRECTION_LEFT){
graphics = ResourceManager.RoboLeftGraphics;
};
if (direction == DIRECTION_RIGHT){
graphics = ResourceManager.RoboRightGraphics;
};
if (direction == DIRECTION_UP){
graphics = ResourceManager.RoboUpGraphics;
};
if (!gunOn){
gunOn = true;
};
if (_local3){
gunOn = false;
};
moved = true;
}
override public function shutdown():void{
if (inuse){
super.shutdown();
GameManager.Instance.pushState(new GameOverCoreState());
};
}
public function progressThroughCommand(_arg1:Number):void{
var _local2:Number = (_arg1 * Level.TILE_SIZE);
if (nextCommand == PlayerCommands.MOVE_RIGHT){
position.x = (oldPosition.x + (_local2 / Level.TILE_SIZE));
};
if (nextCommand == PlayerCommands.MOVE_LEFT){
position.x = (oldPosition.x - (_local2 / Level.TILE_SIZE));
};
if (nextCommand == PlayerCommands.MOVE_DOWN){
position.y = (oldPosition.y + (_local2 / Level.TILE_SIZE));
};
if (nextCommand == PlayerCommands.MOVE_UP){
position.y = (oldPosition.y - (_local2 / Level.TILE_SIZE));
};
}
public function onCommandStart():void{
idleAnimationCountdown = -1;
idleAnimationTimer = -1;
idleAnimationOn = false;
idleGraphics.reset();
switch (nextCommand){
case PlayerCommands.MOVE_RIGHT:
timeOnTurn = TIME_TO_MOVE;
graphics = ResourceManager.RoboWalkRightGraphics;
break;
case PlayerCommands.MOVE_LEFT:
timeOnTurn = TIME_TO_MOVE;
graphics = ResourceManager.RoboWalkLeftGraphics;
break;
case PlayerCommands.MOVE_DOWN:
timeOnTurn = TIME_TO_MOVE;
graphics = ResourceManager.RoboWalkDownGraphics;
break;
case PlayerCommands.MOVE_UP:
timeOnTurn = TIME_TO_MOVE;
graphics = ResourceManager.RoboWalkUpGraphics;
break;
case PlayerCommands.SHOOT_DOWN:
timeOnTurn = TIME_TO_SHOOT;
graphics = ResourceManager.RoboShootDownGraphics;
break;
case PlayerCommands.SHOOT_LEFT:
timeOnTurn = TIME_TO_SHOOT;
graphics = ResourceManager.RoboShootLeftGraphics;
break;
case PlayerCommands.SHOOT_RIGHT:
timeOnTurn = TIME_TO_SHOOT;
graphics = ResourceManager.RoboShootRightGraphics;
break;
case PlayerCommands.SHOOT_UP:
timeOnTurn = TIME_TO_SHOOT;
graphics = ResourceManager.RoboShootUpGraphics;
break;
case PlayerCommands.DIE_IN_ACID_DOWN:
timeOnTurn = TIME_TO_DIE_IN_ACID;
graphics = ResourceManager.CarmackAcidGraphics.clone();
ResourceManager.BubblesFX.play();
break;
case PlayerCommands.DIE_IN_ACID_LEFT:
timeOnTurn = TIME_TO_DIE_IN_ACID;
graphics = ResourceManager.CarmackAcidGraphics.clone();
break;
case PlayerCommands.DIE_IN_ACID_RIGHT:
timeOnTurn = TIME_TO_DIE_IN_ACID;
graphics = ResourceManager.CarmackAcidGraphics.clone();
break;
case PlayerCommands.DIE_IN_ACID_UP:
timeOnTurn = TIME_TO_DIE_IN_ACID;
graphics = ResourceManager.CarmackAcidGraphics.clone();
break;
case PlayerCommands.KILL_CARMACK:
ResourceManager.RobotFightFX.play();
timeOnTurn = TIME_TO_BE_KILLED_BY_ROBOT;
graphics = ResourceManager.CarmackKilledByRobotGraphics;
break;
case PlayerCommands.DIE_FROM_TURRET:
timeOnTurn = TIME_TO_BE_KILLED_BY_TURRET;
ResourceManager.FallFX.play();
graphics = ResourceManager.CarmackKilledByTurretGraphics;
break;
};
graphics.reset();
if ((((((((nextCommand == PlayerCommands.MOVE_RIGHT)) || ((nextCommand == PlayerCommands.MOVE_LEFT)))) || ((nextCommand == PlayerCommands.MOVE_DOWN)))) || ((nextCommand == PlayerCommands.MOVE_UP)))){
GameManager.Instance.currentLevel.detachGameObject(this);
ResourceManager.WalkFX.play();
};
if ((((((((nextCommand == PlayerCommands.SHOOT_DOWN)) || ((nextCommand == PlayerCommands.SHOOT_LEFT)))) || ((nextCommand == PlayerCommands.SHOOT_RIGHT)))) || ((nextCommand == PlayerCommands.SHOOT_UP)))){
ResourceManager.GunFX.play();
};
graphics.reset();
}
}
}//package
Section 490
//Command (Command)
package {
public class Command {
public function execute():void{
}
}
}//package
Section 491
//en_US$collections_properties (en_US$collections_properties)
package {
import mx.resources.*;
public class en_US$collections_properties extends ResourceBundle {
public function en_US$collections_properties(){
super("en_US", "collections");
}
override protected function getContent():Object{
var _local1:Object = {findCondition:"Find criteria must contain all sort fields leading up to '{0}'.", noComparatorSortField:"Cannot determine comparator for SortField with name '{0}'.", outOfBounds:"Index '{0}' specified is out of bounds.", nonUnique:"Non-unique values in items.", incorrectAddition:"Attempt to add an item already in the view.", findRestriction:"Find criteria must contain at least one sort field value.", invalidType:"Incorrect type. Must be of type XML or a XMLList that contains one XML object. ", unknownMode:"Unknown find mode.", invalidIndex:"Invalid index: '{0}'.", invalidRemove:"Cannot remove when current is beforeFirst or afterLast.", unknownProperty:"Unknown Property: '{0}'.", invalidInsert:"Cannot insert when current is beforeFirst.", itemNotFound:"Cannot find when view is not sorted.", bookmarkInvalid:"Bookmark no longer valid.", noComparator:"Cannot determine comparator for '{0}'.", invalidCursor:"Cursor no longer valid.", noItems:"No items to search.", bookmarkNotFound:"Bookmark is not from this view."};
return (_local1);
}
}
}//package
Section 492
//en_US$containers_properties (en_US$containers_properties)
package {
import mx.resources.*;
public class en_US$containers_properties extends ResourceBundle {
public function en_US$containers_properties(){
super("en_US", "containers");
}
override protected function getContent():Object{
var _local1:Object = {noColumnsFound:"No ConstraintColumns found.", noRowsFound:"No ConstraintRows found.", rowNotFound:"ConstraintRow '{0}' not found.", columnNotFound:"ConstraintColumn '{0}' not found."};
return (_local1);
}
}
}//package
Section 493
//en_US$core_properties (en_US$core_properties)
package {
import mx.resources.*;
public class en_US$core_properties extends ResourceBundle {
public function en_US$core_properties(){
super("en_US", "core");
}
override protected function getContent():Object{
var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."};
return (_local1);
}
}
}//package
Section 494
//en_US$effects_properties (en_US$effects_properties)
package {
import mx.resources.*;
public class en_US$effects_properties extends ResourceBundle {
public function en_US$effects_properties(){
super("en_US", "effects");
}
override protected function getContent():Object{
var _local1:Object = {incorrectTrigger:"The Zoom effect can not be triggered by a moveEffect trigger.", incorrectSource:"Source property must be a Class or String."};
return (_local1);
}
}
}//package
Section 495
//en_US$skins_properties (en_US$skins_properties)
package {
import mx.resources.*;
public class en_US$skins_properties extends ResourceBundle {
public function en_US$skins_properties(){
super("en_US", "skins");
}
override protected function getContent():Object{
var _local1:Object = {notLoaded:"Unable to load '{0}'."};
return (_local1);
}
}
}//package
Section 496
//en_US$styles_properties (en_US$styles_properties)
package {
import mx.resources.*;
public class en_US$styles_properties extends ResourceBundle {
public function en_US$styles_properties(){
super("en_US", "styles");
}
override protected function getContent():Object{
var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."};
return (_local1);
}
}
}//package
Section 497
//EventCompleteLevel (EventCompleteLevel)
package {
import cotogames.carmack.core.*;
import cotogames.carmack.core.states.*;
public class EventCompleteLevel extends LevelEvent {
public function EventCompleteLevel(_arg1:Level){
super(_arg1);
}
override public function execute():void{
ResourceManager.ExitFX.play();
GameManager.Instance.pushState(new LevelCompleteCoreState());
}
}
}//package
Section 498
//EventOpenDoor (EventOpenDoor)
package {
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class EventOpenDoor extends LevelEvent {
public var srcTile:Tile;
public var outerTile:Tile;
public var direction:int;
public function EventOpenDoor(_arg1:Level, _arg2:Tile, _arg3:Tile, _arg4:int){
super(_arg1);
this.srcTile = _arg2;
this.outerTile = _arg3;
this.direction = _arg4;
}
override public function execute():void{
trace("=== EXECUTING EVENT! ===");
ResourceManager.ElectricDoorFX.play();
srcTile.graphics = TileBitmapResources.OuterTopTileButtonPressedGraphics;
outerTile.graphics = TileBitmapResources.OuterTopWallSlidingGraphics;
outerTile.graphics.reset();
level.graphicsToUpdate.push(TileBitmapResources.OuterTopWallSlidingGraphics);
level.canExit = true;
srcTile.levelEventID = -1;
var _local1:int;
while (_local1 < level.levelEvents.length) {
if (level.levelEvents.getItemAt(_local1) == this){
level.levelEvents.removeItemAt(_local1);
break;
};
_local1++;
};
}
}
}//package
Section 499
//EventSlideWall (EventSlideWall)
package {
import flash.geom.*;
import cotogames.carmack.core.*;
import cotogames.carmack.resources.*;
public class EventSlideWall extends LevelEvent {
public var wallSide:int;
public var srcTile:Tile;
public var tilePos:Point;
public var tile:Tile;
public function EventSlideWall(_arg1:Level, _arg2:Tile, _arg3:Tile, _arg4:Point, _arg5:int){
super(_arg1);
this.tile = _arg2;
this.srcTile = _arg3;
this.wallSide = _arg5;
this.tilePos = _arg4;
}
override public function execute():void{
var _local1:GraphicsResource;
ResourceManager.SlideFX.play();
if ((((wallSide == GameObject.DIRECTION_DOWN)) || ((wallSide == GameObject.DIRECTION_UP)))){
tile.wallTop = Tile.WALL_SLIDING_DOWN;
_local1 = ResourceManager.TopWallSlidingDownGraphics.clone();
} else {
tile.wallLeft = Tile.WALL_SLIDING_DOWN;
_local1 = WallBitmapResources.VerticalWallSlidingDownGraphics.clone();
};
GameManager.Instance.currentLevel.graphicsToUpdate.push(_local1);
tile.currentAnimationIndex = (GameManager.Instance.currentLevel.graphicsToUpdate.length - 1);
srcTile.graphics = TileBitmapResources.OuterTopTileButtonPressedGraphics;
srcTile.levelEventID = -1;
var _local2:int;
while (_local2 < level.levelEvents.length) {
if (level.levelEvents.getItemAt(_local2) == this){
level.levelEvents.removeItemAt(_local2);
break;
};
_local2++;
};
}
}
}//package
Section 500
//EventTileSlideWall (EventTileSlideWall)
package {
import flash.geom.*;
import cotogames.carmack.core.*;
public class EventTileSlideWall extends LevelEvent {
public var wallSide:int;
public var srctile:Tile;
public var tilePos:Point;
public var tile:Tile;
public function EventTileSlideWall(_arg1:Level, _arg2:Tile, _arg3:Tile, _arg4:Point, _arg5:int){
super(_arg1);
this.tile = _arg2;
this.srctile = _arg3;
this.wallSide = _arg5;
this.tilePos = _arg4;
}
override public function execute():void{
GameManager.Instance.timeToWait = 1;
ResourceManager.SlideFX.play();
tile.wallTop = Tile.WALL_SLIDING_DOWN;
var _local1:GraphicsResource = ResourceManager.TopWallSlidingDownGraphics;
_local1.reset();
GameManager.Instance.currentLevel.graphicsToUpdate.push(_local1);
tile.currentAnimationIndex = (GameManager.Instance.currentLevel.graphicsToUpdate.length - 1);
srctile.graphics = ResourceManager.TileWithButtonPressedGraphics;
srctile.levelEventID = -1;
var _local2:int;
while (_local2 < level.levelEvents.length) {
if (level.levelEvents.getItemAt(_local2) == this){
level.levelEvents.removeItemAt(_local2);
break;
};
_local2++;
};
srctile.onStepEvent = null;
}
}
}//package
Section 501
//LevelBuilder (LevelBuilder)
package {
import cotogames.carmack.core.*;
import cotogames.carmack.levels.*;
public final class LevelBuilder {
public static var latestOpenLevel:int = 0;
protected static var levels:Array = null;
public static function getLevels():Array{
if (levels == null){
levels = new Array();
levels.push("Introduction");
levels.push("Meet The Robots");
levels.push("Watch Out");
levels.push("Robot Maze");
levels.push("Rusty Stuff");
levels.push("Acid Bathing");
levels.push("Make Your Way");
levels.push("A New Threat");
levels.push("Be Carefull");
levels.push("Lonely Turret");
levels.push("Step Up");
levels.push("Level #12");
levels.push("Open The Door");
levels.push("Hard To Pass By");
levels.push("The Gates");
levels.push("Surprise");
levels.push("The Wall");
levels.push("Blast Through");
levels.push("The End Of The Road");
levels.push("Final Level");
};
return (levels);
}
public static function buildLevelByNumber(_arg1:int):Level{
switch (_arg1){
case 0:
return (IntroLevel.build());
case 1:
return (MeetTheRobotsLevel.build());
case 2:
return (WatchOutLevel.build());
case 3:
return (RobotMazeLevel.build());
case 4:
return (RustyStuffLevel.build());
case 5:
return (AcidBathingLevel.build());
case 6:
return (MakeYourWayLevel.build());
case 7:
return (ANewThreatLevel.build());
case 8:
return (BeCarefullLevel.build());
case 9:
return (LonelyTurretLevel.build());
case 10:
return (StepUpLevel.build());
case 11:
return (Level12Level.build());
case 12:
return (OpenTheDoorLevel.build());
case 13:
return (HardToPassByLevel.build());
case 14:
return (TheGatesLevel.build());
case 15:
return (SurpriseLevel.build());
case 16:
return (TheWallLevel.build());
case 17:
return (BlastThroughLevel.build());
case 18:
return (TheEndOfTheRoadLevel.build());
case 19:
return (FinalLevel.build());
default:
return (TheEndOfTheRoadLevel.build());
};
}
}
}//package
Section 502
//LevelEvent (LevelEvent)
package {
import cotogames.carmack.core.*;
public class LevelEvent {
public var level:Level;
public function LevelEvent(_arg1:Level){
this.level = _arg1;
}
public function execute():void{
}
}
}//package
Section 503
//main (main)
package {
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import mx.styles.*;
import mx.controls.*;
import mx.containers.*;
import mx.binding.*;
import cotogames.carmack.core.*;
import flash.net.*;
import cotogames.carmack.core.states.*;
import com.kongregate.as3.client.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import cotogames.carmack.gamestates.*;
import cotogames.carmack.utils.*;
import cotogames.carmack.resources.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class main extends Application {
private const lockURL:Array;
public const QUAKE_TIME:Number = 0.4;
public const QUAKE_DISPLACEMENT:Number = 8;
private var _105739076canvasko:Canvas;
public var inGame:Boolean;
public var currentQuakeTime:Number;// = 0
public var quakeX:int;// = 0
public var quakeY:int;// = 0
private var lock:Boolean;// = true
private var _documentDescriptor_:UIComponentDescriptor;
public var lastFrame:Date;
mx_internal static var _main_StylesInit_done:Boolean = false;
public function main(){
_documentDescriptor_ = new UIComponentDescriptor({type:Application, propertiesFactory:function ():Object{
return ({width:550, height:450, childDescriptors:[new UIComponentDescriptor({type:Canvas, id:"canvasko", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}})]});
}});
lastFrame = new Date();
lockURL = ["www.flashgamelicense.com", "flashgamelicense.com"];
super();
mx_internal::_document = this;
if (!this.styleDeclaration){
this.styleDeclaration = new CSSStyleDeclaration();
};
this.styleDeclaration.defaultFactory = function ():void{
this.backgroundColor = 0;
this.horizontalAlign = "center";
this.verticalAlign = "center";
};
mx_internal::_main_StylesInit();
this.layout = "absolute";
this.width = 550;
this.height = 450;
this.addEventListener("applicationComplete", ___main_Application1_applicationComplete);
this.addEventListener("enterFrame", ___main_Application1_enterFrame);
this.addEventListener("mouseMove", ___main_Application1_mouseMove);
this.addEventListener("mouseDown", ___main_Application1_mouseDown);
this.addEventListener("keyDown", ___main_Application1_keyDown);
this.addEventListener("keyUp", ___main_Application1_keyUp);
}
public function ___main_Application1_keyUp(_arg1:KeyboardEvent):void{
keyUp(_arg1);
}
public function set canvasko(_arg1:Canvas):void{
var _local2:Object = this._105739076canvasko;
if (_local2 !== _arg1){
this._105739076canvasko = _arg1;
this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "canvasko", _local2, _arg1));
};
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
public function ___main_Application1_keyDown(_arg1:KeyboardEvent):void{
keyDown(_arg1);
}
private function siteLock(_arg1:Array):void{
var _local2:String = this.url;
var _local3:Array = _local2.split("://");
var _local4:Array = _local3[1].split("/");
var _local5:uint;
while (_local5 < _arg1.length) {
if (_arg1[_local5] == _local4[0]){
lock = false;
};
_local5++;
};
}
public function get canvasko():Canvas{
return (this._105739076canvasko);
}
public function ___main_Application1_applicationComplete(_arg1:FlexEvent):void{
creationComplete();
}
private function keyUp(_arg1:KeyboardEvent):void{
if (!inGame){
return;
};
GameManager.Instance.keyUp(_arg1);
}
private function mouseMove(_arg1:MouseEvent):void{
if (!inGame){
return;
};
GameManager.Instance.mouseMove(_arg1);
}
private function mouseDown(_arg1:MouseEvent):void{
if (!inGame){
return;
};
this.setFocus();
GameManager.Instance.mouseDown(_arg1);
}
private function keyDown(_arg1:KeyboardEvent):void{
if (!inGame){
return;
};
GameManager.Instance.keyDown(_arg1);
}
public function ___main_Application1_mouseDown(_arg1:MouseEvent):void{
mouseDown(_arg1);
}
public function creationComplete():void{
GameManager.global_root = canvasko.stage;
GameManager.global_root.stage.align = "";
try {
GameManager.kong = new KongregateAPI();
GameManager.global_root.addChild(GameManager.kong);
} catch(error:IllegalOperationError) {
GameManager.kong = KongregateAPI.getInstance();
};
trace("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
Font.registerFont(ResourceManager.DefaultFontEmbedded);
GameManager.Instance.initSaveData();
GameManager.inGame = this;
GameManager.Instance.pushState(new MainMenuCoreState());
MusicManager.play(ResourceManager.MenuMusicTrack);
inGame = true;
}
mx_internal function _main_StylesInit():void{
var _local1:CSSStyleDeclaration;
var _local2:Array;
if (mx_internal::_main_StylesInit_done){
return;
};
mx_internal::_main_StylesInit_done = true;
var _local3 = StyleManager;
_local3.mx_internal::initProtoChainRoots();
}
public function ___main_Application1_enterFrame(_arg1:Event):void{
enterFrame(_arg1);
}
public function enterFrame(_arg1:Event):void{
var _local4:Matrix;
var _local2:Date = new Date();
var _local3:Number = ((_local2.getTime() - lastFrame.getTime()) / 1000);
lastFrame = _local2;
if (GameState.quakeOn){
currentQuakeTime = (currentQuakeTime + _local3);
if (currentQuakeTime > QUAKE_TIME){
currentQuakeTime = 0;
GameState.quakeOn = false;
};
quakeX = (((-1 * QUAKE_DISPLACEMENT) / 2) + (Math.random() * QUAKE_DISPLACEMENT));
quakeY = (((-1 * QUAKE_DISPLACEMENT) / 2) + (Math.random() * QUAKE_DISPLACEMENT));
};
if (inGame){
GameManager.Instance.enterFrame();
_local4 = new Matrix();
_local4.translate(quakeX, quakeY);
canvasko.graphics.clear();
canvasko.graphics.beginBitmapFill(GameManager.Instance.backBuffer, _local4, false, true);
canvasko.graphics.drawRect(0, 0, this.width, this.height);
canvasko.graphics.endFill();
};
}
public function ___main_Application1_mouseMove(_arg1:MouseEvent):void{
mouseMove(_arg1);
}
}
}//package
Section 504
//PlayerCommands (PlayerCommands)
package {
public class PlayerCommands {
public static const DIE_IN_ACID_UP:int = 19;
public static const EXPLODE_LEFT:int = 15;
public static const DIE_FROM_TURRET:int = 25;
public static const SHOOT_LEFT:int = 9;
public static const MOVE_UP:int = 1;
public static const DIE_IN_ACID_RIGHT:int = 17;
public static const MOVE_RIGHT:int = 4;
public static const KILL_CARMACK:int = 24;
public static const MOVE_DOWN:int = 8;
public static const OPEN:int = 22;
public static const SLIDE_IN:int = 23;
public static const WAIT:int = 21;
public static const DIE_IN_ACID_DOWN:int = 20;
public static const EXPLODE_UP:int = 13;
public static const SHOOT_UP:int = 12;
public static const EXPLODE_DOWN:int = 14;
public static const SHOOT_DOWN:int = 11;
public static const DIE_IN_ACID_LEFT:int = 18;
public static const MOVE_LEFT:int = 2;
public static const NONE:int = 0;
public static const SHOOT_RIGHT:int = 10;
public static const EXPLODE_RIGHT:int = 16;
}
}//package
Section 505
//Preloader (Preloader)
package {
import flash.display.*;
import flash.events.*;
import mx.preloaders.*;
import com.gamezhero.api.as3.*;
public class Preloader extends DownloadProgressBar {
override public function set preloader(_arg1:Sprite):void{
GamezheroApi.ini("captainzorrolostfactory");
GamezheroApi.preloader((_arg1.parent as MovieClip), nextStep);
}
private function nextStep():void{
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package
Section 506
//ResourceManager (ResourceManager)
package {
import flash.text.*;
import mx.core.*;
import cotogames.carmack.core.*;
public final class ResourceManager {
public static var Turret1FaceUpGraphics:GraphicsResource = new GraphicsResource(new Turret1FaceUp());
private static var BubblesSound:Class = ResourceManager_BubblesSound;
public static var MenuBackground:Class = ResourceManager_MenuBackground;
private static var Turret4FaceUp:Class = ResourceManager_Turret4FaceUp;
public static var DefaultFont2:Font = new DefaultFontEmbedded2();
public static var Turret0FaceRightGraphics:GraphicsResource = new GraphicsResource(new Turret0FaceRight());
public static var GunOff:Class = ResourceManager_GunOff;
private static var GunBassSound:Class = ResourceManager_GunBassSound;
public static var DroidWalkDownGraphics:GraphicsResource = new GraphicsResource(new DroidWalkDown());
public static var DroidLeftGraphics:GraphicsResource = new GraphicsResource(new DroidLeft());
public static var ClickFX:SoundAsset = (new ClickSound() as SoundAsset);
private static var TileWithButtonPressed:Class = ResourceManager_TileWithButtonPressed;
private static var OuterLeftTopTile:Class = ResourceManager_OuterLeftTopTile;
public static var LeftWallGraphics:GraphicsResource = new GraphicsResource(new LeftWall());
private static var Turret1FaceLeft:Class = ResourceManager_Turret1FaceLeft;
private static var RoboShootRight:Class = ResourceManager_RoboShootRight;
private static var Turret5FaceLeft:Class = ResourceManager_Turret5FaceLeft;
public static var TopWallGraphics:GraphicsResource = new GraphicsResource(new TopWall());
private static var CarmackKilledByRobot:Class = ResourceManager_CarmackKilledByRobot;
public static var TopSlidingWallGraphics:GraphicsResource = new GraphicsResource(new TopSlidingWall());
private static var RoboShootUp:Class = ResourceManager_RoboShootUp;
public static var RoboLeftGraphics:GraphicsResource = new GraphicsResource(new RoboLeft());
public static var BubblesFX:SoundAsset = (new BubblesSound() as SoundAsset);
public static var BottomWallGraphics:GraphicsResource = new GraphicsResource(new BottomWall());
private static var OuterTopTile2:Class = ResourceManager_OuterTopTile2;
public static var Turret2FaceRightGraphics:GraphicsResource = new GraphicsResource(new Turret2FaceRight());
public static var TopSlidingOutWallGraphics:GraphicsResource = new GraphicsResource(new TopSlidingOutWall());
public static var OuterRightTileGraphics:GraphicsResource = new GraphicsResource(new OuterRightTile());
public static var WalkFX:SoundAsset = (new WalkSound() as SoundAsset);
private static var RoboShootLeft:Class = ResourceManager_RoboShootLeft;
private static var DroidLeft:Class = ResourceManager_DroidLeft;
public static var Turret3FaceUpGraphics:GraphicsResource = new GraphicsResource(new Turret3FaceUp());
private static var ClickSound:Class = ResourceManager_ClickSound;
public static var OuterRightTopTileGraphics:GraphicsResource = new GraphicsResource(new OuterRightTopTile());
private static var DroidWalkDown:Class = ResourceManager_DroidWalkDown;
private static var Turret0FaceRight:Class = ResourceManager_Turret0FaceRight;
public static var ElectricDoorFX:SoundAsset = (new ElectricDoorSound() as SoundAsset);
private static var TopWall:Class = ResourceManager_TopWall;
private static var TurretFireUp:Class = ResourceManager_TurretFireUp;
public static var RobotFX:SoundAsset = (new RobotSound() as SoundAsset);
private static var TurretFireLeft:Class = ResourceManager_TurretFireLeft;
private static var WalkSound:Class = ResourceManager_WalkSound;
private static var DroidBoomDown:Class = ResourceManager_DroidBoomDown;
public static var LevelMusicTrack:SoundAsset = (new LevelMusic() as SoundAsset);
public static var OuterTopTileOpenDoorGraphics:GraphicsResource = new GraphicsResource(new OuterTopTileOpenDoor());
public static var Turret4FaceRightGraphics:GraphicsResource = new GraphicsResource(new Turret4FaceRight());
public static var LeftWallDestroyableGraphics:GraphicsResource = new GraphicsResource(new LeftWallDestroyable());
public static var OuterTopButtonNotPressedTileGraphics:GraphicsResource = new GraphicsResource(new OuterTopButtonNotPressedTile());
public static var DefaultFontEmbedded:Class = ResourceManager_DefaultFontEmbedded;
private static var TopSlidingWall:Class = ResourceManager_TopSlidingWall;
private static var TopSlidingOutWall:Class = ResourceManager_TopSlidingOutWall;
public static var FightFX:SoundAsset = (new FightSound() as SoundAsset);
private static var OuterTopTile:Class = ResourceManager_OuterTopTile;
private static var RobotFightSound:Class = ResourceManager_RobotFightSound;
private static var OuterRightTile:Class = ResourceManager_OuterRightTile;
private static var OuterLeftTile:Class = ResourceManager_OuterLeftTile;
public static var RoboShootDownGraphics:GraphicsResource = new GraphicsResource(new RoboShootDown(), 50, 0.08, false);
private static var RoboRight:Class = ResourceManager_RoboRight;
public static var Acid:Class = ResourceManager_Acid;
private static var Turret1FaceDown:Class = ResourceManager_Turret1FaceDown;
private static var Turret5FaceDown:Class = ResourceManager_Turret5FaceDown;
private static var RobotSound:Class = ResourceManager_RobotSound;
private static var Turret3FaceUp:Class = ResourceManager_Turret3FaceUp;
public static var CarmackKilledByRobotGraphics:GraphicsResource = new GraphicsResource(new CarmackKilledByRobot(), 50, 0.12, true);
public static var Turret4FaceRight:Class = ResourceManager_Turret4FaceRight;
private static var LeftWallDestroyable:Class = ResourceManager_LeftWallDestroyable;
public static var MenuMusicTrack:SoundAsset = (new MenuMusic() as SoundAsset);
private static var TileWithButton:Class = ResourceManager_TileWithButton;
public static var Turret5FaceUpGraphics:GraphicsResource = new GraphicsResource(new Turret5FaceUp());
private static var RoboShootDown:Class = ResourceManager_RoboShootDown;
private static var MarkedTile:Class = ResourceManager_MarkedTile;
public static var OuterTopTile2Graphics:GraphicsResource = new GraphicsResource(new OuterTopTile2());
private static var DroidDown:Class = ResourceManager_DroidDown;
private static var LevelMusic:Class = ResourceManager_LevelMusic;
public static var DroidAcidDownGraphics:GraphicsResource = new GraphicsResource(new DroidAcidDown(), 50, 0.14, true);
private static var DroidRight:Class = ResourceManager_DroidRight;
private static var TurretFireDown:Class = ResourceManager_TurretFireDown;
public static var GunBassFX:SoundAsset = (new GunBassSound() as SoundAsset);
public static var Blank:Class = ResourceManager_Blank;
public static var CarmackKilledByTurretGraphics:GraphicsResource = new GraphicsResource(new CarmackKilledByTurret(), 50, 0.06, true);
public static var RoboWalkDownGraphics:GraphicsResource = new GraphicsResource(new RoboWalkDown(), 50, 0.09, false);
private static var ElectricDoorSound:Class = ResourceManager_ElectricDoorSound;
public static var CarmackAcidGraphics:GraphicsResource = new GraphicsResource(new CarmackAcid(), 50, 0.14, true);
private static var Turret0FaceLeft:Class = ResourceManager_Turret0FaceLeft;
public static var RoboUpGraphics:GraphicsResource = new GraphicsResource(new RoboUp());
private static var Turret4FaceLeft:Class = ResourceManager_Turret4FaceLeft;
public static var CarmackIdleGraphics:GraphicsResource = new GraphicsResource(new CarmackIdle(), 50, 0.16, true);
private static var BeepSound:Class = ResourceManager_BeepSound;
private static var DroidAcidDown:Class = ResourceManager_DroidAcidDown;
public static var RoboRightGraphics:GraphicsResource = new GraphicsResource(new RoboRight());
private static var RoboWalkRight:Class = ResourceManager_RoboWalkRight;
public static var Turret0FaceDownGraphics:GraphicsResource = new GraphicsResource(new Turret0FaceDown());
public static var Turret2FaceDownGraphics:GraphicsResource = new GraphicsResource(new Turret2FaceDown());
public static var Turret4FaceDownGraphics:GraphicsResource = new GraphicsResource(new Turret4FaceDown());
private static var RobotWalkSound:Class = ResourceManager_RobotWalkSound;
public static var BeepFX:SoundAsset = (new BeepSound() as SoundAsset);
private static var Turret2FaceUp:Class = ResourceManager_Turret2FaceUp;
private static var Turret1FaceRight:Class = ResourceManager_Turret1FaceRight;
public static var FallFX:SoundAsset = (new FallSound() as SoundAsset);
public static var TileWithButtonGraphics:GraphicsResource = new GraphicsResource(new TileWithButton());
public static var MenuBackgroundGraphics:GraphicsResource = new GraphicsResource(new MenuBackground());
public static var DroidUpGraphics:GraphicsResource = new GraphicsResource(new DroidUp());
public static var Turret0FaceUpGraphics:GraphicsResource = new GraphicsResource(new Turret0FaceUp());
public static var MarkedTileGraphics:GraphicsResource = new GraphicsResource(new MarkedTile());
public static var DroidDownGraphics:GraphicsResource = new GraphicsResource(new DroidDown());
private static var TopWallSlidingDown:Class = ResourceManager_TopWallSlidingDown;
public static var Tile6Graphics:GraphicsResource = new GraphicsResource(new Tile6());
public static var RoboDownGraphics:GraphicsResource = new GraphicsResource(new RoboDown());
private static var Turret0FaceDown:Class = ResourceManager_Turret0FaceDown;
private static var Turret4FaceDown:Class = ResourceManager_Turret4FaceDown;
private static var RightWall:Class = ResourceManager_RightWall;
public static var OuterLeftTopTileGraphics:GraphicsResource = new GraphicsResource(new OuterLeftTopTile());
public static var Turret1FaceLeftGraphics:GraphicsResource = new GraphicsResource(new Turret1FaceLeft());
public static var Turret3FaceLeftGraphics:GraphicsResource = new GraphicsResource(new Turret3FaceLeft());
public static var GunFX:SoundAsset = (new GunSound() as SoundAsset);
public static var Turret5FaceLeftGraphics:GraphicsResource = new GraphicsResource(new Turret5FaceLeft());
private static var OuterTopTileOpenDoor:Class = ResourceManager_OuterTopTileOpenDoor;
private static var SlideSound:Class = ResourceManager_SlideSound;
public static var DefaultFont:Font = new DefaultFontEmbedded();
private static var DroidUp:Class = ResourceManager_DroidUp;
public static var Turret5FaceRight:Class = ResourceManager_Turret5FaceRight;
private static var OuterTopTileClosedDoor:Class = ResourceManager_OuterTopTileClosedDoor;
public static var SlideFX:SoundAsset = (new SlideSound() as SoundAsset);
private static var MenuOpenSound:Class = ResourceManager_MenuOpenSound;
public static var OuterTopButtonPressedTileGraphics:GraphicsResource = new GraphicsResource(new OuterTopButtonPressedTile());
private static var FallSound:Class = ResourceManager_FallSound;
private static var TopWallDestroyable:Class = ResourceManager_TopWallDestroyable;
public static var TurretFireLeftGraphics:GraphicsResource = new GraphicsResource(new TurretFireLeft(), 50, 0.08, false);
public static var Turret2FaceUpGraphics:GraphicsResource = new GraphicsResource(new Turret2FaceUp());
private static var Turret3FaceLeft:Class = ResourceManager_Turret3FaceLeft;
public static var Turret1FaceRightGraphics:GraphicsResource = new GraphicsResource(new Turret1FaceRight());
private static var RoboWalkUp:Class = ResourceManager_RoboWalkUp;
public static var TurretFireUpGraphics:GraphicsResource = new GraphicsResource(new TurretFireUp(), 50, 0.08, false);
public static var DroidBoomDownGraphics:GraphicsResource = new GraphicsResource(new DroidBoomDown(), 50, 0.09, true);
private static var TurretFireRight:Class = ResourceManager_TurretFireRight;
private static var Turret1FaceUp:Class = ResourceManager_Turret1FaceUp;
public static var DroidWalkUpGraphics:GraphicsResource = new GraphicsResource(new DroidWalkUp());
private static var ExitSound:Class = ResourceManager_ExitSound;
public static var DroidWalkRightGraphics:GraphicsResource = new GraphicsResource(new DroidWalkRight());
public static var ExplosionFX:SoundAsset = (new ExplosionSound() as SoundAsset);
public static var Turret3FaceRightGraphics:GraphicsResource = new GraphicsResource(new Turret3FaceRight());
public static var AcidGraphics:GraphicsResource = new GraphicsResource(new Acid(), 50, 0.5, false);
public static var ExitFX:SoundAsset = (new ExitSound() as SoundAsset);
private static var LeftWall:Class = ResourceManager_LeftWall;
private static var CarmackKilledByTurret:Class = ResourceManager_CarmackKilledByTurret;
public static var DroidWalkLeftGraphics:GraphicsResource = new GraphicsResource(new DroidWalkLeft());
public static var RightWallGraphics:GraphicsResource = new GraphicsResource(new RightWall());
private static var CarmackIdle:Class = ResourceManager_CarmackIdle;
private static var RoboLeft:Class = ResourceManager_RoboLeft;
private static var BottomWall:Class = ResourceManager_BottomWall;
public static var DefaultFontEmbedded2:Class = ResourceManager_DefaultFontEmbedded2;
private static var Turret2FaceRight:Class = ResourceManager_Turret2FaceRight;
public static var Turret5FaceRightGraphics:GraphicsResource = new GraphicsResource(new Turret5FaceRight());
public static var Turret4FaceUpGraphics:GraphicsResource = new GraphicsResource(new Turret4FaceUp());
public static var GunOnGraphics:GraphicsResource = new GraphicsResource(new GunOn(), 50, 0.07, false);
public static var OuterTopTileClosedDoorGraphics:GraphicsResource = new GraphicsResource(new OuterTopTileClosedDoor());
public static var Tile1Graphics:GraphicsResource = new GraphicsResource(new Tile1());
private static var DroidWalkRight:Class = ResourceManager_DroidWalkRight;
private static var Turret3FaceDown:Class = ResourceManager_Turret3FaceDown;
public static var TileWithButtonPressedGraphics:GraphicsResource = new GraphicsResource(new TileWithButtonPressed());
public static var RoboWalkUpGraphics:GraphicsResource = new GraphicsResource(new RoboWalkUp(), 50, 0.09, false);
public static var MenuOpenFX:SoundAsset = (new MenuOpenSound() as SoundAsset);
private static var FightSound:Class = ResourceManager_FightSound;
private static var RoboWalkLeft:Class = ResourceManager_RoboWalkLeft;
public static var RoboShootUpGraphics:GraphicsResource = new GraphicsResource(new RoboShootUp(), 50, 0.08, false);
private static var OuterTopButtonNotPressedTile:Class = ResourceManager_OuterTopButtonNotPressedTile;
public static var TurretFireRightGraphics:GraphicsResource = new GraphicsResource(new TurretFireRight(), 50, 0.08, false);
private static var ExplosionSound:Class = ResourceManager_ExplosionSound;
public static var GunOn:Class = ResourceManager_GunOn;
private static var Tile1:Class = ResourceManager_Tile1;
public static var RoboShootLeftGraphics:GraphicsResource = new GraphicsResource(new RoboShootLeft(), 50, 0.08, false);
private static var Tile6:Class = ResourceManager_Tile6;
private static var RoboDown:Class = ResourceManager_RoboDown;
private static var Turret0FaceUp:Class = ResourceManager_Turret0FaceUp;
public static var RoboWalkRightGraphics:GraphicsResource = new GraphicsResource(new RoboWalkRight(), 50, 0.09, false);
public static var RobotFightFX:SoundAsset = (new RobotFightSound() as SoundAsset);
public static var WallVerticalPartGraphics:GraphicsResource = new GraphicsResource(new WallVerticalPart());
public static var RobotWalkFX:SoundAsset = (new RobotWalkSound() as SoundAsset);
private static var Turret2FaceLeft:Class = ResourceManager_Turret2FaceLeft;
public static var OuterTileGraphics1:GraphicsResource = new GraphicsResource(new OuterTile1());
public static var OuterTileGraphics2:GraphicsResource = new GraphicsResource(new OuterTile2());
public static var OuterTileGraphics3:GraphicsResource = new GraphicsResource(new OuterTile3());
public static var OuterTileGraphics4:GraphicsResource = new GraphicsResource(new OuterTile4());
private static var Turret5FaceUp:Class = ResourceManager_Turret5FaceUp;
public static var OuterTopTileGraphics:GraphicsResource = new GraphicsResource(new OuterTopTile());
public static var OuterLeftTileGraphics:GraphicsResource = new GraphicsResource(new OuterLeftTile());
public static var TopWallSlidingDownGraphics:GraphicsResource = new GraphicsResource(new TopWallSlidingDown(), 60, 0.06, true);
private static var OuterTopButtonPressedTile:Class = ResourceManager_OuterTopButtonPressedTile;
public static var Turret1FaceDownGraphics:GraphicsResource = new GraphicsResource(new Turret1FaceDown());
private static var CarmackAcid:Class = ResourceManager_CarmackAcid;
public static var Turret5FaceDownGraphics:GraphicsResource = new GraphicsResource(new Turret5FaceDown());
private static var WallVerticalPart:Class = ResourceManager_WallVerticalPart;
public static var Turret3FaceDownGraphics:GraphicsResource = new GraphicsResource(new Turret3FaceDown());
private static var RoboWalkDown:Class = ResourceManager_RoboWalkDown;
private static var RoboUp:Class = ResourceManager_RoboUp;
private static var OuterTile1:Class = ResourceManager_OuterTile1;
private static var OuterTile2:Class = ResourceManager_OuterTile2;
private static var OuterTile3:Class = ResourceManager_OuterTile3;
private static var OuterTile4:Class = ResourceManager_OuterTile4;
public static var RoboWalkLeftGraphics:GraphicsResource = new GraphicsResource(new RoboWalkLeft(), 50, 0.09, false);
private static var DroidWalkUp:Class = ResourceManager_DroidWalkUp;
public static var DroidRightGraphics:GraphicsResource = new GraphicsResource(new DroidRight());
private static var GunSound:Class = ResourceManager_GunSound;
public static var GunOffGraphics:GraphicsResource = new GraphicsResource(new GunOff());
public static var Turret3FaceRight:Class = ResourceManager_Turret3FaceRight;
public static var BlankGraphics:GraphicsResource = new GraphicsResource(new Blank());
public static var TopWallDestroyableGraphics:GraphicsResource = new GraphicsResource(new TopWallDestroyable(), 50, 0.25, true);
private static var Turret2FaceDown:Class = ResourceManager_Turret2FaceDown;
private static var OuterRightTopTile:Class = ResourceManager_OuterRightTopTile;
private static var DroidWalkLeft:Class = ResourceManager_DroidWalkLeft;
private static var MenuMusic:Class = ResourceManager_MenuMusic;
public static var Turret0FaceLeftGraphics:GraphicsResource = new GraphicsResource(new Turret0FaceLeft());
public static var Turret2FaceLeftGraphics:GraphicsResource = new GraphicsResource(new Turret2FaceLeft());
public static var RoboShootRightGraphics:GraphicsResource = new GraphicsResource(new RoboShootRight(), 50, 0.08, false);
public static var Turret4FaceLeftGraphics:GraphicsResource = new GraphicsResource(new Turret4FaceLeft());
public static var TurretFireDownGraphics:GraphicsResource = new GraphicsResource(new TurretFireDown(), 50, 0.08, false);
public static function get OuterTileGraphics():GraphicsResource{
var _local1:Number = Math.random();
if (_local1 < 0.05){
return (OuterTileGraphics2);
};
_local1 = Math.random();
if (_local1 < 0.05){
return (OuterTileGraphics3);
};
_local1 = Math.random();
if (_local1 < 0.05){
return (OuterTileGraphics4);
};
return (OuterTileGraphics1);
}
}
}//package
Section 507
//ResourceManager_Acid (ResourceManager_Acid)
package {
import mx.core.*;
public class ResourceManager_Acid extends BitmapAsset {
}
}//package
Section 508
//ResourceManager_BeepSound (ResourceManager_BeepSound)
package {
import mx.core.*;
public class ResourceManager_BeepSound extends SoundAsset {
}
}//package
Section 509
//ResourceManager_Blank (ResourceManager_Blank)
package {
import mx.core.*;
public class ResourceManager_Blank extends BitmapAsset {
}
}//package
Section 510
//ResourceManager_BottomWall (ResourceManager_BottomWall)
package {
import mx.core.*;
public class ResourceManager_BottomWall extends BitmapAsset {
}
}//package
Section 511
//ResourceManager_BubblesSound (ResourceManager_BubblesSound)
package {
import mx.core.*;
public class ResourceManager_BubblesSound extends SoundAsset {
}
}//package
Section 512
//ResourceManager_CarmackAcid (ResourceManager_CarmackAcid)
package {
import mx.core.*;
public class ResourceManager_CarmackAcid extends BitmapAsset {
}
}//package
Section 513
//ResourceManager_CarmackIdle (ResourceManager_CarmackIdle)
package {
import mx.core.*;
public class ResourceManager_CarmackIdle extends BitmapAsset {
}
}//package
Section 514
//ResourceManager_CarmackKilledByRobot (ResourceManager_CarmackKilledByRobot)
package {
import mx.core.*;
public class ResourceManager_CarmackKilledByRobot extends BitmapAsset {
}
}//package
Section 515
//ResourceManager_CarmackKilledByTurret (ResourceManager_CarmackKilledByTurret)
package {
import mx.core.*;
public class ResourceManager_CarmackKilledByTurret extends BitmapAsset {
}
}//package
Section 516
//ResourceManager_ClickSound (ResourceManager_ClickSound)
package {
import mx.core.*;
public class ResourceManager_ClickSound extends SoundAsset {
}
}//package
Section 517
//ResourceManager_DefaultFontEmbedded (ResourceManager_DefaultFontEmbedded)
package {
import mx.core.*;
public class ResourceManager_DefaultFontEmbedded extends FontAsset {
}
}//package
Section 518
//ResourceManager_DefaultFontEmbedded2 (ResourceManager_DefaultFontEmbedded2)
package {
import mx.core.*;
public class ResourceManager_DefaultFontEmbedded2 extends FontAsset {
}
}//package
Section 519
//ResourceManager_DroidAcidDown (ResourceManager_DroidAcidDown)
package {
import mx.core.*;
public class ResourceManager_DroidAcidDown extends BitmapAsset {
}
}//package
Section 520
//ResourceManager_DroidBoomDown (ResourceManager_DroidBoomDown)
package {
import mx.core.*;
public class ResourceManager_DroidBoomDown extends BitmapAsset {
}
}//package
Section 521
//ResourceManager_DroidDown (ResourceManager_DroidDown)
package {
import mx.core.*;
public class ResourceManager_DroidDown extends BitmapAsset {
}
}//package
Section 522
//ResourceManager_DroidLeft (ResourceManager_DroidLeft)
package {
import mx.core.*;
public class ResourceManager_DroidLeft extends BitmapAsset {
}
}//package
Section 523
//ResourceManager_DroidRight (ResourceManager_DroidRight)
package {
import mx.core.*;
public class ResourceManager_DroidRight extends BitmapAsset {
}
}//package
Section 524
//ResourceManager_DroidUp (ResourceManager_DroidUp)
package {
import mx.core.*;
public class ResourceManager_DroidUp extends BitmapAsset {
}
}//package
Section 525
//ResourceManager_DroidWalkDown (ResourceManager_DroidWalkDown)
package {
import mx.core.*;
public class ResourceManager_DroidWalkDown extends BitmapAsset {
}
}//package
Section 526
//ResourceManager_DroidWalkLeft (ResourceManager_DroidWalkLeft)
package {
import mx.core.*;
public class ResourceManager_DroidWalkLeft extends BitmapAsset {
}
}//package
Section 527
//ResourceManager_DroidWalkRight (ResourceManager_DroidWalkRight)
package {
import mx.core.*;
public class ResourceManager_DroidWalkRight extends BitmapAsset {
}
}//package
Section 528
//ResourceManager_DroidWalkUp (ResourceManager_DroidWalkUp)
package {
import mx.core.*;
public class ResourceManager_DroidWalkUp extends BitmapAsset {
}
}//package
Section 529
//ResourceManager_ElectricDoorSound (ResourceManager_ElectricDoorSound)
package {
import mx.core.*;
public class ResourceManager_ElectricDoorSound extends SoundAsset {
}
}//package
Section 530
//ResourceManager_ExitSound (ResourceManager_ExitSound)
package {
import mx.core.*;
public class ResourceManager_ExitSound extends SoundAsset {
}
}//package
Section 531
//ResourceManager_ExplosionSound (ResourceManager_ExplosionSound)
package {
import mx.core.*;
public class ResourceManager_ExplosionSound extends SoundAsset {
}
}//package
Section 532
//ResourceManager_FallSound (ResourceManager_FallSound)
package {
import mx.core.*;
public class ResourceManager_FallSound extends SoundAsset {
}
}//package
Section 533
//ResourceManager_FightSound (ResourceManager_FightSound)
package {
import mx.core.*;
public class ResourceManager_FightSound extends SoundAsset {
}
}//package
Section 534
//ResourceManager_GunBassSound (ResourceManager_GunBassSound)
package {
import mx.core.*;
public class ResourceManager_GunBassSound extends SoundAsset {
}
}//package
Section 535
//ResourceManager_GunOff (ResourceManager_GunOff)
package {
import mx.core.*;
public class ResourceManager_GunOff extends BitmapAsset {
}
}//package
Section 536
//ResourceManager_GunOn (ResourceManager_GunOn)
package {
import mx.core.*;
public class ResourceManager_GunOn extends BitmapAsset {
}
}//package
Section 537
//ResourceManager_GunSound (ResourceManager_GunSound)
package {
import mx.core.*;
public class ResourceManager_GunSound extends SoundAsset {
}
}//package
Section 538
//ResourceManager_LeftWall (ResourceManager_LeftWall)
package {
import mx.core.*;
public class ResourceManager_LeftWall extends BitmapAsset {
}
}//package
Section 539
//ResourceManager_LeftWallDestroyable (ResourceManager_LeftWallDestroyable)
package {
import mx.core.*;
public class ResourceManager_LeftWallDestroyable extends BitmapAsset {
}
}//package
Section 540
//ResourceManager_LevelMusic (ResourceManager_LevelMusic)
package {
import mx.core.*;
public class ResourceManager_LevelMusic extends SoundAsset {
}
}//package
Section 541
//ResourceManager_MarkedTile (ResourceManager_MarkedTile)
package {
import mx.core.*;
public class ResourceManager_MarkedTile extends BitmapAsset {
}
}//package
Section 542
//ResourceManager_MenuBackground (ResourceManager_MenuBackground)
package {
import mx.core.*;
public class ResourceManager_MenuBackground extends BitmapAsset {
}
}//package
Section 543
//ResourceManager_MenuMusic (ResourceManager_MenuMusic)
package {
import mx.core.*;
public class ResourceManager_MenuMusic extends SoundAsset {
}
}//package
Section 544
//ResourceManager_MenuOpenSound (ResourceManager_MenuOpenSound)
package {
import mx.core.*;
public class ResourceManager_MenuOpenSound extends SoundAsset {
}
}//package
Section 545
//ResourceManager_OuterLeftTile (ResourceManager_OuterLeftTile)
package {
import mx.core.*;
public class ResourceManager_OuterLeftTile extends BitmapAsset {
}
}//package
Section 546
//ResourceManager_OuterLeftTopTile (ResourceManager_OuterLeftTopTile)
package {
import mx.core.*;
public class ResourceManager_OuterLeftTopTile extends BitmapAsset {
}
}//package
Section 547
//ResourceManager_OuterRightTile (ResourceManager_OuterRightTile)
package {
import mx.core.*;
public class ResourceManager_OuterRightTile extends BitmapAsset {
}
}//package
Section 548
//ResourceManager_OuterRightTopTile (ResourceManager_OuterRightTopTile)
package {
import mx.core.*;
public class ResourceManager_OuterRightTopTile extends BitmapAsset {
}
}//package
Section 549
//ResourceManager_OuterTile1 (ResourceManager_OuterTile1)
package {
import mx.core.*;
public class ResourceManager_OuterTile1 extends BitmapAsset {
}
}//package
Section 550
//ResourceManager_OuterTile2 (ResourceManager_OuterTile2)
package {
import mx.core.*;
public class ResourceManager_OuterTile2 extends BitmapAsset {
}
}//package
Section 551
//ResourceManager_OuterTile3 (ResourceManager_OuterTile3)
package {
import mx.core.*;
public class ResourceManager_OuterTile3 extends BitmapAsset {
}
}//package
Section 552
//ResourceManager_OuterTile4 (ResourceManager_OuterTile4)
package {
import mx.core.*;
public class ResourceManager_OuterTile4 extends BitmapAsset {
}
}//package
Section 553
//ResourceManager_OuterTopButtonNotPressedTile (ResourceManager_OuterTopButtonNotPressedTile)
package {
import mx.core.*;
public class ResourceManager_OuterTopButtonNotPressedTile extends BitmapAsset {
}
}//package
Section 554
//ResourceManager_OuterTopButtonPressedTile (ResourceManager_OuterTopButtonPressedTile)
package {
import mx.core.*;
public class ResourceManager_OuterTopButtonPressedTile extends BitmapAsset {
}
}//package
Section 555
//ResourceManager_OuterTopTile (ResourceManager_OuterTopTile)
package {
import mx.core.*;
public class ResourceManager_OuterTopTile extends BitmapAsset {
}
}//package
Section 556
//ResourceManager_OuterTopTile2 (ResourceManager_OuterTopTile2)
package {
import mx.core.*;
public class ResourceManager_OuterTopTile2 extends BitmapAsset {
}
}//package
Section 557
//ResourceManager_OuterTopTileClosedDoor (ResourceManager_OuterTopTileClosedDoor)
package {
import mx.core.*;
public class ResourceManager_OuterTopTileClosedDoor extends BitmapAsset {
}
}//package
Section 558
//ResourceManager_OuterTopTileOpenDoor (ResourceManager_OuterTopTileOpenDoor)
package {
import mx.core.*;
public class ResourceManager_OuterTopTileOpenDoor extends BitmapAsset {
}
}//package
Section 559
//ResourceManager_RightWall (ResourceManager_RightWall)
package {
import mx.core.*;
public class ResourceManager_RightWall extends BitmapAsset {
}
}//package
Section 560
//ResourceManager_RoboDown (ResourceManager_RoboDown)
package {
import mx.core.*;
public class ResourceManager_RoboDown extends BitmapAsset {
}
}//package
Section 561
//ResourceManager_RoboLeft (ResourceManager_RoboLeft)
package {
import mx.core.*;
public class ResourceManager_RoboLeft extends BitmapAsset {
}
}//package
Section 562
//ResourceManager_RoboRight (ResourceManager_RoboRight)
package {
import mx.core.*;
public class ResourceManager_RoboRight extends BitmapAsset {
}
}//package
Section 563
//ResourceManager_RoboShootDown (ResourceManager_RoboShootDown)
package {
import mx.core.*;
public class ResourceManager_RoboShootDown extends BitmapAsset {
}
}//package
Section 564
//ResourceManager_RoboShootLeft (ResourceManager_RoboShootLeft)
package {
import mx.core.*;
public class ResourceManager_RoboShootLeft extends BitmapAsset {
}
}//package
Section 565
//ResourceManager_RoboShootRight (ResourceManager_RoboShootRight)
package {
import mx.core.*;
public class ResourceManager_RoboShootRight extends BitmapAsset {
}
}//package
Section 566
//ResourceManager_RoboShootUp (ResourceManager_RoboShootUp)
package {
import mx.core.*;
public class ResourceManager_RoboShootUp extends BitmapAsset {
}
}//package
Section 567
//ResourceManager_RobotFightSound (ResourceManager_RobotFightSound)
package {
import mx.core.*;
public class ResourceManager_RobotFightSound extends SoundAsset {
}
}//package
Section 568
//ResourceManager_RobotSound (ResourceManager_RobotSound)
package {
import mx.core.*;
public class ResourceManager_RobotSound extends SoundAsset {
}
}//package
Section 569
//ResourceManager_RobotWalkSound (ResourceManager_RobotWalkSound)
package {
import mx.core.*;
public class ResourceManager_RobotWalkSound extends SoundAsset {
}
}//package
Section 570
//ResourceManager_RoboUp (ResourceManager_RoboUp)
package {
import mx.core.*;
public class ResourceManager_RoboUp extends BitmapAsset {
}
}//package
Section 571
//ResourceManager_RoboWalkDown (ResourceManager_RoboWalkDown)
package {
import mx.core.*;
public class ResourceManager_RoboWalkDown extends BitmapAsset {
}
}//package
Section 572
//ResourceManager_RoboWalkLeft (ResourceManager_RoboWalkLeft)
package {
import mx.core.*;
public class ResourceManager_RoboWalkLeft extends BitmapAsset {
}
}//package
Section 573
//ResourceManager_RoboWalkRight (ResourceManager_RoboWalkRight)
package {
import mx.core.*;
public class ResourceManager_RoboWalkRight extends BitmapAsset {
}
}//package
Section 574
//ResourceManager_RoboWalkUp (ResourceManager_RoboWalkUp)
package {
import mx.core.*;
public class ResourceManager_RoboWalkUp extends BitmapAsset {
}
}//package
Section 575
//ResourceManager_SlideSound (ResourceManager_SlideSound)
package {
import mx.core.*;
public class ResourceManager_SlideSound extends SoundAsset {
}
}//package
Section 576
//ResourceManager_Tile1 (ResourceManager_Tile1)
package {
import mx.core.*;
public class ResourceManager_Tile1 extends BitmapAsset {
}
}//package
Section 577
//ResourceManager_Tile6 (ResourceManager_Tile6)
package {
import mx.core.*;
public class ResourceManager_Tile6 extends BitmapAsset {
}
}//package
Section 578
//ResourceManager_TileWithButton (ResourceManager_TileWithButton)
package {
import mx.core.*;
public class ResourceManager_TileWithButton extends BitmapAsset {
}
}//package
Section 579
//ResourceManager_TileWithButtonPressed (ResourceManager_TileWithButtonPressed)
package {
import mx.core.*;
public class ResourceManager_TileWithButtonPressed extends BitmapAsset {
}
}//package
Section 580
//ResourceManager_TopSlidingOutWall (ResourceManager_TopSlidingOutWall)
package {
import mx.core.*;
public class ResourceManager_TopSlidingOutWall extends BitmapAsset {
}
}//package
Section 581
//ResourceManager_TopSlidingWall (ResourceManager_TopSlidingWall)
package {
import mx.core.*;
public class ResourceManager_TopSlidingWall extends BitmapAsset {
}
}//package
Section 582
//ResourceManager_TopWall (ResourceManager_TopWall)
package {
import mx.core.*;
public class ResourceManager_TopWall extends BitmapAsset {
}
}//package
Section 583
//ResourceManager_TopWallDestroyable (ResourceManager_TopWallDestroyable)
package {
import mx.core.*;
public class ResourceManager_TopWallDestroyable extends BitmapAsset {
}
}//package
Section 584
//ResourceManager_TopWallSlidingDown (ResourceManager_TopWallSlidingDown)
package {
import mx.core.*;
public class ResourceManager_TopWallSlidingDown extends BitmapAsset {
}
}//package
Section 585
//ResourceManager_Turret0FaceDown (ResourceManager_Turret0FaceDown)
package {
import mx.core.*;
public class ResourceManager_Turret0FaceDown extends BitmapAsset {
}
}//package
Section 586
//ResourceManager_Turret0FaceLeft (ResourceManager_Turret0FaceLeft)
package {
import mx.core.*;
public class ResourceManager_Turret0FaceLeft extends BitmapAsset {
}
}//package
Section 587
//ResourceManager_Turret0FaceRight (ResourceManager_Turret0FaceRight)
package {
import mx.core.*;
public class ResourceManager_Turret0FaceRight extends BitmapAsset {
}
}//package
Section 588
//ResourceManager_Turret0FaceUp (ResourceManager_Turret0FaceUp)
package {
import mx.core.*;
public class ResourceManager_Turret0FaceUp extends BitmapAsset {
}
}//package
Section 589
//ResourceManager_Turret1FaceDown (ResourceManager_Turret1FaceDown)
package {
import mx.core.*;
public class ResourceManager_Turret1FaceDown extends BitmapAsset {
}
}//package
Section 590
//ResourceManager_Turret1FaceLeft (ResourceManager_Turret1FaceLeft)
package {
import mx.core.*;
public class ResourceManager_Turret1FaceLeft extends BitmapAsset {
}
}//package
Section 591
//ResourceManager_Turret1FaceRight (ResourceManager_Turret1FaceRight)
package {
import mx.core.*;
public class ResourceManager_Turret1FaceRight extends BitmapAsset {
}
}//package
Section 592
//ResourceManager_Turret1FaceUp (ResourceManager_Turret1FaceUp)
package {
import mx.core.*;
public class ResourceManager_Turret1FaceUp extends BitmapAsset {
}
}//package
Section 593
//ResourceManager_Turret2FaceDown (ResourceManager_Turret2FaceDown)
package {
import mx.core.*;
public class ResourceManager_Turret2FaceDown extends BitmapAsset {
}
}//package
Section 594
//ResourceManager_Turret2FaceLeft (ResourceManager_Turret2FaceLeft)
package {
import mx.core.*;
public class ResourceManager_Turret2FaceLeft extends BitmapAsset {
}
}//package
Section 595
//ResourceManager_Turret2FaceRight (ResourceManager_Turret2FaceRight)
package {
import mx.core.*;
public class ResourceManager_Turret2FaceRight extends BitmapAsset {
}
}//package
Section 596
//ResourceManager_Turret2FaceUp (ResourceManager_Turret2FaceUp)
package {
import mx.core.*;
public class ResourceManager_Turret2FaceUp extends BitmapAsset {
}
}//package
Section 597
//ResourceManager_Turret3FaceDown (ResourceManager_Turret3FaceDown)
package {
import mx.core.*;
public class ResourceManager_Turret3FaceDown extends BitmapAsset {
}
}//package
Section 598
//ResourceManager_Turret3FaceLeft (ResourceManager_Turret3FaceLeft)
package {
import mx.core.*;
public class ResourceManager_Turret3FaceLeft extends BitmapAsset {
}
}//package
Section 599
//ResourceManager_Turret3FaceRight (ResourceManager_Turret3FaceRight)
package {
import mx.core.*;
public class ResourceManager_Turret3FaceRight extends BitmapAsset {
}
}//package
Section 600
//ResourceManager_Turret3FaceUp (ResourceManager_Turret3FaceUp)
package {
import mx.core.*;
public class ResourceManager_Turret3FaceUp extends BitmapAsset {
}
}//package
Section 601
//ResourceManager_Turret4FaceDown (ResourceManager_Turret4FaceDown)
package {
import mx.core.*;
public class ResourceManager_Turret4FaceDown extends BitmapAsset {
}
}//package
Section 602
//ResourceManager_Turret4FaceLeft (ResourceManager_Turret4FaceLeft)
package {
import mx.core.*;
public class ResourceManager_Turret4FaceLeft extends BitmapAsset {
}
}//package
Section 603
//ResourceManager_Turret4FaceRight (ResourceManager_Turret4FaceRight)
package {
import mx.core.*;
public class ResourceManager_Turret4FaceRight extends BitmapAsset {
}
}//package
Section 604
//ResourceManager_Turret4FaceUp (ResourceManager_Turret4FaceUp)
package {
import mx.core.*;
public class ResourceManager_Turret4FaceUp extends BitmapAsset {
}
}//package
Section 605
//ResourceManager_Turret5FaceDown (ResourceManager_Turret5FaceDown)
package {
import mx.core.*;
public class ResourceManager_Turret5FaceDown extends BitmapAsset {
}
}//package
Section 606
//ResourceManager_Turret5FaceLeft (ResourceManager_Turret5FaceLeft)
package {
import mx.core.*;
public class ResourceManager_Turret5FaceLeft extends BitmapAsset {
}
}//package
Section 607
//ResourceManager_Turret5FaceRight (ResourceManager_Turret5FaceRight)
package {
import mx.core.*;
public class ResourceManager_Turret5FaceRight extends BitmapAsset {
}
}//package
Section 608
//ResourceManager_Turret5FaceUp (ResourceManager_Turret5FaceUp)
package {
import mx.core.*;
public class ResourceManager_Turret5FaceUp extends BitmapAsset {
}
}//package
Section 609
//ResourceManager_TurretFireDown (ResourceManager_TurretFireDown)
package {
import mx.core.*;
public class ResourceManager_TurretFireDown extends BitmapAsset {
}
}//package
Section 610
//ResourceManager_TurretFireLeft (ResourceManager_TurretFireLeft)
package {
import mx.core.*;
public class ResourceManager_TurretFireLeft extends BitmapAsset {
}
}//package
Section 611
//ResourceManager_TurretFireRight (ResourceManager_TurretFireRight)
package {
import mx.core.*;
public class ResourceManager_TurretFireRight extends BitmapAsset {
}
}//package
Section 612
//ResourceManager_TurretFireUp (ResourceManager_TurretFireUp)
package {
import mx.core.*;
public class ResourceManager_TurretFireUp extends BitmapAsset {
}
}//package
Section 613
//ResourceManager_WalkSound (ResourceManager_WalkSound)
package {
import mx.core.*;
public class ResourceManager_WalkSound extends SoundAsset {
}
}//package
Section 614
//ResourceManager_WallVerticalPart (ResourceManager_WallVerticalPart)
package {
import mx.core.*;
public class ResourceManager_WallVerticalPart extends BitmapAsset {
}
}//package
Section 615
//StartLevelCommand (StartLevelCommand)
package {
import cotogames.carmack.core.*;
import cotogames.carmack.core.states.*;
public class StartLevelCommand extends Command {
public var levelNumber:int;// = 0
public function StartLevelCommand(_arg1:int){
this.levelNumber = _arg1;
}
override public function execute():void{
trace("start level command");
GameManager.Instance.clearStates();
GameManager.Instance.pushState(new PlayCoreState());
GameManager.Instance.pushState(new FadeInCoreState());
GameManager.Instance.currentLevelNumber = levelNumber;
GameManager.Instance.loadCurrentLevel();
}
}
}//package
Section 616
//Tile (Tile)
package {
import cotogames.carmack.core.*;
public class Tile {
public var decorations:Array;
public var attachedGameObject:GameObject;// = null
public var currentAnimationIndex:int;// = 0
public var graphics:GraphicsResource;
public var hasButton:Boolean;// = false
public var movable:Boolean;// = true
public var onStepEvent:LevelEvent;// = null
public var levelEventID:int;// = -1
public var wallTop:int;// = 0
public var wallLeft:int;// = 0
public var isDeadly:Boolean;// = false
public static const WALL_SLIDING_DOWN:int = 5;
public static const WALL_GENERIC:int = 1;
public static const WALL_NONE:int = 0;
public static const WALL_DESTROID:int = 3;
public static const WALL_SLIDING:int = 4;
public static const WALL_DESTROYABLE:int = 2;
public function Tile(_arg1:GraphicsResource, _arg2:Boolean=false, _arg3:Boolean=true){
decorations = new Array();
super();
this.graphics = _arg1;
this.isDeadly = _arg2;
this.movable = _arg3;
}
public function update(_arg1:Number):void{
graphics.update(_arg1);
}
}
}//package
Section 617
//Turret (Turret)
package {
import cotogames.carmack.core.*;
public class Turret extends GameObject {
public var recharging:Boolean;// = false
public var roundsToRecharge:int;
public var charged:int;
public var target:GameObject;// = null
public static const TIME_TO_SHOOT:Number = 1.2;
public function Turret(_arg1:int, _arg2:int){
this.direction = _arg1;
this.roundsToRecharge = _arg2;
this.charged = _arg2;
setStaticGraphics();
}
public function onCommandComplete():void{
setStaticGraphics();
charged = roundsToRecharge;
setStaticGraphics();
target.timeMoved = 0;
if ((target is Carmack)){
target.nextCommand = PlayerCommands.DIE_FROM_TURRET;
} else {
if ((target is Welder)){
target.nextCommand = PlayerCommands.EXPLODE_DOWN;
};
};
moved = true;
target.moved = false;
GameManager.Instance.movingObject = target;
target = null;
}
override public function update(_arg1:Number):void{
super.update(_arg1);
if (target != null){
if (timeMoved == 0){
onCommandStart();
};
timeMoved = (timeMoved + _arg1);
if (timeMoved > TIME_TO_SHOOT){
onCommandComplete();
};
return;
};
charged--;
if (charged < 0){
charged = 0;
};
setStaticGraphics();
if (charged > 0){
moved = true;
return;
};
target = GameManager.Instance.currentLevel.seekShootingTarget(position, direction);
if (((!((target is Welder))) && (!((target is Carmack))))){
target = null;
};
if (target != null){
timeMoved = 0;
switch (direction){
case DIRECTION_DOWN:
nextCommand = PlayerCommands.SHOOT_DOWN;
break;
case DIRECTION_RIGHT:
nextCommand = PlayerCommands.SHOOT_RIGHT;
break;
case DIRECTION_LEFT:
nextCommand = PlayerCommands.SHOOT_LEFT;
break;
case DIRECTION_UP:
nextCommand = PlayerCommands.SHOOT_UP;
break;
};
} else {
moved = true;
};
}
public function onCommandStart():void{
trace(("next command = " + nextCommand));
switch (nextCommand){
case PlayerCommands.SHOOT_DOWN:
graphics = ResourceManager.TurretFireDownGraphics;
break;
case PlayerCommands.SHOOT_LEFT:
graphics = ResourceManager.TurretFireLeftGraphics;
break;
case PlayerCommands.SHOOT_RIGHT:
graphics = ResourceManager.TurretFireRightGraphics;
break;
case PlayerCommands.SHOOT_UP:
graphics = ResourceManager.TurretFireUpGraphics;
break;
};
if ((((((((nextCommand == PlayerCommands.SHOOT_DOWN)) || ((nextCommand == PlayerCommands.SHOOT_LEFT)))) || ((nextCommand == PlayerCommands.SHOOT_RIGHT)))) || ((nextCommand == PlayerCommands.SHOOT_UP)))){
ResourceManager.GunBassFX.play();
};
}
public function setStaticGraphics():void{
if (direction == GameObject.DIRECTION_DOWN){
if (charged == 5){
graphics = ResourceManager.Turret5FaceDownGraphics;
};
if (charged == 4){
graphics = ResourceManager.Turret4FaceDownGraphics;
};
if (charged == 3){
graphics = ResourceManager.Turret3FaceDownGraphics;
};
if (charged == 2){
graphics = ResourceManager.Turret2FaceDownGraphics;
};
if (charged == 1){
graphics = ResourceManager.Turret1FaceDownGraphics;
};
if (charged == 0){
graphics = ResourceManager.Turret0FaceDownGraphics;
};
} else {
if (direction == GameObject.DIRECTION_UP){
if (charged == 5){
graphics = ResourceManager.Turret5FaceUpGraphics;
};
if (charged == 4){
graphics = ResourceManager.Turret4FaceUpGraphics;
};
if (charged == 3){
graphics = ResourceManager.Turret3FaceUpGraphics;
};
if (charged == 2){
graphics = ResourceManager.Turret2FaceUpGraphics;
};
if (charged == 1){
graphics = ResourceManager.Turret1FaceUpGraphics;
};
if (charged == 0){
graphics = ResourceManager.Turret0FaceUpGraphics;
};
} else {
if (direction == GameObject.DIRECTION_LEFT){
if (charged == 5){
graphics = ResourceManager.Turret5FaceLeftGraphics;
};
if (charged == 4){
graphics = ResourceManager.Turret4FaceLeftGraphics;
};
if (charged == 3){
graphics = ResourceManager.Turret3FaceLeftGraphics;
};
if (charged == 2){
graphics = ResourceManager.Turret2FaceLeftGraphics;
};
if (charged == 1){
graphics = ResourceManager.Turret1FaceLeftGraphics;
};
if (charged == 0){
graphics = ResourceManager.Turret0FaceLeftGraphics;
};
} else {
if (charged == 5){
graphics = ResourceManager.Turret5FaceRightGraphics;
};
if (charged == 4){
graphics = ResourceManager.Turret4FaceRightGraphics;
};
if (charged == 3){
graphics = ResourceManager.Turret3FaceRightGraphics;
};
if (charged == 2){
graphics = ResourceManager.Turret2FaceRightGraphics;
};
if (charged == 1){
graphics = ResourceManager.Turret1FaceRightGraphics;
};
if (charged == 0){
graphics = ResourceManager.Turret0FaceRightGraphics;
};
};
};
};
}
}
}//package
Section 618
//Welder (Welder)
package {
import cotogames.carmack.core.*;
import cotogames.carmack.gamestates.*;
import cotogames.carmack.resources.*;
public class Welder extends GameObject {
protected var steps:int;// = 0
public var timeOnTurn:Number;// = 0
public static const TIME_TO_MOVE:Number = 0.5;
public static const TIME_TO_DIE_IN_ACID:Number = 1.6;
public function Welder(){
idleGraphics = RobotBitmapResources.RobotIdleGraphics.clone();
}
override public function update(_arg1:Number):void{
super.update(_arg1);
var _local2:Boolean;
if ((((timeMoved == 0)) && ((steps == 0)))){
if (nextCommand == PlayerCommands.NONE){
setMoveDirection();
};
setAnimationForCommand();
};
if (nextCommand == PlayerCommands.NONE){
moved = true;
steps = 0;
nextCommand = PlayerCommands.NONE;
return;
};
timeMoved = (timeMoved + _arg1);
var _local3:Number = (timeMoved / Carmack.TIME_TO_MOVE);
if (_local3 > 1){
_local3 = 1;
};
progressThroughCommand(_local3);
if (timeMoved > timeOnTurn){
onCommandComplete();
if (GameManager.Instance.movingObject != this){
steps = 0;
moved = true;
nextCommand = PlayerCommands.NONE;
return;
};
if ((((((((nextCommand == PlayerCommands.MOVE_RIGHT)) || ((nextCommand == PlayerCommands.MOVE_LEFT)))) || ((nextCommand == PlayerCommands.MOVE_DOWN)))) || ((nextCommand == PlayerCommands.MOVE_UP)))){
if (steps == 0){
steps++;
timeMoved = 0;
moved = false;
oldPosition = position.clone();
setMoveDirection();
setAnimationForCommand();
} else {
steps = 0;
nextCommand = PlayerCommands.NONE;
};
} else {
if (nextCommand != PlayerCommands.DIE_IN_ACID_DOWN){
moved = true;
};
};
};
}
public function setAnimationForCommand():void{
trace((("robot " + id) + " moves"));
timeOnTurn = TIME_TO_MOVE;
idleAnimationCountdown = -1;
idleAnimationTimer = -1;
idleAnimationOn = false;
idleGraphics.reset();
switch (nextCommand){
case PlayerCommands.MOVE_RIGHT:
graphics = ResourceManager.DroidWalkRightGraphics;
break;
case PlayerCommands.MOVE_LEFT:
graphics = ResourceManager.DroidWalkLeftGraphics;
break;
case PlayerCommands.MOVE_DOWN:
graphics = ResourceManager.DroidWalkDownGraphics;
break;
case PlayerCommands.MOVE_UP:
graphics = ResourceManager.DroidWalkUpGraphics;
break;
case PlayerCommands.EXPLODE_DOWN:
graphics = ResourceManager.DroidBoomDownGraphics;
break;
case PlayerCommands.EXPLODE_UP:
graphics = ResourceManager.DroidBoomDownGraphics;
break;
case PlayerCommands.EXPLODE_LEFT:
graphics = ResourceManager.DroidBoomDownGraphics;
break;
case PlayerCommands.EXPLODE_RIGHT:
graphics = ResourceManager.DroidBoomDownGraphics;
break;
case PlayerCommands.DIE_IN_ACID_DOWN:
graphics = ResourceManager.DroidAcidDownGraphics;
ResourceManager.BubblesFX.play();
timeOnTurn = TIME_TO_DIE_IN_ACID;
break;
case PlayerCommands.DIE_IN_ACID_LEFT:
graphics = ResourceManager.DroidAcidDownGraphics;
break;
case PlayerCommands.DIE_IN_ACID_RIGHT:
graphics = ResourceManager.DroidAcidDownGraphics;
break;
case PlayerCommands.DIE_IN_ACID_UP:
graphics = ResourceManager.DroidAcidDownGraphics;
break;
case PlayerCommands.NONE:
if (direction == DIRECTION_DOWN){
graphics = ResourceManager.DroidDownGraphics;
};
if (direction == DIRECTION_LEFT){
graphics = ResourceManager.DroidLeftGraphics;
};
if (direction == DIRECTION_RIGHT){
graphics = ResourceManager.DroidRightGraphics;
};
if (direction == DIRECTION_UP){
graphics = ResourceManager.DroidUpGraphics;
};
break;
};
if ((((((((nextCommand == PlayerCommands.MOVE_RIGHT)) || ((nextCommand == PlayerCommands.MOVE_LEFT)))) || ((nextCommand == PlayerCommands.MOVE_DOWN)))) || ((nextCommand == PlayerCommands.MOVE_UP)))){
GameManager.Instance.currentLevel.detachGameObject(this);
ResourceManager.RobotWalkFX.play();
};
if ((((((((nextCommand == PlayerCommands.EXPLODE_DOWN)) || ((nextCommand == PlayerCommands.EXPLODE_LEFT)))) || ((nextCommand == PlayerCommands.EXPLODE_UP)))) || ((nextCommand == PlayerCommands.EXPLODE_RIGHT)))){
ResourceManager.ExplosionFX.play();
GameState.quakeOn = true;
};
graphics.reset();
}
public function onCommandComplete():void{
var _local2:int;
var _local3:GameObject;
var _local1:Level = GameManager.Instance.currentLevel;
if (nextCommand == PlayerCommands.MOVE_DOWN){
graphics = ResourceManager.DroidDownGraphics;
};
if (nextCommand == PlayerCommands.MOVE_LEFT){
graphics = ResourceManager.DroidLeftGraphics;
};
if (nextCommand == PlayerCommands.MOVE_RIGHT){
graphics = ResourceManager.DroidRightGraphics;
};
if (nextCommand == PlayerCommands.MOVE_UP){
graphics = ResourceManager.DroidUpGraphics;
};
if ((((((((nextCommand == PlayerCommands.MOVE_RIGHT)) || ((nextCommand == PlayerCommands.MOVE_LEFT)))) || ((nextCommand == PlayerCommands.MOVE_DOWN)))) || ((nextCommand == PlayerCommands.MOVE_UP)))){
if (GameManager.Instance.currentLevel.canDie(position.x, position.y)){
this.timeMoved = 0;
this.nextCommand = PlayerCommands.DIE_IN_ACID_DOWN;
GameManager.Instance.movingObject = this;
this.steps = 0;
GameManager.Instance.currentLevel.detachGameObject(this);
return;
};
_local2 = 0;
while (_local2 < GameManager.Instance.gameObjectsToMove.length) {
_local3 = (GameManager.Instance.gameObjectsToMove.getItemAt(_local2) as GameObject);
if (_local3 == this){
} else {
if (!(((position.x == _local3.position.x)) && ((position.y == _local3.position.y)))){
} else {
if (((!((_local3 is Carmack))) && (!((_local3 is Welder))))){
} else {
if ((_local3 is Carmack)){
_local3.timeMoved = 0;
_local3.nextCommand = PlayerCommands.KILL_CARMACK;
_local3.moved = false;
GameManager.Instance.movingObject = _local3;
this.shutdown();
} else {
_local3.timeMoved = 0;
_local3.nextCommand = PlayerCommands.EXPLODE_DOWN;
_local3.moved = false;
GameManager.Instance.movingObject = _local3;
};
break;
};
};
};
_local2++;
};
GameManager.Instance.currentLevel.attachGameObject(this);
};
if ((((((((nextCommand == PlayerCommands.EXPLODE_DOWN)) || ((nextCommand == PlayerCommands.EXPLODE_LEFT)))) || ((nextCommand == PlayerCommands.EXPLODE_RIGHT)))) || ((nextCommand == PlayerCommands.EXPLODE_UP)))){
this.shutdown();
GameManager.Instance.currentLevel.detachGameObject(this);
};
if ((((((((nextCommand == PlayerCommands.DIE_IN_ACID_DOWN)) || ((nextCommand == PlayerCommands.DIE_IN_ACID_LEFT)))) || ((nextCommand == PlayerCommands.DIE_IN_ACID_RIGHT)))) || ((nextCommand == PlayerCommands.DIE_IN_ACID_UP)))){
GameManager.Instance.currentLevel.detachGameObject(this);
this.shutdown();
};
moved = true;
}
override public function shutdown():void{
GameManager.Instance.currentLevel.robotsKilled++;
super.shutdown();
}
public function progressThroughCommand(_arg1:Number):void{
var _local2:Number = (_arg1 * Level.TILE_SIZE);
if (nextCommand == PlayerCommands.MOVE_RIGHT){
position.x = (oldPosition.x + (_local2 / Level.TILE_SIZE));
};
if (nextCommand == PlayerCommands.MOVE_LEFT){
position.x = (oldPosition.x - (_local2 / Level.TILE_SIZE));
};
if (nextCommand == PlayerCommands.MOVE_DOWN){
position.y = (oldPosition.y + (_local2 / Level.TILE_SIZE));
};
if (nextCommand == PlayerCommands.MOVE_UP){
position.y = (oldPosition.y - (_local2 / Level.TILE_SIZE));
};
}
protected function setMoveDirection():void{
var _local3:Boolean;
var _local1:Number = (GameManager.Instance.carmack.position.x - position.x);
var _local2:Number = (GameManager.Instance.carmack.position.y - position.y);
if (_local1 > 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_RIGHT)){
nextCommand = PlayerCommands.MOVE_RIGHT;
} else {
if (_local2 > 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_DOWN)){
nextCommand = PlayerCommands.MOVE_DOWN;
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
} else {
if (_local2 < 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_UP)){
nextCommand = PlayerCommands.MOVE_UP;
} else {
direction = GameObject.DIRECTION_UP;
nextCommand = PlayerCommands.NONE;
};
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
};
};
} else {
if (_local1 < 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_LEFT)){
nextCommand = PlayerCommands.MOVE_LEFT;
} else {
if (_local2 > 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_DOWN)){
nextCommand = PlayerCommands.MOVE_DOWN;
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
} else {
if (_local2 < 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_UP)){
nextCommand = PlayerCommands.MOVE_UP;
} else {
direction = GameObject.DIRECTION_UP;
nextCommand = PlayerCommands.NONE;
};
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
};
};
} else {
if (_local1 == 0){
if (_local2 > 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_DOWN)){
nextCommand = PlayerCommands.MOVE_DOWN;
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
} else {
if (_local2 < 0){
if (GameManager.Instance.currentLevel.canMove(position, DIRECTION_UP)){
nextCommand = PlayerCommands.MOVE_UP;
} else {
direction = GameObject.DIRECTION_UP;
nextCommand = PlayerCommands.NONE;
};
} else {
direction = GameObject.DIRECTION_DOWN;
nextCommand = PlayerCommands.NONE;
};
};
};
};
};
}
protected function reset():void{
moved = true;
nextCommand = PlayerCommands.NONE;
steps = 0;
}
}
}//package