Section 1
//McModel (assets.scene.McModel)
package assets.scene {
import flash.display.*;
public dynamic class McModel extends MovieClip {
public var mcPart3:MovieClip;
public var mcPart4:MovieClip;
public var mcPart5:MovieClip;
public var mcPart6:MovieClip;
public var mcPart7:MovieClip;
public var mcPart8:MovieClip;
public var mcPart1:MovieClip;
public var mcPart2:MovieClip;
}
}//package assets.scene
Section 2
//McScene (assets.scene.McScene)
package assets.scene {
import flash.display.*;
public dynamic class McScene extends MovieClip {
public var mcBackground:MovieClip;
public var mcBgButtons:MovieClip;
public var mcCatPanels:MovieClip;
public var mcModel:McModel;
public var mcCatButtons:MovieClip;
public var mcControlPanel:McControlPanel;
}
}//package assets.scene
Section 3
//McIntro (assets.McIntro)
package assets {
import flash.display.*;
public dynamic class McIntro extends MovieClip {
}
}//package assets
Section 4
//Conveyor (common.commands.Conveyor)
package common.commands {
public class Conveyor {
private var _items:Array;
private var _active:Boolean;// = true
private var _currentItem:Object;
public function Conveyor(){
_items = [];
super();
}
public function get active():Boolean{
return (_active);
}
private function executeNext():void{
while (((_active) && ((_items.length > 0)))) {
_currentItem = _items.shift();
if ((_currentItem is IAsincCommand)){
IAsincCommand(_currentItem).completeEvent.addListener(onComplete);
IAsincCommand(_currentItem).execute();
break;
} else {
if ((_currentItem is Function)){
_currentItem();
_currentItem = null;
} else {
if ((_currentItem is ICommand)){
ICommand(_currentItem).execute();
_currentItem = null;
};
};
};
};
}
public function set active(_arg1:Boolean):void{
if (_active != _arg1){
_active = _arg1;
};
}
public function pushAction(_arg1:Object):void{
if ((((_arg1 is Function)) || ((_arg1 is ICommand)))){
_items.push(_arg1);
} else {
throw (new ArgumentError());
};
checkForExecute();
}
private function checkForExecute():void{
if (((_active) && (!(_currentItem)))){
executeNext();
};
}
private function onComplete():void{
resetCurrentItem();
executeNext();
}
private function resetCurrentItem():void{
IAsincCommand(_currentItem).completeEvent.removeListener(onComplete);
_currentItem = null;
}
public function dispose():void{
if ((_currentItem is ICancelableCommand)){
ICancelableCommand(_currentItem).cancel();
};
if ((_currentItem is IAsincCommand)){
resetCurrentItem();
};
_items = null;
}
}
}//package common.commands
Section 5
//IAsincCommand (common.commands.IAsincCommand)
package common.commands {
import common.events.*;
public interface IAsincCommand extends ICommand {
function get completeEvent():EventSender;
}
}//package common.commands
Section 6
//ICancelableCommand (common.commands.ICancelableCommand)
package common.commands {
public interface ICancelableCommand extends IAsincCommand {
function cancel():void;
}
}//package common.commands
Section 7
//ICommand (common.commands.ICommand)
package common.commands {
public interface ICommand {
function execute():void;
}
}//package common.commands
Section 8
//IRequirement (common.comparing.IRequirement)
package common.comparing {
public interface IRequirement {
function accept(_arg1:Object):Boolean;
}
}//package common.comparing
Section 9
//MultipleFramesRequirement (common.comparing.MultipleFramesRequirement)
package common.comparing {
import flash.display.*;
public class MultipleFramesRequirement implements IRequirement {
public function accept(_arg1:Object):Boolean{
return ((((_arg1 is MovieClip)) && ((MovieClip(_arg1).totalFrames > 1))));
}
}
}//package common.comparing
Section 10
//NameRequirement (common.comparing.NameRequirement)
package common.comparing {
public class NameRequirement implements IRequirement {
private var _value:String;
private var _property:String;
private var _isPrefix:Boolean;
public function NameRequirement(_arg1:String, _arg2:Boolean=false){
_property = "name";
_value = _arg1;
_isPrefix = _arg2;
}
public function accept(_arg1:Object):Boolean{
if (_isPrefix){
return (((((_arg1) && (_arg1.hasOwnProperty(_property)))) && ((String(_arg1[_property]).indexOf(_value) == 0))));
};
return (((((_arg1) && (_arg1.hasOwnProperty(_property)))) && ((_arg1[_property] == _value))));
}
}
}//package common.comparing
Section 11
//PropertyRequirement (common.comparing.PropertyRequirement)
package common.comparing {
public class PropertyRequirement implements IRequirement {
private var _value:Object;
private var _path:Array;
public function PropertyRequirement(_arg1:String, _arg2:Object){
_path = _arg1.split(".");
_value = _arg2;
}
public function accept(_arg1:Object):Boolean{
var _local3:String;
if (!_arg1){
return (false);
};
var _local2:Object = _arg1;
for each (_local3 in _path) {
if (((_local2) && (_local2.hasOwnProperty(_local3)))){
_local2 = _local2[_local3];
} else {
return (false);
};
};
return ((_local2 == _value));
}
}
}//package common.comparing
Section 12
//TypeRequirement (common.comparing.TypeRequirement)
package common.comparing {
public class TypeRequirement implements IRequirement {
private var _type:Class;
public function TypeRequirement(_arg1:Class){
_type = _arg1;
}
public function accept(_arg1:Object):Boolean{
return ((_arg1 is _type));
}
}
}//package common.comparing
Section 13
//ConstructorConverter (common.converting.ConstructorConverter)
package common.converting {
public class ConstructorConverter implements IConverter {
private var _constructor:Class;
public function ConstructorConverter(_arg1:Class){
_constructor = _arg1;
}
public function convert(_arg1:Object):Object{
return (new _constructor(_arg1));
}
}
}//package common.converting
Section 14
//IConverter (common.converting.IConverter)
package common.converting {
public interface IConverter {
function convert(_arg1:Object):Object;
}
}//package common.converting
Section 15
//EventManager (common.events.EventManager)
package common.events {
import flash.events.*;
public class EventManager {
private var _listeners:Array;
private var _nativeListeners:Array;
public function EventManager(){
_listeners = [];
_nativeListeners = [];
super();
}
private function getEventIndex(_arg1:EventSender, _arg2:Function):int{
var _local4:EventData;
var _local3:int;
while (_local3 < _listeners.length) {
_local4 = _listeners[_local3];
if ((((_local4.event == _arg1)) && ((_local4.handler == _arg2)))){
return (_local3);
};
_local3++;
};
return (-1);
}
public function unregisterNativeEvent(_arg1:EventDispatcher, _arg2:String, _arg3:Function, _arg4:Boolean=false):void{
var _local5:int = getNativeEventIndex(_arg1, _arg2, _arg3, _arg4);
if (_local5 == -1){
throw (new Error("Event is not registered"));
};
_arg1.removeEventListener(_arg2, _arg3, _arg4);
_nativeListeners.splice(_local5, 1);
}
public function registerEvent(_arg1:EventSender, _arg2:Function):void{
var _local3:int = getEventIndex(_arg1, _arg2);
if (_local3 >= 0){
throw (new Error("Event is already registered."));
};
_arg1.addListener(_arg2);
_listeners.push(new EventData(_arg1, _arg2));
}
public function registerNativeEvent(_arg1:EventDispatcher, _arg2:String, _arg3:Function, _arg4:Boolean=false):void{
var _local5:int = getNativeEventIndex(_arg1, _arg2, _arg3, _arg4);
if (_local5 >= 0){
throw (new Error("Event is already registered"));
};
_arg1.addEventListener(_arg2, _arg3, _arg4);
_nativeListeners.push(new NativeEventData(_arg1, _arg2, _arg3, _arg4));
}
private function getNativeEventIndex(_arg1:EventDispatcher, _arg2:String, _arg3:Function, _arg4:Boolean):int{
var _local6:NativeEventData;
var _local5:int;
while (_local5 < _nativeListeners.length) {
_local6 = _nativeListeners[_local5];
if ((((((((_local6.object == _arg1)) && ((_local6.type == _arg2)))) && ((_local6.listener == _arg3)))) && ((_local6.useCapture == _arg4)))){
return (_local5);
};
_local5++;
};
return (-1);
}
public function clearEvents():void{
var _local1:EventData;
var _local2:NativeEventData;
for each (_local1 in _listeners) {
_local1.event.removeListener(_local1.handler);
};
_listeners = [];
for each (_local2 in _nativeListeners) {
_local2.object.removeEventListener(_local2.type, _local2.listener, _local2.useCapture);
};
_nativeListeners = [];
}
public function unregisterEvent(_arg1:EventSender, _arg2:Function):void{
var _local3:int = getEventIndex(_arg1, _arg2);
if (_local3 == -1){
throw (new Error("Event is not registered"));
};
_arg1.removeListener(_arg2);
_listeners.splice(_local3, 1);
}
}
}//package common.events
import flash.events.*;
class EventData {
public var handler:Function;
public var event:EventSender;
private function EventData(_arg1:EventSender, _arg2:Function):void{
this.event = _arg1;
this.handler = _arg2;
}
}
class NativeEventData {
public var listener:Function;
public var useCapture:Boolean;
public var type:String;
public var object:EventDispatcher;
private function NativeEventData(_arg1:EventDispatcher, _arg2:String, _arg3:Function, _arg4:Boolean):void{
this.object = _arg1;
this.type = _arg2;
this.listener = _arg3;
this.useCapture = _arg4;
}
}
Section 16
//EventSender (common.events.EventSender)
package common.events {
public class EventSender {
private var _listeners:Array;
private var _sender:Object;
public function EventSender(_arg1:Object){
_listeners = [];
super();
_sender = _arg1;
}
public function sendEvent(_arg1=null):void{
var _local3:Function;
var _local2:Array = _listeners.slice();
for each (_local3 in _local2) {
if (_local3.length == 0){
_local3();
} else {
if (_local3.length == 1){
_local3(_sender);
} else {
if (_local3.length == 2){
_local3(_sender, _arg1);
} else {
throw (new ArgumentError("Incorrect number of arguments in handler"));
};
};
};
};
}
public function addListener(_arg1:Function):void{
if (hasListener(_arg1)){
throw (new Error("List already contains such listener"));
};
_listeners.push(_arg1);
}
public function hasListener(_arg1:Function):Boolean{
return ((_listeners.indexOf(_arg1) >= 0));
}
public function removeListener(_arg1:Function):void{
if (hasListener(_arg1)){
_listeners.splice(_listeners.indexOf(_arg1), 1);
} else {
throw (new Error("List doesn't contain such listener"));
};
}
}
}//package common.events
Section 17
//PlayIntroCommand (common.flash.commands.PlayIntroCommand)
package common.flash.commands {
import flash.display.*;
import common.commands.*;
import flash.events.*;
import common.events.*;
import common.utils.*;
public class PlayIntroCommand implements ICancelableCommand {
private var _completeEvent:EventSender;
public var allowSkip:Boolean;// = false
private var _container:Sprite;
public var clickTag:String;// = null
private var _focus:InteractiveObject;
private var _content:MovieClip;
private static const SKIP_CODE:int = 39;
public function PlayIntroCommand(_arg1:MovieClip, _arg2:Sprite){
_completeEvent = new EventSender(this);
super();
_content = _arg1;
_container = _arg2;
initialize();
}
public function get completeEvent():EventSender{
return (_completeEvent);
}
public function cancel():void{
stop();
}
private function stop():void{
_content.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
if (_focus){
_focus.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
_focus = null;
};
GraphUtil.stopAllChildren(_content);
GraphUtil.detachFromDisplay(_content);
}
private function onKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == SKIP_CODE){
stop();
_completeEvent.sendEvent();
};
}
private function initialize():void{
_content.mouseChildren = false;
_content.mouseEnabled = false;
_content.opaqueBackground = 0;
GraphUtil.stopAllChildren(_content);
}
private function onClick(_arg1:MouseEvent):void{
BrowserUtil.navigate(clickTag);
}
private function onEnterFrame(_arg1:Event):void{
if (_content.currentFrame == _content.totalFrames){
stop();
_completeEvent.sendEvent();
};
}
public function execute():void{
_container.addChild(_content);
_content.addEventListener(Event.ENTER_FRAME, onEnterFrame);
if (clickTag){
_content.mouseEnabled = true;
_content.useHandCursor = true;
_content.buttonMode = true;
_content.addEventListener(MouseEvent.CLICK, onClick);
};
if (allowSkip){
_focus = ((_content.stage) || (_content));
_focus.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
};
GraphUtil.playAllChildren(_content);
}
}
}//package common.flash.commands
Section 18
//CheckBox (common.flash.controls.CheckBox)
package common.flash.controls {
import flash.display.*;
import flash.events.*;
import common.events.*;
public class CheckBox {
private var _checked:Boolean;// = false
private var _enabled:Boolean;// = true
private var _clickEvent:EventSender;
private var _content:MovieClip;
public function CheckBox(_arg1:MovieClip){
_clickEvent = new EventSender(this);
super();
_content = _arg1;
initialize();
refresh();
}
public function get enabled():Boolean{
return (_enabled);
}
public function get checked():Boolean{
return (_checked);
}
public function set checked(_arg1:Boolean):void{
if (_checked != _arg1){
_checked = _arg1;
refresh();
};
}
private function onMouseClick(_arg1:MouseEvent):void{
checked = !(checked);
_clickEvent.sendEvent();
}
public function get clickEvent():EventSender{
return (_clickEvent);
}
public function set enabled(_arg1:Boolean):void{
if (_enabled != _arg1){
_enabled = _arg1;
refresh();
};
}
private function initialize():void{
_content.addEventListener(MouseEvent.CLICK, onMouseClick);
}
private function refresh():void{
_content.mouseEnabled = _enabled;
_content.mouseChildren = _enabled;
_content.useHandCursor = _enabled;
_content.buttonMode = _enabled;
if (_checked){
_content.gotoAndStop(2);
} else {
_content.gotoAndStop(1);
};
}
}
}//package common.flash.controls
Section 19
//RadioGroup (common.flash.controls.RadioGroup)
package common.flash.controls {
import common.events.*;
public class RadioGroup {
private var _items:Array;
private var _selectedItem:CheckBox;// = null
private var _clickEvent:EventSender;
public function RadioGroup(_arg1:Array){
_items = [];
_clickEvent = new EventSender(this);
super();
_items = _arg1;
initialize();
}
public function get buttons():Array{
return (_items);
}
private function setSelection(_arg1:CheckBox):void{
if (_selectedItem){
_selectedItem.checked = false;
_selectedItem.enabled = true;
};
_selectedItem = _arg1;
if (_selectedItem){
_selectedItem.checked = true;
_selectedItem.enabled = false;
};
}
public function get selectedItem():CheckBox{
return (_selectedItem);
}
private function initialize():void{
var _local1:CheckBox;
for each (_local1 in _items) {
_local1.clickEvent.addListener(onButtonClick);
};
}
public function get clickEvent():EventSender{
return (_clickEvent);
}
public function set selectedIndex(_arg1:int):void{
selectedItem = _items[_arg1];
}
private function onButtonClick(_arg1:CheckBox):void{
selectedItem = _arg1;
_clickEvent.sendEvent();
}
public function set selectedItem(_arg1:CheckBox):void{
if (_selectedItem != _arg1){
setSelection(_arg1);
};
}
public function get selectedIndex():int{
return (_items.indexOf(_selectedItem));
}
}
}//package common.flash.controls
Section 20
//ArrayUtil (common.utils.ArrayUtil)
package common.utils {
import common.converting.*;
import common.comparing.*;
public class ArrayUtil {
public static function getFirstRequired(_arg1:Object, _arg2:IRequirement):Object{
var _local4:Object;
var _local3:Object;
for each (_local4 in _arg1) {
if (_arg2.accept(_local4)){
_local3 = _local4;
break;
};
};
return (_local3);
}
public static function getByProperty(_arg1:Object, _arg2:String, _arg3:Object):Array{
return (getRequired(_arg1, new PropertyRequirement(_arg2, _arg3)));
}
public static function convert(_arg1:Object, _arg2:IConverter):Array{
var _local4:Object;
var _local3:Array = [];
for each (_local4 in _arg1) {
_local3.push(_arg2.convert(_local4));
};
return (_local3);
}
public static function getRequired(_arg1:Object, _arg2:IRequirement):Array{
var _local4:Object;
var _local3:Array = [];
for each (_local4 in _arg1) {
if (_arg2.accept(_local4)){
_local3.push(_local4);
};
};
return (_local3);
}
public static function getFirstByProperty(_arg1:Object, _arg2:String, _arg3:Object):Object{
return (getFirstRequired(_arg1, new PropertyRequirement(_arg2, _arg3)));
}
public static function removeItem(_arg1:Array, _arg2:Object):void{
var _local3:int = _arg1.indexOf(_arg2);
if (_local3 >= 0){
_arg1.splice(_local3, 1);
};
}
public static function hasRequired(_arg1:Object, _arg2:IRequirement):Object{
return (Boolean(getFirstRequired(_arg1, _arg2)));
}
public static function getRandomItem(_arg1:Array){
return (_arg1[int((Math.random() * _arg1.length))]);
}
public static function findByProperty(_arg1:Object, _arg2:String, _arg3:Object):Object{
return (getFirstRequired(_arg1, new PropertyRequirement(_arg2, _arg3)));
}
public static function getRandomItems(_arg1:Array, _arg2:int):Array{
var _local6:int;
var _local3:Array = [];
var _local4:Array = [];
var _local5:int;
while (_local5 < _arg2) {
_local6 = (Math.random() * _arg1.length);
while (_local4.indexOf(_local6) >= 0) {
_local6++;
if (_local6 == _arg1.length){
_local6 = 0;
};
};
_local3.push(_arg1[_local6]);
_local4.push(_local6);
_local5++;
};
return (_local3);
}
}
}//package common.utils
Section 21
//BrowserUtil (common.utils.BrowserUtil)
package common.utils {
import flash.external.*;
import flash.net.*;
public class BrowserUtil {
public static function navigate(_arg1:String, _arg2:String="_blank"):void{
var browser:String;
var url = _arg1;
var window = _arg2;
if (ExternalInterface.available){
try {
browser = (ExternalInterface.call("function getBrowser(){return navigator.userAgent}") as String);
if (((!((browser.indexOf("Firefox") == -1))) || (!((browser.indexOf("MSIE 7.0") == -1))))){
ExternalInterface.call((((("window.open(\"" + url) + "\",\"") + window) + "\")"));
} else {
navigateToURL(new URLRequest(url), window);
};
} catch(e:Error) {
navigateToURL(new URLRequest(url), window);
};
} else {
navigateToURL(new URLRequest(url), window);
};
}
}
}//package common.utils
Section 22
//GraphUtil (common.utils.GraphUtil)
package common.utils {
import flash.display.*;
import flash.geom.*;
import common.comparing.*;
import flash.text.*;
public class GraphUtil {
public static function alignCenter(_arg1:DisplayObject, _arg2:Rectangle):void{
var _local3:Rectangle = _arg1.getBounds(_arg1.parent);
_arg1.x = (_arg1.x + (((0.5 * (_arg2.left + _arg2.right)) - (0.5 * _local3.width)) - _local3.left));
_arg1.y = (_arg1.y + (((0.5 * (_arg2.top + _arg2.bottom)) - (0.5 * _local3.height)) - _local3.top));
}
public static function cacheChildrenAsBitmap(_arg1:DisplayObjectContainer):void{
var _local3:DisplayObject;
var _local4:Array;
var _local2:Array = getChildren(_arg1);
for each (_local3 in _local2) {
if ((_local3 is DisplayObjectContainer)){
_local4 = getAllChildren(_arg1, new MultipleFramesRequirement());
if (_local4.length == 0){
_local3.cacheAsBitmap = true;
} else {
if (((!((_local3 is MovieClip))) || ((MovieClip(_local3).totalFrames == 1)))){
cacheChildrenAsBitmap((_local3 as DisplayObjectContainer));
};
};
} else {
_local3.cacheAsBitmap = true;
};
};
}
public static function fromRGB(_arg1:uint, _arg2:uint, _arg3:uint):uint{
return ((((_arg1 << 16) | (_arg2 << 8)) | _arg3));
}
public static function attachBefore(_arg1:DisplayObject, _arg2:DisplayObject):void{
_arg2.parent.addChildAt(_arg1, _arg2.parent.getChildIndex(_arg2));
}
public static function setBtnEnabled(_arg1:InteractiveObject, _arg2:Boolean, _arg3:Number=0.5):void{
_arg1.mouseEnabled = _arg2;
if ((_arg1 is DisplayObjectContainer)){
DisplayObjectContainer(_arg1).mouseChildren = _arg2;
};
_arg1.alpha = (_arg2) ? 1 : _arg3;
}
public static function setScale(_arg1:DisplayObject, _arg2:Number):void{
_arg1.scaleX = (_arg1.scaleY = _arg2);
}
public static function addColor(_arg1:DisplayObject, _arg2:int):void{
var _local3:Object = toRGB(_arg2);
var _local4:ColorTransform = _arg1.transform.colorTransform;
_arg1.transform.colorTransform.redOffset = (_local4.redOffset + _local3.r);
_local4.greenOffset = (_local4.greenOffset + _local3.g);
_local4.blueOffset = (_local4.blueOffset + _local3.b);
_arg1.transform.colorTransform = _local4;
}
public static function getAllChildren(_arg1:DisplayObjectContainer, _arg2:IRequirement=null):Array{
var _local5:DisplayObject;
var _local3:Array = getChildren(_arg1);
var _local4:Array = [];
for each (_local5 in _local3) {
if ((((_arg2 == null)) || (_arg2.accept(_local5)))){
_local4.push(_local5);
};
if ((_local5 is DisplayObjectContainer)){
_local4 = _local4.concat(getAllChildren(DisplayObjectContainer(_local5), _arg2));
};
};
return (_local4);
}
public static function getPixel(_arg1:DisplayObject, _arg2:int, _arg3:int):int{
var _local4:BitmapData = new BitmapData(4, 4);
var _local5:Matrix = new Matrix();
_local5.tx = -(_arg2);
_local5.ty = -(_arg3);
_local4.draw(_arg1, _local5, _arg1.transform.colorTransform, _arg1.blendMode);
return (_local4.getPixel(1, 1));
}
public static function claimBounds(_arg1:DisplayObject, _arg2:Rectangle):void{
var _local3:Rectangle = _arg1.getBounds(_arg1.parent);
if (_local3.left < _arg2.left){
_arg1.x = (_arg1.x + (_arg2.left - _local3.left));
} else {
if (_local3.right > _arg2.right){
_arg1.x = (_arg1.x + (_arg2.right - _local3.right));
};
};
if (_local3.top < _arg2.top){
_arg1.y = (_arg1.y + (_arg2.top - _local3.top));
} else {
if (_local3.bottom > _arg2.bottom){
_arg1.y = (_arg1.y + (_arg2.bottom - _local3.bottom));
};
};
}
public static function toRGB(_arg1:uint):Object{
return ({r:(_arg1 >> 16), g:((_arg1 >> 8) & 0xFF), b:(_arg1 & 0xFF)});
}
public static function toPoint(_arg1:Object):Point{
return (new Point(_arg1.x, _arg1.y));
}
public static function attachAfter(_arg1:DisplayObject, _arg2:DisplayObject):void{
_arg2.parent.addChildAt(_arg1, (_arg2.parent.getChildIndex(_arg2) + 1));
}
public static function findObject(_arg1:DisplayObjectContainer, _arg2:IRequirement, _arg3:Boolean=true):DisplayObject{
if (_arg3){
return (getAllChildren(_arg1, _arg2)[0]);
};
return (getChildren(_arg1, _arg2)[0]);
}
public static function getChildrenBounds(_arg1:DisplayObjectContainer):Rectangle{
var _local7:DisplayObject;
var _local8:Rectangle;
var _local2:Number = Number.MAX_VALUE;
var _local3:Number = Number.MIN_VALUE;
var _local4:Number = Number.MAX_VALUE;
var _local5:Number = Number.MIN_VALUE;
var _local6:int;
while (_local6 < _arg1.numChildren) {
_local7 = _arg1.getChildAt(_local6);
_local8 = _local7.getBounds(_arg1);
_local2 = Math.min(_local2, _local8.x);
_local4 = Math.min(_local4, _local8.y);
_local3 = Math.max(_local3, _local8.right);
_local5 = Math.max(_local5, _local8.bottom);
_local6++;
};
return (new Rectangle(_local2, _local4, (_local3 - _local2), (_local5 - _local4)));
}
public static function getAllButtonChildren(_arg1:SimpleButton, _arg2:IRequirement=null):Array{
var _local5:DisplayObject;
var _local3:Array = [_arg1.upState, _arg1.overState, _arg1.downState];
var _local4:Array = [];
for each (_local5 in _local3) {
if ((((_arg2 == null)) || (_arg2.accept(_local5)))){
_local4.push(_local5);
};
if ((_local5 is DisplayObjectContainer)){
_local4 = _local4.concat(getAllChildren(DisplayObjectContainer(_local5), _arg2));
};
};
return (_local4);
}
public static function stopAllChildren(_arg1:DisplayObjectContainer, _arg2:int=0):void{
var _local4:MovieClip;
var _local3:Array = getAllChildren(_arg1, new TypeRequirement(MovieClip));
if ((_arg1 is MovieClip)){
_local3.push(_arg1);
};
for each (_local4 in _local3) {
if (_local4.totalFrames > 1){
if (_arg2 > 0){
_local4.gotoAndStop(_arg2);
} else {
_local4.stop();
};
};
};
}
public static function removeChildren(_arg1:DisplayObjectContainer):void{
while (_arg1.numChildren > 0) {
_arg1.removeChildAt(0);
};
}
public static function adjustBounds(_arg1:DisplayObject, _arg2:Rectangle):void{
claimScale(_arg1, _arg2.width, _arg2.height);
alignCenter(_arg1, _arg2);
}
public static function createRectSprite(_arg1:Number, _arg2:Number, _arg3:int=0, _arg4:Number=1):Sprite{
var _local5:Sprite = new Sprite();
_local5.graphics.beginFill(_arg3, _arg4);
_local5.graphics.drawRect(0, 0, _arg1, _arg2);
_local5.graphics.endFill();
return (_local5);
}
public static function setRandomFrame(_arg1:MovieClip):void{
var _local2:int = (1 + (Math.random() * _arg1.totalFrames));
_arg1.gotoAndStop(_local2);
}
public static function transformCoords(_arg1:Point, _arg2:DisplayObject, _arg3:DisplayObject):Point{
return (_arg3.globalToLocal(_arg2.localToGlobal(_arg1)));
}
public static function setPosition(_arg1:DisplayObject, _arg2:Object):void{
_arg1.x = _arg2.x;
_arg1.y = _arg2.y;
}
public static function detachFromDisplay(_arg1:DisplayObject):void{
_arg1.parent.removeChild(_arg1);
}
public static function claimScale(_arg1:DisplayObject, _arg2:Number, _arg3:Number):void{
var _local4:Number = Math.min((_arg2 / _arg1.width), (_arg3 / _arg1.height));
_arg1.height = (_arg1.height * _local4);
_arg1.width = (_arg1.width * _local4);
}
public static function sendToBack(_arg1:DisplayObject):void{
var _local2:DisplayObjectContainer = _arg1.parent;
_local2.setChildIndex(_arg1, 0);
}
public static function setFontSize(_arg1:TextField, _arg2:int):void{
var _local3:TextFormat = _arg1.getTextFormat();
_local3.size = _arg2;
_arg1.setTextFormat(_local3);
}
public static function playAllChildren(_arg1:MovieClip):void{
var _local3:MovieClip;
_arg1.play();
var _local2:Array = getAllChildren(_arg1, new TypeRequirement(MovieClip));
for each (_local3 in _local2) {
if (_local3.totalFrames > 1){
_local3.play();
};
};
}
public static function getChildren(_arg1:DisplayObjectContainer, _arg2:IRequirement=null):Array{
var _local5:DisplayObject;
var _local3:Array = [];
var _local4:int;
while (_local4 < _arg1.numChildren) {
_local5 = _arg1.getChildAt(_local4);
if ((((_arg2 == null)) || (_arg2.accept(_local5)))){
_local3.push(_local5);
};
_local4++;
};
return (_local3);
}
public static function addBoundsRect(_arg1:Sprite, _arg2:int=0, _arg3:Number=0):Sprite{
var _local4:Rectangle = _arg1.getBounds(_arg1);
var _local5:Sprite = createRectSprite(_local4.width, _local4.height, _arg2, _arg3);
_arg1.addChild(_local5);
_local5.x = _local4.x;
_local5.y = _local4.y;
return (_local5);
}
public static function bringToFront(_arg1:DisplayObject):void{
var _local2:DisplayObjectContainer = _arg1.parent;
_local2.setChildIndex(_arg1, (_local2.numChildren - 1));
}
}
}//package common.utils
Section 23
//StringUtil (common.utils.StringUtil)
package common.utils {
public class StringUtil {
public static const EMPTY_CHARS:String = (" \t\r\n\f" + String.fromCharCode(160));
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
var _local3:int = (_arg1.length - 1);
var _local4:int = _arg1.length;
while ((((_local2 < _local4)) && ((EMPTY_CHARS.indexOf(_arg1.charAt(_local2)) >= 0)))) {
_local2++;
};
while ((((_local3 > 0)) && ((EMPTY_CHARS.indexOf(_arg1.charAt(_local3)) >= 0)))) {
_local3--;
};
return (((_local3)>=_local2) ? _arg1.slice(_local2, (_local3 + 1)) : "");
}
public static function format(_arg1:String, ... _args):String{
var _local3:int = _args.length;
var _local4:int;
while (_local4 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local4) + "\\}"), "g"), _args[_local4]);
_local4++;
};
return (_arg1);
}
public static function replaceChars(_arg1:String, _arg2:Array, _arg3:Array):String{
var _local6:int;
var _local4 = "";
var _local5:int;
while (_local5 < _arg1.length) {
_local6 = _arg2.indexOf(_arg1.charAt(_local5));
if (_local6 != -1){
_local4 = (_local4 + _arg3[_local6]);
} else {
_local4 = (_local4 + _arg1.charAt(_local5));
};
_local5++;
};
return (_local4);
}
public static function isBlankString(_arg1:String):Boolean{
var _local2:int;
while (_local2 <= _arg1.length) {
if (EMPTY_CHARS.indexOf(_arg1.charAt(_local2)) < 0){
return (false);
};
_local2++;
};
return (true);
}
public static function extractInt(_arg1:String):int{
return (_arg1.match(/\d+/)[0]);
}
}
}//package common.utils
Section 24
//Sounds (components.Sounds)
package components {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class Sounds {
private static const DEFAULT_VOLUME:Number = 1;
private static var _musicVolume:Number = 1;
private static var _musicClass:Class;
private static var _nowPlaying:Dictionary = new Dictionary();
private static var _musicChannel:SoundChannel;
public static function get muted():Boolean{
return ((_musicVolume == 0));
}
private static function setMusicVolume(_arg1:Number):void{
_musicVolume = _arg1;
if (_musicChannel){
_musicChannel.soundTransform = new SoundTransform(_musicVolume);
};
}
public static function playMusic(_arg1:Class):void{
if (_musicChannel){
_musicChannel.stop();
};
_musicClass = _arg1;
var _local2:Sound = new (_arg1);
_musicChannel = _local2.play(0, 0, new SoundTransform(_musicVolume));
_musicChannel.addEventListener(Event.SOUND_COMPLETE, onMusicComplete);
}
public static function play(_arg1:Class, _arg2:Boolean=false):void{
var sound:Sound;
var channel:SoundChannel;
var soundClass = _arg1;
var playSafe = _arg2;
if (((!(playSafe)) || (!((soundClass in _nowPlaying))))){
sound = new (soundClass);
channel = sound.play(0, 0, new SoundTransform(DEFAULT_VOLUME));
channel.addEventListener(Event.SOUND_COMPLETE, function (_arg1:Event):void{
delete _nowPlaying[soundClass];
});
_nowPlaying[soundClass] = true;
};
}
public static function mute():void{
if (_musicVolume == 0){
setMusicVolume(DEFAULT_VOLUME);
} else {
setMusicVolume(0);
};
}
private static function onMusicComplete(_arg1:Event):void{
playMusic(_musicClass);
}
}
}//package components
Section 25
//pojava_logo_2 (cooking_fla.pojava_logo_2)
package cooking_fla {
import flash.display.*;
public dynamic class pojava_logo_2 extends MovieClip {
public var loader:McBar;
}
}//package cooking_fla
Section 26
//Controller (dressup.abstract.Controller)
package dressup.abstract {
import dressup.*;
import flash.events.*;
import common.events.*;
public class Controller {
private var _eventManager:EventManager;
protected function registerNativeEvent(_arg1:EventDispatcher, _arg2:String, _arg3:Function, _arg4:Boolean=false):void{
if (!_eventManager){
_eventManager = new EventManager();
};
_eventManager.registerNativeEvent(_arg1, _arg2, _arg3, _arg4);
}
protected function get app():Application{
return (Application.instance);
}
protected function unregisterNativeEvent(_arg1:EventDispatcher, _arg2:String, _arg3:Function, _arg4:Boolean=false):void{
if (_eventManager){
_eventManager.unregisterNativeEvent(_arg1, _arg2, _arg3, _arg4);
};
}
protected function registerEvent(_arg1:EventSender, _arg2:Function):void{
if (!_eventManager){
_eventManager = new EventManager();
};
_eventManager.registerEvent(_arg1, _arg2);
}
protected function clearEvents():void{
if (_eventManager){
_eventManager.clearEvents();
};
}
protected function unregisterEvent(_arg1:EventSender, _arg2:Function):void{
if (_eventManager){
_eventManager.unregisterEvent(_arg1, _arg2);
};
}
public function dispose():void{
if (_eventManager){
_eventManager.clearEvents();
};
}
}
}//package dressup.abstract
Section 27
//View (dressup.abstract.View)
package dressup.abstract {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import common.converting.*;
import common.comparing.*;
import common.flash.controls.*;
import components.*;
import common.utils.*;
public class View extends Controller {
private var _enabled:Boolean;// = true
private var _content:Sprite;
public static var defaultSound:Class;
public function View(_arg1:Sprite){
_content = _arg1;
}
public function get content():Sprite{
return (_content);
}
public static function setButtonText(_arg1:SimpleButton, _arg2:String, _arg3):void{
var _local5:TextField;
var _local4:Array = GraphUtil.getAllButtonChildren(_arg1, new NameRequirement(_arg2));
for each (_local5 in _local4) {
_local5.text = String(_arg3);
};
}
public static function getCheckBoxes(_arg1:Sprite):Array{
var _local2:Array = GraphUtil.getChildren(_arg1, new PropertyRequirement("totalFrames", 2));
var _local3:Array = ArrayUtil.convert(_local2, new ConstructorConverter(CheckBox));
return (_local3.reverse());
}
public static function setButtonAction(_arg1:InteractiveObject, _arg2:Function, _arg3:Class=null, ... _args):void{
var button = _arg1;
var handler = _arg2;
var soundClass = _arg3;
var rest = _args;
var clickHandler:Function = function (_arg1:MouseEvent):void{
handler.apply(this, rest);
};
var pressHandler:Function = function (_arg1:MouseEvent):void{
if (((soundClass) || (defaultSound))){
Sounds.play(((soundClass) || (defaultSound)));
};
};
button.addEventListener(MouseEvent.MOUSE_DOWN, pressHandler);
button.addEventListener(MouseEvent.CLICK, clickHandler);
}
public static function setButtonEnabled(_arg1:InteractiveObject, _arg2:Boolean):void{
GraphUtil.setBtnEnabled(_arg1, _arg2);
}
}
}//package dressup.abstract
Section 28
//BackgroundView (dressup.scene.BackgroundView)
package dressup.scene {
import flash.display.*;
import common.events.*;
import assets.scene.*;
import common.flash.controls.*;
import dressup.abstract.*;
import common.utils.*;
public class BackgroundView extends View {
private var _buttons:RadioGroup;
private var _changeEvent:EventSender;
private var _clip:MovieClip;
public function BackgroundView(_arg1:McScene){
_changeEvent = new EventSender(this);
super(_arg1);
initClip(_arg1.mcBackground);
initButtons(_arg1.mcBgButtons);
}
private function initClip(_arg1:MovieClip):void{
_clip = _arg1;
_clip.stop();
_clip.mouseEnabled = false;
_clip.mouseChildren = false;
_clip.opaqueBackground = 0;
}
public function get changeEvent():EventSender{
return (_changeEvent);
}
public function set selectedIndex(_arg1:int):void{
GraphUtil.stopAllChildren(_clip);
_clip.gotoAndStop((_arg1 + 1));
_buttons.selectedIndex = _arg1;
}
private function initButtons(_arg1:Sprite):void{
var _local2:Array = getCheckBoxes(_arg1);
_buttons = new RadioGroup(_local2);
_buttons.selectedIndex = 0;
_buttons.clickEvent.addListener(onButtonClick);
}
private function onButtonClick():void{
selectedIndex = _buttons.selectedIndex;
_changeEvent.sendEvent();
}
public function get selectedIndex():int{
return (_buttons.selectedIndex);
}
}
}//package dressup.scene
Section 29
//CategoreisView (dressup.scene.CategoreisView)
package dressup.scene {
import flash.display.*;
import flash.events.*;
import common.events.*;
import common.comparing.*;
import assets.scene.*;
import common.flash.controls.*;
import dressup.abstract.*;
import common.utils.*;
public class CategoreisView extends View {
private var _frameIndex:int;
private var _panelSelector:RadioGroup;
private var _panels:Array;
private var _clickEvent:EventSender;
private var _panelsContainer:Sprite;
private var _selectedPanel:Sprite;
private var _filters:Array;
public function CategoreisView(_arg1:McScene){
_clickEvent = new EventSender(this);
super(_arg1);
initPanels(_arg1.mcCatPanels);
initPanelSelector(_arg1.mcCatButtons);
}
private function initPanelButtons(_arg1:Sprite):void{
var _local3:SimpleButton;
var _local2:Array = getButtons(_arg1);
for each (_local3 in _local2) {
_local3.addEventListener(MouseEvent.CLICK, onButtonClick);
};
}
private function onCategoryClick():void{
categoryIndex = _panelSelector.selectedIndex;
}
private function onButtonClick(_arg1:MouseEvent):void{
var _local2:SimpleButton = (_arg1.currentTarget as SimpleButton);
_frameIndex = getButtons(_selectedPanel).indexOf(_local2);
_filters = _local2.filters;
_clickEvent.sendEvent();
}
private function initPanelSelector(_arg1:Sprite):void{
var _local2:Array = getCheckBoxes(_arg1);
_panelSelector = new RadioGroup(_local2);
_panelSelector.clickEvent.addListener(onCategoryClick);
}
private function initPanels(_arg1:Sprite):void{
var _local2:Sprite;
_panelsContainer = _arg1;
_panels = GraphUtil.getChildren(_panelsContainer).reverse();
for each (_local2 in _panels) {
initPanelButtons(_local2);
GraphUtil.detachFromDisplay(_local2);
};
}
private function getButtons(_arg1:Sprite):Array{
return (GraphUtil.getChildren(_arg1, new TypeRequirement(SimpleButton)).reverse());
}
public function get frameIndex():int{
return (_frameIndex);
}
public function set categoryIndex(_arg1:int):void{
if (_selectedPanel){
GraphUtil.detachFromDisplay(_selectedPanel);
};
_selectedPanel = _panels[_arg1];
_panelSelector.selectedIndex = _arg1;
if (_selectedPanel){
_panelsContainer.addChild(_selectedPanel);
};
}
public function get clickEvent():EventSender{
return (_clickEvent);
}
public function get categoryIndex():int{
return (_panels.indexOf(_selectedPanel));
}
public function get filters():Array{
return (_filters);
}
}
}//package dressup.scene
Section 30
//ControlPanelView (dressup.scene.ControlPanelView)
package dressup.scene {
import flash.display.*;
import gs.*;
import dressup.abstract.*;
import common.utils.*;
public class ControlPanelView extends View {
private var _defaultScale:Number;
private var _content:McControlPanel;
public function ControlPanelView(_arg1:McControlPanel){
super((_content = _arg1));
_defaultScale = _content.btnLogo.scaleX;
initialize();
setDefaultState();
}
private function initialize():void{
setButtonAction(_content.btnBack, onBackClick);
setButtonAction(_content.btnPhoto, onPhotoClick);
setButtonAction(_content.btnLogo, onLogoClick);
setButtonAction(_content.btnReset, onResetClick);
}
private function onBackClick():void{
app.scene.controlsVisible = true;
setDefaultState();
}
private function onPhotoClick():void{
app.scene.controlsVisible = false;
showButtons(_content.btnBack, _content.btnLogo, _content.btnReset);
}
public function setDefaultState():void{
showButtons(_content.btnPhoto, _content.btnReset, _content.btnLogo);
}
private function showButtons(... _args):void{
var _local2:SimpleButton;
GraphUtil.removeChildren(_content);
for each (_local2 in _args) {
_content.addChild(_local2);
if ((((_local2 == _content.btnBottomLogo)) || ((_local2 == _content.btnTopLogo)))){
GraphUtil.setScale(_local2, (_defaultScale * 0.75));
TweenLite.to(_local2, 0.1, {scaleX:_defaultScale, scaleY:_defaultScale});
};
};
}
private function onLogoClick():void{
BrowserUtil.navigate("http://www.cookinggames.com/");
}
private function onResetClick():void{
app.scene.reset();
app.scene.controlsVisible = true;
showButtons(_content.btnPhoto, _content.btnLogo, _content.btnReset);
}
}
}//package dressup.scene
Section 31
//ModelView (dressup.scene.ModelView)
package dressup.scene {
import flash.display.*;
import flash.events.*;
import common.comparing.*;
import dressup.abstract.*;
import common.utils.*;
public class ModelView extends View {
private var _items:Array;
private static const PART_NAME:String = "mcPart";
public function ModelView(_arg1:Sprite){
_items = [];
super(_arg1);
initItems();
}
private function initItems():void{
var _local2:MovieClip;
var _local3:int;
var _local1:Array = GraphUtil.getChildren(content, new NameRequirement(PART_NAME, true));
for each (_local2 in _local1) {
_local3 = StringUtil.extractInt(_local2.name);
initItem(_local2, _local3);
};
}
public function setDefaultItem(_arg1:int, _arg2:int):void{
var _local3:MovieClip = _items[_arg1];
_local3.mouseEnabled = false;
showItem(_arg1, _arg2);
}
public function hideItem(_arg1:int):void{
var _local2:MovieClip = _items[_arg1];
_local2.visible = false;
}
public function showItem(_arg1:int, _arg2:int):void{
var _local3:MovieClip = _items[_arg1];
_local3.visible = true;
_local3.gotoAndStop((_arg2 + 1));
}
public function hideAllItems():void{
var _local1:int;
while (_local1 < _items.length) {
if (_items[_local1]){
hideItem(_local1);
};
_local1++;
};
}
private function onClick(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
var _local3:int = _items.indexOf(_local2);
hideItem(_local3);
}
private function initItem(_arg1:MovieClip, _arg2:int):void{
_items[(_arg2 - 1)] = _arg1;
_arg1.addEventListener(MouseEvent.CLICK, onClick);
_arg1.buttonMode = true;
_arg1.useHandCursor = true;
_arg1.mouseChildren = false;
_arg1.visible = false;
_arg1.stop();
}
public function applyFilters(_arg1:int, _arg2:int, _arg3:Array):void{
var _local4:MovieClip = _items[_arg1];
var _local5:Array = GraphUtil.getChildren(_local4, new TypeRequirement(Sprite)).reverse();
var _local6:Sprite = (((_local5[_arg2] as Sprite)) || (_local4));
_local6.filters = _arg3;
}
public function resetDefaultItems():void{
var _local1:MovieClip;
for each (_local1 in _items) {
if (_local1){
_local1.mouseEnabled = true;
};
};
}
}
}//package dressup.scene
Section 32
//SceneScreen (dressup.scene.SceneScreen)
package dressup.scene {
import assets.scene.*;
import dressup.abstract.*;
public class SceneScreen extends View {
private var _categories:CategoreisView;
private var _model:ModelView;
private var _background:BackgroundView;
private var _controls:ControlPanelView;
private var _content:McScene;
public function SceneScreen(){
_content = new McScene();
_controls = new ControlPanelView(_content.mcControlPanel);
_categories = new CategoreisView(_content);
_background = new BackgroundView(_content);
_model = new ModelView(_content.mcModel);
super(_content);
initCategories();
refreshDefaultItems();
_background.changeEvent.addListener(onBackgoundChange);
_categories.clickEvent.addListener(onItemSelect);
}
private function refreshDefaultItems():void{
var bgNum:int;
var defaultItems:XMLList;
var itemData:XML;
var itemIndex:int;
var frameIndex:int;
bgNum = (_background.selectedIndex + 1);
defaultItems = app.config.background.(int(@num) == bgNum).defaultItem;
_model.resetDefaultItems();
for each (itemData in defaultItems) {
itemIndex = (int(itemData.@categoryNum) - 1);
frameIndex = (int(itemData.@frameNum) - 1);
_model.setDefaultItem(itemIndex, frameIndex);
};
}
private function initCategories():void{
var _local2:XML;
var _local3:int;
var _local4:int;
var _local1:XMLList = app.config.filterEffect;
for each (_local2 in _local1) {
_local3 = (int(_local2.@buttonNum) - 1);
_local4 = (int(_local2.@targetCategoryNum) - 1);
_categories;
};
}
private function onItemSelect(_arg1:CategoreisView):void{
var buttonNum:int;
var effects:XMLList;
var targetIndex:int;
var childIndex:int;
var sender = _arg1;
buttonNum = (_categories.categoryIndex + 1);
effects = app.config.filterEffect.(int(@buttonNum) == buttonNum);
_controls.setDefaultState();
if (effects.length() == 0){
_model.showItem(_categories.categoryIndex, _categories.frameIndex);
} else {
targetIndex = (int(effects.@targetCategoryNum) - 1);
childIndex = (int(effects.@childNum) - 1);
_model.applyFilters(targetIndex, childIndex, _categories.filters);
};
}
public function reset():void{
_model.hideAllItems();
refreshDefaultItems();
}
public function set controlsVisible(_arg1:Boolean):void{
_content.mcBgButtons.visible = _arg1;
_content.mcCatPanels.visible = _arg1;
_content.mcCatButtons.visible = _arg1;
}
private function onBackgoundChange():void{
_categories.categoryIndex = -1;
refreshDefaultItems();
}
}
}//package dressup.scene
Section 33
//Application (dressup.Application)
package dressup {
import flash.display.*;
import flash.text.*;
import common.commands.*;
import dressup.scene.*;
import girlgames.*;
import assets.*;
import common.flash.commands.*;
public class Application {
private var _root:Sprite;
private var _appRoot:Sprite;
private var _conveyor:Conveyor;
private var _scene:SceneScreen;
private var _textStyles:StyleSheet;
private var _config:XML;
public static const CONFIG_XML:Class = Application_CONFIG_XML;
private static var _instance:Application;
public function Application(){
_conveyor = new Conveyor();
_appRoot = new Sprite();
super();
}
public function get conveyor():Conveyor{
return (_conveyor);
}
public function get scene():SceneScreen{
return (_scene);
}
public function get textStyles():StyleSheet{
return (_textStyles);
}
public function get config():XML{
return (_config);
}
public function createScene():void{
_scene = new SceneScreen();
_appRoot.addChild(_scene.content);
}
public function initialize(_arg1:Sprite):void{
var _local2:PlayIntroCommand;
_root = _arg1;
_root.addChild(_appRoot);
_config = new XML(new CONFIG_XML());
_local2 = new PlayIntroCommand(new McIntro(), _appRoot);
_local2.allowSkip = true;
conveyor.pushAction(_local2);
conveyor.pushAction(createScene);
}
private function showBaner():void{
var _local1:GirlgamesBanner = new GirlgamesBanner();
_local1.y = (Main.HEIGHT - _local1.height);
_root.addChild(_local1);
}
public static function get instance():Application{
if (!_instance){
_instance = new (Application);
};
return (_instance);
}
}
}//package dressup
Section 34
//Application_CONFIG_XML (dressup.Application_CONFIG_XML)
package dressup {
import mx.core.*;
public class Application_CONFIG_XML extends ByteArrayAsset {
}
}//package dressup
Section 35
//GirlgamesBanner (girlgames.GirlgamesBanner)
package girlgames {
import flash.events.*;
import common.utils.*;
public class GirlgamesBanner extends McGirlgamesBaner {
public function GirlgamesBanner(){
initialize();
}
private function initialize():void{
btnLogo.addEventListener(MouseEvent.CLICK, onLogoClick);
btnMoreGames.addEventListener(MouseEvent.CLICK, onMoreGamesClick);
btnFreeGames.addEventListener(MouseEvent.CLICK, onFreeGamesClick);
}
private function onFreeGamesClick(_arg1:MouseEvent):void{
BrowserUtil.navigate("http://www.cookinggames.com/");
}
private function onMoreGamesClick(_arg1:MouseEvent):void{
BrowserUtil.navigate("http://www.cookinggames.com/");
}
private function onLogoClick(_arg1:MouseEvent):void{
BrowserUtil.navigate("http://www.cookinggames.com/");
}
}
}//package girlgames
Section 36
//GirlgamesPreloader (girlgames.GirlgamesPreloader)
package girlgames {
import flash.events.*;
import flash.display.*;
import common.events.*;
import common.utils.*;
public class GirlgamesPreloader {
private var _root:MovieClip;
private var _clickRect:Sprite;
private var _completeEvent:EventSender;
private var _content:PreloaderMC;
private var _state:Function;
public function GirlgamesPreloader(_arg1:MovieClip){
_completeEvent = new EventSender(this);
super();
_root = _arg1;
_state = playingAnim1;
initContent();
setPercent(0);
}
private function setPercent(_arg1:Number):void{
_content.loader.barMask.scaleX = _arg1;
}
public function get completeEvent():EventSender{
return (_completeEvent);
}
private function initContent():void{
_content = new PreloaderMC();
_content.anim2.stop();
_content.anim2.visible = false;
_content.addEventListener(Event.ENTER_FRAME, onEnterFrame);
_content.mouseChildren = false;
_content.mouseEnabled = false;
_clickRect = GraphUtil.createRectSprite(Main.WIDTH, Main.HEIGHT, 0, 0);
_clickRect.useHandCursor = true;
_clickRect.buttonMode = true;
_clickRect.mouseChildren = false;
_clickRect.addEventListener(MouseEvent.CLICK, onMouseClick);
_root.addChild(_content);
_root.addChild(_clickRect);
_root.opaqueBackground = 0xFFFFFF;
_root.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
}
private function playingAnim1():void{
if (_content.anim1.currentFrame == _content.anim1.totalFrames){
_content.anim1.stop();
_state = loading;
};
}
private function onProgress(_arg1:ProgressEvent):void{
setPercent((_arg1.bytesLoaded / _arg1.bytesTotal));
}
private function onMouseClick(_arg1:MouseEvent):void{
BrowserUtil.navigate("http://www.cookinggames.com/");
}
private function finishing():void{
if (_content.anim2.currentFrame == _content.anim2.totalFrames){
GraphUtil.stopAllChildren(_content);
GraphUtil.detachFromDisplay(_content);
GraphUtil.detachFromDisplay(_clickRect);
_content.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
_root.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
_completeEvent.sendEvent();
};
}
private function onEnterFrame(_arg1:Event):void{
_state();
}
private function loading():void{
if (_root.loaderInfo.bytesLoaded == _root.loaderInfo.bytesTotal){
_content.loader.visible = false;
_content.anim1.visible = false;
_content.anim2.visible = true;
_content.anim2.play();
_state = finishing;
};
}
}
}//package girlgames
Section 37
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
public class TweenLite {
public var delay:Number;
protected var _initted:Boolean;
protected var _subTweens:Array;
public var startTime:int;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
protected var _active:Boolean;
public var tweens:Array;
public var vars:Object;
public var initTime:int;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 6.31;
private static var _sprite:Sprite = new Sprite();
protected static var _all:Dictionary = new Dictionary();
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
protected static var _curTime:uint;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (((((!((_arg3.overwrite == false))) && (!((_arg1 == null))))) || ((_all[_arg1] == undefined)))){
delete _all[_arg1];
_all[_arg1] = new Dictionary();
};
_all[_arg1][this] = this;
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.target = _arg1;
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
if ((((this.vars.alpha == 0)) && (!((this.vars.runBackwards == true))))){
this.vars.visible = false;
};
};
this.tweens = [];
_subTweens = [];
_hst = (_initted = false);
_active = (((_arg2 == 0)) && ((this.delay == 0)));
if (!_classInitted){
_curTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
_classInitted = true;
};
this.initTime = _curTime;
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){
initTweenVals();
this.startTime = _curTime;
if (_active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
};
if (((!(_listening)) && (!(_active)))){
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
}
protected function addSubTween(_arg1:Function, _arg2:Object, _arg3:Object, _arg4:Object=null):void{
var _local6:String;
var _local5:Object = {proxy:_arg1, target:_arg2, info:_arg4};
_subTweens.push(_local5);
for (_local6 in _arg3) {
if (typeof(_arg3[_local6]) == "number"){
this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:(_arg3[_local6] - _arg2[_local6]), sub:_local5});
} else {
this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:Number(_arg3[_local6]), sub:_local5});
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local4:String;
var _local5:int;
var _local6:Array;
var _local7:ColorTransform;
var _local8:ColorTransform;
var _local9:Object;
var _local3 = (this.target is DisplayObject);
if ((this.target is Array)){
_local6 = ((this.vars.endArray) || ([]));
_local5 = 0;
while (_local5 < _local6.length) {
if (((!((this.target[_local5] == _local6[_local5]))) && (!((this.target[_local5] == undefined))))){
this.tweens.push({o:this.target, p:_local5.toString(), s:this.target[_local5], c:(_local6[_local5] - this.target[_local5])});
};
_local5++;
};
} else {
for (_local4 in this.vars) {
if ((((((((((((((((((((((((((((((((((((((_local4 == "ease")) || ((_local4 == "delay")))) || ((_local4 == "overwrite")))) || ((_local4 == "onComplete")))) || ((_local4 == "onCompleteParams")))) || ((_local4 == "onCompleteScope")))) || ((_local4 == "runBackwards")))) || ((_local4 == "visible")))) || ((_local4 == "onUpdate")))) || ((_local4 == "onUpdateParams")))) || ((_local4 == "onUpdateScope")))) || ((_local4 == "autoAlpha")))) || ((_local4 == "onStart")))) || ((_local4 == "onStartParams")))) || ((_local4 == "onStartScope")))) || ((_local4 == "renderOnStart")))) || ((_local4 == "proxiedEase")))) || ((_local4 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local4) + " ")) == -1))))))){
} else {
if ((((_local4 == "tint")) && (_local3))){
_local7 = this.target.transform.colorTransform;
_local8 = new ColorTransform();
if (this.vars.alpha != undefined){
_local8.alphaMultiplier = this.vars.alpha;
delete this.vars.alpha;
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
if (this.tweens[_local5].p == "alpha"){
this.tweens.splice(_local5, 1);
break;
};
_local5--;
};
} else {
_local8.alphaMultiplier = this.target.alpha;
};
if (((((!((this.vars[_local4] == null))) && (!((this.vars[_local4] == ""))))) || ((this.vars[_local4] == 0)))){
_local8.color = this.vars[_local4];
};
addSubTween(tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8});
} else {
if ((((_local4 == "frame")) && (_local3))){
addSubTween(frameProxy, {frame:this.target.currentFrame}, {frame:this.vars[_local4]}, {target:this.target});
} else {
if ((((_local4 == "volume")) && (((_local3) || ((this.target is SoundChannel)))))){
addSubTween(volumeProxy, this.target.soundTransform, {volume:this.vars[_local4]}, {target:this.target});
} else {
if (typeof(this.vars[_local4]) == "number"){
this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:(this.vars[_local4] - this.target[_local4])});
} else {
this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:Number(this.vars[_local4])});
};
};
};
};
};
};
};
if (this.vars.runBackwards == true){
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local9 = this.tweens[_local5];
this.tweens[_local5].s = (_local9.s + _local9.c);
_local9.c = (_local9.c * -1);
_local5--;
};
};
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = !((((this.vars.runBackwards == true)) && ((this.target.alpha == 0))));
};
_initted = true;
}
public function get active():Boolean{
if (_active){
return (true);
};
if (((_curTime - this.initTime) / 1000) > this.delay){
_active = true;
this.startTime = (this.initTime + (this.delay * 1000));
if (!_initted){
initTweenVals();
} else {
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(this.vars.onStartScope, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:Object;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) / 1000);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = 1;
} else {
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (this.vars.onUpdate != null){
this.vars.onUpdate.apply(this.vars.onUpdateScope, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!_initted){
initTweenVals();
};
this.startTime = (_curTime - (this.duration * 1000));
render(_curTime);
return;
};
if (this.vars.visible != undefined){
this.target.visible = Boolean(this.vars.visible);
};
removeTween(this);
if (this.vars.onComplete != null){
this.vars.onComplete.apply(this.vars.onCompleteScope, this.vars.onCompleteParams);
};
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function frameProxy(_arg1:Object):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.target] == undefined))))){
delete _all[_arg1.target][_arg1];
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:*;
if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){
if (_arg2){
_local3 = _all[_arg1];
for (_local4 in _local3) {
_local3[_local4].complete(false);
};
};
delete _all[_arg1];
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, onCompleteScope:_arg4, overwrite:false}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function executeAll(_arg1:Event=null):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:Object;
var _local2:uint = (_curTime = getTimer());
if (_listening){
_local3 = _all;
for each (_local4 in _local3) {
for (_local5 in _local4) {
if (((!((_local4[_local5] == undefined))) && (_local4[_local5].active))){
_local4[_local5].render(_local2);
};
};
};
};
}
public static function volumeProxy(_arg1:Object):void{
_arg1.info.target.soundTransform = _arg1.target;
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local3:Boolean;
var _local4:Object;
var _local5:Object;
var _local6:Object;
var _local2:uint;
for (_local4 in _all) {
_local3 = false;
for (_local5 in _all[_local4]) {
_local3 = true;
break;
};
if (!_local3){
delete _all[_local4];
} else {
_local2++;
};
};
if (_local2 == 0){
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function tintProxy(_arg1:Object):void{
var _local2:Number = _arg1.target.progress;
var _local3:Number = (1 - _local2);
var _local4:Object = _arg1.info.color;
var _local5:Object = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local4.redMultiplier * _local3) + (_local5.redMultiplier * _local2)), ((_local4.greenMultiplier * _local3) + (_local5.greenMultiplier * _local2)), ((_local4.blueMultiplier * _local3) + (_local5.blueMultiplier * _local2)), ((_local4.alphaMultiplier * _local3) + (_local5.alphaMultiplier * _local2)), ((_local4.redOffset * _local3) + (_local5.redOffset * _local2)), ((_local4.greenOffset * _local3) + (_local5.greenOffset * _local2)), ((_local4.blueOffset * _local3) + (_local5.blueOffset * _local2)), ((_local4.alphaOffset * _local3) + (_local5.alphaOffset * _local2)));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 38
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.5.0.12683";
}
}//package mx.core
Section 39
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 40
//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 41
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import girlgames.*;
import flash.utils.*;
public class Main extends MovieClip {
public static const BOUNDS:Rectangle = new Rectangle(0, 0, WIDTH, HEIGHT);
public static const WIDTH:Number = 760;
public static const HEIGHT:Number = 610;
public function Main(){
var _local1:GirlgamesPreloader;
super();
scrollRect = BOUNDS;
opaqueBackground = 0;
_local1 = new GirlgamesPreloader(this);
_local1.completeEvent.addListener(startup);
//unresolved jump
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function initializeApp(_arg1:Event=null):void{
removeEventListener(Event.ADDED_TO_STAGE, initializeApp);
var _local2:Class = Class(getDefinitionByName("dressup.Application"));
_local2["instance"].initialize(this);
}
private function onEnterFrame(_arg1:Event):void{
if (currentFrame == totalFrames){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
startup();
};
}
private function startup():void{
stop();
if (stage){
initializeApp();
} else {
addEventListener(Event.ADDED_TO_STAGE, initializeApp);
};
}
}
}//package
Section 42
//McBar (McBar)
package {
import flash.display.*;
public dynamic class McBar extends MovieClip {
public var barMask:MovieClip;
}
}//package
Section 43
//McControlPanel (McControlPanel)
package {
import flash.display.*;
public dynamic class McControlPanel extends MovieClip {
public var btnLogo:SimpleButton;
public var btnReset:SimpleButton;
public var btnPhoto:SimpleButton;
public var btnBack:SimpleButton;
}
}//package
Section 44
//McGirlgamesBaner (McGirlgamesBaner)
package {
import flash.display.*;
public dynamic class McGirlgamesBaner extends MovieClip {
public var btnLogo:SimpleButton;
public var btnMoreGames:SimpleButton;
public var btnFreeGames:SimpleButton;
}
}//package
Section 45
//PreloaderMC (PreloaderMC)
package {
import flash.display.*;
public dynamic class PreloaderMC extends MovieClip {
public var loader:McBar;
public var anim2:MovieClip;
public var anim1:MovieClip;
}
}//package