Section 1
//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.0.0.0";
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 2
//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.0.0.0";
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 3
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 4
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
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 5
//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 6
//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 7
//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.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
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 8
//Updater (Tools.Updater)
package Tools {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class Updater {
private var prevTime:Number;// = -1
private var timer:Timer;
private var fpsCount:int;// = 0
private var stateList:Array;
private var objectsList:Array;
private var fpsTime:Number;// = 0
private var showFps:Boolean;// = false
private var textFps:TextField;// = null
public function Updater(){
objectsList = new Array();
stateList = new Array();
timer = new Timer(20);
super();
timer.addEventListener(TimerEvent.TIMER, UpdateAll);
prevTime = getTimer();
timer.start();
}
public function HaveState(_arg1:int):Boolean{
return ((stateList.lastIndexOf(_arg1) >= 0));
}
public function AddUpdateObject(_arg1:Object, _arg2:int):void{
if (objectsList.lastIndexOf(_arg1) < 0){
objectsList.push(_arg1);
};
var _local3:int = objectsList.lastIndexOf(_arg1);
if (objectsList[_local3].updateOnStates.lastIndexOf(_arg2) < 0){
objectsList[_local3].updateOnStates.push(_arg2);
};
}
public function RemoveState(_arg1:int):void{
if (stateList.lastIndexOf(_arg1) >= 0){
stateList.splice(stateList.lastIndexOf(_arg1), 1);
};
}
public function RemoveUpdateObject(_arg1:Object):void{
if (objectsList.lastIndexOf(_arg1) >= 0){
objectsList.splice(objectsList.lastIndexOf(_arg1), 1);
};
}
public function AddState(_arg1:int):void{
if (stateList.lastIndexOf(_arg1) < 0){
stateList.push(_arg1);
};
}
private function UpdateAll(_arg1:TimerEvent):void{
var _local5:int;
var _local2:Number = getTimer();
var _local3:Number = ((_local2 - prevTime) / 1000);
prevTime = _local2;
if (showFps){
fpsTime = (fpsTime + _local3);
fpsCount++;
if (fpsTime >= 1){
textFps.text = String(fpsCount);
fpsCount = 0;
fpsTime = (fpsTime - 1);
};
};
var _local4:int;
while (_local4 < objectsList.length) {
_local5 = 0;
while (_local5 < stateList.length) {
if (objectsList[_local4].updateOnStates.lastIndexOf(stateList[_local5]) >= 0){
objectsList[_local4].Update(_local3, stateList[_local5]);
};
_local5++;
};
_local4++;
};
}
public function ShowFps(_arg1:Sprite, _arg2:int, _arg3:int):void{
textFps = new TextField();
textFps.x = _arg2;
textFps.y = _arg3;
textFps.width = 35;
textFps.height = 18;
textFps.opaqueBackground = 0;
var _local4:TextFormat = new TextFormat();
_local4.align = TextFormatAlign.CENTER;
_local4.color = 0xFFFFFF;
textFps.defaultTextFormat = _local4;
_arg1.addChild(textFps);
showFps = true;
}
}
}//package Tools
Section 9
//Utils (Tools.Utils)
package Tools {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class Utils {
public static var PI:Number = 3.14159265358979;
private static var acosinus:Array = new Array(360);
private static var cosinus:Array = new Array(360);
private static var asinus:Array = new Array(360);
private static var sinus:Array = new Array(360);
private static var VERSION:int = 5;
public static var invPI:Number = 57.2957795130823;
public static function UintToArgb(_arg1:uint):Array{
var _local2:Array = new Array();
_local2.push(((_arg1 >> 24) & 0xFF));
_local2.push(((_arg1 >> 16) & 0xFF));
_local2.push(((_arg1 >> 8) & 0xFF));
_local2.push((_arg1 & 0xFF));
return (_local2);
}
public static function GetSin(_arg1:int):Number{
if (_arg1 < 0){
_arg1 = (360 - (-(_arg1) % 360));
} else {
_arg1 = (_arg1 % 360);
};
if (isNaN(sinus[_arg1])){
CreateSinCosTable();
};
return (sinus[_arg1]);
}
private static function CreateSinCosTable():void{
var _local1:int;
while (_local1 < 360) {
sinus[_local1] = Math.sin((_local1 / invPI));
cosinus[_local1] = Math.cos((_local1 / invPI));
asinus[_local1] = Math.asin(((_local1 / 180) - 1));
acosinus[_local1] = Math.acos(((_local1 / 180) - 1));
_local1++;
};
}
public static function GetRotationOffset(_arg1:int, _arg2:Number, _arg3:Number):Point{
var _local4:Number = Math.sqrt((Math.pow(_arg2, 2) + Math.pow(_arg3, 2)));
var _local5:Number = (GetASin((_arg3 / _local4)) * invPI);
var _local6:Point = new Point();
_local6.x = ((-(GetCos((_arg1 + _local5))) * _local4) + _arg2);
_local6.y = ((-(GetSin((_arg1 + _local5))) * _local4) + _arg3);
return (_local6);
}
public static function ArgbToUint(_arg1:Array):uint{
var _local2:uint;
_local2 = (_local2 + (_arg1[0] << 24));
_local2 = (_local2 + (_arg1[1] << 16));
_local2 = (_local2 + (_arg1[2] << 8));
_local2 = (_local2 + _arg1[3]);
return (_local2);
}
public static function BitmapToPixelBitmap(_arg1:Bitmap, _arg2:int):void{
var _local4:Number;
var _local5:uint;
var _local6:Array;
var _local3:Number = 0;
while (_local3 < _arg1.bitmapData.width) {
_local4 = 0;
while (_local4 < _arg1.bitmapData.height) {
_local5 = _arg1.bitmapData.getPixel32(_local3, _local4);
_local6 = UintToArgb(_local5);
if ((((_local6[0] > 0)) && ((_local6[0] < 0xFF)))){
_local6[0] = ((_local6[0])<_arg2) ? 0 : 0xFF;
_local5 = ArgbToUint(_local6);
_arg1.bitmapData.setPixel32(_local3, _local4, _local5);
};
_local4++;
};
_local3++;
};
}
public static function GetASin(_arg1:Number):Number{
var _local2:int = Math.floor(((_arg1 + 1) * 180));
if (_local2 >= 360){
_local2 = 359;
};
if (isNaN(asinus[_local2])){
CreateSinCosTable();
};
return (asinus[_local2]);
}
public static function UpdatePopupScale(_arg1:Number, _arg2:Number, _arg3:Boolean, _arg4:Number):Number{
var _local5:Number = ((_arg2 * 2) - 1);
if (((_arg3) && ((_arg1 < _local5)))){
if (_arg1 < _local5){
if (_arg1 < _arg2){
_arg1 = (_arg1 + ((((_arg2 + 0.07) - _arg1) * _arg4) * 8));
} else {
_arg1 = (_arg1 + ((((_local5 + 0.07) - _arg1) * _arg4) * 5));
};
if (_arg1 > _local5){
_arg1 = _local5;
};
};
} else {
if (((!(_arg3)) && ((_arg1 > 0)))){
if (_arg1 > 0){
if (_arg1 > _arg2){
_arg1 = (_arg1 - ((((_local5 + 0.07) - _arg1) * _arg4) * 5));
} else {
_arg1 = (_arg1 - ((((_arg2 + 0.07) - _arg1) * _arg4) * 8));
};
if (_arg1 < 0){
_arg1 = 0;
};
};
};
};
return (_arg1);
}
public static function PointInTriangle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{
return (((((IsOnTrueSide(_arg3, _arg4, _arg5, _arg6, _arg1, _arg2)) && (IsOnTrueSide(_arg5, _arg6, _arg7, _arg8, _arg1, _arg2)))) && (IsOnTrueSide(_arg7, _arg8, _arg3, _arg4, _arg1, _arg2))));
}
public static function Fill9GridTexture(_arg1:BitmapData, _arg2:BitmapData, _arg3:Rectangle, _arg4:Point):void{
_arg1.copyPixels(_arg2, new Rectangle(0, 0, _arg3.x, _arg3.y), new Point(0, 0), null, null, true);
_arg1.copyPixels(_arg2, new Rectangle((_arg3.x + _arg3.width), 0, (_arg2.width - (_arg3.x + _arg3.width)), _arg3.y), new Point((_arg3.x + _arg4.x), 0), null, null, true);
_arg1.copyPixels(_arg2, new Rectangle(0, (_arg3.y + _arg3.height), _arg3.x, (_arg2.height - (_arg3.y + _arg3.height))), new Point(0, (_arg3.y + _arg4.y)), null, null, true);
_arg1.copyPixels(_arg2, new Rectangle((_arg3.x + _arg3.width), (_arg3.y + _arg3.height), (_arg2.width - (_arg3.x + _arg3.width)), (_arg2.height - (_arg3.y + _arg3.height))), new Point((_arg3.x + _arg4.x), (_arg3.y + _arg4.y)), null, null, true);
if ((((_arg3.width > 0)) && ((_arg4.x > 0)))){
TileImage(_arg2, _arg1, new Rectangle(_arg3.x, 0, _arg4.x, _arg3.y), new Rectangle(_arg3.x, 0, _arg3.width, _arg3.y));
TileImage(_arg2, _arg1, new Rectangle(_arg3.x, (_arg3.y + _arg4.y), _arg4.x, (_arg2.height - (_arg3.y + _arg3.height))), new Rectangle(_arg3.x, (_arg3.y + _arg3.height), _arg3.width, (_arg2.height - (_arg3.y + _arg3.height))));
};
if ((((_arg3.height > 0)) && ((_arg4.y > 0)))){
TileImage(_arg2, _arg1, new Rectangle(0, _arg3.y, _arg3.x, _arg4.y), new Rectangle(0, _arg3.y, _arg3.x, _arg3.height));
TileImage(_arg2, _arg1, new Rectangle((_arg3.x + _arg4.x), _arg3.y, (_arg2.width - (_arg3.x + _arg3.width)), _arg4.y), new Rectangle((_arg3.x + _arg3.width), _arg3.y, (_arg2.width - (_arg3.x + _arg3.width)), _arg3.height));
};
if ((((((((_arg3.height > 0)) && ((_arg4.y > 0)))) && ((_arg3.width > 0)))) && ((_arg4.x > 0)))){
TileImage(_arg2, _arg1, new Rectangle(_arg3.x, _arg3.y, _arg4.x, _arg4.y), new Rectangle(_arg3.x, _arg3.y, _arg3.width, _arg3.height));
};
}
public static function Random(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + (Math.random() * (_arg2 - _arg1))));
}
public static function AlphaJPG(_arg1:Bitmap, _arg2:Bitmap):Bitmap{
var _local3:Bitmap = new Bitmap(new BitmapData(_arg1.width, _arg1.height, true, 0xFFFFFF));
_local3.bitmapData.copyPixels(_arg1.bitmapData, new Rectangle(0, 0, _arg1.width, _arg1.height), new Point());
_local3.bitmapData.copyChannel(_arg2.bitmapData, new Rectangle(0, 0, _arg1.width, _arg1.height), new Point(), BitmapDataChannel.BLUE, BitmapDataChannel.ALPHA);
_arg1.bitmapData.dispose();
_arg2.bitmapData.dispose();
return (_local3);
}
public static function TileImage(_arg1:BitmapData, _arg2:BitmapData, _arg3:Rectangle, _arg4:Rectangle=null):void{
var _local9:int;
var _local10:int;
var _local5:int = _arg3.width;
var _local6:int = _arg3.height;
var _local7:int = _arg3.x;
var _local8:int = _arg3.y;
var _local11:int = ((_arg4)!=null) ? _arg4.x : 0;
var _local12:int = ((_arg4)!=null) ? _arg4.y : 0;
var _local13:int = ((_arg4)!=null) ? _arg4.width : _arg1.width;
var _local14:int = ((_arg4)!=null) ? _arg4.height : _arg1.height;
while (true) {
_local9 = Math.min(_local13, _local5);
_local10 = Math.min(_local14, _local6);
_arg2.copyPixels(_arg1, new Rectangle(_local11, _local12, _local9, _local10), new Point(_local7, _local8), null, null, true);
_local7 = (_local7 + _local9);
_local5 = (_local5 - _local9);
if (_local5 <= 0){
_local7 = _arg3.x;
_local5 = _arg3.width;
_local8 = (_local8 + _local10);
_local6 = (_local6 - _local10);
};
if (_local6 <= 0){
break;
};
};
}
public static function IsOnTrueSide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Boolean{
var _local7:Number = (((_arg3 - _arg1) * (_arg6 - _arg2)) - ((_arg5 - _arg1) * (_arg4 - _arg2)));
if (_local7 > 0){
return (false);
};
return (true);
}
public static function GetCos(_arg1:int):Number{
if (_arg1 < 0){
_arg1 = (360 - (-(_arg1) % 360));
} else {
_arg1 = (_arg1 % 360);
};
if (isNaN(cosinus[_arg1])){
CreateSinCosTable();
};
return (cosinus[_arg1]);
}
public static function TextToBitmap(_arg1:TextField):Bitmap{
var _local3:int;
var _local4:int;
var _local5:Boolean;
var _local2:Bitmap = new Bitmap(new BitmapData(_arg1.width, _arg1.height, true, 0xFFFFFF));
_local2.bitmapData.draw(_arg1);
var _local6:Rectangle = new Rectangle(0, 0, _local2.width, _local2.height);
_local5 = false;
_local3 = 0;
while (_local3 < _local2.width) {
_local4 = 0;
while (_local4 < _local2.height) {
if (_slot1.UintToArgb(_local2.bitmapData.getPixel32(_local3, _local4))[0] > 0){
_local5 = true;
break;
};
_local4++;
};
if (_local5){
_local6.x = _local3;
break;
};
_local3++;
};
_local5 = false;
_local4 = 0;
while (_local4 < _local2.height) {
_local3 = 0;
while (_local3 < _local2.width) {
if (_slot1.UintToArgb(_local2.bitmapData.getPixel32(_local3, _local4))[0] > 0){
_local5 = true;
break;
};
_local3++;
};
if (_local5){
_local6.y = _local4;
break;
};
_local4++;
};
_local5 = false;
_local3 = (_local2.width - 1);
while (_local3 >= 0) {
_local4 = 0;
while (_local4 < _local2.height) {
if (_slot1.UintToArgb(_local2.bitmapData.getPixel32(_local3, _local4))[0] > 0){
_local5 = true;
break;
};
_local4++;
};
if (_local5){
_local6.width = ((_local3 - _local6.x) + 1);
break;
};
_local3--;
};
_local5 = false;
_local4 = (_local2.height - 1);
while (_local4 >= 0) {
_local3 = 0;
while (_local3 < _local2.width) {
if (_slot1.UintToArgb(_local2.bitmapData.getPixel32(_local3, _local4))[0] > 0){
_local5 = true;
break;
};
_local3++;
};
if (_local5){
_local6.height = ((_local4 - _local6.y) + 1);
break;
};
_local4--;
};
var _local7:Bitmap = new Bitmap(new BitmapData(_local6.width, _local6.height, true, 0xFFFFFF));
_local7.bitmapData.copyPixels(_local2.bitmapData, _local6, new Point());
_local2.bitmapData.dispose();
return (_local7);
}
public static function GetACos(_arg1:Number):Number{
var _local2:int = Math.floor(((_arg1 + 1) * 180));
if (_local2 >= 360){
_local2 = 359;
};
if (isNaN(acosinus[_local2])){
CreateSinCosTable();
};
return (acosinus[_local2]);
}
}
}//package Tools
Section 10
//Deal (Deal)
package {
import flash.display.*;
import Tools.*;
import flash.geom.*;
public class Deal extends Bitmap {
public var app:Main;
public var updater:Updater;
public var updateOnStates:Array;
public var env:Enviroment;
private var cells:Array;
private var globalOffset:Number;// = 0
private var ID:int;
private static var parts:Array = null;
private static var tempBmp2:BitmapData = new BitmapData(1, 28, false);
public static var CELL_2Key:int = 4;
private static var partsBmp:Array = null;
private static var imgSrc:BitmapData = new Resources.imgDeals().bitmapData;
public static var CELL_2Lock:int = 1;
private static var tempBmp:BitmapData = new BitmapData((28 * 6), 28, false);
public static var CELL_None:int = 0;
private static var constOffset:int = 0;
public static var CELL_Lock:int = 3;
public static var CELL_Key:int = 2;
private static var minCells:int = 6;
public function Deal(_arg1:int){
var _local2:int;
var _local3:int;
var _local4:int;
app = Main.gameApp;
env = Main.enviroment;
updater = Main.updater;
updateOnStates = new Array();
cells = new Array();
ID = _arg1;
super(new BitmapData(68, 28, false, 0xFFFFFF), "auto", true);
if (parts == null){
parts = new Array();
partsBmp = new Array();
_local3 = 0;
_local2 = 0;
while (_local2 < 68) {
_local4 = int((1 + ((1 - Math.cos(((((_local2 / 34) - 1) * 0.8) * (Math.PI / 2)))) * 4)));
parts.push(_local4);
_local3 = (_local3 + _local4);
_local2++;
};
minCells = (Math.ceil((_local3 / 28)) + 1);
constOffset = ((28 - (int(((_local3 - 28) / 2)) % 28)) - 1);
_local2 = 0;
while (_local2 < parts.length) {
partsBmp.push(new BitmapData(parts[_local2], 28, false));
_local2++;
};
};
Initialize();
updater.AddUpdateObject(this, (app.STT_DealSpin + ID));
}
public function GoTo(_arg1:Boolean):void{
cells.push((_arg1) ? CELL_Key : CELL_None);
var _local2:int;
while (_local2 < 2) {
cells.push(GetRandomCell());
_local2++;
};
updater.AddState((app.STT_DealSpin + ID));
updater.AddState((app.STT_ButtonHide + ID));
}
private function StartCellEvent(_arg1:int):void{
var _local2:Array;
var _local3:int;
var _local4:int;
switch (_arg1){
case CELL_Key:
_local2 = new Array();
_local3 = 0;
while (_local3 < 12) {
if (((!(env.locksOpened[_local3])) && (!(updater.HaveState((app.STT_LockClose + _local3)))))){
_local2.push(_local3);
};
_local3++;
};
if (_local2.length == 0){
_local3 = 0;
while (_local3 < 12) {
if (!env.locksOpened[_local3]){
_local2.push(_local3);
};
_local3++;
};
};
if (_local2.length == 0){
break;
};
_local4 = (Math.random() * _local2.length);
updater.RemoveState((app.STT_LockClose + _local2[_local4]));
updater.AddState((app.STT_LockOpen + _local2[_local4]));
env.locksOpened[_local2[_local4]] = true;
break;
case CELL_Lock:
_local2 = new Array();
_local3 = 0;
while (_local3 < 12) {
if (((env.locksOpened[_local3]) && (!(updater.HaveState((app.STT_LockOpen + _local3)))))){
_local2.push(_local3);
};
_local3++;
};
if (_local2.length == 0){
_local3 = 0;
while (_local3 < 12) {
if (env.locksOpened[_local3]){
_local2.push(_local3);
};
_local3++;
};
};
if (_local2.length == 0){
break;
};
_local4 = (Math.random() * _local2.length);
updater.RemoveState((app.STT_LockOpen + _local2[_local4]));
updater.AddState((app.STT_LockClose + _local2[_local4]));
env.locksOpened[_local2[_local4]] = false;
break;
};
}
public function Go():void{
var _local1:int;
while (_local1 < 15) {
cells.push(GetRandomCell());
_local1++;
};
updater.AddState((app.STT_DealSpin + ID));
}
private function GetRandomCell():int{
var _local1:Number = Math.random();
if (_local1 < 0.31){
return (CELL_Key);
};
if (_local1 < 0.58){
return (CELL_Lock);
};
if (_local1 < 0.81){
return (CELL_2Key);
};
return (CELL_2Lock);
}
private function DrawDeal():void{
var _local1:int;
_local1 = 0;
while (_local1 < minCells) {
tempBmp.copyPixels(imgSrc, new Rectangle((28 * cells[_local1]), 0, 28, 28), new Point((_local1 * 28), 0));
_local1++;
};
var _local2:int = (globalOffset + constOffset);
_local1 = 0;
while (_local1 < parts.length) {
partsBmp[_local1].copyPixels(tempBmp, new Rectangle(_local2, 0, parts[_local1], 28), new Point());
tempBmp2.draw(partsBmp[_local1], new Matrix((1 / parts[_local1])), null, null, new Rectangle(0, 0, 1, 28), true);
bitmapData.copyPixels(tempBmp2, new Rectangle(0, 0, 1, 28), new Point(_local1, 0));
_local2 = (_local2 + parts[_local1]);
_local1++;
};
}
public function Initialize():void{
cells.splice(0, cells.length);
var _local1:int;
while (_local1 < minCells) {
cells.push(GetRandomCell());
_local1++;
};
cells[2] = CELL_None;
DrawDeal();
}
public function Update(_arg1:Number, _arg2:int):void{
var _local3:Number = 120;
if (cells.length > 10){
globalOffset = (globalOffset + (_arg1 * _local3));
} else {
globalOffset = (globalOffset + ((((((cells.length - minCells) * 28) - globalOffset) + 10) * 0.85) * _arg1));
};
if (globalOffset >= 28){
globalOffset = (globalOffset - 28);
cells.splice(0, 1);
if (cells.length == minCells){
globalOffset = 0;
updater.RemoveState((app.STT_DealSpin + ID));
if (ID == 3){
if (!OpenLocks()){
env.startButn.upState = env.startButn.hitTestState;
env.startButn.overState = env.startButn.hitTestState;
env.startButn.mouseEnabled = true;
};
};
};
};
DrawDeal();
}
private function OpenLocks():Boolean{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local1 = 0;
while (_local1 < 4) {
switch (env.deals[_local1].cells[2]){
case CELL_Key:
_local2 = (_local2 + 1);
break;
case CELL_2Key:
_local2 = (_local2 + 2);
break;
case CELL_Lock:
_local3 = (_local3 + 1);
break;
case CELL_2Lock:
_local3 = (_local3 + 2);
break;
};
_local1++;
};
_local1 = 0;
while (_local1 < 12) {
if (env.locksOpened[_local1]){
_local4++;
} else {
_local5++;
};
_local1++;
};
if (_local3 > _local4){
_local2 = (_local2 - Math.min((_local3 - _local4), _local2));
_local3 = _local4;
};
if (_local2 > _local5){
_local3 = (_local3 - Math.min((_local2 - _local5), _local3));
_local2 = _local5;
};
_local1 = 0;
while (_local1 < _local2) {
StartCellEvent(CELL_Key);
_local1++;
};
_local1 = 0;
while (_local1 < _local3) {
StartCellEvent(CELL_Lock);
_local1++;
};
if ((((_local3 == 0)) && (((_local4 + _local2) == env.locksOpened.length)))){
return (true);
};
return (false);
}
}
}//package
Section 11
//Enviroment (Enviroment)
package {
import flash.events.*;
import flash.display.*;
import Tools.*;
import flash.text.*;
import flash.geom.*;
public class Enviroment {
public var doorSprites:Array;
public var buttons:Array;
public var moreButn:SimpleButton;
public var deals:Array;
public var startButn:SimpleButton;
public var updater:Updater;
public var continueBmp1:Bitmap;
public var continueBmp2:Bitmap;
public var blackSprites:Array;
public var textMsg1:TextField;
public var app:Main;
public var continueButn:SimpleButton;
public var locks:Array;
public var updateOnStates:Array;
public var backs:Array;
public var textErrorBannerSprt:Sprite;
public var currGirl:int;// = 0
public var locksOpened:Array;
public var currLevel:int;// = 0
public var textMsg2:TextField;
private var currBanner:int;// = 0
public function Enviroment(){
var _local1:int;
var _local2:Bitmap;
app = Main.gameApp;
updater = Main.updater;
updateOnStates = new Array();
doorSprites = new Array(8);
locks = new Array(12);
buttons = new Array(4);
deals = new Array(4);
locksOpened = new Array(12);
startButn = new SimpleButton();
moreButn = new SimpleButton();
continueButn = new SimpleButton();
continueBmp1 = new Resources.imgButnContinueOff();
continueBmp2 = new Resources.imgButnContinueOff();
blackSprites = new Array(10);
backs = new Array(4);
textErrorBannerSprt = new Sprite();
textMsg1 = new TextField();
textMsg2 = new TextField();
super();
Main.enviroment = this;
_local1 = 0;
while (_local1 < 8) {
doorSprites[_local1] = new Sprite();
doorSprites[_local1].mouseEnabled = false;
app.layers[1].addChild(doorSprites[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < blackSprites.length) {
blackSprites[_local1] = new Sprite();
blackSprites[_local1].graphics.beginFill(0, 1);
blackSprites[_local1].graphics.drawRect(0, 0, (app.stageWidth / 2), app.stageHeight);
_local1++;
};
app.layers[5].addChild(textErrorBannerSprt);
textErrorBannerSprt.mouseEnabled = false;
textErrorBannerSprt.graphics.beginFill(0xFFFFFF, 0);
textErrorBannerSprt.graphics.drawRect(0, 0, app.stageWidth, app.stageHeight);
backs[0] = new Bitmap(new BitmapData(250, 400), "auto", true);
backs[0].bitmapData.copyPixels(new Resources.imgDoors().bitmapData, new Rectangle(0, 0, 250, 400), new Point());
doorSprites[1].addChild(backs[0]);
backs[1] = new Resources.imgDoorsOverlay1();
backs[1].x = 127;
doorSprites[3].addChild(backs[1]);
backs[2] = new Bitmap(new BitmapData(250, 400), "auto", true);
backs[2].bitmapData.copyPixels(new Resources.imgDoors().bitmapData, new Rectangle(250, 0, 250, 400), new Point());
doorSprites[0].addChild(backs[2]);
backs[3] = new Resources.imgDoorsOverlay2();
backs[3].x = 11;
doorSprites[2].addChild(backs[3]);
doorSprites[2].x = 250;
doorSprites[0].x = 250;
startButn.upState = new Resources.imgButnStartOn();
startButn.downState = new Resources.imgButnStartOff();
startButn.overState = startButn.upState;
startButn.hitTestState = startButn.upState;
startButn.x = 143;
startButn.y = 45;
startButn.addEventListener(MouseEvent.MOUSE_DOWN, onStart);
doorSprites[3].addChild(startButn);
moreButn.upState = new Resources.imgButnMoreOn();
moreButn.downState = new Resources.imgButnMoreOff();
moreButn.overState = moreButn.upState;
moreButn.hitTestState = moreButn.upState;
moreButn.x = 32;
moreButn.y = 45;
moreButn.addEventListener(MouseEvent.CLICK, onGirls);
doorSprites[2].addChild(moreButn);
continueButn.upState = new Resources.imgButnContinueOn();
continueButn.downState = new Resources.imgButnContinueOff();
continueButn.overState = continueButn.upState;
continueButn.hitTestState = continueButn.upState;
continueButn.x = 158;
continueButn.y = 357;
continueButn.addEventListener(MouseEvent.CLICK, onContinue);
continueBmp1.x = (continueBmp2.x = continueButn.x);
continueBmp1.y = (continueBmp2.y = continueButn.y);
textMsg1.text = "SPONSOR SITE";
textMsg1.setTextFormat(new TextFormat("Arial", 18, 0xFFFFFF, true));
textMsg1.selectable = false;
textMsg1.autoSize = TextFieldAutoSize.LEFT;
textMsg1.x = ((app.stageWidth / 2) - (textMsg1.width / 2));
textMsg1.y = 40;
textMsg2.text = "SPONSOR SITE";
textMsg2.setTextFormat(new TextFormat("Arial", 18, 0xFFFFFF, true));
textMsg2.selectable = false;
textMsg2.autoSize = TextFieldAutoSize.LEFT;
textMsg2.x = (-(textMsg1.width) / 2);
textMsg2.y = 40;
_local1 = 0;
while (_local1 < 4) {
deals[_local1] = new Deal(_local1);
if ((_local1 % 2) == 0){
deals[_local1].x = 146;
deals[_local1].y = (15 + (int(((_local1 + 4) / 2)) * 68));
} else {
deals[_local1].x = 35;
deals[_local1].y = (15 + (int(((_local1 + 4) / 2)) * 68));
};
_local1++;
};
_local1 = 0;
while (_local1 < 12) {
locks[_local1] = new Resources.imgLock();
locks[_local1].x = 218;
locks[_local1].y = (3 + (_local1 * 34));
doorSprites[1].addChild(locks[_local1]);
locksOpened[_local1] = false;
_local1++;
};
_local1 = 0;
while (_local1 < 4) {
(((_local1 % 2))==0) ? doorSprites[1] : doorSprites[0].addChild(deals[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < 12) {
updater.AddUpdateObject(this, (app.STT_LockOpen + _local1));
updater.AddUpdateObject(this, (app.STT_LockClose + _local1));
_local1++;
};
updater.AddUpdateObject(this, app.STT_OpenDoor);
_local1 = 0;
while (_local1 < app.layers.length) {
app.layers[_local1].mouseEnabled = false;
_local1++;
};
}
private function onStart(_arg1:MouseEvent):void{
startButn.upState = startButn.downState;
startButn.overState = startButn.downState;
startButn.mouseEnabled = false;
deals[0].Go();
deals[1].Go();
deals[2].Go();
deals[3].Go();
}
public function NextScreen():void{
var _local1:int;
var _local2:Bitmap;
var _local3:Sprite;
_local1 = 0;
while (_local1 < 4) {
while (doorSprites[_local1].numChildren > 0) {
doorSprites[(_local1 + 4)].addChild(doorSprites[_local1].getChildAt(0));
};
_local1++;
};
if (continueButn.parent == doorSprites[4]){
doorSprites[4].removeChild(continueButn);
doorSprites[4].addChild(continueBmp2);
};
doorSprites[(3 + 4)].x = (doorSprites[(1 + 4)].x = 0);
doorSprites[(2 + 4)].x = (doorSprites[(0 + 4)].x = 250);
if ((((currGirl >= 0)) && ((currGirl < 6)))){
_local2 = new (Resources.girlsImages[((currLevel * 6) + currGirl)]);
_local2.mask = (((currGirl % 2))==0) ? blackSprites[0] : blackSprites[1];
_local2.x = ((app.stageWidth / 2) - (_local2.width / 2));
_local2.y = ((app.stageHeight / 2) - (_local2.height / 2));
doorSprites[1].addChild((((currGirl % 2))==0) ? blackSprites[0] : blackSprites[1]);
doorSprites[1].addChild((((currGirl % 2))==0) ? blackSprites[4] : blackSprites[5]);
doorSprites[1].addChild(_local2);
_local2 = new (Resources.girlsImages[((currLevel * 6) + currGirl)]);
_local2.mask = (((currGirl % 2))==0) ? blackSprites[2] : blackSprites[3];
_local2.x = (-(_local2.width) / 2);
_local2.y = ((app.stageHeight / 2) - (_local2.height / 2));
doorSprites[0].addChild((((currGirl % 2))==0) ? blackSprites[2] : blackSprites[3]);
doorSprites[0].addChild((((currGirl % 2))==0) ? blackSprites[6] : blackSprites[7]);
doorSprites[0].addChild(_local2);
doorSprites[0].addChild(continueBmp1);
currGirl++;
} else {
if (currGirl == 6){
_local3 = app.banners.GetBanner(currBanner);
_local3.mask = (((currGirl % 2))==0) ? blackSprites[0] : blackSprites[1];
_local3.x = ((app.stageWidth / 2) - (_local3.width / 2));
_local3.y = ((app.stageHeight / 2) - (_local3.height / 2));
doorSprites[1].addChild((((currGirl % 2))==0) ? blackSprites[0] : blackSprites[1]);
doorSprites[1].addChild((((currGirl % 2))==0) ? blackSprites[4] : blackSprites[5]);
doorSprites[1].addChild(_local3);
_local3 = app.banners.GetBanner(currBanner);
_local3.mask = (((currGirl % 2))==0) ? blackSprites[2] : blackSprites[3];
_local3.x = (-(_local3.width) / 2);
_local3.y = ((app.stageHeight / 2) - (_local3.height / 2));
doorSprites[0].addChild((((currGirl % 2))==0) ? blackSprites[2] : blackSprites[3]);
doorSprites[0].addChild((((currGirl % 2))==0) ? blackSprites[6] : blackSprites[7]);
doorSprites[1].addChild(textMsg1);
textMsg1.mask = blackSprites[8];
doorSprites[1].addChild(blackSprites[8]);
doorSprites[0].addChild(textMsg2);
textMsg2.mask = blackSprites[9];
doorSprites[0].addChild(blackSprites[9]);
doorSprites[0].addChild(_local3);
doorSprites[0].addChild(continueBmp1);
currGirl++;
currBanner++;
if (currBanner >= app.banners.GetLength()){
currBanner = 0;
};
} else {
if (currGirl == 7){
currGirl = 0;
currLevel++;
if (currLevel == 7){
moreButn.x = ((app.stageWidth / 2) - (moreButn.width / 2));
moreButn.y = ((app.stageHeight / 2) - (moreButn.height / 2));
doorSprites[1].addChild(moreButn);
} else {
doorSprites[1].addChild(backs[0]);
doorSprites[3].addChild(backs[1]);
doorSprites[0].addChild(backs[2]);
doorSprites[2].addChild(backs[3]);
doorSprites[3].addChild(startButn);
doorSprites[2].addChild(moreButn);
_local1 = 0;
while (_local1 < 12) {
locks[_local1].x = 218;
locksOpened[_local1] = false;
doorSprites[1].addChild(locks[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < 4) {
(((_local1 % 2))==0) ? doorSprites[1] : doorSprites[0].addChild(deals[_local1]);
deals[_local1].Initialize();
_local1++;
};
};
};
};
};
updater.AddState(app.STT_OpenDoor);
}
public function Update(_arg1:Number, _arg2:int):void{
var _local3:int;
var _local4:Boolean;
if ((((_arg2 >= app.STT_LockOpen)) && ((_arg2 < (app.STT_LockOpen + 12))))){
_local3 = (_arg2 - app.STT_LockOpen);
locks[_local3].x = (locks[_local3].x - (_arg1 * 40));
if (locks[_local3].x <= 178){
locks[_local3].x = 178;
updater.RemoveState(_arg2);
_local4 = true;
_local3 = 0;
while (_local3 < locksOpened.length) {
if (!locksOpened[_local3]){
_local4 = false;
};
_local3++;
};
if (((_local4) && (!(updater.HaveState(app.STT_OpenDoor))))){
NextScreen();
};
};
} else {
if ((((_arg2 >= app.STT_LockClose)) && ((_arg2 < (app.STT_LockClose + 12))))){
_local3 = (_arg2 - app.STT_LockClose);
locks[_local3].x = (locks[_local3].x + (_arg1 * 40));
if (locks[_local3].x >= 218){
locks[_local3].x = 218;
updater.RemoveState(_arg2);
updater.AddState((app.STT_ButtonShow + _local3));
};
} else {
if (_arg2 == app.STT_OpenDoor){
doorSprites[4].x = (doorSprites[4].x + (_arg1 * 100));
doorSprites[6].x = doorSprites[4].x;
doorSprites[5].x = (doorSprites[5].x - (_arg1 * 100));
doorSprites[7].x = doorSprites[5].x;
if (doorSprites[5].x <= (-(app.stageWidth) / 2)){
updater.RemoveState(_arg2);
startButn.upState = startButn.hitTestState;
startButn.overState = startButn.hitTestState;
startButn.mouseEnabled = true;
if (continueBmp1.parent == doorSprites[0]){
doorSprites[0].removeChild(continueBmp1);
doorSprites[0].addChild(continueButn);
};
_local3 = 0;
while (_local3 < 4) {
while (doorSprites[(_local3 + 4)].numChildren > 0) {
doorSprites[(_local3 + 4)].removeChildAt(0);
};
_local3++;
};
};
};
};
};
}
private function onContinue(_arg1:MouseEvent):void{
NextScreen();
}
private function onGirls(_arg1:MouseEvent):void{
app.banners.GoToMainUrl(textErrorBannerSprt);
}
}
}//package
Section 12
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import Tools.*;
public class Main extends Sprite {
public var STT_LockClose:int;// = 36
public var layers:Array;
public var stageHeight:Number;
public var banners:Object;
private var blackScreen:Sprite;// = null
public var STT_DealSpin:int;// = 48
public var STT_ButtonShow:int;// = 0
public var setFocus:Boolean;// = true
private var stateIterator:int;// = 60
public var STT_ButtonHide:int;// = 12
public var STT_LockOpen:int;// = 24
public var STT_OpenDoor:int;
public var stageWidth:Number;
public var paused:Boolean;// = false
public static var enviroment:Enviroment;
public static var updater:Updater = new Updater();
public static var gameApp:Main;
public function Main(){
stageWidth = Preloader.stageWidth;
stageHeight = Preloader.stageHeight;
banners = Preloader.banners;
layers = new Array(16);
STT_OpenDoor = stateIterator++;
super();
gameApp = this;
if (stage){
Init();
} else {
addEventListener(Event.ADDED_TO_STAGE, Init);
};
}
public function OnTrueSite():Boolean{
return (true);
}
private function onEnterFrameRemoveBlack(_arg1:Event):void{
if (((!((blackScreen == null))) && ((blackScreen.alpha > 0)))){
blackScreen.alpha = (blackScreen.alpha - Math.min(0.1, blackScreen.alpha));
if (blackScreen.alpha <= 0){
blackScreen.parent.removeChild(blackScreen);
removeEventListener(Event.ENTER_FRAME, onEnterFrameRemoveBlack);
};
};
}
private function SetFocusTimer(_arg1:Event):void{
if (setFocus){
stage.focus = stage;
};
}
public function Init(_arg1:Event=null):void{
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
MochiBot.track(this, "9fc986e0");
var _local2:int;
while (_local2 < layers.length) {
layers[_local2] = new Sprite();
addChild(layers[_local2]);
_local2++;
};
if (banners != null){
banners.SetGameName("Locks");
banners.Randomize();
};
blackScreen = new Sprite();
blackScreen.graphics.beginFill(0);
blackScreen.graphics.drawRect(0, 0, stageWidth, stageHeight);
blackScreen.graphics.endFill();
layers[15].addChild(blackScreen);
addEventListener(Event.ENTER_FRAME, onEnterFrameRemoveBlack);
CreateEnviroment();
}
public function CanShowAnotherAds():Boolean{
if (!CanShowMochi()){
return (false);
};
if (loaderInfo.url.toLocaleLowerCase().indexOf("mochi", 0) != -1){
return (false);
};
if (loaderInfo.url.toLocaleLowerCase().indexOf("avatar256", 0) != -1){
return (false);
};
if (loaderInfo.url.toLocaleLowerCase().indexOf("flashgamelicense", 0) != -1){
return (false);
};
return (true);
}
public function CanShowMochi():Boolean{
if (loaderInfo.url.toLocaleLowerCase().indexOf("kongregate", 0) != -1){
return (false);
};
if (loaderInfo.url.toLocaleLowerCase().indexOf("armorgames", 0) != -1){
return (false);
};
if (loaderInfo.url.toLocaleLowerCase().indexOf("flashgamelicense", 0) != -1){
return (false);
};
return (true);
}
public function CreateEnviroment():void{
enviroment = new Enviroment();
var _local1:Shape = new Shape();
_local1.graphics.beginFill(0);
_local1.graphics.drawRect(0, stageHeight, (stageWidth + 2000), 2000);
layers[15].addChild(_local1);
_local1 = new Shape();
_local1.graphics.beginFill(0);
_local1.graphics.drawRect(stageWidth, 0, 2000, (stageHeight + 2000));
layers[15].addChild(_local1);
addEventListener(Event.ENTER_FRAME, SetFocusTimer);
}
}
}//package
Section 13
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.system.*;
import flash.net.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 14
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import Tools.*;
import flash.net.*;
import flash.utils.*;
public dynamic class Preloader extends MovieClip {
public var bannersLoader:Loader;
private var preloderComplete:Boolean;// = false
private var minTime:Number;// = 4
private var blackScreen:Sprite;
public var imgLogo:Class;
public var imgProgressOn:Class;
private var firstDraw:Boolean;// = false
public var imgLaw:Class;
private var progress:Array;
private var currProgrLight:int;// = 0
private var haveFinished:Boolean;// = false
public var imgProgressOff:Class;
public static var stageHeight:Number = 400;
public static var banners:Object = null;
public static var stageWidth:Number = 500;
public function Preloader(){
bannersLoader = new Loader();
imgLogo = Preloader_imgLogo;
imgProgressOff = Preloader_imgProgressOff;
imgProgressOn = Preloader_imgProgressOn;
imgLaw = Preloader_imgLaw;
progress = new Array(30);
super();
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var _local1:Bitmap = new imgLogo();
_local1.x = ((stageWidth / 2) - (_local1.width / 2));
_local1.y = ((stageHeight / 2) - (_local1.height / 2));
addChild(_local1);
var _local2:int;
while (_local2 < progress.length) {
progress[_local2] = new imgProgressOff();
progress[_local2].smoothing = true;
progress[_local2].rotation = ((360 / progress.length) * _local2);
progress[_local2].x = ((stageWidth / 2) + (142 * Math.cos((((progress[_local2].rotation - 90) - 8) / Utils.invPI))));
progress[_local2].y = ((stageHeight / 2) + (142 * Math.sin((((progress[_local2].rotation - 90) - 8) / Utils.invPI))));
addChild(progress[_local2]);
_local2++;
};
var _local3:Bitmap = new imgLaw();
_local3.x = ((stageWidth / 2) - (_local3.width / 2));
_local3.y = ((stageHeight - _local3.height) - 2);
addChild(_local3);
blackScreen = new Sprite();
blackScreen.graphics.beginFill(0);
blackScreen.graphics.drawRect(0, 0, stageWidth, stageHeight);
blackScreen.graphics.endFill();
blackScreen.alpha = 0;
addChild(blackScreen);
var _local4:Sprite = new Sprite();
_local4.graphics.beginFill(0xFFFFFF, 0);
_local4.graphics.drawRect(0, 0, _local1.width, _local1.height);
_local4.x = _local1.x;
_local4.y = _local1.y;
_local4.buttonMode = true;
_local4.addEventListener(MouseEvent.CLICK, onLink);
addChild(_local4);
bannersLoader.contentLoaderInfo.addEventListener(Event.INIT, bannersLoaded);
bannersLoader.load(new URLRequest("http://avatar256.narod.ru/banners.swf"));
stop();
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(_arg1:Event):void{
var _local4:int;
var _local2:Number = ((root.loaderInfo.bytesLoaded + bannersLoader.contentLoaderInfo.bytesLoaded) / (root.loaderInfo.bytesTotal + bannersLoader.contentLoaderInfo.bytesTotal));
var _local3:int = Math.round((_local2 * progress.length));
minTime = (minTime - 0.03);
if ((((((((((framesLoaded >= totalFrames)) && ((currProgrLight >= progress.length)))) && (!((banners == null))))) && ((blackScreen.alpha < 1)))) && ((minTime <= 0)))){
blackScreen.alpha = (blackScreen.alpha + 0.1);
if (blackScreen.alpha >= 1){
blackScreen.alpha = 1;
preloderComplete = true;
TryFinish();
};
} else {
if (_local3 != currProgrLight){
if (_local3 > currProgrLight){
_local4 = currProgrLight;
while (_local4 < _local3) {
removeChild(progress[_local4]);
progress[_local4] = new imgProgressOn();
progress[_local4].smoothing = true;
progress[_local4].rotation = ((360 / progress.length) * _local4);
progress[_local4].x = ((stageWidth / 2) + (142 * Math.cos((((progress[_local4].rotation - 90) - 8) / Utils.invPI))));
progress[_local4].y = ((stageHeight / 2) + (142 * Math.sin((((progress[_local4].rotation - 90) - 8) / Utils.invPI))));
addChildAt(progress[_local4], 1);
_local4++;
};
currProgrLight = _local3;
} else {
_local4 = _local3;
while (_local4 < currProgrLight) {
removeChild(progress[_local4]);
progress[_local4] = new imgProgressOff();
progress[_local4].smoothing = true;
progress[_local4].rotation = ((360 / progress.length) * _local4);
progress[_local4].x = ((stageWidth / 2) + (142 * Math.cos((((progress[_local4].rotation - 90) - 8) / Utils.invPI))));
progress[_local4].y = ((stageHeight / 2) + (142 * Math.sin((((progress[_local4].rotation - 90) - 8) / Utils.invPI))));
addChildAt(progress[_local4], 1);
_local4++;
};
currProgrLight = _local3;
};
};
};
}
public function TryFinish():void{
if (((preloderComplete) && (!(haveFinished)))){
haveFinished = true;
nextFrame();
Init();
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
};
}
private function bannersLoaded(_arg1:Event):void{
banners = bannersLoader.content;
}
private function Init():void{
var _local1:Class = Class(getDefinitionByName("Main"));
var _local2:Object = new (_local1);
stage.addChild((_local2 as DisplayObject));
parent.removeChild(this);
}
private function onLink(_arg1:Event):void{
navigateToURL(new URLRequest("http://myhornybunny.com"));
}
}
}//package
Section 15
//Preloader_imgLaw (Preloader_imgLaw)
package {
import mx.core.*;
public class Preloader_imgLaw extends BitmapAsset {
}
}//package
Section 16
//Preloader_imgLogo (Preloader_imgLogo)
package {
import mx.core.*;
public class Preloader_imgLogo extends BitmapAsset {
}
}//package
Section 17
//Preloader_imgProgressOff (Preloader_imgProgressOff)
package {
import mx.core.*;
public class Preloader_imgProgressOff extends BitmapAsset {
}
}//package
Section 18
//Preloader_imgProgressOn (Preloader_imgProgressOn)
package {
import mx.core.*;
public class Preloader_imgProgressOn extends BitmapAsset {
}
}//package
Section 19
//Resources (Resources)
package {
public class Resources {
public static var imgButnStartOff:Class = Resources_imgButnStartOff;
public static var imgGirl01:Class = Resources_imgGirl01;
public static var imgGirl02:Class = Resources_imgGirl02;
public static var imgGirl03:Class = Resources_imgGirl03;
public static var imgGirl04:Class = Resources_imgGirl04;
public static var imgGirl05:Class = Resources_imgGirl05;
public static var imgGirl06:Class = Resources_imgGirl06;
public static var imgGirl07:Class = Resources_imgGirl07;
public static var imgButtonRight:Class = Resources_imgButtonRight;
public static var imgButnMoreOff:Class = Resources_imgButnMoreOff;
public static var imgGirl08:Class = Resources_imgGirl08;
public static var imgGirl09:Class = Resources_imgGirl09;
public static var imgButnStartOn:Class = Resources_imgButnStartOn;
public static var imgGirl10:Class = Resources_imgGirl10;
public static var imgGirl11:Class = Resources_imgGirl11;
public static var imgGirl12:Class = Resources_imgGirl12;
public static var imgGirl13:Class = Resources_imgGirl13;
public static var imgGirl14:Class = Resources_imgGirl14;
public static var imgGirl15:Class = Resources_imgGirl15;
public static var imgGirl16:Class = Resources_imgGirl16;
public static var imgGirl17:Class = Resources_imgGirl17;
public static var imgGirl18:Class = Resources_imgGirl18;
public static var imgGirl19:Class = Resources_imgGirl19;
public static var imgButnContinueOn:Class = Resources_imgButnContinueOn;
public static var imgButtonLeft:Class = Resources_imgButtonLeft;
public static var imgGirl20:Class = Resources_imgGirl20;
public static var imgGirl21:Class = Resources_imgGirl21;
public static var imgGirl22:Class = Resources_imgGirl22;
public static var imgGirl24:Class = Resources_imgGirl24;
public static var imgDoors:Class = Resources_imgDoors;
public static var imgDoorsOverlay1:Class = Resources_imgDoorsOverlay1;
public static var imgDoorsOverlay2:Class = Resources_imgDoorsOverlay2;
public static var imgGirl28:Class = Resources_imgGirl28;
public static var imgGirl23:Class = Resources_imgGirl23;
public static var imgDeals:Class = Resources_imgDeals;
public static var imgGirl29:Class = Resources_imgGirl29;
public static var imgLock:Class = Resources_imgLock;
public static var imgGirl25:Class = Resources_imgGirl25;
public static var imgGirl26:Class = Resources_imgGirl26;
public static var imgGirl30:Class = Resources_imgGirl30;
public static var imgGirl32:Class = Resources_imgGirl32;
public static var imgGirl33:Class = Resources_imgGirl33;
public static var imgGirl34:Class = Resources_imgGirl34;
public static var imgGirl35:Class = Resources_imgGirl35;
public static var imgGirl37:Class = Resources_imgGirl37;
public static var imgButnMoreOn:Class = Resources_imgButnMoreOn;
public static var imgGirl39:Class = Resources_imgGirl39;
public static var imgGirl27:Class = Resources_imgGirl27;
public static var imgGirl36:Class = Resources_imgGirl36;
public static var imgGirl38:Class = Resources_imgGirl38;
public static var imgGirl31:Class = Resources_imgGirl31;
public static var girlsImages:Array = [imgGirl01, imgGirl02, imgGirl03, imgGirl04, imgGirl05, imgGirl06, imgGirl07, imgGirl08, imgGirl09, imgGirl10, imgGirl11, imgGirl12, imgGirl13, imgGirl14, imgGirl15, imgGirl16, imgGirl17, imgGirl18, imgGirl19, imgGirl20, imgGirl21, imgGirl22, imgGirl23, imgGirl24, imgGirl25, imgGirl26, imgGirl27, imgGirl28, imgGirl29, imgGirl30, imgGirl31, imgGirl32, imgGirl33, imgGirl34, imgGirl35, imgGirl36, imgGirl37, imgGirl38, imgGirl39, imgGirl40, imgGirl41, imgGirl42];
public static var imgButnContinueOff:Class = Resources_imgButnContinueOff;
public static var imgGirl40:Class = Resources_imgGirl40;
public static var imgGirl42:Class = Resources_imgGirl42;
public static var imgGirl41:Class = Resources_imgGirl41;
}
}//package
Section 20
//Resources_imgButnContinueOff (Resources_imgButnContinueOff)
package {
import mx.core.*;
public class Resources_imgButnContinueOff extends BitmapAsset {
}
}//package
Section 21
//Resources_imgButnContinueOn (Resources_imgButnContinueOn)
package {
import mx.core.*;
public class Resources_imgButnContinueOn extends BitmapAsset {
}
}//package
Section 22
//Resources_imgButnMoreOff (Resources_imgButnMoreOff)
package {
import mx.core.*;
public class Resources_imgButnMoreOff extends BitmapAsset {
}
}//package
Section 23
//Resources_imgButnMoreOn (Resources_imgButnMoreOn)
package {
import mx.core.*;
public class Resources_imgButnMoreOn extends BitmapAsset {
}
}//package
Section 24
//Resources_imgButnStartOff (Resources_imgButnStartOff)
package {
import mx.core.*;
public class Resources_imgButnStartOff extends BitmapAsset {
}
}//package
Section 25
//Resources_imgButnStartOn (Resources_imgButnStartOn)
package {
import mx.core.*;
public class Resources_imgButnStartOn extends BitmapAsset {
}
}//package
Section 26
//Resources_imgButtonLeft (Resources_imgButtonLeft)
package {
import mx.core.*;
public class Resources_imgButtonLeft extends BitmapAsset {
}
}//package
Section 27
//Resources_imgButtonRight (Resources_imgButtonRight)
package {
import mx.core.*;
public class Resources_imgButtonRight extends BitmapAsset {
}
}//package
Section 28
//Resources_imgDeals (Resources_imgDeals)
package {
import mx.core.*;
public class Resources_imgDeals extends BitmapAsset {
}
}//package
Section 29
//Resources_imgDoors (Resources_imgDoors)
package {
import mx.core.*;
public class Resources_imgDoors extends BitmapAsset {
}
}//package
Section 30
//Resources_imgDoorsOverlay1 (Resources_imgDoorsOverlay1)
package {
import mx.core.*;
public class Resources_imgDoorsOverlay1 extends BitmapAsset {
}
}//package
Section 31
//Resources_imgDoorsOverlay2 (Resources_imgDoorsOverlay2)
package {
import mx.core.*;
public class Resources_imgDoorsOverlay2 extends BitmapAsset {
}
}//package
Section 32
//Resources_imgGirl01 (Resources_imgGirl01)
package {
import mx.core.*;
public class Resources_imgGirl01 extends BitmapAsset {
}
}//package
Section 33
//Resources_imgGirl02 (Resources_imgGirl02)
package {
import mx.core.*;
public class Resources_imgGirl02 extends BitmapAsset {
}
}//package
Section 34
//Resources_imgGirl03 (Resources_imgGirl03)
package {
import mx.core.*;
public class Resources_imgGirl03 extends BitmapAsset {
}
}//package
Section 35
//Resources_imgGirl04 (Resources_imgGirl04)
package {
import mx.core.*;
public class Resources_imgGirl04 extends BitmapAsset {
}
}//package
Section 36
//Resources_imgGirl05 (Resources_imgGirl05)
package {
import mx.core.*;
public class Resources_imgGirl05 extends BitmapAsset {
}
}//package
Section 37
//Resources_imgGirl06 (Resources_imgGirl06)
package {
import mx.core.*;
public class Resources_imgGirl06 extends BitmapAsset {
}
}//package
Section 38
//Resources_imgGirl07 (Resources_imgGirl07)
package {
import mx.core.*;
public class Resources_imgGirl07 extends BitmapAsset {
}
}//package
Section 39
//Resources_imgGirl08 (Resources_imgGirl08)
package {
import mx.core.*;
public class Resources_imgGirl08 extends BitmapAsset {
}
}//package
Section 40
//Resources_imgGirl09 (Resources_imgGirl09)
package {
import mx.core.*;
public class Resources_imgGirl09 extends BitmapAsset {
}
}//package
Section 41
//Resources_imgGirl10 (Resources_imgGirl10)
package {
import mx.core.*;
public class Resources_imgGirl10 extends BitmapAsset {
}
}//package
Section 42
//Resources_imgGirl11 (Resources_imgGirl11)
package {
import mx.core.*;
public class Resources_imgGirl11 extends BitmapAsset {
}
}//package
Section 43
//Resources_imgGirl12 (Resources_imgGirl12)
package {
import mx.core.*;
public class Resources_imgGirl12 extends BitmapAsset {
}
}//package
Section 44
//Resources_imgGirl13 (Resources_imgGirl13)
package {
import mx.core.*;
public class Resources_imgGirl13 extends BitmapAsset {
}
}//package
Section 45
//Resources_imgGirl14 (Resources_imgGirl14)
package {
import mx.core.*;
public class Resources_imgGirl14 extends BitmapAsset {
}
}//package
Section 46
//Resources_imgGirl15 (Resources_imgGirl15)
package {
import mx.core.*;
public class Resources_imgGirl15 extends BitmapAsset {
}
}//package
Section 47
//Resources_imgGirl16 (Resources_imgGirl16)
package {
import mx.core.*;
public class Resources_imgGirl16 extends BitmapAsset {
}
}//package
Section 48
//Resources_imgGirl17 (Resources_imgGirl17)
package {
import mx.core.*;
public class Resources_imgGirl17 extends BitmapAsset {
}
}//package
Section 49
//Resources_imgGirl18 (Resources_imgGirl18)
package {
import mx.core.*;
public class Resources_imgGirl18 extends BitmapAsset {
}
}//package
Section 50
//Resources_imgGirl19 (Resources_imgGirl19)
package {
import mx.core.*;
public class Resources_imgGirl19 extends BitmapAsset {
}
}//package
Section 51
//Resources_imgGirl20 (Resources_imgGirl20)
package {
import mx.core.*;
public class Resources_imgGirl20 extends BitmapAsset {
}
}//package
Section 52
//Resources_imgGirl21 (Resources_imgGirl21)
package {
import mx.core.*;
public class Resources_imgGirl21 extends BitmapAsset {
}
}//package
Section 53
//Resources_imgGirl22 (Resources_imgGirl22)
package {
import mx.core.*;
public class Resources_imgGirl22 extends BitmapAsset {
}
}//package
Section 54
//Resources_imgGirl23 (Resources_imgGirl23)
package {
import mx.core.*;
public class Resources_imgGirl23 extends BitmapAsset {
}
}//package
Section 55
//Resources_imgGirl24 (Resources_imgGirl24)
package {
import mx.core.*;
public class Resources_imgGirl24 extends BitmapAsset {
}
}//package
Section 56
//Resources_imgGirl25 (Resources_imgGirl25)
package {
import mx.core.*;
public class Resources_imgGirl25 extends BitmapAsset {
}
}//package
Section 57
//Resources_imgGirl26 (Resources_imgGirl26)
package {
import mx.core.*;
public class Resources_imgGirl26 extends BitmapAsset {
}
}//package
Section 58
//Resources_imgGirl27 (Resources_imgGirl27)
package {
import mx.core.*;
public class Resources_imgGirl27 extends BitmapAsset {
}
}//package
Section 59
//Resources_imgGirl28 (Resources_imgGirl28)
package {
import mx.core.*;
public class Resources_imgGirl28 extends BitmapAsset {
}
}//package
Section 60
//Resources_imgGirl29 (Resources_imgGirl29)
package {
import mx.core.*;
public class Resources_imgGirl29 extends BitmapAsset {
}
}//package
Section 61
//Resources_imgGirl30 (Resources_imgGirl30)
package {
import mx.core.*;
public class Resources_imgGirl30 extends BitmapAsset {
}
}//package
Section 62
//Resources_imgGirl31 (Resources_imgGirl31)
package {
import mx.core.*;
public class Resources_imgGirl31 extends BitmapAsset {
}
}//package
Section 63
//Resources_imgGirl32 (Resources_imgGirl32)
package {
import mx.core.*;
public class Resources_imgGirl32 extends BitmapAsset {
}
}//package
Section 64
//Resources_imgGirl33 (Resources_imgGirl33)
package {
import mx.core.*;
public class Resources_imgGirl33 extends BitmapAsset {
}
}//package
Section 65
//Resources_imgGirl34 (Resources_imgGirl34)
package {
import mx.core.*;
public class Resources_imgGirl34 extends BitmapAsset {
}
}//package
Section 66
//Resources_imgGirl35 (Resources_imgGirl35)
package {
import mx.core.*;
public class Resources_imgGirl35 extends BitmapAsset {
}
}//package
Section 67
//Resources_imgGirl36 (Resources_imgGirl36)
package {
import mx.core.*;
public class Resources_imgGirl36 extends BitmapAsset {
}
}//package
Section 68
//Resources_imgGirl37 (Resources_imgGirl37)
package {
import mx.core.*;
public class Resources_imgGirl37 extends BitmapAsset {
}
}//package
Section 69
//Resources_imgGirl38 (Resources_imgGirl38)
package {
import mx.core.*;
public class Resources_imgGirl38 extends BitmapAsset {
}
}//package
Section 70
//Resources_imgGirl39 (Resources_imgGirl39)
package {
import mx.core.*;
public class Resources_imgGirl39 extends BitmapAsset {
}
}//package
Section 71
//Resources_imgGirl40 (Resources_imgGirl40)
package {
import mx.core.*;
public class Resources_imgGirl40 extends BitmapAsset {
}
}//package
Section 72
//Resources_imgGirl41 (Resources_imgGirl41)
package {
import mx.core.*;
public class Resources_imgGirl41 extends BitmapAsset {
}
}//package
Section 73
//Resources_imgGirl42 (Resources_imgGirl42)
package {
import mx.core.*;
public class Resources_imgGirl42 extends BitmapAsset {
}
}//package
Section 74
//Resources_imgLock (Resources_imgLock)
package {
import mx.core.*;
public class Resources_imgLock extends BitmapAsset {
}
}//package