Section 1
//abracelet_set_110 (Calypso_fla.abracelet_set_110)
package Calypso_fla {
import flash.display.*;
public dynamic class abracelet_set_110 extends MovieClip {
public var Abracelet_01:MovieClip;
public var Abracelet_03:MovieClip;
public var Abracelet_04:MovieClip;
public var Abracelet_05:MovieClip;
public var Abracelet_00:MovieClip;
public var Abracelet_06:MovieClip;
public var Abracelet_02:MovieClip;
}
}//package Calypso_fla
Section 2
//accessory_set_101 (Calypso_fla.accessory_set_101)
package Calypso_fla {
import flash.display.*;
public dynamic class accessory_set_101 extends MovieClip {
public var Accessory_01:MovieClip;
public var Accessory_02:MovieClip;
}
}//package Calypso_fla
Section 3
//authors_171 (Calypso_fla.authors_171)
package Calypso_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.system.*;
import flash.ui.*;
public dynamic class authors_171 extends MovieClip {
public function authors_171(){
addFrameScript(0, frame1, 103, frame104);
}
function frame1(){
stop();
}
function frame104(){
this.y = -1000;
}
}
}//package Calypso_fla
Section 4
//bag_set_142 (Calypso_fla.bag_set_142)
package Calypso_fla {
import flash.display.*;
public dynamic class bag_set_142 extends MovieClip {
public var Bag_04:MovieClip;
public var Bag_06:MovieClip;
public var Bag_07:MovieClip;
public var Bag_08:MovieClip;
public var Bag_09:MovieClip;
}
}//package Calypso_fla
Section 5
//crown_set_104 (Calypso_fla.crown_set_104)
package Calypso_fla {
import flash.display.*;
public dynamic class crown_set_104 extends MovieClip {
public var Crown_04:MovieClip;
public var Crown_05:MovieClip;
public var Crown_03:MovieClip;
}
}//package Calypso_fla
Section 6
//dress_set_89 (Calypso_fla.dress_set_89)
package Calypso_fla {
import flash.display.*;
public dynamic class dress_set_89 extends MovieClip {
public var Dress_01:MovieClip;
public var Dress_03:MovieClip;
public var Dress_04:MovieClip;
public var Dress_05:MovieClip;
public var Dress_06:MovieClip;
public var Dress_08:MovieClip;
public var Dress_09:MovieClip;
public var Dress_07:MovieClip;
public var Dress_02:MovieClip;
public var Dress_00:MovieClip;
public var Dress_10:MovieClip;
}
}//package Calypso_fla
Section 7
//earring_set_49 (Calypso_fla.earring_set_49)
package Calypso_fla {
import flash.display.*;
public dynamic class earring_set_49 extends MovieClip {
public var Earring_02:MovieClip;
public var Earring_03:MovieClip;
public var Earring_06:MovieClip;
public var Earring_04:MovieClip;
public var Earring_00:MovieClip;
public var Earring_01:MovieClip;
public var Earring_05:MovieClip;
}
}//package Calypso_fla
Section 8
//kraken_all_25 (Calypso_fla.kraken_all_25)
package Calypso_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.system.*;
import flash.ui.*;
public dynamic class kraken_all_25 extends MovieClip {
public function kraken_all_25(){
addFrameScript(37, frame38);
}
function frame38(){
parent.move_again();
}
}
}//package Calypso_fla
Section 9
//loader_as3_1 (Calypso_fla.loader_as3_1)
package Calypso_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.system.*;
import flash.ui.*;
public dynamic class loader_as3_1 extends MovieClip {
public var loadBarMask:MovieClip;
public var buttonLogo:SimpleButton;
public function loader_as3_1(){
addFrameScript(1, frame2, 123, frame124, 177, frame178);
}
public function on_logo(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.dressupwho.com");
navigateToURL(_local2, "_blank");
}
function frame178(){
this.buttonLogo.addEventListener(MouseEvent.CLICK, on_logo2);
}
public function on_logo2(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.dressupwho.com");
navigateToURL(_local2, "_blank");
}
function frame124(){
this.buttonLogo.addEventListener(MouseEvent.CLICK, on_logo);
}
function frame2(){
gotoAndPlay(1);
}
}
}//package Calypso_fla
Section 10
//necklace_set_133 (Calypso_fla.necklace_set_133)
package Calypso_fla {
import flash.display.*;
public dynamic class necklace_set_133 extends MovieClip {
public var Necklace_03:MovieClip;
public var Necklace_07:MovieClip;
public var Necklace_05:MovieClip;
public var Necklace_02:MovieClip;
public var Necklace_00:MovieClip;
public var Necklace_06:MovieClip;
public var Necklace_01:MovieClip;
public var Necklace_04:MovieClip;
}
}//package Calypso_fla
Section 11
//preview_mc_168 (Calypso_fla.preview_mc_168)
package Calypso_fla {
import flash.display.*;
public dynamic class preview_mc_168 extends MovieClip {
public var back:MovieClip;
}
}//package Calypso_fla
Section 12
//shoes_set_58 (Calypso_fla.shoes_set_58)
package Calypso_fla {
import flash.display.*;
public dynamic class shoes_set_58 extends MovieClip {
public var Shoes_14:MovieClip;
public var Shoes_01:MovieClip;
public var Shoes_11:MovieClip;
public var Shoes_05:MovieClip;
public var Shoes_00:MovieClip;
public var Shoes_02:MovieClip;
public var Shoes_03:MovieClip;
public var Shoes_04:MovieClip;
public var Shoes_06:MovieClip;
public var Shoes_07:MovieClip;
public var Shoes_09:MovieClip;
public var Shoes_08:MovieClip;
public var Shoes_13:MovieClip;
public var Shoes_10:MovieClip;
public var Shoes_12:MovieClip;
}
}//package Calypso_fla
Section 13
//skirt_set_74 (Calypso_fla.skirt_set_74)
package Calypso_fla {
import flash.display.*;
public dynamic class skirt_set_74 extends MovieClip {
public var Skirt_11:MovieClip;
public var Skirt_10:MovieClip;
public var Skirt_00:MovieClip;
public var Skirt_01:MovieClip;
public var Skirt_02:MovieClip;
public var Skirt_03:MovieClip;
public var Skirt_04:MovieClip;
public var Skirt_05:MovieClip;
public var Skirt_06:MovieClip;
public var Skirt_07:MovieClip;
public var Skirt_08:MovieClip;
public var Skirt_09:MovieClip;
public var Skirt_12:MovieClip;
public var Skirt_13:MovieClip;
}
}//package Calypso_fla
Section 14
//top_set_118 (Calypso_fla.top_set_118)
package Calypso_fla {
import flash.display.*;
public dynamic class top_set_118 extends MovieClip {
public var Top_02:MovieClip;
public var Top_06:MovieClip;
public var Top_04:MovieClip;
public var Top_01:MovieClip;
public var Top_07:MovieClip;
public var Top_11:MovieClip;
public var Top_12:MovieClip;
public var Top_10:MovieClip;
public var Top_05:MovieClip;
public var Top_09:MovieClip;
public var Top_00:MovieClip;
public var Top_13:MovieClip;
public var Top_08:MovieClip;
public var Top_03:MovieClip;
}
}//package Calypso_fla
Section 15
//Avatar (classes.common.Avatar)
package classes.common {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import com.adobe.images.*;
public class Avatar extends MovieClip {
public var png_image_data:ByteArray;
public function Avatar(){
visible = false;
}
public function make_shot(_arg1:Boolean):BitmapData{
var _local2:BitmapData;
var _local3:BitmapData;
var _local4:Rectangle;
var _local5:Point;
root.game.hide_hitch();
if (_arg1){
root.game.hide_backs();
};
_local2 = new BitmapData(root.width, root.height, false);
_local2.draw(root);
root.game.hide_hitch(false);
if (_arg1){
root.game.hide_backs(false);
};
_local3 = new BitmapData(this.width, this.height);
_local4 = new Rectangle(this.x, this.y, this.width, this.height);
_local5 = new Point(0, 0);
_local3.copyPixels(_local2, _local4, _local5);
png_image_data = PNGEncoder2.encode(_local3);
return (_local3);
}
}
}//package classes.common
Section 16
//Checkbox (classes.common.Checkbox)
package classes.common {
import flash.events.*;
import flash.display.*;
public class Checkbox extends MovieClip {
private var _checked:Boolean;// = false
private var group:String;// = "STANDALONE"
public static var groups:Object = new Object();
public static var MOUSE_CLICK:String = "checkbox_clicked";
public function Checkbox(){
group = "STANDALONE";
_checked = false;
super();
gotoAndStop("Not_selected");
this.addEventListener(MouseEvent.CLICK, on_click);
}
public function check(_arg1:Boolean=true):void{
_checked = _arg1;
if (_checked){
gotoAndStop("Selected");
} else {
gotoAndStop("Not_selected");
};
}
public function pushIntoGroup(_arg1:String):void{
if (!groups.hasOwnProperty(_arg1)){
groups[_arg1] = new Array();
};
groups[_arg1].push(this);
group = _arg1;
}
public function toggle():Boolean{
var _local1:*;
if (group == "STANDALONE"){
_checked = !(_checked);
if (_checked){
gotoAndStop("Selected");
} else {
gotoAndStop("Not_selected");
};
} else {
if (_checked){
return;
};
for each (_local1 in groups[group]) {
if (((!((_local1 == this))) && (_local1.get_state()))){
_local1.check(false);
};
};
this.check();
};
return (_checked);
}
private function on_click(_arg1:MouseEvent):void{
this.toggle();
this.dispatchEvent(new Event(MOUSE_CLICK));
}
public function get_state():Boolean{
return (_checked);
}
}
}//package classes.common
Section 17
//Digit (classes.common.Digit)
package classes.common {
import flash.display.*;
import classes.main.*;
public class Digit extends MovieClip {
public function Digit(){
stop();
}
public function get_number():int{
return ((currentFrame - 1));
}
public function set_random_number():int{
gotoAndStop(Usefull.randRange(1, totalFrames));
return ((currentFrame - 1));
}
public function set_number(_arg1:int):void{
if ((((_arg1 < 0)) || ((_arg1 > 9)))){
trace(("Digit::set_number::bad number: " + _arg1));
return;
};
gotoAndStop((_arg1 + 1));
}
}
}//package classes.common
Section 18
//Floater (classes.common.Floater)
package classes.common {
import flash.events.*;
import flash.display.*;
import classes.main.*;
public class Floater extends MovieClip {
var yBorder:int;// = 10
var iY:int;
var iX:int;
var speed:Number;
var dir:int;
var xBorder:int;// = 200
var randY:Boolean;
public function Floater(_arg1:Number=20, _arg2:Boolean=true, _arg3:Boolean=false){
xBorder = 200;
yBorder = 10;
super();
iX = x;
iY = y;
speed = _arg1;
dir = (_arg2) ? 1 : -1;
randY = _arg3;
startMove();
}
protected function stopMove():void{
removeEventListener(Event.ENTER_FRAME, move);
}
public function init(_arg1:Number, _arg2:Boolean){
speed = _arg1;
dir = (_arg2) ? 1 : -1;
x = iX;
y = iY;
}
protected function startMove():void{
this.addEventListener(Event.ENTER_FRAME, move);
}
private function changeY():void{
if (!randY){
return;
};
y = Usefull.randRange(yBorder, ((stage.stageHeight - height) - yBorder));
}
protected function move(_arg1:Event):void{
x = (x + (speed * dir));
if ((((dir > 0)) && ((x > ((stage.stageWidth + width) + xBorder))))){
x = -(width);
changeY();
} else {
if ((((dir < 0)) && ((x < (-(width) - xBorder))))){
x = (stage.stageWidth + width);
changeY();
};
};
}
}
}//package classes.common
Section 19
//Group (classes.common.Group)
package classes.common {
import flash.display.*;
public class Group extends Sprite {
protected var objSet:Array;
public function Group(_arg1:Array){
var _local2:*;
objSet = new Array();
super();
for each (_local2 in _arg1) {
objSet.push(_local2);
};
}
}
}//package classes.common
Section 20
//GroupAlpha (classes.common.GroupAlpha)
package classes.common {
import flash.events.*;
public class GroupAlpha extends Group {
private var speed:Number;
public function GroupAlpha(_arg1:Array, _arg2:Number){
super(_arg1);
speed = _arg2;
}
public function start_appear():void{
var _local1:*;
for each (_local1 in objSet) {
_local1.alpha = 0;
};
this.addEventListener(Event.ENTER_FRAME, appear);
}
public function stop_appear():void{
var _local1:*;
for each (_local1 in objSet) {
_local1.alpha = 1;
};
this.removeEventListener(Event.ENTER_FRAME, appear);
}
private function appear(_arg1:Event){
var _local2:*;
for each (_local2 in objSet) {
_local2.alpha = (_local2.alpha + speed);
};
if (objSet[0].alpha >= 1){
stop_appear();
};
}
}
}//package classes.common
Section 21
//OnTimer (classes.common.OnTimer)
package classes.common {
import flash.events.*;
import flash.display.*;
import classes.main.*;
import flash.utils.*;
public class OnTimer extends MovieClip {
private var minTime:Number;// = 0.5
private var timer:Timer;
private var maxTime:Number;// = 4
public function OnTimer(){
minTime = 0.5;
maxTime = 4;
super();
if (this.totalFrames > 1){
this.stop();
initTimer();
} else {
Usefull.trace_debug(("onTimer:: totalFrames = 1, object: " + name));
};
}
public function initTimer():void{
timer = new Timer((1000 * Usefull.randRange(minTime, maxTime)), 1);
if (!timer.hasEventListener(TimerEvent.TIMER_COMPLETE)){
timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimer);
};
timer.start();
}
public function reset():void{
this.gotoAndStop(1);
}
protected function onTimer(_arg1:TimerEvent):void{
if (!hasEventListener(Event.ENTER_FRAME)){
addEventListener(Event.ENTER_FRAME, onFrame);
};
this.play();
}
protected function onFrame(_arg1:Event):void{
if (currentFrame == totalFrames){
if (hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, onFrame);
};
reset();
initTimer();
};
}
public function set_timeRange(_arg1:Number, _arg2:Number):void{
minTime = _arg1;
maxTime = _arg2;
}
}
}//package classes.common
Section 22
//OnTimerLabels (classes.common.OnTimerLabels)
package classes.common {
import flash.events.*;
import classes.main.*;
public class OnTimerLabels extends OnTimer {
private var _entIndex:int;// = 0
protected var _firstMove:int;// = 1
private var _entLabelName:String;// = "Stay"
protected var _lastMove:int;// = 4
public function OnTimerLabels(){
_entIndex = 0;
_entLabelName = "Stay";
_firstMove = 1;
_lastMove = 4;
super();
}
override protected function onTimer(_arg1:TimerEvent):void{
if (!hasEventListener(Event.ENTER_FRAME)){
addEventListener(Event.ENTER_FRAME, onFrame);
};
_entIndex = Usefull.randRange(_firstMove, _lastMove);
_entLabelName = ("Move_" + _entIndex);
this.gotoAndPlay(_entLabelName);
}
override protected function onFrame(_arg1:Event):void{
if (((((!((currentFrame == 1))) && (currentLabel))) && (!((currentLabel == _entLabelName))))){
if (hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, onFrame);
};
gotoAndStop("Stay");
initTimer();
};
}
}
}//package classes.common
Section 23
//Sequence (classes.common.Sequence)
package classes.common {
import flash.display.*;
import classes.main.*;
public class Sequence extends MovieClip {
private var initFrame:int;
public function Sequence(_arg1:int=1){
if (totalFrames == 1){
trace(name, "WARNING: Sequence with one frame!!!");
};
initFrame = _arg1;
gotoAndStop(initFrame);
}
public function switchToNext():Boolean{
var _local1:int;
_local1 = 1;
if (currentFrame < totalFrames){
_local1 = (currentFrame + 1);
};
gotoAndStop(_local1);
return (((_local1 == initFrame)) ? true : false);
}
public function reset():void{
gotoAndStop(initFrame);
}
public function set_initFrame(_arg1:int){
initFrame = _arg1;
reset();
}
public function random():void{
gotoAndStop(Usefull.randRange(0, totalFrames));
}
public function switchToFrame(_arg1:int):void{
if ((((_arg1 < 1)) || ((_arg1 > totalFrames)))){
trace("Sequence::switchToFrame: Bad frame: ", _arg1, ", object: ", name);
};
this.gotoAndStop(_arg1);
}
}
}//package classes.common
Section 24
//SequenceSet (classes.common.SequenceSet)
package classes.common {
import flash.display.*;
import classes.main.*;
public class SequenceSet {
private var set:Array;
private var mode:Boolean;// = false
private var sequentialMode:Boolean;
public var totalFrames:int;// = 0
private var currentSet:int;// = 0
public function SequenceSet(_arg1:Array, _arg2:Boolean=false){
var _local3:Boolean;
var _local4:Sequence;
set = new Array();
mode = false;
totalFrames = 0;
currentSet = 0;
super();
totalFrames = 0;
sequentialMode = _arg2;
_local3 = false;
for each (_local4 in _arg1) {
set.push(_local4);
if (sequentialMode){
totalFrames = (totalFrames + _local4.totalFrames);
if (!_local3){
_local3 = true;
_local4.alpha = 1;
} else {
_local4.alpha = 0;
};
} else {
if (((!((totalFrames == 0))) && (!((_local4.totalFrames == _local4.totalFrames))))){
trace("SequenceSet:: Sequences with different totalFrames parameter!");
} else {
totalFrames = _local4.totalFrames;
};
};
};
}
private function switchToNextSet():void{
set[currentSet].alpha = 0;
set[currentSet].reset();
currentSet = (currentSet + 1);
if (currentSet == set.length){
currentSet = 0;
};
set[currentSet].alpha = 1;
set[currentSet].reset();
}
public function switchToIndex(_arg1:int):void{
var _local2:int;
var _local3:Boolean;
var _local4:Sequence;
var _local5:Sequence;
if (sequentialMode){
if (_arg1 > totalFrames){
trace("SequenceSet::switchToIndex: bad index: ", _arg1);
_arg1 = (_arg1 - totalFrames);
};
_local2 = 0;
_local3 = false;
for each (_local4 in set) {
if (((!(_local3)) && ((_local4.totalFrames >= _arg1)))){
currentSet = _local2;
_local3 = true;
_local4.alpha = 1;
_local4.gotoAndStop(_arg1);
} else {
_local4.alpha = 0;
};
if (!_local3){
_arg1 = (_arg1 - _local4.totalFrames);
_local2++;
};
};
} else {
for each (_local5 in set) {
_local5.gotoAndStop(_arg1);
};
};
}
public function switchToLabel(_arg1:String):void{
var _local2:int;
var _local3:Boolean;
var _local4:Array;
var _local5:Sequence;
var _local6:FrameLabel;
var _local7:Sequence;
if (sequentialMode){
_local2 = 0;
for each (_local5 in set) {
_local3 = false;
_local4 = _local5.currentLabels;
for each (_local6 in _local4) {
if (_arg1 == _local6.name){
_local3 = true;
};
};
if (_local3){
currentSet = _local2;
_local5.alpha = 1;
_local5.gotoAndStop(_arg1);
} else {
_local5.alpha = 0;
};
_local2++;
};
} else {
for each (_local7 in set) {
_local7.gotoAndStop(_arg1);
};
};
}
public function switchToNext():void{
var _local1:Sequence;
var _local2:Boolean;
var _local3:int;
_local2 = false;
_local3 = 0;
while (_local3 < set.length) {
if (((sequentialMode) && (!((currentSet == _local3))))){
} else {
_local1 = set[_local3];
_local2 = _local1.switchToNext();
if (((sequentialMode) && (_local2))){
switchToNextSet();
return;
};
};
_local3++;
};
}
public function reset():void{
var _local1:Sequence;
var _local2:int;
_local2 = 0;
while (_local2 < set.length) {
_local1 = set[_local2];
if (sequentialMode){
if (_local2 == 0){
currentSet = 0;
_local1.alpha = 1;
} else {
_local1.alpha = 0;
};
};
_local1.reset();
_local2++;
};
}
public function getCurrentLabel():String{
return (set[currentSet].currentLabel);
}
public function hide():void{
var _local1:Sequence;
for each (_local1 in set) {
_local1.visible = false;
};
}
public function random():void{
switchToIndex(Usefull.randRange(0, totalFrames));
}
public function set alpha(_arg1:Number):void{
var _local2:Sequence;
if (sequentialMode){
set[currentSet].alpha = _arg1;
} else {
for each (_local2 in set) {
_local2.alpha = _arg1;
};
};
}
public function get alpha():Number{
if (sequentialMode){
return (set[currentSet].alpha);
};
return (set[0].alpha);
}
}
}//package classes.common
Section 25
//SimpleTimer (classes.common.SimpleTimer)
package classes.common {
import flash.events.*;
import flash.utils.*;
public class SimpleTimer {
private var timer:Timer;
private var action:Function;
public function SimpleTimer(_arg1:int, _arg2:Function){
action = _arg2;
timer = new Timer((1000 * _arg1), 1);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimer);
timer.start();
}
private function onTimer(_arg1:TimerEvent):void{
action();
}
}
}//package classes.common
Section 26
//Suit_generator (classes.main.suits.Suit_generator)
package classes.main.suits {
import classes.main.*;
import classes.*;
public class Suit_generator {
var mandatoryClothes2:Array;
var exceptions:Array;
var mandatoryClothes:Array;
public function Suit_generator(){
var _local1:Array;
var _local2:String;
mandatoryClothes = Options.SUITS_MANDATORY;
mandatoryClothes2 = new Array();
exceptions = Options.SUITS_EXCEPTIONS;
super();
for each (_local1 in mandatoryClothes) {
for each (_local2 in _local1) {
mandatoryClothes2.push(_local2);
};
};
}
function addToNewSet(_arg1:String, _arg2:Array, _arg3:Object):Array{
var _local4:Boolean;
var _local5:String;
_local4 = true;
for each (_local5 in _arg2) {
if (((_arg3.hasOwnProperty(_local5)) && (!((_arg3[_local5].indexOf(_arg1) == -1))))){
_local4 = false;
};
};
if (_local4){
_arg2.push(_arg1);
};
return (_arg2);
}
public function generate_suitSet(_arg1:Object, _arg2:Object):Array{
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:*;
_local3 = new Array();
_local4 = new Array();
for each (_local5 in mandatoryClothes) {
if (_local5.length > 0){
_local8 = _local5[Usefull.randRange(0, (_local5.length - 1))];
addToNewSet(_local8, _local4, _arg1);
};
};
for each (_local6 in Options.OBJECT_NAMES) {
if ((((((mandatoryClothes2.indexOf(_local6) == -1)) && ((Usefull.randRange(0, 1) == 1)))) && ((exceptions.indexOf(_local6) == -1)))){
addToNewSet(_local6, _local4, _arg1);
};
};
for each (_local7 in _local4) {
_local9 = _arg2[_local7][Usefull.randRange(0, (_arg2[_local7].length - 1))];
_local3.push(_local9);
};
return (_local3);
}
}
}//package classes.main.suits
Section 27
//Suits (classes.main.suits.Suits)
package classes.main.suits {
import flash.display.*;
import classes.main.*;
import flash.utils.*;
import classes.*;
public class Suits {
var game:Game;
var generator:Suit_generator;
public function Suits(_arg1:Game){
game = _arg1;
generator = new Suit_generator();
checkNames();
}
public function checkNames():void{
var _local1:Array;
var _local2:Array;
var _local3:int;
var _local4:String;
for (_local3 in Options.SUITS) {
_local1 = new Array();
_local2 = Options.SUITS[_local3];
for each (_local4 in _local2) {
_local4 = (_local4.slice(0, 1).toUpperCase() + _local4.slice(1));
if (((!((_local4.indexOf("Wig") == -1))) || (game.objects.hasOwnProperty(_local4)))){
_local1.push(_local4);
} else {
trace(((("suits::checkNames:: Bad name in suit " + _local3) + ": ") + _local4));
};
};
Options.SUITS[_local3] = _local1;
};
}
public function create_randomSet():Array{
return (generator.generate_suitSet(Options.dressupTable, game.objectCounters));
}
public function checkSuitSet():int{
var _local1:int;
var _local2:int;
var _local3:Array;
var _local4:int;
var _local5:Item;
for (_local4 in Options.SUITS) {
_local3 = Options.SUITS[_local4];
_local3 = _local3.slice(1);
_local2 = 0;
_local1 = _local2;
for each (_local5 in game.objects) {
if (_local5.snaped){
_local1++;
if (_local3.indexOf(_local5.name) != -1){
_local2++;
};
};
};
if ((((_local1 == _local2)) && ((_local1 == _local3.length)))){
if (game.wigs.getCurrentLabel() == Options.SUITS[_local4][0]){
return (_local4);
};
return (-1);
};
};
return (-1);
}
}
}//package classes.main.suits
Section 28
//AnimatedItem (classes.main.AnimatedItem)
package classes.main {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.*;
public dynamic class AnimatedItem extends Item {
public function AnimatedItem(_arg1:String, _arg2:DisplayObject, _arg3:Point, _arg4:DisplayObject, _arg5:int, _arg6:String, _arg7:Game){
var newName = _arg1;
var iChildShape = _arg2;
var iPosition = _arg3;
var iParent = _arg4;
var iIndex = _arg5;
var cType = _arg6;
var iGame = _arg7;
super(newName, iChildShape, iPosition, iParent, iIndex, cType, iGame);
try {
childShape.stop();
} catch(e:Error) {
trace(("AnimatedItem:: childShape is not movieclip! Object: " + name));
};
}
override public function put_on(_arg1:Boolean=false):void{
if (type == "Sphere"){
if (!_arg1){
game.sounds.playSound("sound08");
};
_arg1 = true;
};
super.put_on();
if (_arg1){
play_animation();
};
}
public function play_animation():void{
childShape.gotoAndPlay("Animation");
childShape.addEventListener(Event.ENTER_FRAME, check_frame);
}
function check_frame(_arg1:Event):void{
if (((childShape.currentLabel) && ((childShape.currentLabel == "Still")))){
childShape.removeEventListener(Event.ENTER_FRAME, check_frame);
childShape.stop();
};
}
public function stop_animation():void{
childShape.gotoAndStop("Still");
}
}
}//package classes.main
Section 29
//ButtonsBar (classes.main.ButtonsBar)
package classes.main {
import flash.events.*;
import flash.display.*;
public class ButtonsBar extends MovieClip {
public var buttonWardrobe:MovieClip;
public var shown:Boolean;
public var locked:Boolean;
public var buttonReset:SimpleButton;
public var buttonWigs:SimpleButton;
public var buttonAvatarMail:SimpleButton;
public var buttonRandom:SimpleButton;
public var buttonTatoo:SimpleButton;
public var buttonEyes:SimpleButton;
public var buttonAuthors:SimpleButton;
public var buttonSkin:SimpleButton;
public var buttonSound:MovieClip;
public function ButtonsBar(){
shown = true;
locked = true;
this.stop();
init();
}
private function on_buttonRandom(_arg1:MouseEvent):void{
if (root.game.sounds){
root.game.sounds.playSound("random");
};
root.game.randomClothe();
}
public function init():void{
var _local1:DisplayObject;
var _local2:int;
_local2 = 0;
while (_local2 < numChildren) {
_local1 = this.getChildAt(_local2);
if (_local1.name.indexOf("button") != -1){
switch (_local1.name){
case "buttonEyes":
case "buttonSkin":
case "buttonWigs":
case "buttonTatoo":
addButton(_local1, on_buttonSequence);
break;
case "buttonReset":
addButton(_local1, on_buttonReset, true);
break;
case "buttonRandom":
addButton(_local1, on_buttonRandom);
break;
case "buttonWardrobe":
addButton(_local1, on_buttonWardrobe);
updateWardrobeButton();
break;
case "buttonAvatarMail":
addButton(_local1, on_buttonAvatar);
break;
case "buttonSound":
addButton(_local1, on_buttonSound);
updateSoundButton();
break;
case "buttonAuthors":
addButton(_local1, on_buttonAuthors, true);
break;
default:
Usefull.trace_debug(("ButtonsBar::init: Unknown button: " + _local1.name));
};
};
_local2++;
};
}
private function updateWardrobeButton():void{
if (((root.game) && (root.game.wardrobe))){
if (root.game.wardrobe.shown){
buttonWardrobe.gotoAndStop("On");
} else {
buttonWardrobe.gotoAndStop("Off");
};
} else {
buttonWardrobe.gotoAndStop("On");
};
}
private function on_buttonAuthors(_arg1:MouseEvent):void{
if (root.game.sounds){
root.game.sounds.playSound("authors");
};
root.game.showAuthors();
}
public function reset():void{
}
private function on_buttonWardrobe(_arg1:MouseEvent):void{
root.game.toggleWardrobe();
updateWardrobeButton();
}
private function addButton(_arg1:DisplayObject, _arg2:Function, _arg3:Boolean=false):void{
var subFunc:Function;
var buttObj = _arg1;
var eventFunc = _arg2;
var silent = _arg3;
subFunc = function (_arg1:MouseEvent){
if (locked){
return;
};
if (((!(silent)) && (root.game.sounds))){
root.game.sounds.playSound("push");
};
eventFunc(_arg1);
};
if (!buttObj.hasEventListener(MouseEvent.CLICK)){
buttObj.addEventListener(MouseEvent.CLICK, subFunc);
};
if (!buttObj.hasEventListener(MouseEvent.MOUSE_OVER)){
buttObj.addEventListener(MouseEvent.MOUSE_OVER, on_mouseOver);
};
}
private function updateSoundButton():void{
if (((root.game) && (root.game.sounds))){
if (root.game.sounds.soundsEnabled){
buttonSound.gotoAndStop("On");
} else {
buttonSound.gotoAndStop("Off");
};
} else {
buttonSound.gotoAndStop("On");
};
}
private function on_buttonAvatar(_arg1:MouseEvent):void{
root.game.popup_avatar();
}
private function on_buttonSound(_arg1:MouseEvent):void{
if (root.game.sounds){
root.game.sounds.toggleSounds();
};
updateSoundButton();
}
private function on_buttonSequence(_arg1:MouseEvent):void{
var _local2:String;
if (root.game.sounds){
root.game.sounds.playSound("push");
};
lastClicked = _arg1.target.name;
_local2 = _arg1.target.name.slice("button".length);
_local2 = _local2.toLowerCase();
root.game.switchSequence(_local2);
}
private function on_mouseOver(_arg1:MouseEvent):void{
if (locked){
return;
};
if (root.game.sounds){
root.game.sounds.playSound("over");
};
}
private function on_buttonClothe(_arg1:MouseEvent):void{
var _local2:String;
_local2 = _arg1.target.name.slice("button_".length);
root.game.switchClothe(_local2);
}
private function on_buttonReset(_arg1:MouseEvent):void{
if (root.game.objectsIntact){
return;
};
root.game.reset();
if (root.game.sounds){
root.game.sounds.playSound("reset");
};
}
}
}//package classes.main
Section 30
//Captcha (classes.main.Captcha)
package classes.main {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import classes.common.*;
import flash.text.*;
public class Captcha extends MovieClip {
private var _length:int;
public var inputDigits:TextField;
private var _inputColor:uint;
private var _flashTime:Number;
private var _timer:Timer;
public var digit3:Digit;
public var digit2:Digit;
public var digit1:Digit;
public var digit4:Digit;
private var _flash_inputColor:uint;
public function Captcha(){
stop();
digit1.set_random_number();
digit2.set_random_number();
digit3.set_random_number();
digit4.set_random_number();
_length = 4;
_inputColor = this.inputDigits.textColor;
_flash_inputColor = 0xCC0000;
_flashTime = 0.2;
_timer = new Timer((1000 * _flashTime), 4);
_timer.addEventListener(TimerEvent.TIMER, on_timer);
}
public function check():Boolean{
var _local1:String;
var _local2:Digit;
var _local3:int;
_local1 = this.inputDigits.text;
if (_local1.length != this._length){
flash();
return (false);
};
_local3 = 1;
while (_local3 < (_local1.length + 1)) {
_local2 = this.getChildByName(("digit" + _local3));
if (_local2.get_number() != int(_local1.charAt((_local1.length - _local3)))){
flash();
return (false);
};
_local3++;
};
return (true);
}
private function on_timer(_arg1:TimerEvent):void{
if (this.inputDigits.textColor == _flash_inputColor){
this.inputDigits.textColor = _inputColor;
} else {
this.inputDigits.textColor = _flash_inputColor;
};
}
private function flash():void{
_timer.reset();
_timer.start();
}
}
}//package classes.main
Section 31
//Game (classes.main.Game)
package classes.main {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import classes.common.*;
import classes.main.suits.*;
import classes.*;
import classes.objects.*;
public class Game {
public var wallpaper:Sequence;
public var suits:Suits;
public var objects:Object;
public var gameStage:DisplayObjectContainer;
public var wardrobe:Wardrobe;
public var wigs:SequenceSet;
public var tatoo:Sequence;
private var objectNames:Array;
public var sounds:Sounds;
private var girlToAppear:GroupAlpha;
public var objectCounters:Object;
public var avatar:Avatar;
var objectPairs:Object;
public var eyes:DisplayObject;
public var objectsIntact:Boolean;
public var skin:SequenceSet;
public function Game(_arg1:DisplayObjectContainer, _arg2:Sounds=null){
var iGameStage = _arg1;
var iSounds = _arg2;
objects = new Object();
objectNames = new Array();
objectCounters = new Object();
objectPairs = new Object();
super();
gameStage = iGameStage;
if (gameStage.popup){
gameStage.removeChild(gameStage.popup);
};
avatar = gameStage.avatar1;
if (iSounds){
sounds = iSounds;
} else {
sounds = new Sounds();
};
wardrobe = gameStage.wardrobe;
try {
skin = new SequenceSet(new Array(gameStage.body, gameStage.head, gameStage.finger1, gameStage.finger2, gameStage.nose));
} catch(e:Error) {
Usefull.trace_debug("Game:: bad skin objects!");
};
try {
wigs = new SequenceSet(new Array(gameStage.wigs0), true);
} catch(e:Error) {
Usefull.trace_debug("Game:: bad wigs objects!");
};
try {
eyes = gameStage.face;
} catch(e:Error) {
Usefull.trace_debug("Game:: bad eyes object!");
};
try {
tatoo = gameStage.tatoo;
} catch(e:Error) {
Usefull.trace_debug("Game:: bad tatoo object!");
};
init_objectNames();
initObjects();
makePairs();
suits = new Suits(this);
objectsIntact = false;
if (gameStage.hasOwnProperty("temporary_objects")){
gameStage.removeChild(gameStage.temporary_objects);
};
gameStage.wardrobe.visible = false;
gameStage.buttons.visible = false;
eyes.alpha = (tatoo.alpha = (skin.alpha = (wigs.alpha = 0)));
girlToAppear = new GirlToAppear(new Array(eyes, tatoo, skin, wigs), 0.06);
new SimpleTimer(0.5, girlToAppear.start_appear);
}
public function showAuthors():void{
gameStage.authors.y = (550 / 2);
gameStage.authors.play();
gameStage.authors.stage.addChild(gameStage.authors);
}
public function switchSequence(_arg1:String):void{
if (this.hasOwnProperty(_arg1)){
this[_arg1].switchToNext();
objectsIntact = false;
} else {
Usefull.trace_debug(("Game::switchSequence:: bad sequence name: " + _arg1));
};
}
public function traceObjects(_arg1:DisplayObjectContainer=null, _arg2:String=""):void{
var _local3:*;
var _local4:uint;
if (_arg1 == null){
_arg1 = gameStage;
};
_local4 = 0;
while (_local4 < _arg1.numChildren) {
_local3 = _arg1.getChildAt(_local4);
if (_local3 == null){
trace("child is null!!!");
return;
};
trace(_arg2, _local3, _local3.name);
if ((_arg1.getChildAt(_local4) is DisplayObjectContainer)){
traceObjects(DisplayObjectContainer(_local3), (_arg2 + " "));
};
_local4++;
};
}
private function init_objectNames():void{
var _local1:Array;
var _local2:String;
for each (_local1 in Options.WARDROBE_TABS) {
for each (_local2 in _local1) {
if (_local2.length > 2){
objectNames.push(_local2);
};
};
};
Options.OBJECT_NAMES = objectNames;
}
private function getObjectType(_arg1:String):String{
var _local2:int;
_local2 = 0;
while (_local2 < objectNames.length) {
if (_arg1.indexOf(objectNames[_local2]) == 0){
return (objectNames[_local2]);
};
_local2++;
};
return ("None");
}
function makePairs():void{
var _local1:Item;
var _local2:String;
var _local3:String;
var _local4:String;
if (!Options.PAIR_OBJECTS){
trace("No PAIR_OBJECTS");
return;
};
for each (_local1 in objects) {
if (Options.PAIR_OBJECTS.hasOwnProperty(_local1.type)){
_local2 = Options.PAIR_OBJECTS[_local1.type];
_local3 = _local1.name.slice(_local1.type.length);
_local4 = (_local2 + _local3);
if (objects.hasOwnProperty(_local4)){
_local1.pairObject = objects[_local4];
} else {
trace("makePairs:: bad pair: ", _local4, " for object : ", _local1.name);
};
};
};
}
public function isTypeInWardrobe(_arg1:String):Boolean{
return (wardrobe.isNameInSet(_arg1));
}
public function switchToWardrobe(_arg1:int):void{
wardrobe.switchToSet(_arg1);
}
public function randomClothe():void{
var _local1:*;
var _local2:String;
reset(false);
if (!suits){
Usefull.trace_debug("Game::randomClothe:: no suits!");
return;
};
_local1 = suits.create_randomSet();
for (_local2 in objects) {
if (_local1.indexOf(_local2) != -1){
objects[_local2].put_on();
if (objects[_local2].pairObject){
objects[_local2].pairObject.put_on();
};
};
};
if (wigs){
wigs.random();
};
if (skin){
skin.random();
};
if (eyes){
eyes.random();
};
if (tatoo){
tatoo.random();
};
objectsIntact = false;
}
public function hide_backs(_arg1:Boolean=true):void{
var _local2:Item;
gameStage.wallpaper.visible = !(_arg1);
for each (_local2 in objects) {
if (!_local2.snaped){
_local2.visible = !(_arg1);
};
};
}
public function toggleWardrobe():void{
var _local1:*;
var _local2:*;
_local1 = wardrobe.toggle();
for each (_local2 in objects) {
if (!_local2.snaped){
if (((_local1) && (isTypeInWardrobe(_local2.type)))){
_local2.show();
} else {
_local2.hide();
};
};
};
}
function toggleSounds(_arg1:Event):void{
if (!sounds.soundsEnabled){
return;
};
if (_arg1.type == Event.ACTIVATE){
sounds.turnOn();
} else {
sounds.turnOff();
};
}
public function get_avatarBmp(_arg1:Boolean=false, _arg2:int=-1):BitmapData{
if (_arg2 != -1){
avatar = gameStage.getChildByName(("avatar" + _arg2));
};
return (avatar.make_shot(_arg1));
}
public function resetSuitSet():void{
}
public function popup_avatar():void{
var _local1:*;
serialize_clothes();
_local1 = new Popup();
gameStage.addChild(_local1);
}
public function reset(_arg1:Boolean=true, _arg2:Boolean=true):void{
if (objectsIntact){
return;
};
serialize_clothes(true);
if (_arg1){
wardrobe.reset();
};
objectsIntact = true;
if (_arg2){
if (wigs){
wigs.reset();
};
if (skin){
skin.reset();
};
if (eyes){
eyes.reset();
};
if (tatoo){
tatoo.reset();
};
};
}
public function putOn_suit(_arg1:int):void{
var _local2:*;
var _local3:String;
var _local4:String;
reset();
_local2 = Options.SUITS[_arg1];
for (_local3 in objects) {
if (_local2.indexOf(_local3) != -1){
objects[_local3].put_on(true);
};
};
_local4 = _local2[0];
wigs.switchToLabel(_local4);
objectsIntact = false;
}
function initObjects(_arg1:DisplayObjectContainer=null):void{
var currentObject:*;
var currentParent:*;
var childShape:*;
var currentName:String;
var currentType:String;
var objectPosition:Point;
var newClothes:Item;
var i:uint;
var container = _arg1;
currentType = "None";
if (container == null){
container = gameStage;
};
i = 0;
while (i < container.numChildren) {
currentObject = container.getChildAt(i);
currentType = getObjectType(currentObject.name);
currentParent = currentObject.parent;
objectPosition = new Point(currentObject.x, currentObject.y);
if (currentType != "None"){
if (!objectCounters.hasOwnProperty(currentType)){
objectCounters[currentType] = new Array(currentObject.name);
} else {
objectCounters[currentType].push(currentObject.name);
};
if (currentObject.numChildren > 1){
trace(("Multiple children: \n" + currentObject.name), currentObject.numChildren, "\n");
};
try {
childShape = currentObject.getChildAt(0);
} catch(e:Error) {
childShape = new Shape();
};
if ((((Options.ANIMATED_OBJECTS.indexOf(currentType) == -1)) && ((Options.ANIMATED_OBJECTS.indexOf(currentObject.name) == -1)))){
newClothes = new Item(currentObject.name, childShape, objectPosition, currentParent, currentParent.getChildIndex(currentObject), currentType, this);
} else {
newClothes = new AnimatedItem(currentObject.name, childShape, objectPosition, currentParent, currentParent.getChildIndex(currentObject), currentType, this);
};
if (Options.SMALL_OBJECTS.indexOf(currentType) != -1){
newClothes.set_snapDistance(Options.SMALL_OBJECTS_DISTANCE);
};
newClothes.scaleX = currentObject.scaleX;
newClothes.scaleY = currentObject.scaleY;
try {
currentParent.removeChild(currentObject);
} catch(e:Error) {
};
currentParent.addChildAt(newClothes, i);
objects[newClothes.name] = newClothes;
} else {
if ((container.getChildAt(i) is DisplayObjectContainer)){
initObjects(DisplayObjectContainer(currentObject));
};
};
i = (i + 1);
};
}
public function get_avatarPng():ByteArray{
return (avatar.png_image_data);
}
public function serialize_clothes(_arg1:Boolean=false):void{
var _local2:*;
for each (_local2 in objects) {
if (((_arg1) || (!(_local2.snaped)))){
_local2.put_off(!(wardrobe.shown));
};
};
}
public function hide_hitch(_arg1:Boolean=true):void{
gameStage.logo_dressup.visible = !(_arg1);
gameStage.buttons.visible = !(_arg1);
}
}
}//package classes.main
Section 32
//Item (classes.main.Item)
package classes.main {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import classes.*;
public dynamic class Item extends Sprite {
private var pairOffsetY:int;
public var type:String;
var initPosition:Point;
var pairObject:DisplayObject;// = null
var _parent;
var _index:int;
public var inSuit:Boolean;// = false
var childShape:DisplayObject;
var snapDistance:int;
public var snaped:Boolean;
private var pairOffsetX:int;
var fixedIfSnaped:Boolean;
static var incompatibleTypes:Object;
static var offsetX:int;
static var offsetY:int;
static var wearedPosition:Point = new Point(0, 0);
static var game:Game;
public static var selectedItem:Item;
public function Item(_arg1:String, _arg2:DisplayObject, _arg3:Point, _arg4:DisplayObject, _arg5:int, _arg6:String, _arg7:Game){
inSuit = false;
snapDistance = Options.OBJECTS_DISTANCE;
pairObject = null;
super();
name = _arg1;
childShape = _arg2;
initPosition = _arg3;
x = initPosition.x;
y = initPosition.y;
_index = _arg5;
_parent = _arg4;
type = _arg6;
game = _arg7;
snaped = false;
fixedIfSnaped = false;
trackAsBitmap = true;
addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
addEventListener(MouseEvent.MOUSE_UP, stopDragging);
incompatibleTypes = Options.dressupTable;
}
public function fix():void{
if (hasEventListener(MouseEvent.MOUSE_DOWN)){
removeEventListener(MouseEvent.MOUSE_DOWN, startDragging);
};
if (hasEventListener(MouseEvent.MOUSE_UP)){
removeEventListener(MouseEvent.MOUSE_UP, stopDragging);
};
}
public function put_on(_arg1:Boolean=false):void{
var obj:*;
var withAnimation = _arg1;
x = wearedPosition.x;
y = wearedPosition.y;
snaped = true;
try {
_parent.addChildAt(this, _index);
} catch(err:Error) {
_parent.addChild(this);
};
for each (obj in game.objects) {
if (obj == this){
} else {
if (((!(checkCompatiblity(this.type, obj.type))) && (obj.snaped))){
obj.put_off(false);
};
};
};
show();
}
public function put_off(_arg1:Boolean=true):void{
var toHide = _arg1;
x = initPosition.x;
y = initPosition.y;
snaped = false;
try {
_parent.addChildAt(this, _index);
} catch(err:Error) {
_parent.addChild(this);
};
if (((toHide) || (!(game.isTypeInWardrobe(this.type))))){
hide();
};
}
public function hide():void{
if (((!(snaped)) && (contains(childShape)))){
removeChild(childShape);
put_off(false);
};
}
function dragObject(_arg1:MouseEvent):void{
this.x = (_arg1.stageX - offsetX);
this.y = (_arg1.stageY - offsetY);
if (this.pairObject){
pairObject.x = (this.x + pairOffsetX);
pairObject.y = (this.y + pairOffsetY);
};
}
function checkCompatiblity(_arg1:String, _arg2:String):Boolean{
var _local3:*;
if (_arg1 == _arg2){
return (false);
};
if (incompatibleTypes.hasOwnProperty(_arg1)){
_local3 = incompatibleTypes[_arg1];
if (_local3.indexOf(_arg2) != -1){
return (false);
};
};
return (true);
}
public function fixIfSnaped():void{
fixedIfSnaped = true;
}
public function stopDragging(_arg1:MouseEvent):void{
if (selectedItem != this){
if (((pairObject) && ((pairObject == selectedItem)))){
pairObject.stopDragging(_arg1);
};
return;
};
if (stage.hasEventListener(MouseEvent.MOUSE_MOVE)){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, dragObject);
};
if (Point.distance(wearedPosition, new Point(this.x, this.y)) <= snapDistance){
put_on();
if (this.pairObject){
pairObject.put_on();
};
} else {
snaped = false;
if (this.pairObject){
pairObject.snaped = false;
};
};
selectedItem = null;
}
function startDragging(_arg1:MouseEvent):void{
if (((snaped) && (fixedIfSnaped))){
return;
};
offsetX = (_arg1.stageX - this.x);
offsetY = (_arg1.stageY - this.y);
stage.addChild(this);
stage.addEventListener(MouseEvent.MOUSE_MOVE, dragObject);
game.objectsIntact = false;
selectedItem = this;
if (this.pairObject){
pairOffsetX = (this.x - pairObject.x);
pairOffsetY = (this.y - pairObject.y);
stage.addChild(pairObject);
if (pairObject.type.charAt((pairObject.type.length - 1)) == "b"){
stage.addChild(this);
};
};
}
public function set_snapDistance(_arg1:int):void{
snapDistance = _arg1;
}
public function show():void{
if (numChildren == 0){
addChild(childShape);
};
}
}
}//package classes.main
Section 33
//Logo_dressup (classes.main.Logo_dressup)
package classes.main {
import flash.events.*;
import flash.display.*;
import classes.common.*;
import classes.*;
import flash.text.*;
import flash.net.*;
public class Logo_dressup extends MovieClip {
public function Logo_dressup(){
this.addEventListener(MouseEvent.CLICK, on_group_click);
this.buttonMode = true;
}
private function on_group_click(_arg1:MouseEvent):void{
request = new URLRequest("http://www.dressupwho.com");
navigateToURL(request, "_blank");
}
}
}//package classes.main
Section 34
//Mail_input (classes.main.Mail_input)
package classes.main {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class Mail_input extends MovieClip {
public var inputField:TextField;
private var _inputColor:uint;
private var _flashTime:Number;
private var _timer:Timer;
private var _flash_inputColor:uint;
public function Mail_input(){
_inputColor = this.inputField.textColor;
_flash_inputColor = 0xCC0000;
_flashTime = 0.2;
_timer = new Timer((1000 * _flashTime), 4);
_timer.addEventListener(TimerEvent.TIMER, on_timer);
}
public function check():Boolean{
var _local1:String;
_local1 = this.inputField.text;
if (!validateEmail(_local1)){
flash();
return (false);
};
return (true);
}
private function validateEmail(_arg1:String):Boolean{
var _local2:RegExp;
var _local3:Object;
_local2 = /^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$/;
_local3 = _local2.exec(_arg1);
if (_local3 == null){
return (false);
};
return (true);
}
public function get_text():String{
return (this.inputField.text);
}
private function on_timer(_arg1:TimerEvent):void{
if (this.inputField.textColor == _flash_inputColor){
this.inputField.textColor = _inputColor;
} else {
this.inputField.textColor = _flash_inputColor;
};
}
private function flash():void{
_timer.reset();
_timer.start();
}
}
}//package classes.main
Section 35
//Main (classes.main.Main)
package classes.main {
import flash.events.*;
import flash.display.*;
import classes.common.*;
import classes.objects.*;
import flash.net.*;
public class Main extends MovieClip {
public var avatar2:Avatar;
public var avatar3:Avatar;
public var wallpaper:Wallpaper;
public var authors:MovieClip;
public var face:Face;
private var hitareaLogo:Sprite;
public var logo_dressup:Logo_dressup;
public var loadingComplete:Boolean;// = false
public var progressBar:MovieClip;
public var popup:Popup;
public var wigs0:Wigs0;
var introObject:MovieClip;
public var buttonSound:MovieClip;
var soundFlag:Boolean;// = false
public var sounds:Sounds;
var old_frame:int;// = 0
private var _stage_height:Number;
public var buttons:ButtonsBar;
public var buttonPlay:SimpleButton;
private var _stage_width:Number;
public var body:Body;
public var wardrobe:Wardrobe;
public var tatoo:Tatoo;
public var nose:Nose;
public var head:Head;
public var finger1:Finger1;
public var finger2:Finger2;
public var stars2:MovieClip;
public var stars1:MovieClip;
public var avatar1:Avatar;
public var game:Game;
public function Main(){
var _local1:Sprite;
loadingComplete = false;
old_frame = 0;
soundFlag = false;
super();
addFrameScript(1, frame2, 2, frame3);
stop();
stage.align = StageAlign.TOP_LEFT;
_stage_width = 700;
_stage_height = 550;
_local1 = new Sprite();
_local1.graphics.beginFill(0xFF0000);
_local1.graphics.drawRect(-1, -2, (_stage_width + 1), (_stage_height + 1));
addChild(_local1);
this.mask = _local1;
init_loader();
}
function updateProgress(_arg1:ProgressEvent):void{
var _local2:int;
var _local3:int;
_local2 = ((_arg1.bytesLoaded * 100) / _arg1.bytesTotal);
_local3 = (_local2 / 10);
progressBar.loadBarMask.scaleX = (_local2 * 0.01);
}
function init_loader():void{
var on_logo:*;
on_logo = function (_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.dressupwho.com");
navigateToURL(_local2, "_blank");
};
if (loaderInfo.bytesTotal == loaderInfo.bytesLoaded){
on_complete_();
};
loaderInfo.addEventListener(ProgressEvent.PROGRESS, updateProgress);
loaderInfo.addEventListener(Event.COMPLETE, on_completeLoading);
hitareaLogo = new Sprite();
hitareaLogo.graphics.beginFill(0xFFFF00, 0);
hitareaLogo.graphics.drawRect(0, 0, _stage_width, _stage_height);
hitareaLogo.graphics.endFill();
hitareaLogo.buttonMode = true;
hitareaLogo.addEventListener(MouseEvent.CLICK, on_logo);
addChild(hitareaLogo);
}
function onCLick2(_arg1:Event):void{
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=button_mainscreen_moregames"));
};
navigateToURL(request, "_blank");
}
function onCLick3(_arg1:Event):void{
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=button_gameover_moregames"));
};
navigateToURL(request, "_blank");
}
function onCLick4(_arg1:Event):void{
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=button_highscore_3000games"));
};
navigateToURL(request, "_blank");
}
function onCLick1(_arg1:Event):void{
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=logo_intro"));
};
navigateToURL(request, "_blank");
}
function frame2(){
dispatchEvent(new Event("is_loaded"));
}
function frame3(){
dispatchEvent(new Event("is_loaded"));
}
function init_start():void{
buttonPlay.addEventListener(MouseEvent.CLICK, on_buttonPlay);
if (!sounds){
sounds = new Sounds();
};
if (sounds.soundsEnabled){
buttonSound.gotoAndStop("On");
} else {
buttonSound.gotoAndStop("Off");
};
buttonSound.addEventListener(MouseEvent.CLICK, on_sound);
addEventListener(Event.ACTIVATE, toggleStageSounds);
addEventListener(Event.DEACTIVATE, toggleStageSounds);
addEventListener("is_loaded", on_sceneGame_loaded);
}
private function on_progress(_arg1:Event):void{
if (_arg1.target.totalFrames == _arg1.target.currentFrame){
addEventListener("is_loaded", on_sceneStart_loaded);
this.play();
};
}
function on_sound(_arg1:MouseEvent){
sounds.toggleSounds();
if (sounds.soundsEnabled){
buttonSound.gotoAndStop("On");
} else {
buttonSound.gotoAndStop("Off");
};
}
function on_sceneStart_loaded(_arg1:Event):void{
removeChild(hitareaLogo);
stop();
removeEventListener("is_loaded", on_sceneStart_loaded);
init_start();
}
function onStageButtonUp(_arg1:Event):void{
var _local2:Item;
_local2 = Item.selectedItem;
if (_local2 != null){
_local2.stopDragging(_arg1);
};
}
function on_sceneGame_loaded(_arg1:Event):void{
stop();
removeEventListener("is_loaded", on_sceneGame_loaded);
init_game();
}
function on_completeLoading(_arg1:Event):void{
on_complete_();
}
function init_game():void{
try {
hitareaLogo.addEventListener(MouseEvent.CLICK, onCLick2);
} catch(e:Error) {
Usefull.trace_debug("Bad hitareaLogo!");
};
game = new Game(this, sounds);
addEventListener(MouseEvent.MOUSE_UP, onStageButtonUp);
}
function on_complete_():void{
if (hasEventListener(ProgressEvent.PROGRESS)){
removeEventListener(ProgressEvent.PROGRESS);
};
if (hasEventListener(Event.COMPLETE)){
removeEventListener(Event.COMPLETE, on_completeLoading);
};
loadingComplete = true;
progressBar.gotoAndPlay(3);
progressBar.addEventListener(Event.ENTER_FRAME, on_progress);
}
function on_buttonPlay(_arg1:MouseEvent){
play();
}
function toggleStageSounds(_arg1:Event):void{
if (!sounds.soundsEnabled){
return;
};
if (_arg1.type == Event.ACTIVATE){
if (!soundFlag){
return;
};
sounds.turnOn();
} else {
sounds.turnOff();
soundFlag = true;
};
}
}
}//package classes.main
Section 36
//Popup (classes.main.Popup)
package classes.main {
import flash.events.*;
import flash.display.*;
import classes.common.*;
import classes.*;
import flash.text.*;
import classes.objects.*;
import flash.net.*;
public class Popup extends MovieClip {
public var buttonMail:SimpleButton;
public var checkBack:Checkbox2;
public var checkSize2:Checkbox1;
public var checkSize3:Checkbox1;
private var _lastCheckBox:String;
private var _withoutBack_flag:Boolean;// = false
private var _avaPicture:Shape;// = null
public var mail_input:Mail_input;
public var checkSize1:Checkbox1;
public var captcha:Captcha;
public var preview:MovieClip;
public var buttonClose:SimpleButton;
private static var _EVENT1:String = "is_loaded";
public function Popup(){
_avaPicture = null;
_withoutBack_flag = false;
super();
addFrameScript(0, frame1);
addEventListener(_EVENT1, eventHandler);
}
private function send_mail(_arg1:String):void{
var _local2:String;
var _local3:URLRequest;
_local2 = (Options.SERVER_URL + Options.SCRIPT_NAME);
_local2 = (_local2 + ("?email=" + _arg1));
_local2 = (_local2 + ("&gname=" + Options.MAIL_GAME_NAME));
_local3 = new URLRequest(_local2);
_local3.data = root.game.get_avatarPng();
_local3.method = URLRequestMethod.POST;
_local3.contentType = "application/octet-stream";
if (Options.TEST_SCRIPT){
navigateToURL(_local3, "_blank");
} else {
sendToURL(_local3);
};
}
private function on_mail(_arg1:MouseEvent):void{
if (!this.mail_input.check()){
if (root.sounds){
root.sounds.playSound("bad");
};
return;
};
if (!this.captcha.check()){
if (root.sounds){
root.sounds.playSound("bad");
};
return;
};
send_mail(this.mail_input.get_text());
on_close(null);
}
function removeListeners():void{
if (hasEventListener(_EVENT1)){
removeEventListener(_EVENT1, eventHandler);
};
}
function eventHandler(_arg1:Event):void{
if (!root){
return;
};
initButtons();
}
function frame1(){
dispatchEvent(new Event("is_loaded"));
}
function addButton(_arg1:DisplayObject, _arg2:Function):void{
var subFunc:Function;
var buttObj = _arg1;
var eventFunc = _arg2;
subFunc = function (_arg1:MouseEvent){
if (root.sounds){
root.sounds.playSound("push");
};
eventFunc(_arg1);
};
if (!buttObj.hasEventListener(MouseEvent.CLICK)){
buttObj.addEventListener(MouseEvent.CLICK, subFunc);
};
if (!buttObj.hasEventListener(MouseEvent.MOUSE_OVER)){
buttObj.addEventListener(MouseEvent.MOUSE_OVER, on_mouseOver);
};
}
function initButtons():void{
var bmp:BitmapData;
try {
addButton(buttonClose, on_close);
addButton(buttonMail, on_mail);
checkSize1.pushIntoGroup("SIZE");
checkSize2.pushIntoGroup("SIZE");
checkSize3.pushIntoGroup("SIZE");
checkSize1.addEventListener(Checkbox.MOUSE_CLICK, on_checkboxClicked);
checkSize2.addEventListener(Checkbox.MOUSE_CLICK, on_checkboxClicked);
checkSize3.addEventListener(Checkbox.MOUSE_CLICK, on_checkboxClicked);
checkSize1.toggle();
_lastCheckBox = "checkSize1";
checkBack.addEventListener(Checkbox.MOUSE_CLICK, on_checkBack);
this.visible = false;
bmp = root.game.get_avatarBmp(_withoutBack_flag, 1);
this.visible = true;
make_preview(bmp);
removeListeners();
} catch(e:Error) {
trace(e);
trace("Object does not exist!");
};
}
private function on_close(_arg1:MouseEvent):void{
parent.removeChild(this);
}
private function make_preview(_arg1:BitmapData):void{
var _local2:Shape;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = new Shape();
_local2.graphics.beginBitmapFill(_arg1);
_local2.graphics.drawRect(0, 0, _arg1.width, _arg1.height);
_local2.graphics.endFill();
if (_avaPicture){
preview.removeChild(_avaPicture);
};
_local3 = 1;
_local4 = 1;
_local5 = 1;
_local3 = (preview.width / _local2.width);
_local4 = (preview.height / _local2.height);
if (_local3 < _local4){
_local5 = _local3;
} else {
_local5 = _local4;
};
_local2.width = (_local2.width * _local5);
_local2.height = (_local2.height * _local5);
_avaPicture = _local2;
preview.addChild(_local2);
_local2.x = ((preview.width - _local2.width) / 2);
_local2.y = ((preview.height - _local2.height) / 2);
preview.back.visible = false;
}
private function on_checkboxClicked(_arg1:Event):void{
var _local2:int;
var _local3:BitmapData;
if (_arg1.target.name == _lastCheckBox){
return;
};
if (root.sounds){
root.sounds.playSound("push");
};
this.visible = false;
_local2 = _arg1.target.name.charAt((_arg1.target.name.length - 1));
_local3 = root.game.get_avatarBmp(_withoutBack_flag, _local2);
this.visible = true;
make_preview(_local3);
_lastCheckBox = _arg1.target.name;
}
private function on_checkBack(_arg1:Event):void{
var _local2:BitmapData;
if (root.sounds){
root.sounds.playSound("push");
};
_withoutBack_flag = _arg1.target.get_state();
this.visible = false;
_local2 = root.game.get_avatarBmp(_withoutBack_flag);
this.visible = true;
make_preview(_local2);
}
function on_mouseOver(_arg1:MouseEvent):void{
if (root.sounds){
root.sounds.playSound("over");
};
}
}
}//package classes.main
Section 37
//Sounds (classes.main.Sounds)
package classes.main {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import classes.*;
import flash.net.*;
public class Sounds {
var sounds:Object;
var music_pausePosition:int;// = 0
var channels:Object;
var music_startPosition:int;// = 0
public var soundsEnabled:Boolean;// = true
var musicChannel:SoundChannel;
public function Sounds(){
soundsEnabled = true;
sounds = new Object();
channels = new Object();
music_startPosition = 0;
music_pausePosition = 0;
super();
addSound("over", "sound01");
addSound("push", "sound02");
addSound("random", "sound03");
addSound("reset", "sound07");
addSound("authors", "sound05");
addSound("bad", "sound06");
addSound("wardrobe", "sound07");
setVolume(Options.SOUND_VOLUME, "sound");
addSound("music", "music");
musicChannel = sounds["music"].play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, on_musicComplete);
setVolume(Options.MUSIC_VOLUME, "music");
}
public function turnOn():void{
try {
musicChannel = sounds["music"].play(music_pausePosition);
musicChannel.addEventListener(Event.SOUND_COMPLETE, on_musicComplete);
setVolume(Options.MUSIC_VOLUME, "music");
} catch(e:Error) {
Usefull.trace_debug("Sounds::turnOn:: error!");
};
}
private function setVolume(_arg1:Number, _arg2:String):void{
var _local3:SoundTransform;
var _local4:String;
if (_arg2 == "music"){
_local3 = musicChannel.soundTransform;
_local3.volume = _arg1;
musicChannel.soundTransform = _local3;
} else {
for (_local4 in channels) {
if (_local4.indexOf("music") == -1){
_local3 = channels[_local4].soundTransform;
_local3.volume = _arg1;
channels[_local4].soundTransform = _local3;
};
};
};
}
public function stopSound(_arg1:String):void{
if (((soundsEnabled) && (channels[_arg1]))){
channels[_arg1].stop();
};
}
function addSound(_arg1:String, _arg2:String):void{
var transform:SoundTransform;
var ClassReference:Class;
var req:URLRequest;
var soundName = _arg1;
var iSoundclassName = _arg2;
try {
ClassReference = (getDefinitionByName(iSoundclassName) as Class);
sounds[soundName] = new (ClassReference);
} catch(e:Error) {
req = new URLRequest("sound/sound01.mp3");
sounds[soundName] = new Sound(req);
Usefull.trace_debug(("Sounds::addSound:: added empty sound: " + soundName));
};
transform = new SoundTransform(0);
channels[soundName] = sounds[soundName].play(0, 0, transform);
channels[soundName].stop();
}
public function turnOff():void{
try {
music_pausePosition = musicChannel.position;
musicChannel.stop();
musicChannel = null;
} catch(e:Error) {
Usefull.trace_debug("Sounds::turnOff:: error!");
};
}
private function on_musicComplete(_arg1:Event){
musicChannel = sounds["music"].play(music_startPosition);
musicChannel.addEventListener(Event.SOUND_COMPLETE, on_musicComplete);
setVolume(Options.MUSIC_VOLUME, "music");
}
public function toggleSounds():void{
soundsEnabled = !(soundsEnabled);
if (!soundsEnabled){
turnOff();
} else {
turnOn();
};
}
public function playSound(_arg1:String, _arg2:Number=0, _arg3:int=0):void{
if (!soundsEnabled){
return;
};
if (channels.hasOwnProperty(_arg1)){
channels[_arg1] = sounds[_arg1].play(_arg2, _arg3, channels[_arg1].soundTransform);
} else {
trace(("Sounds::playSound:: Bad sound name: " + _arg1));
};
}
}
}//package classes.main
Section 38
//Usefull (classes.main.Usefull)
package classes.main {
import classes.*;
public class Usefull {
public static function randRange(_arg1:Number, _arg2:Number):Number{
return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1));
}
public static function trace_debug(_arg1:String):void{
if (Options.DEBUG){
trace(_arg1);
};
}
}
}//package classes.main
Section 39
//Wardrobe (classes.main.Wardrobe)
package classes.main {
import flash.events.*;
import flash.display.*;
import classes.*;
public class Wardrobe extends MovieClip {
var itemSets:Array;
var currentSet:int;// = -1
public var shown:Boolean;
var prevSet:int;// = -1
public var button_0:SimpleButton;
public var button_3:SimpleButton;
public var button_1:SimpleButton;
public var button_4:SimpleButton;
public var button_2:SimpleButton;
public function Wardrobe(){
currentSet = -1;
prevSet = -1;
super();
itemSets = Options.WARDROBE_TABS;
shown = true;
init_buttons();
}
public function switchToSet(_arg1:int):void{
var _local2:Item;
if (((!(root.game)) || ((currentSet == _arg1)))){
return;
};
for each (_local2 in root.game.objects) {
_local2.inSuit = false;
if (((shown) && (!((itemSets[_arg1].indexOf(_local2.type) == -1))))){
_local2.show();
} else {
_local2.hide();
};
};
prevSet = currentSet;
currentSet = _arg1;
}
public function toggle():Boolean{
this.visible = !(this.visible);
shown = this.visible;
return (shown);
}
public function reset():void{
switchToSet(Options.WARDROBE_DEFAULT_TAB);
}
public function isNameInSet(_arg1:String):Boolean{
if (((!((currentSet == -1))) && (!((itemSets[currentSet].indexOf(_arg1) == -1))))){
return (true);
};
return (false);
}
public function init_buttons():void{
var _local1:DisplayObject;
var _local2:int;
_local2 = 0;
while (_local2 < this.numChildren) {
currButton = this.getChildAt(_local2);
if (currButton.name.indexOf("button") != -1){
addButton(currButton, on_button);
};
_local2++;
};
}
function on_button(_arg1:MouseEvent):void{
var _local2:int;
if (root.game.sounds){
root.game.sounds.playSound("push");
};
_local2 = _arg1.target.name.slice("button_".length);
switchToSet(_local2);
}
function addButton(_arg1:DisplayObject, _arg2:Function):void{
_arg1.addEventListener(MouseEvent.CLICK, _arg2);
_arg1.addEventListener(MouseEvent.MOUSE_OVER, on_mouseOver);
}
function on_mouseOver(_arg1:MouseEvent):void{
if (root.game.sounds){
root.game.sounds.playSound("over");
};
}
public function switchToPreviousSet():void{
switchToSet(prevSet);
}
}
}//package classes.main
Section 40
//Bird1 (classes.objects.Bird1)
package classes.objects {
import classes.common.*;
public class Bird1 extends OnTimer {
public function Bird1(){
set_timeRange(8, 20);
}
}
}//package classes.objects
Section 41
//Bird2 (classes.objects.Bird2)
package classes.objects {
import classes.common.*;
public class Bird2 extends OnTimer {
public function Bird2(){
set_timeRange(8, 22);
}
}
}//package classes.objects
Section 42
//Boat (classes.objects.Boat)
package classes.objects {
import flash.events.*;
import classes.common.*;
public class Boat extends Floater {
public function Boat(){
addFrameScript(22, frame23);
super();
init(0.8, true);
}
function frame23(){
gotoAndPlay(1);
}
public function move_again():void{
x = -(width);
this.gotoAndPlay(1);
this.startMove();
}
override protected function move(_arg1:Event):void{
super.move(_arg1);
if ((((x >= 550)) && (!(root.wardrobe.visible)))){
stopMove();
this.gotoAndStop("Kraken");
};
}
}
}//package classes.objects
Section 43
//Body (classes.objects.Body)
package classes.objects {
import classes.common.*;
public class Body extends Sequence {
}
}//package classes.objects
Section 44
//Checkbox1 (classes.objects.Checkbox1)
package classes.objects {
import classes.common.*;
public class Checkbox1 extends Checkbox {
}
}//package classes.objects
Section 45
//Checkbox2 (classes.objects.Checkbox2)
package classes.objects {
import classes.common.*;
public class Checkbox2 extends Checkbox {
}
}//package classes.objects
Section 46
//Cloud1 (classes.objects.Cloud1)
package classes.objects {
import classes.main.*;
import classes.common.*;
public class Cloud1 extends Floater {
public function Cloud1(){
var _local1:Number;
super();
_local1 = (Usefull.randRange(1, 9) * 0.1);
init(_local1, false);
}
}
}//package classes.objects
Section 47
//Cloud2 (classes.objects.Cloud2)
package classes.objects {
import classes.main.*;
import classes.common.*;
public class Cloud2 extends Floater {
public function Cloud2(){
var _local1:Number;
super();
_local1 = (Usefull.randRange(1, 9) * 0.1);
init(_local1, false);
}
}
}//package classes.objects
Section 48
//Cloud3 (classes.objects.Cloud3)
package classes.objects {
import classes.main.*;
import classes.common.*;
public class Cloud3 extends Floater {
public function Cloud3(){
var _local1:Number;
super();
_local1 = (Usefull.randRange(1, 9) * 0.1);
init(_local1, false);
}
}
}//package classes.objects
Section 49
//Cloud4 (classes.objects.Cloud4)
package classes.objects {
import classes.main.*;
import classes.common.*;
public class Cloud4 extends Floater {
public function Cloud4(){
var _local1:Number;
super();
_local1 = (Usefull.randRange(1, 9) * 0.1);
init(_local1, false);
}
}
}//package classes.objects
Section 50
//Crab1 (classes.objects.Crab1)
package classes.objects {
import classes.common.*;
public class Crab1 extends OnTimer {
public function Crab1(){
set_timeRange(2, 6);
}
}
}//package classes.objects
Section 51
//Crab2 (classes.objects.Crab2)
package classes.objects {
import classes.common.*;
public class Crab2 extends OnTimer {
public function Crab2(){
set_timeRange(2, 6);
}
}
}//package classes.objects
Section 52
//Daytime (classes.objects.Daytime)
package classes.objects {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import classes.common.*;
public class Daytime extends MovieClip {
var objects:Array;
public var back2:MovieClip;
public var back3:MovieClip;
public var back1:MovieClip;
var speed:Number;
var oldBack:DisplayObject;
var time:Number;
var currindex;
public function Daytime(){
objects = new Array(this.back1, this.back3, this.back2);
time = 10;
currindex = 0;
speed = 0.2;
timer = new Timer((1000 * time), 1);
if (!timer.hasEventListener(TimerEvent.TIMER_COMPLETE)){
timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimer);
};
timer.start();
}
private function start_appear(_arg1:DisplayObject):void{
_arg1.alpha = 0;
_arg1.visible = true;
this.addEventListener(Event.ENTER_FRAME, appear);
}
private function change_back():void{
oldBack = objects[currindex];
currindex++;
if (currindex == objects.length){
currindex = 0;
};
this.addChild(objects[currindex]);
start_appear(objects[currindex]);
}
private function onTimer(_arg1:TimerEvent):void{
change_back();
}
private function appear(_arg1:Event){
objects[currindex].alpha = (objects[currindex].alpha + speed);
if (objects[currindex].alpha >= 1){
objects[currindex].alpha = 1;
oldBack.visible = false;
this.removeEventListener(Event.ENTER_FRAME, appear);
timer.reset();
timer.start();
};
}
}
}//package classes.objects
Section 53
//Face (classes.objects.Face)
package classes.objects {
import classes.common.*;
public class Face extends OnTimerLabels {
public function switchToNext():void{
var _local1:*;
var _local2:int;
_local2 = 0;
while (_local2 < numChildren) {
_local1 = getChildAt(_local2);
if ((_local1 is Iris)){
_local1.switchToNext();
};
_local2++;
};
}
override public function reset():void{
var _local1:*;
var _local2:int;
_local2 = 0;
while (_local2 < numChildren) {
_local1 = getChildAt(_local2);
if ((_local1 is Iris)){
_local1.reset();
};
_local2++;
};
}
public function random():void{
var _local1:*;
var _local2:int;
_local2 = 0;
while (_local2 < numChildren) {
_local1 = getChildAt(_local2);
if ((_local1 is Iris)){
_local1.random();
};
_local2++;
};
}
}
}//package classes.objects
Section 54
//Finger1 (classes.objects.Finger1)
package classes.objects {
import classes.common.*;
public class Finger1 extends Sequence {
}
}//package classes.objects
Section 55
//Finger2 (classes.objects.Finger2)
package classes.objects {
import classes.common.*;
public class Finger2 extends Sequence {
}
}//package classes.objects
Section 56
//GirlToAppear (classes.objects.GirlToAppear)
package classes.objects {
import classes.common.*;
public class GirlToAppear extends GroupAlpha {
private var gameRoot;
public function GirlToAppear(_arg1:Array, _arg2:Number){
super(_arg1, _arg2);
gameRoot = objSet[0].root;
gameRoot.stars1.stop();
gameRoot.stars1.visible = false;
gameRoot.stars2.stop();
gameRoot.stars2.visible = false;
}
override public function start_appear():void{
super.start_appear();
gameRoot.stars1.visible = true;
gameRoot.stars1.play();
gameRoot.stars2.visible = true;
gameRoot.stars2.play();
}
override public function stop_appear():void{
super.stop_appear();
gameRoot.removeChild(gameRoot.stars1);
gameRoot.removeChild(gameRoot.stars2);
gameRoot.wardrobe.visible = true;
gameRoot.buttons.visible = true;
gameRoot.buttons.locked = false;
gameRoot.game.reset();
}
}
}//package classes.objects
Section 57
//Head (classes.objects.Head)
package classes.objects {
import classes.common.*;
public class Head extends Sequence {
}
}//package classes.objects
Section 58
//Iris (classes.objects.Iris)
package classes.objects {
import classes.main.*;
import classes.common.*;
public class Iris extends Sequence {
private static var _initIndex:int;
public function Iris():void{
if (!_initIndex){
_initIndex = 1;
};
switchToFrame(_initIndex);
}
override public function switchToNext():Boolean{
var _local1:Boolean;
_local1 = super.switchToNext();
_initIndex = this.currentFrame;
return (_local1);
}
override public function reset():void{
super.reset();
_initIndex = this.currentFrame;
}
override public function random():void{
super.random();
_initIndex = this.currentFrame;
}
}
}//package classes.objects
Section 59
//Nose (classes.objects.Nose)
package classes.objects {
import classes.common.*;
public class Nose extends Sequence {
}
}//package classes.objects
Section 60
//Shine (classes.objects.Shine)
package classes.objects {
import classes.common.*;
public class Shine extends OnTimer {
public function Shine(){
set_timeRange(8, 22);
}
}
}//package classes.objects
Section 61
//Tatoo (classes.objects.Tatoo)
package classes.objects {
import classes.common.*;
public class Tatoo extends Sequence {
public function Tatoo(){
set_initFrame(totalFrames);
}
}
}//package classes.objects
Section 62
//Wallpaper (classes.objects.Wallpaper)
package classes.objects {
import flash.display.*;
import classes.common.*;
public class Wallpaper extends MovieClip {
public var daytime:Daytime;
public function Wallpaper(){
stop();
}
}
}//package classes.objects
Section 63
//Wigs0 (classes.objects.Wigs0)
package classes.objects {
import classes.common.*;
public class Wigs0 extends Sequence {
}
}//package classes.objects
Section 64
//Options (classes.Options)
package classes {
public class Options {
public static const DEBUG:Boolean = false;
public static var SCRIPT_NAME:String = "index.php";
public static var LOCALE_NUMBER:int = 14;
public static var PAIR_OBJECTS:Object = {};
public static var SMALL_OBJECTS_DISTANCE:int = 200;
public static var MAIL_GAME_NAME:String = "Calypso Dress Up";
public static var SERVER_URL:String = "http://www.trickster-games.com/avatar_mailer/";
public static var ANIMATED_OBJECTS:Array = new Array();
public static var WARDROBE_DEFAULT_TAB:int = 0;
public static var dressupTable:Object = {Dress:new Array("Skirt", "Top"), Skirt:new Array("Dress"), Top:new Array("Dress")};
public static var TEST_SCRIPT:Boolean = false;
public static var SUITS_MANDATORY:Array = new Array(new Array("Skirt", "Dress"), new Array("Top"), new Array("Shoes"));
public static var WARDROBE_TABS = new Array(new Array("Dress"), new Array("Skirt"), new Array("Top"), new Array("Shoes", "Bag"), new Array("Abracelet", "Accessory", "Crown", "Earring", "Necklace"));
public static var MUSIC_VOLUME:Number = 1;
public static var SUITS = new Array();
public static var OBJECTS_DISTANCE:int = 150;
public static var SOUND_VOLUME:Number = 1;
public static var SMALL_OBJECTS:Array = new Array();
public static var GAME_NAME:String = "calypso_dress_up";
public static var SUITS_EXCEPTIONS:Array = new Array();
}
}//package classes
Section 65
//PNGEncoder2 (com.adobe.images.PNGEncoder2)
package com.adobe.images {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class PNGEncoder2 {
private static var crcTableComputed:Boolean = false;
private static var crcTable:Array;
private static function writeChunk(_arg1:ByteArray, _arg2:uint, _arg3:ByteArray){
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:int;
var _local9:uint;
var _local10:uint;
if (!crcTableComputed){
crcTableComputed = true;
crcTable = [];
_local9 = 0;
while (_local9 < 0x0100) {
_local7 = _local9;
_local10 = 0;
while (_local10 < 8) {
if ((_local7 & 1)){
_local7 = uint((uint(3988292384) ^ uint((_local7 >>> 1))));
} else {
_local7 = uint((_local7 >>> 1));
};
_local10++;
};
crcTable[_local9] = _local7;
_local9++;
};
};
_local4 = 0;
if (_arg3 != null){
_local4 = _arg3.length;
};
_arg1.writeUnsignedInt(_local4);
_local5 = _arg1.position;
_arg1.writeUnsignedInt(_arg2);
if (_arg3 != null){
_arg1.writeBytes(_arg3);
};
_local6 = _arg1.position;
_arg1.position = _local5;
_local7 = 4294967295;
_local8 = 0;
while (_local8 < (_local6 - _local5)) {
_local7 = uint((crcTable[((_local7 ^ _arg1.readUnsignedByte()) & uint(0xFF))] ^ uint((_local7 >>> 8))));
_local8++;
};
_local7 = uint((_local7 ^ uint(4294967295)));
_arg1.position = _local6;
_arg1.writeUnsignedInt(_local7);
}
public static function encode(_arg1:BitmapData):ByteArray{
var _local2:ByteArray;
var _local3:ByteArray;
var _local4:ByteArray;
var _local5:int;
var _local6:uint;
var _local7:int;
_local2 = new ByteArray();
_local2.writeUnsignedInt(2303741511);
_local2.writeUnsignedInt(218765834);
_local3 = new ByteArray();
_local3.writeInt(_arg1.width);
_local3.writeInt(_arg1.height);
_local3.writeUnsignedInt(134610944);
_local3.writeByte(0);
writeChunk(_local2, 1229472850, _local3);
_local4 = new ByteArray();
_local5 = 0;
while (_local5 < _arg1.height) {
_local4.writeByte(0);
if (!_arg1.transparent){
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | 0xFF)));
_local7++;
};
} else {
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel32(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | (_local6 >>> 24))));
_local7++;
};
};
_local5++;
};
_local4.compress();
writeChunk(_local2, 1229209940, _local4);
writeChunk(_local2, 1229278788, null);
return (_local2);
}
}
}//package com.adobe.images
Section 66
//music (music)
package {
import flash.media.*;
public dynamic class music extends Sound {
}
}//package
Section 67
//sound01 (sound01)
package {
import flash.media.*;
public dynamic class sound01 extends Sound {
}
}//package
Section 68
//sound02 (sound02)
package {
import flash.media.*;
public dynamic class sound02 extends Sound {
}
}//package
Section 69
//sound03 (sound03)
package {
import flash.media.*;
public dynamic class sound03 extends Sound {
}
}//package
Section 70
//sound05 (sound05)
package {
import flash.media.*;
public dynamic class sound05 extends Sound {
}
}//package
Section 71
//sound06 (sound06)
package {
import flash.media.*;
public dynamic class sound06 extends Sound {
}
}//package
Section 72
//sound07 (sound07)
package {
import flash.media.*;
public dynamic class sound07 extends Sound {
}
}//package