Section 1
//AbstractPreload (com.kerb.game.AbstractPreload)
package com.kerb.game {
import flash.events.*;
import flash.display.*;
import flash.ui.*;
import flash.utils.*;
import flash.net.*;
public class AbstractPreload extends MovieClip {
protected var lowQualityItem:ContextMenuItem;
protected var url:String;
protected var highQualityItem:ContextMenuItem;
protected var mediumQualityItem:ContextMenuItem;
public static const KERB_SITE_URL:String = "http://www.kerb.co.uk";
public static const DOWNLOAD_THIS_GAME_URL:String = "http://blog.kerb.co.uk/download.php?url=";
public static const KERB_GAMES_URL:String = "http://www.kerbgames.com";
public function AbstractPreload(){
initStage();
initContextMenu();
}
protected function initContextMenu():void{
var _local1:ContextMenuItem;
contextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
url = loaderInfo.url;
_local1 = new ContextMenuItem("Built by Kerb!", false);
_local1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onKerbMenuItemSelect);
contextMenu.customItems.push(_local1);
lowQualityItem = new ContextMenuItem("Low Quality (fastest)", true);
lowQualityItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onQualityMenuItemSelect);
contextMenu.customItems.push(lowQualityItem);
mediumQualityItem = new ContextMenuItem("Medium Quality", false);
mediumQualityItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onQualityMenuItemSelect);
contextMenu.customItems.push(mediumQualityItem);
highQualityItem = new ContextMenuItem("• High Quality (slowest)", false);
highQualityItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onQualityMenuItemSelect);
contextMenu.customItems.push(highQualityItem);
_local1 = new ContextMenuItem("Download This Game", true);
_local1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onDownloadMenuItemSelect);
contextMenu.customItems.push(_local1);
}
protected function onKerbMenuItemSelect(_arg1:Event):void{
navigateToURL(new URLRequest(KERB_SITE_URL), "_blank");
}
protected function initStage():void{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.stageFocusRect = false;
}
protected function onDownloadMenuItemSelect(_arg1:Event):void{
navigateToURL(new URLRequest((DOWNLOAD_THIS_GAME_URL + url)), "_blank");
}
protected function initMainContent(_arg1:String):void{
var _local2:Class = Class(getDefinitionByName(_arg1));
if (_local2){
addChild((new (_local2) as DisplayObject));
};
}
protected function onQualityMenuItemSelect(_arg1:Event):void{
lowQualityItem.caption = "Low Quality (fast)";
mediumQualityItem.caption = "Medium Quality";
highQualityItem.caption = "High Quality (slow)";
switch (_arg1.currentTarget){
case lowQualityItem:
lowQualityItem.caption = ("• " + lowQualityItem.caption);
stage.quality = StageQuality.LOW;
break;
case mediumQualityItem:
mediumQualityItem.caption = ("• " + mediumQualityItem.caption);
stage.quality = StageQuality.MEDIUM;
break;
case highQualityItem:
highQualityItem.caption = ("• " + highQualityItem.caption);
stage.quality = StageQuality.HIGH;
break;
};
}
}
}//package com.kerb.game
Section 2
//Action (com.kerb.gamestation.action.Action)
package com.kerb.gamestation.action {
public final class Action {
private var _actionPoints:int;
private var _id:int;
public static const VisitLocation:Action = new Action(1, 5);
;
public static const IncreaseIntelligence:Action = new Action(6, 5);
;
public static const TalkToGirl:Action = new Action(2);
;
public static const IncreaseAthleticism:Action = new Action(7, 4);
;
public static const IncreaseCharm:Action = new Action(5, 3);
;
public static const GiveGiftToGirl:Action = new Action(4);
;
public static const AskGirlQuestion:Action = new Action(3);
;
public static const Job:Action = new Action(0);
;
public function Action(_arg1:int, _arg2:int=-1){
_id = _arg1;
_actionPoints = _arg2;
}
public function getAP():int{
return (_actionPoints);
}
}
}//package com.kerb.gamestation.action
Section 3
//ActionPointProcessor (com.kerb.gamestation.action.ActionPointProcessor)
package com.kerb.gamestation.action {
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.job.*;
public final class ActionPointProcessor {
private var _player:Player;
private function _doAskGirlQuestion(_arg1:Girl):void{
var _local2:int = _arg1.getAPToAskQuestion();
if (_player.getAP() < _local2){
throw (new Error("insufficient_ap"));
};
_player.takeAP(_local2);
}
private function _doGiveGiftToGirl(_arg1:Girl):void{
var _local2:int = _arg1.getAPToGiveGift();
if (_player.getAP() < _local2){
throw (new Error("insufficient_ap"));
};
_player.takeAP(_local2);
}
private function _doJob(_arg1:Job):void{
if (_player.getAP() < _arg1.getAP()){
throw (new Error("insufficient_ap"));
};
_player.takeAP(_arg1.getAP());
}
private function _checkGenericAction(_arg1:Action):Boolean{
if (_arg1.getAP() == -1){
throw (new Error("a generic action must have a non-negative number of required action points"));
};
if (_player.getAP() < _arg1.getAP()){
return (false);
};
return (true);
}
public function checkGenericAction(_arg1:Action, _arg2:Player):Boolean{
_player = _arg2;
return (_checkGenericAction(_arg1));
}
private function _doGenericAction(_arg1:Action):void{
if (_arg1.getAP() == -1){
throw (new Error("a generic action must have a non-negative number of required action points"));
};
if (_player.getAP() < _arg1.getAP()){
throw (new Error("insufficient_ap"));
};
_player.takeAP(_arg1.getAP());
}
private function _doTalkToGirl(_arg1:Girl):void{
var _local2:int = _arg1.getAPToTalk();
if (_player.getAP() < _local2){
throw (new Error("insufficient_ap"));
};
_player.takeAP(_local2);
}
public function process(_arg1:Action, _arg2:Player, _arg3:Object=null):void{
_player = _arg2;
switch (_arg1){
case Action.Job:
_doJob((_arg3 as Job));
break;
case Action.GiveGiftToGirl:
_doGiveGiftToGirl((_arg3 as Girl));
break;
case Action.TalkToGirl:
_doTalkToGirl((_arg3 as Girl));
break;
case Action.AskGirlQuestion:
_doAskGirlQuestion((_arg3 as Girl));
break;
default:
_doGenericAction(_arg1);
break;
};
}
}
}//package com.kerb.gamestation.action
Section 4
//OwnableItem (com.kerb.gamestation.item.OwnableItem)
package com.kerb.gamestation.item {
public final class OwnableItem {
public var pop:int;
public var goth:int;
public var linkage:String;
public var isGift:Boolean;
public var name:String;
public var sporty:int;
public var cost:int;
public var id:int;
public var isOutfit:Boolean;
}
}//package com.kerb.gamestation.item
Section 5
//OwnedItem (com.kerb.gamestation.item.OwnedItem)
package com.kerb.gamestation.item {
import com.kerb.gamestation.owner.*;
public final class OwnedItem {
public var owner:int;
public var isEquipped:Boolean;
public var ownableItem:OwnableItem;
public function OwnedItem(_arg1:OwnableItem){
this.ownableItem = _arg1;
owner = Owner.NONE;
}
public function getLiking():int{
switch (owner){
case Owner.GOTH_GIRL:
return (ownableItem.goth);
case Owner.SPORTY_GIRL:
return (ownableItem.sporty);
case Owner.POP_GIRL:
return (ownableItem.pop);
};
throw (new Error("invalid argument"));
}
}
}//package com.kerb.gamestation.item
Section 6
//OwnedItemFactory (com.kerb.gamestation.item.OwnedItemFactory)
package com.kerb.gamestation.item {
import flash.utils.*;
import com.kerb.utils.*;
public final class OwnedItemFactory {
private var _allOwnableItems:Array;
private var XMLOwnableItemData:Class;
private var _ownableItemData:XML;
private static var _allow:Boolean;
private static var _instance:OwnedItemFactory;
public function OwnedItemFactory(){
XMLOwnableItemData = OwnedItemFactory_XMLOwnableItemData;
super();
if (!_allow){
throw (new Error("class is singleton"));
};
_allOwnableItems = [];
_init();
}
public function createOwnedItemFromId(_arg1:int):OwnedItem{
var _local3:OwnableItem;
var _local2:OwnedItem;
for each (_local3 in _allOwnableItems) {
if (_local3.id == _arg1){
_local2 = new OwnedItem(_local3);
};
};
if (_local2 == null){
throw (new Error((("an item with the id " + _arg1) + " does not exist")));
};
return (_local2);
}
public function createOwnedItemFromName(_arg1:String):OwnedItem{
var _local3:OwnableItem;
var _local2:OwnedItem;
for each (_local3 in _allOwnableItems) {
if (_local3.name == _arg1){
_local2 = new OwnedItem(_local3);
};
};
if (_local2 == null){
throw (new Error((("an item by the name \"" + TextManager.getInstance().getTextById(_arg1)) + "\" does not exist")));
};
return (_local2);
}
public function getAllOwnableItems():Array{
return (_allOwnableItems);
}
private function _init():void{
var _local4:OwnableItem;
var _local5:XML;
var _local1:ByteArray = (new XMLOwnableItemData() as ByteArray);
var _local2:String = _local1.readUTFBytes(3);
if (_local2.length == 1){
_ownableItemData = new XML(_local1.readUTFBytes((_local1.length - 3)));
} else {
_ownableItemData = new XML((_local2 + _local1.readUTFBytes((_local1.length - 3))));
};
var _local3:XMLList = _ownableItemData.ownableItems.children();
for each (_local5 in _local3) {
_local4 = new OwnableItem();
_local4.id = _local5.@id;
_local4.name = _local5.@name;
_local4.linkage = _local5.@linkage;
_local4.cost = _local5.@cost;
_local4.isGift = (_local5.@isGift == "true");
_local4.isOutfit = (_local5.@isOutfit == "true");
_local4.goth = _local5.@goth;
_local4.sporty = _local5.@sporty;
_local4.pop = _local5.@pop;
_allOwnableItems.push(_local4);
};
}
public static function instance():OwnedItemFactory{
if (_instance == null){
_allow = true;
_instance = new (OwnedItemFactory);
_allow = false;
};
return (_instance);
}
}
}//package com.kerb.gamestation.item
Section 7
//OwnedItemFactory_XMLOwnableItemData (com.kerb.gamestation.item.OwnedItemFactory_XMLOwnableItemData)
package com.kerb.gamestation.item {
import mx.core.*;
public class OwnedItemFactory_XMLOwnableItemData extends ByteArrayAsset {
}
}//package com.kerb.gamestation.item
Section 8
//OwnedItemLister (com.kerb.gamestation.item.OwnedItemLister)
package com.kerb.gamestation.item {
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
public final class OwnedItemLister {
public function OwnedItemLister(_arg1:int, _arg2:Array){
_run(_arg1, _arg2);
}
private function _run(_arg1:int, _arg2:Array):void{
var _local4:OwnedItem;
var _local3 = (("\"" + Owner.getName(_arg1)) + "\" owns the following items:");
if (_arg2.length == 0){
_local3 = (_local3 + "\n none!");
} else {
for each (_local4 in _arg2) {
_local3 = (_local3 + (("\n id=" + _local4.ownableItem.id) + ","));
_local3 = (_local3 + ((" \"" + TextManager.getInstance().getTextById(_local4.ownableItem.name)) + "\""));
};
};
trace(_local3);
}
}
}//package com.kerb.gamestation.item
Section 9
//Job (com.kerb.gamestation.job.Job)
package com.kerb.gamestation.job {
import com.kerb.utils.*;
public final class Job {
public var outcomes:Array;
public var id:int;
public var confirmation:String;
public var name:String;
public var description:String;
public function Job(){
outcomes = [];
}
public function getAP():int{
var _local1:JobOutcome;
for each (_local1 in outcomes) {
if (_local1.name == "actionPoints"){
return (_local1.value);
};
};
throw (new Error((("mandatory job outcome \"actionPoints\" missing for job \"" + TextManager.getInstance().getTextById(name)) + "\"")));
}
}
}//package com.kerb.gamestation.job
Section 10
//JobFactory (com.kerb.gamestation.job.JobFactory)
package com.kerb.gamestation.job {
import flash.utils.*;
import com.kerb.utils.*;
public final class JobFactory {
private var XMLJobData:Class;
private var _jobData:XML;
private var _allJobs:Array;
private static var _allow:Boolean;
private static var _instance:JobFactory;
public function JobFactory(){
XMLJobData = JobFactory_XMLJobData;
super();
if (!_allow){
throw (new Error("class is singleton"));
};
_allJobs = [];
_init();
}
private function _init():void{
var _local4:Job;
var _local5:JobOutcome;
var _local6:XML;
var _local7:XML;
var _local1:ByteArray = (new XMLJobData() as ByteArray);
var _local2:String = _local1.readUTFBytes(3);
if (_local2.length == 1){
_jobData = new XML(_local1.readUTFBytes((_local1.length - 3)));
} else {
_jobData = new XML((_local2 + _local1.readUTFBytes((_local1.length - 3))));
};
var _local3:XMLList = _jobData.jobs.children();
for each (_local6 in _local3) {
_local4 = new Job();
_local4.id = _local6.@id;
_local4.name = _local6.@name;
_local4.description = _local6.description;
_local4.confirmation = _local6.confirmation;
for each (_local7 in _local6.outcomes.children()) {
_local5 = new JobOutcome();
_local5.name = _local7.@name;
_local5.probability = _local7.@probability;
_local5.value = _local7.@value;
_local5.value2 = _local7.@value2;
_local4.outcomes.push(_local5);
};
_allJobs.push(_local4);
};
}
public function getJobFromName(_arg1:String):Job{
var _local3:Job;
var _local2:Job;
for each (_local3 in _allJobs) {
if (_local3.name == _arg1){
_local2 = _local3;
};
};
if (_local2 == null){
throw (new Error((("a job by the name \"" + TextManager.getInstance().getTextById(_arg1)) + "\" does not exist")));
};
return (_local2);
}
public static function instance():JobFactory{
if (_instance == null){
_allow = true;
_instance = new (JobFactory);
_allow = false;
};
return (_instance);
}
}
}//package com.kerb.gamestation.job
Section 11
//JobFactory_XMLJobData (com.kerb.gamestation.job.JobFactory_XMLJobData)
package com.kerb.gamestation.job {
import mx.core.*;
public class JobFactory_XMLJobData extends ByteArrayAsset {
}
}//package com.kerb.gamestation.job
Section 12
//JobOutcome (com.kerb.gamestation.job.JobOutcome)
package com.kerb.gamestation.job {
public class JobOutcome {
public var value:Number;
public var probability:Number;
public var value2:Number;
public var name:String;
}
}//package com.kerb.gamestation.job
Section 13
//JobProcessor (com.kerb.gamestation.job.JobProcessor)
package com.kerb.gamestation.job {
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.action.*;
public final class JobProcessor {
private var _player:Player;
private var _dayDelta:int;// = 0
private var _costDelta:int;// = 0
private var _moneyDelta:int;// = 0
private var _sickDelta:int;// = 0
private var _job:Job;
private function _processOneOutcome(_arg1:JobOutcome):void{
if (_arg1.probability < 1){
if (_arg1.probability < Math.random()){
return;
};
};
Main.playSoundFX(Main.CASH_SFX_NAME);
var _local2:ActionPointProcessor = new ActionPointProcessor();
switch (_arg1.name){
case "actionPoints":
_local2.process(Action.Job, _player, _job);
break;
case "basicPay":
_moneyDelta = Math.round(_arg1.value);
_player.acquireMoney(_moneyDelta);
break;
case "athleticismPay":
_moneyDelta = Math.round((_player.getAthleticism() * _arg1.value));
_player.acquireMoney(_moneyDelta);
break;
case "charmPay":
_moneyDelta = Math.round((_player.getCharm() * _arg1.value));
_player.acquireMoney(_moneyDelta);
break;
case "intelligencePay":
_moneyDelta = Math.round((_player.getIntelligence() * _arg1.value));
_player.acquireMoney(_moneyDelta);
break;
case "dayDelta":
_dayDelta = (_dayDelta + _arg1.value);
break;
case "sickDelta":
_sickDelta = _arg1.value;
_dayDelta = (_dayDelta + _arg1.value);
_costDelta = (_costDelta + _arg1.value2);
_player.acquireMoney(-(_costDelta));
break;
case "athleticismDelta":
_player.changeAthleticism(_arg1.value, false);
break;
case "charmDelta":
_player.changeCharm(_arg1.value, false);
break;
case "intelligenceDelta":
_player.changeIntelligence(_arg1.value, false);
break;
};
}
public function getSickDelta():int{
return (_sickDelta);
}
public function getCostDelta():int{
return (_costDelta);
}
public function process(_arg1:Job, _arg2:Player):void{
var _local3:JobOutcome;
_job = _arg1;
_player = _arg2;
if (_player.getAP() < _job.getAP()){
throw (new Error("insufficient_ap"));
};
for each (_local3 in _arg1.outcomes) {
_processOneOutcome(_local3);
};
}
public function getDayDelta():int{
return (_dayDelta);
}
public function getMoneyDelta():int{
return (_moneyDelta);
}
}
}//package com.kerb.gamestation.job
Section 14
//Girl (com.kerb.gamestation.owner.Girl)
package com.kerb.gamestation.owner {
import flash.utils.*;
import com.kerb.utils.*;
import com.kerb.gamestation.item.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.question.*;
import com.kerb.gamestation.action.*;
public class Girl implements IPersistable, IOwner {
private var XMLTalkData:Class;
private var _requiredCharm:int;
public var won:Boolean;// = false
private var _answeredQuestionToday:Boolean;
private var _requiredAthleticism:int;
private var _standing:int;
protected var _allTalk:Array;
protected var _owner:int;
private var _apToTalk:int;
private var _ownedItems:Array;
private var _questionIdsTested:Array;
protected var _apToAskQuestion:int;
private var _requiredIntelligence:int;
private var _questionIdsAsked:Array;
private var _apToGiveGift:int;
private static const TEST_PLAYER_PROBABILITY:Number = 0.3;
private static const QUESTION_TEST_STANDING_INCORRECT:int = -5;
public static const MAX_STANDING:int = 100;
private static const QUESTION_TEST_STANDING_CORRECT:int = 10;
protected static const GIFT_LIKING_THRESHOLD:int = 10;
private static const EXPENSIVE_OUTFIT_STAT_MODIFIER:int = 10;
public function Girl(_arg1:int){
XMLTalkData = Girl_XMLTalkData;
super();
_owner = _arg1;
_ownedItems = [];
_questionIdsAsked = [];
_questionIdsTested = [];
_allTalk = [];
_populateTalk();
}
final public function askQuestion(_arg1:Question, _arg2:Player):void{
if (!willTalkToPlayer(_arg2)){
throw (new Error("snub"));
};
if (_answeredQuestionToday){
throw (new Error("already_answered"));
};
if (_questionIdsAsked.indexOf(_arg1.id) != -1){
throw (new Error("use_talk"));
};
var _local3:ActionPointProcessor = new ActionPointProcessor();
_local3.process(Action.AskGirlQuestion, _arg2, this);
_standing++;
if (_standing > MAX_STANDING){
_standing = MAX_STANDING;
};
_questionIdsAsked.push(_arg1.id);
trace(((("Girl::askQuestion: question ids asked to " + Owner.getName(_owner)) + " is now: ") + _questionIdsAsked));
_answeredQuestionToday = true;
}
final public function acquireItem(_arg1:OwnedItem):void{
throw (new Error("girls cannot buy their own items"));
}
final public function receiveAnswerFromPlayer(_arg1:Question, _arg2:Player, _arg3:String):Boolean{
if (!TextManager.getInstance().hasId(_arg3)){
throw (new Error("invalid argument"));
};
var _local4 = (_arg1.getCorrectAnswerFromOwner(_owner) == _arg3);
if (_local4){
_standing = (_standing + QUESTION_TEST_STANDING_CORRECT);
if (_questionIdsTested.indexOf(_arg1.id) == -1){
_questionIdsTested.push(_arg1.id);
};
} else {
_standing = (_standing + QUESTION_TEST_STANDING_INCORRECT);
};
if (_standing < 0){
_standing = 0;
} else {
if (_standing > MAX_STANDING){
_standing = MAX_STANDING;
};
};
return (_local4);
}
final public function talkToPlayer(_arg1:Player, _arg2:Boolean):String{
var _local4:Boolean;
var _local5:Boolean;
var _local3:ActionPointProcessor = new ActionPointProcessor();
_local3.process(Action.TalkToGirl, _arg1, this);
if (!willTalkToPlayer(_arg1)){
return (_getSnubResponse());
};
_local4 = (_questionIdsAsked.length > _questionIdsTested.length);
if (((_local4) && (_arg2))){
_local5 = (Math.random() < TEST_PLAYER_PROBABILITY);
if (_local5){
return ("test");
};
};
return (_getTalkResponse());
}
final public function getQuestionIdsTested():Array{
return (_questionIdsTested);
}
private function _populateTalk():void{
var _local2:XML;
var _local4:XML;
var _local6:Talk;
var _local7:XML;
if (_allTalk.length > 0){
throw (new Error("this function should only be called once"));
};
var _local1:ByteArray = (new XMLTalkData() as ByteArray);
var _local3:String = _local1.readUTFBytes(3);
if (_local3.length == 1){
_local4 = new XML(_local1.readUTFBytes((_local1.length - 3)));
} else {
_local4 = new XML((_local3 + _local1.readUTFBytes((_local1.length - 3))));
};
var _local5:XMLList = _local4[Owner.getName(_owner)].children();
for each (_local7 in _local5) {
_local6 = new Talk();
_local6.minStanding = _local7.@minStanding;
_local6.maxStanding = _local7.@maxStanding;
_local6.text = _local7;
_allTalk.push(_local6);
};
}
final public function willGoToPartyWithPlayer():Boolean{
return ((_standing >= MAX_STANDING));
}
final public function getAnswersToQuestion(_arg1:Question):Array{
var _local3:String;
var _local2:Array = [];
_local2.push(_arg1.getCorrectAnswerFromOwner(_owner));
for each (_local3 in _arg1.distractors) {
_local2.push(_local3);
};
Util.shuffleArray(_local2);
return (_local2);
}
protected function _likesPlayerOutfit(_arg1:OwnableItem):Boolean{
return (false);
}
public function athleticismOK(_arg1:Player):Boolean{
if (_arg1.getAthleticism() >= _requiredAthleticism){
return (true);
};
return (((_lovesPlayerOutfit(_arg1.getOutfit())) && ((_arg1.getAthleticism() >= (_requiredAthleticism - EXPENSIVE_OUTFIT_STAT_MODIFIER)))));
}
final public function likesPlayerOutfit(_arg1:OwnableItem):Boolean{
return (_likesPlayerOutfit(_arg1));
}
final public function snubPlayer():String{
return (_getSnubResponse());
}
protected function _lovesPlayerOutfit(_arg1:OwnableItem):Boolean{
return (false);
}
final public function getQuestionIdsAskedButNotYetTested():Array{
var _local2:int;
var _local1:Array = [];
for each (_local2 in _questionIdsAsked) {
if (_questionIdsTested.indexOf(_local2) == -1){
_local1.push(_local2);
};
};
return (_local1);
}
private function _changeStanding(_arg1:int):void{
_standing = (_standing + _arg1);
if (_standing < 0){
_standing = 0;
} else {
if (_standing > MAX_STANDING){
_standing = MAX_STANDING;
};
};
}
final public function lovesPlayerOutfit(_arg1:OwnableItem):Boolean{
return (_lovesPlayerOutfit(_arg1));
}
private function _getSnubResponse():String{
var _local2:Talk;
var _local1:Array = [];
for each (_local2 in _allTalk) {
if ((((_local2.minStanding == 0)) && ((_local2.maxStanding == 0)))){
_local1.push(_local2);
};
};
if (_local1.length < 1){
throw (new Error((Owner.getName(_owner) + " needs at least one snub!")));
};
var _local3 = ((Math.random() * _local1.length) | 0);
return ((_local1[_local3] as Talk).text);
}
final public function getStanding():int{
if (_standing < 0){
_standing = 0;
} else {
if (_standing > MAX_STANDING){
_standing = MAX_STANDING;
};
};
return (_standing);
}
private function _getTalkResponse():String{
var _local2:Talk;
var _local1:Array = [];
for each (_local2 in _allTalk) {
if ((((_standing >= _local2.minStanding)) && ((_standing <= _local2.maxStanding)))){
_local1.push(_local2);
};
};
if (_local1.length < 1){
throw (new Error(((Owner.getName(_owner) + " needs at least one talk item for standing ") + _standing)));
};
var _local3 = ((Math.random() * _local1.length) | 0);
return ((_local1[_local3] as Talk).text);
}
final public function getAPToTalk():int{
return (_apToTalk);
}
final public function setStanding(_arg1:int):void{
_standing = _arg1;
if (_standing < 0){
_standing = 0;
} else {
if (_standing > MAX_STANDING){
_standing = MAX_STANDING;
};
};
}
final public function alreadyOwnsItem(_arg1:OwnableItem):Boolean{
var _local3:OwnedItem;
var _local2:Boolean;
for each (_local3 in _ownedItems) {
if (_local3.ownableItem.id == _arg1.id){
_local2 = true;
break;
};
};
return (_local2);
}
public function intelligenceOK(_arg1:Player):Boolean{
if (_arg1.getIntelligence() >= _requiredIntelligence){
return (true);
};
return (((_lovesPlayerOutfit(_arg1.getOutfit())) && ((_arg1.getIntelligence() >= (_requiredIntelligence - EXPENSIVE_OUTFIT_STAT_MODIFIER)))));
}
final public function newDay():void{
_answeredQuestionToday = false;
}
public function saveTo(_arg1:Object):void{
var _local2:OwnedItem;
var _local3:int;
_arg1.standing = _standing;
_arg1.answeredQuestionToday = _answeredQuestionToday;
_arg1.ownableItemIds = [];
for each (_local2 in _ownedItems) {
_arg1.ownableItemIds.push(_local2.ownableItem.id);
};
_arg1.questionIdsAsked = [];
for each (_local3 in _questionIdsAsked) {
_arg1.questionIdsAsked.push(_local3);
};
_arg1.questionIdsTested = [];
for each (_local3 in _questionIdsTested) {
_arg1.questionIdsTested.push(_local3);
};
}
final public function listOwnedItems():void{
new OwnedItemLister(_owner, _ownedItems);
}
final public function getAPToGiveGift():int{
return (_apToGiveGift);
}
final public function giftItem(_arg1:OwnedItem):void{
if (_arg1.owner == _owner){
throw (new Error((Owner.getName(_owner) + " already owns this item")));
};
if (_arg1.owner != Owner.NONE){
throw (new Error(((((Owner.getName(_owner) + " cannot be gifted \"") + TextManager.getInstance().getTextById(_arg1.ownableItem.name)) + "\" because it is already owned by ") + Owner.getName(_arg1.owner))));
};
if (!_arg1.ownableItem.isGift){
throw (new Error((((Owner.getName(_owner) + " cannot be gifted \"") + TextManager.getInstance().getTextById(_arg1.ownableItem.name)) + "\" because it is not a gift")));
};
_arg1.owner = _owner;
_changeStanding(_arg1.getLiking());
_ownedItems.push(_arg1);
}
final protected function _initDifficultyData(_arg1:ByteArray):void{
var _local2:XML;
var _local3:String = _arg1.readUTFBytes(3);
if (_local3.length == 1){
_local2 = new XML(_arg1.readUTFBytes((_arg1.length - 3)));
} else {
_local2 = new XML((_local3 + _arg1.readUTFBytes((_arg1.length - 3))));
};
_requiredCharm = _local2.requiredCharm;
_requiredIntelligence = _local2.requiredIntelligence;
_requiredAthleticism = _local2.requiredAthleticism;
_apToGiveGift = _local2.apToGiveGift;
_apToTalk = _local2.apToTalk;
_apToAskQuestion = _local2.apToAskQuestion;
}
public function restoreFrom(_arg1:Object):void{
var _local2:int;
var _local3:OwnedItem;
_standing = _arg1.standing;
_answeredQuestionToday = _arg1.answeredQuestionToday;
_ownedItems = [];
for each (_local2 in _arg1.ownableItemIds) {
_local3 = OwnedItemFactory.instance().createOwnedItemFromId(_local2);
giftItem(_local3);
};
_questionIdsAsked = [];
for each (_local2 in _arg1.questionIdsAsked) {
_questionIdsAsked.push(_local2);
};
_questionIdsTested = [];
for each (_local2 in _arg1.questionIdsTested) {
_questionIdsTested.push(_local2);
};
}
public function charmOK(_arg1:Player):Boolean{
if (_arg1.getCharm() >= _requiredCharm){
return (true);
};
return (((_lovesPlayerOutfit(_arg1.getOutfit())) && ((_arg1.getCharm() >= (_requiredCharm - EXPENSIVE_OUTFIT_STAT_MODIFIER)))));
}
final public function clearQuestionIdsTested():void{
_questionIdsTested = [];
}
final public function willTalkToPlayer(_arg1:Player):Boolean{
var _local2:Boolean = charmOK(_arg1);
var _local3:Boolean = intelligenceOK(_arg1);
var _local4:Boolean = athleticismOK(_arg1);
var _local5:Boolean = _likesPlayerOutfit(_arg1.getOutfit());
var _local6:Boolean = ((((((_local2) && (_local3))) && (_local4))) && (_local5));
if (((!(_local6)) && (_lovesPlayerOutfit(_arg1.getOutfit())))){
_local5 = true;
_local2 = (_arg1.getCharm() >= (_requiredCharm - EXPENSIVE_OUTFIT_STAT_MODIFIER));
_local3 = (_arg1.getIntelligence() >= (_requiredIntelligence - EXPENSIVE_OUTFIT_STAT_MODIFIER));
_local4 = (_arg1.getAthleticism() >= (_requiredAthleticism - EXPENSIVE_OUTFIT_STAT_MODIFIER));
_local6 = ((((_local2) && (_local3))) && (_local4));
};
if (!_local6){
Main.playSoundFX(Main.KNOCK_BACK_SFX_NAME);
};
return (_local6);
}
public function lovesItem(_arg1:OwnableItem):Boolean{
if (!_arg1.isGift){
throw (new Error("must be a gift"));
};
return (false);
}
final public function getQuestionIdsAsked():Array{
return (_questionIdsAsked);
}
final public function getOwner():int{
return (_owner);
}
final public function getAPToAskQuestion():int{
return (_apToAskQuestion);
}
}
}//package com.kerb.gamestation.owner
Section 15
//Girl_XMLTalkData (com.kerb.gamestation.owner.Girl_XMLTalkData)
package com.kerb.gamestation.owner {
import mx.core.*;
public class Girl_XMLTalkData extends ByteArrayAsset {
}
}//package com.kerb.gamestation.owner
Section 16
//GothGirl (com.kerb.gamestation.owner.GothGirl)
package com.kerb.gamestation.owner {
import flash.utils.*;
import com.kerb.gamestation.item.*;
public final class GothGirl extends Girl {
private var XMLData:Class;
public function GothGirl(){
XMLData = GothGirl_XMLData;
super(Owner.GOTH_GIRL);
_initDifficultyData((new XMLData() as ByteArray));
}
override public function restoreFrom(_arg1:Object):void{
super.restoreFrom(_arg1.goth);
}
override protected function _likesPlayerOutfit(_arg1:OwnableItem):Boolean{
if (_arg1 == null){
return (false);
};
if (!_arg1.isOutfit){
throw (new Error("invalid argument"));
};
return ((_arg1.goth > 0));
}
override public function lovesItem(_arg1:OwnableItem):Boolean{
if (!_arg1.isGift){
throw (new Error("must be a gift"));
};
return ((_arg1.goth >= GIFT_LIKING_THRESHOLD));
}
override protected function _lovesPlayerOutfit(_arg1:OwnableItem):Boolean{
if (_arg1 == null){
return (false);
};
if (!_arg1.isOutfit){
throw (new Error("invalid argument"));
};
return ((_arg1.goth > 1));
}
override public function saveTo(_arg1:Object):void{
_arg1.goth = {};
super.saveTo(_arg1.goth);
}
}
}//package com.kerb.gamestation.owner
Section 17
//GothGirl_XMLData (com.kerb.gamestation.owner.GothGirl_XMLData)
package com.kerb.gamestation.owner {
import mx.core.*;
public class GothGirl_XMLData extends ByteArrayAsset {
}
}//package com.kerb.gamestation.owner
Section 18
//IOwner (com.kerb.gamestation.owner.IOwner)
package com.kerb.gamestation.owner {
import com.kerb.gamestation.item.*;
public interface IOwner {
function listOwnedItems():void;
function acquireItem(_arg1:OwnedItem):void;
function giftItem(_arg1:OwnedItem):void;
}
}//package com.kerb.gamestation.owner
Section 19
//Owner (com.kerb.gamestation.owner.Owner)
package com.kerb.gamestation.owner {
public final class Owner {
public static const PLAYER:int = 1;
private static const NAMES:Array = ["none", "player", "sporty", "goth", "pop"];
public static const POP_GIRL:int = 4;
public static const SPORTY_GIRL:int = 2;
public static const NONE:int = 0;
public static const GOTH_GIRL:int = 3;
public function Owner(){
throw (new Error("class is static"));
}
public static function getName(_arg1:int):String{
if ((((_arg1 >= 0)) && ((_arg1 < NAMES.length)))){
return (NAMES[_arg1]);
};
return (null);
}
}
}//package com.kerb.gamestation.owner
Section 20
//Player (com.kerb.gamestation.owner.Player)
package com.kerb.gamestation.owner {
import com.kerb.utils.*;
import com.kerb.gamestation.item.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.action.*;
public final class Player implements IPersistable, IOwner {
private var _money:int;
private var _athleticism:int;
private var _location:int;
private var _actionPoints:int;
private var _intelligence:int;
private var _charm:int;
private var _ownedItems:Array;
public static const INIT_AP:int = 10;
public static const INIT_CHARM:int = 10;
public static const INIT_INTELLIGENCE:int = 10;
public static const MAX_STAT:int = 100;
public static const INIT_MONEY:int = 100;
public static const INIT_ATHLETICISM:int = 10;
public static const AP_FOR_SLEEP:int = 10;
public function Player(){
_ownedItems = [];
}
public function giveAP(_arg1:int):void{
_actionPoints = (_actionPoints + _arg1);
}
public function getOwnedOutfits():Array{
var _local2:OwnedItem;
var _local1:Array = [];
for each (_local2 in _ownedItems) {
if (_local2.ownableItem.isOutfit){
_local1.push(_local2);
};
};
return (_local1);
}
public function getAP():int{
return (_actionPoints);
}
public function changeCharm(_arg1:int, _arg2:Boolean=true):void{
var _local3:ActionPointProcessor;
if (_arg2){
_local3 = new ActionPointProcessor();
_local3.process(Action.IncreaseCharm, this);
};
_charm = (_charm + _arg1);
if (_charm < 0){
_charm = 0;
};
}
public function acquireItem(_arg1:OwnedItem):void{
if (_arg1.owner != Owner.NONE){
throw (new Error(((("player cannot acquire \"" + TextManager.getInstance().getTextById(_arg1.ownableItem.name)) + "\" because it is already owned by ") + Owner.getName(_arg1.owner))));
};
if (_arg1.ownableItem.cost > _money){
throw (new Error("insufficient_cash"));
};
_arg1.owner = Owner.PLAYER;
_money = (_money - _arg1.ownableItem.cost);
_ownedItems.push(_arg1);
}
public function getMoney():int{
return (_money);
}
public function changeAthleticism(_arg1:int, _arg2:Boolean=true):void{
var _local3:ActionPointProcessor;
if (_arg2){
_local3 = new ActionPointProcessor();
_local3.process(Action.IncreaseAthleticism, this);
};
_athleticism = (_athleticism + _arg1);
if (_athleticism < 0){
_athleticism = 0;
};
}
public function getAthleticism():int{
return (_athleticism);
}
public function toString():String{
var _local1 = "";
_local1 = (_local1 + ((((((((("AP=" + _actionPoints.toString()) + ",money=") + _money.toString()) + ",charm=") + _charm.toString()) + ",int=") + _intelligence.toString()) + ",ath=") + _athleticism.toString()));
return (_local1);
}
public function changeIntelligence(_arg1:int, _arg2:Boolean=true):void{
var _local3:ActionPointProcessor;
if (_arg2){
_local3 = new ActionPointProcessor();
_local3.process(Action.IncreaseIntelligence, this);
};
_intelligence = (_intelligence + _arg1);
if (_intelligence < 0){
_intelligence = 0;
};
}
public function acquireMoney(_arg1:int):void{
_money = (_money + _arg1);
if (_money < 0){
_money = 0;
};
}
public function equipOutfit(_arg1:OwnedItem):void{
var _local2:OwnedItem;
if (_arg1.owner != Owner.PLAYER){
throw (new Error((("player cannot equip \"" + TextManager.getInstance().getTextById(_arg1.ownableItem.name)) + "\" as they don't own it")));
};
for each (_local2 in _ownedItems) {
if (_local2.ownableItem.isOutfit){
_local2.isEquipped = false;
};
};
_arg1.isEquipped = true;
}
public function canAfford(_arg1:OwnableItem):Boolean{
return ((_money >= _arg1.cost));
}
public function listOwnedItems():void{
new OwnedItemLister(Owner.PLAYER, _ownedItems);
}
public function giveItemToGirl(_arg1:OwnedItem, _arg2:Girl):void{
if (_arg1.owner != Owner.PLAYER){
throw (new Error((("player cannot give \"" + TextManager.getInstance().getTextById(_arg1.ownableItem.name)) + "\" because he does not own it")));
};
var _local3:int = _ownedItems.indexOf(_arg1);
if (_local3 == -1){
throw (new Error("that owned item is not in the player's collection of owned items"));
};
if (!_arg2.willTalkToPlayer(this)){
throw (new Error("snub"));
};
var _local4:ActionPointProcessor = new ActionPointProcessor();
_local4.process(Action.GiveGiftToGirl, this, _arg2);
_ownedItems.splice(_local3, 1);
_arg1.owner = Owner.NONE;
_arg2.giftItem(_arg1);
}
public function restoreFrom(_arg1:Object):void{
var _local2:OwnedItem;
var _local3:int;
_arg1 = _arg1.player;
_actionPoints = _arg1.actionPoints;
_money = _arg1.money;
_charm = _arg1.charm;
_intelligence = _arg1.intelligence;
_athleticism = _arg1.athleticism;
_ownedItems = [];
for each (_local3 in _arg1.ownableItemIds) {
_local2 = OwnedItemFactory.instance().createOwnedItemFromId(_local3);
giftItem(_local2);
if (_local3 == _arg1.equippedOutfitId){
_local2.isEquipped = true;
};
};
}
public function getCharm():int{
return (_charm);
}
public function giftItem(_arg1:OwnedItem):void{
if (_arg1.owner != Owner.NONE){
throw (new Error("insufficient_cash"));
};
_arg1.owner = Owner.PLAYER;
_ownedItems.push(_arg1);
}
public function saveTo(_arg1:Object):void{
var _local2:OwnedItem;
_arg1.player = {};
_arg1 = _arg1.player;
_arg1.actionPoints = _actionPoints;
_arg1.money = _money;
_arg1.charm = _charm;
_arg1.intelligence = _intelligence;
_arg1.athleticism = _athleticism;
_arg1.ownableItemIds = [];
_arg1.equippedOutfitId = -1;
for each (_local2 in _ownedItems) {
_arg1.ownableItemIds.push(_local2.ownableItem.id);
if (_local2.ownableItem.isOutfit){
if (_local2.isEquipped){
_arg1.equippedOutfitId = _local2.ownableItem.id;
};
};
};
}
public function getOwnedGifts():Array{
var _local2:OwnedItem;
var _local1:Array = [];
for each (_local2 in _ownedItems) {
if (_local2.ownableItem.isGift){
_local1.push(_local2);
};
};
return (_local1);
}
public function getIntelligence():int{
return (_intelligence);
}
public function takeAP(_arg1:int):void{
_actionPoints = (_actionPoints - _arg1);
if (_actionPoints < 0){
_actionPoints = 0;
};
}
public function getOutfit():OwnableItem{
var _local1:OwnableItem;
var _local2:OwnedItem;
for each (_local2 in _ownedItems) {
if (_local2.ownableItem.isOutfit){
if (_local2.isEquipped){
_local1 = _local2.ownableItem;
};
};
};
return (_local1);
}
}
}//package com.kerb.gamestation.owner
Section 21
//PopGirl (com.kerb.gamestation.owner.PopGirl)
package com.kerb.gamestation.owner {
import flash.utils.*;
import com.kerb.gamestation.item.*;
public final class PopGirl extends Girl {
private var XMLData:Class;
public function PopGirl(){
XMLData = PopGirl_XMLData;
super(Owner.POP_GIRL);
_initDifficultyData((new XMLData() as ByteArray));
}
override public function restoreFrom(_arg1:Object):void{
super.restoreFrom(_arg1.pop);
}
override protected function _likesPlayerOutfit(_arg1:OwnableItem):Boolean{
if (_arg1 == null){
return (false);
};
if (!_arg1.isOutfit){
throw (new Error("invalid argument"));
};
return ((_arg1.pop > 0));
}
override public function lovesItem(_arg1:OwnableItem):Boolean{
if (!_arg1.isGift){
throw (new Error("must be a gift"));
};
return ((_arg1.pop >= GIFT_LIKING_THRESHOLD));
}
override protected function _lovesPlayerOutfit(_arg1:OwnableItem):Boolean{
if (_arg1 == null){
return (false);
};
if (!_arg1.isOutfit){
throw (new Error("invalid argument"));
};
return ((_arg1.pop > 1));
}
override public function saveTo(_arg1:Object):void{
_arg1.pop = {};
super.saveTo(_arg1.pop);
}
}
}//package com.kerb.gamestation.owner
Section 22
//PopGirl_XMLData (com.kerb.gamestation.owner.PopGirl_XMLData)
package com.kerb.gamestation.owner {
import mx.core.*;
public class PopGirl_XMLData extends ByteArrayAsset {
}
}//package com.kerb.gamestation.owner
Section 23
//SportyGirl (com.kerb.gamestation.owner.SportyGirl)
package com.kerb.gamestation.owner {
import flash.utils.*;
import com.kerb.gamestation.item.*;
public final class SportyGirl extends Girl {
private var XMLData:Class;
public function SportyGirl(){
XMLData = SportyGirl_XMLData;
super(Owner.SPORTY_GIRL);
_initDifficultyData((new XMLData() as ByteArray));
}
override public function restoreFrom(_arg1:Object):void{
super.restoreFrom(_arg1.sporty);
}
override protected function _likesPlayerOutfit(_arg1:OwnableItem):Boolean{
if (_arg1 == null){
return (false);
};
if (!_arg1.isOutfit){
throw (new Error("invalid argument"));
};
return ((_arg1.sporty > 0));
}
override public function lovesItem(_arg1:OwnableItem):Boolean{
if (!_arg1.isGift){
throw (new Error("must be a gift"));
};
return ((_arg1.sporty >= GIFT_LIKING_THRESHOLD));
}
override protected function _lovesPlayerOutfit(_arg1:OwnableItem):Boolean{
if (_arg1 == null){
return (false);
};
if (!_arg1.isOutfit){
throw (new Error("invalid argument"));
};
return ((_arg1.sporty > 1));
}
override public function saveTo(_arg1:Object):void{
_arg1.sporty = {};
super.saveTo(_arg1.sporty);
}
}
}//package com.kerb.gamestation.owner
Section 24
//SportyGirl_XMLData (com.kerb.gamestation.owner.SportyGirl_XMLData)
package com.kerb.gamestation.owner {
import mx.core.*;
public class SportyGirl_XMLData extends ByteArrayAsset {
}
}//package com.kerb.gamestation.owner
Section 25
//Talk (com.kerb.gamestation.owner.Talk)
package com.kerb.gamestation.owner {
public final class Talk {
public var maxStanding:int;
public var text:String;
public var minStanding:int;
}
}//package com.kerb.gamestation.owner
Section 26
//Question (com.kerb.gamestation.question.Question)
package com.kerb.gamestation.question {
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
public final class Question {
public var sporty:String;
public var girlToPlayer:String;
public var pop:String;
public var playerToGirl:String;
public var distractors:Array;
public var id:int;
public var goth:String;
public function Question(){
distractors = [];
}
public function toString():String{
var _local1 = "";
_local1 = (((("Q" + id.toString()) + ": \"") + TextManager.getInstance().getTextById(playerToGirl)) + "\"");
return (_local1);
}
public function getCorrectAnswerFromOwner(_arg1:int):String{
switch (_arg1){
case Owner.GOTH_GIRL:
return (goth);
case Owner.SPORTY_GIRL:
return (sporty);
case Owner.POP_GIRL:
return (pop);
};
throw (new Error("invalid argument"));
}
}
}//package com.kerb.gamestation.question
Section 27
//QuestionFactory (com.kerb.gamestation.question.QuestionFactory)
package com.kerb.gamestation.question {
import flash.utils.*;
public final class QuestionFactory {
private var XMLQuestionData:Class;
private var _allQuestions:Array;
private var _questionData:XML;
private static var _allow:Boolean;
private static var _instance:QuestionFactory;
public function QuestionFactory(){
XMLQuestionData = QuestionFactory_XMLQuestionData;
super();
if (!_allow){
throw (new Error("class is singleton"));
};
_allQuestions = [];
_init();
}
private function _init():void{
var _local4:Question;
var _local5:XML;
var _local6:XML;
var _local1:ByteArray = (new XMLQuestionData() as ByteArray);
var _local2:String = _local1.readUTFBytes(3);
if (_local2.length == 1){
_questionData = new XML(_local1.readUTFBytes((_local1.length - 3)));
} else {
_questionData = new XML((_local2 + _local1.readUTFBytes((_local1.length - 3))));
};
var _local3:XMLList = _questionData.questions.children();
for each (_local5 in _local3) {
_local4 = new Question();
_local4.id = _local5.@id;
_local4.playerToGirl = _local5.playerToGirl;
_local4.girlToPlayer = _local5.girlToPlayer;
_local4.goth = _local5.answers.goth;
_local4.pop = _local5.answers.pop;
_local4.sporty = _local5.answers.sporty;
for each (_local6 in _local5.distractors.children()) {
_local4.distractors.push(_local6);
};
trace(_local4);
_allQuestions.push(_local4);
};
}
public function getAllQuestions():Array{
return (_allQuestions);
}
public function getQuestionFromId(_arg1:int):Question{
var _local3:Question;
var _local2:Question;
for each (_local3 in _allQuestions) {
if (_local3.id == _arg1){
_local2 = _local3;
};
};
if (_local2 == null){
throw (new Error((("a question with the id " + _arg1) + " does not exist")));
};
return (_local2);
}
public function getRandomQuestion(_arg1:Array):Question{
var _local3:Question;
trace("QuestionFactory::getRandomQuestion");
var _local2:Array = [];
for each (_local3 in _allQuestions) {
if (_arg1.indexOf(_local3.id) == -1){
trace((" including question id " + _local3.id));
_local2.push(_local3.id);
} else {
trace(((" excluding question id " + _local3.id) + " (as has already asked)"));
};
};
if (_local2.length == 0){
return (null);
};
var _local4:int = _local2[((_local2.length * Math.random()) | 0)];
trace(((((" chosen question id " + _local4) + " at random from ") + _local2.length) + " available"));
return (getQuestionFromId(_local4));
}
public static function instance():QuestionFactory{
if (_instance == null){
_allow = true;
_instance = new (QuestionFactory);
_allow = false;
};
return (_instance);
}
}
}//package com.kerb.gamestation.question
Section 28
//QuestionFactory_XMLQuestionData (com.kerb.gamestation.question.QuestionFactory_XMLQuestionData)
package com.kerb.gamestation.question {
import mx.core.*;
public class QuestionFactory_XMLQuestionData extends ByteArrayAsset {
}
}//package com.kerb.gamestation.question
Section 29
//AbstractScreen (com.kerb.gamestation.screens.AbstractScreen)
package com.kerb.gamestation.screens {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.geom.*;
import com.kerb.gamestation.*;
public class AbstractScreen extends Sprite {
protected var _linkage:String;
protected var _game:Game;
protected var _mc:MovieClip;
private var _t0:int;
private static const FADE_IN_PERIOD:int = 200;
public function AbstractScreen(_arg1:Game){
this._game = _arg1;
addEventListener(Event.ADDED_TO_STAGE, _addedToStage);
}
public function enable():void{
var _local1:int;
while (_local1 < _mc.numChildren) {
if ((_mc.getChildAt(_local1) is SimpleButton)){
SimpleButton(_mc.getChildAt(_local1)).enabled = true;
};
_local1++;
};
}
public function getMC():MovieClip{
return (_mc);
}
public function supportsFadeIn():Boolean{
return (true);
}
public function disable():void{
var _local1:int;
while (_local1 < _mc.numChildren) {
if ((_mc.getChildAt(_local1) is SimpleButton)){
SimpleButton(_mc.getChildAt(_local1)).enabled = false;
};
_local1++;
};
}
private function _addedToStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _addedToStage);
_mc = Main.afm.createMovieClip("screens", _linkage);
addChild(_mc);
_init();
}
private function _onFadeIn(_arg1:Event):void{
var _local4:int;
var _local2:int = (getTimer() - _t0);
var _local3:Number = Math.min(1, (_local2 / FADE_IN_PERIOD));
if (_local3 >= 1){
removeEventListener(Event.ENTER_FRAME, _onFadeIn);
transform.colorTransform = new ColorTransform();
} else {
_local4 = (0xFF * (1 - _local3));
transform.colorTransform = new ColorTransform(1, 1, 1, 1, _local4, _local4, _local4);
};
}
protected function _init():void{
if (supportsFadeIn()){
_t0 = getTimer();
addEventListener(Event.ENTER_FRAME, _onFadeIn);
};
enable();
}
public function panelClosed():void{
}
public function dispose():void{
disable();
}
}
}//package com.kerb.gamestation.screens
Section 30
//Arcade (com.kerb.gamestation.screens.Arcade)
package com.kerb.gamestation.screens {
import flash.events.*;
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.*;
public class Arcade extends AbstractScreen {
public function Arcade(_arg1:Game){
_linkage = "ArcadeAsset";
Main.stopTitleMusic();
Main.playSting(Main.ARCADE_MUSIC_NAME);
super(_arg1);
}
override public function disable():void{
super.disable();
_mc.exit_btn.removeEventListener(MouseEvent.CLICK, _exitClick);
_mc.approach_btn.removeEventListener(MouseEvent.CLICK, _approachClick);
}
private function _approachClick(_arg1:MouseEvent):void{
if (_game.approachGirl(PopGirl)){
_mc.gotoAndStop("close");
};
}
override public function enable():void{
super.enable();
_mc.exit_btn.addEventListener(MouseEvent.CLICK, _exitClick);
_mc.approach_btn.addEventListener(MouseEvent.CLICK, _approachClick);
}
private function _exitClick(_arg1:MouseEvent):void{
Main.stopTitleMusic();
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Town);
}
override public function panelClosed():void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_mc.gotoAndStop("normal");
}
}
}//package com.kerb.gamestation.screens
Section 31
//GamestationShop (com.kerb.gamestation.screens.GamestationShop)
package com.kerb.gamestation.screens {
import flash.events.*;
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.item.*;
import com.kerb.gamestation.*;
public class GamestationShop extends AbstractScreen {
private var _cheatCode:String;
private var _cheatCodeStep:int;
private var _intelligencePanelOpen:Boolean;
public function GamestationShop(_arg1:Game){
_linkage = "GamestationShopAsset";
_cheatCode = TextManager.getInstance().getTextById("cheat.code").toUpperCase();
_cheatCodeStep = 0;
Main.stopTitleMusic();
Main.playSting(Main.GAMESTATION_MUSIC_NAME);
super(_arg1);
}
override public function enable():void{
super.enable();
_mc.exit_btn.addEventListener(MouseEvent.CLICK, _exitClick);
_mc.presents_btn.addEventListener(MouseEvent.CLICK, _presentsClick);
_mc.charm_btn.addEventListener(MouseEvent.CLICK, _charmClick);
_mc.intelligence_btn.addEventListener(MouseEvent.CLICK, _intelligenceClick);
_mc.athleticism_btn.addEventListener(MouseEvent.CLICK, _athleticismClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, _keyDown);
stage.focus = stage;
}
private function _athleticismClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.showAthleticismPanel();
}
private function _onFlickComplete(_arg1:Event):void{
_mc.bg_mc.watch_mc.thing1_mc.visible = true;
_mc.bg_mc.watch_mc.thing2_mc.visible = false;
_mc.bg_mc.watch_mc.thing2_mc.removeEventListener(Event.COMPLETE, _onFlickComplete);
_mc.bg_mc.watch_mc.thing1_mc.gotoAndPlay(1);
}
override public function disable():void{
super.disable();
_mc.exit_btn.removeEventListener(MouseEvent.CLICK, _exitClick);
_mc.presents_btn.removeEventListener(MouseEvent.CLICK, _presentsClick);
_mc.charm_btn.removeEventListener(MouseEvent.CLICK, _charmClick);
_mc.intelligence_btn.removeEventListener(MouseEvent.CLICK, _intelligenceClick);
_mc.athleticism_btn.removeEventListener(MouseEvent.CLICK, _athleticismClick);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, _keyDown);
}
private function _keyDown(_arg1:KeyboardEvent):void{
var _local2:String = String.fromCharCode(_arg1.keyCode);
if (_local2 == _cheatCode.charAt(_cheatCodeStep)){
if (++_cheatCodeStep == _cheatCode.length){
_applyCheat();
_game.updateUI();
};
} else {
_cheatCodeStep = 0;
};
}
private function _intelligenceClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_intelligencePanelOpen = true;
_game.showIntelligencePanel();
}
private function _exitClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Town);
}
private function _presentsClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.showPresentSelector();
}
private function _charmClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.showCharmPanel();
}
private function _applyCheat():void{
var ownedItem:OwnedItem;
var boughtItem:OwnedItem;
var item:OwnableItem;
var bought:Boolean;
var p:Player = _game.getPlayer();
p.changeAthleticism((100 - p.getAthleticism()), false);
p.changeCharm((100 - p.getCharm()), false);
p.changeIntelligence((100 - p.getIntelligence()), false);
p.acquireMoney((10000 - p.getMoney()));
p.giveAP((1000 - p.getAP()));
var allItems:Array = OwnedItemFactory.instance().getAllOwnableItems();
var boughtOutfits:Array = p.getOwnedOutfits();
var boughtGifts:Array = p.getOwnedGifts();
for each (item in allItems) {
ownedItem = OwnedItemFactory.instance().createOwnedItemFromName(item.name);
bought = false;
for each (boughtItem in boughtOutfits) {
if (boughtItem.ownableItem.id == ownedItem.ownableItem.id){
bought = true;
break;
};
};
if (!bought){
for each (boughtItem in boughtGifts) {
if (boughtItem.ownableItem.id == ownedItem.ownableItem.id){
bought = true;
break;
};
};
};
if (!bought){
try {
p.acquireMoney(item.cost);
p.acquireItem(ownedItem);
} catch(e:Error) {
};
};
};
_game.showInfo(TextManager.getInstance().getTextById("cheat.message"));
_game.partyAccess = true;
_game.cheat = true;
}
override public function panelClosed():void{
if (_intelligencePanelOpen){
_mc.bg_mc.watch_mc.thing1_mc.visible = false;
_mc.bg_mc.watch_mc.thing2_mc.visible = true;
_mc.bg_mc.watch_mc.thing2_mc.addEventListener(Event.COMPLETE, _onFlickComplete);
_mc.bg_mc.watch_mc.thing2_mc.gotoAndPlay(1);
_intelligencePanelOpen = false;
};
}
}
}//package com.kerb.gamestation.screens
Section 32
//Gym (com.kerb.gamestation.screens.Gym)
package com.kerb.gamestation.screens {
import flash.events.*;
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.*;
public class Gym extends AbstractScreen {
public function Gym(_arg1:Game){
_linkage = "GymAsset";
Main.stopTitleMusic();
Main.playSting(Main.GYM_MUSIC_NAME);
super(_arg1);
}
override public function disable():void{
super.disable();
_mc.exit_btn.removeEventListener(MouseEvent.CLICK, _exitClick);
_mc.approach_btn.removeEventListener(MouseEvent.CLICK, _approachClick);
}
private function _approachClick(_arg1:MouseEvent):void{
if (_game.approachGirl(SportyGirl)){
_mc.gotoAndStop("close");
};
}
override public function enable():void{
super.enable();
_mc.exit_btn.addEventListener(MouseEvent.CLICK, _exitClick);
_mc.approach_btn.addEventListener(MouseEvent.CLICK, _approachClick);
}
private function _exitClick(_arg1:MouseEvent):void{
Main.stopTitleMusic();
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Town);
}
override public function panelClosed():void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_mc.gotoAndStop("normal");
}
}
}//package com.kerb.gamestation.screens
Section 33
//Home (com.kerb.gamestation.screens.Home)
package com.kerb.gamestation.screens {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
import com.kerb.logger.*;
import com.kerb.gamestation.*;
public class Home extends AbstractScreen {
private var _sleep:MovieClip;
private static const FAST_DAY_NIGHT_ANIM:Boolean = false;
public function Home(_arg1:Game){
_linkage = "HomeAsset";
super(_arg1);
}
override protected function _init():void{
_sleep = _mc.sleep;
_sleep.stop();
_mc.removeChild(_sleep);
super._init();
}
private function _sleepClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
if (_game.getPlayer().getAP() == Player.AP_FOR_SLEEP){
_game.showInfo(TextManager.getInstance().getTextById("info.lazy"));
} else {
if (FAST_DAY_NIGHT_ANIM){
KerbLog.instance().info("fast day/night anim is ON ...");
};
_sleep.gotoAndPlay((FAST_DAY_NIGHT_ANIM) ? (_sleep.totalFrames - 10) : 1);
_mc.addChild(_sleep);
_mc.addEventListener(Event.ENTER_FRAME, _updateSleep);
};
}
override public function enable():void{
super.enable();
_mc.exit_btn.addEventListener(MouseEvent.CLICK, _exitClick);
_mc.sleep_btn.addEventListener(MouseEvent.CLICK, _sleepClick);
_mc.outfit_btn.addEventListener(MouseEvent.CLICK, _outfitClick);
}
private function _exitClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Town);
}
private function _outfitClick(_arg1:MouseEvent):void{
_game.showWardrobePanel();
}
private function _updateSleep(_arg1:Event):void{
if (_sleep.currentFrame == 30){
Main.stopTitleMusic();
Main.playSoundFX(Main.HOME_NIGHT_SFX_NAME);
} else {
if (_sleep.currentFrame == 91){
Main.playSoundFX(Main.HOME_MORNING_SFX_NAME);
};
};
if (_sleep.currentFrame == _sleep.totalFrames){
_sleep.stop();
_mc.removeChild(_sleep);
_mc.removeEventListener(Event.ENTER_FRAME, _updateSleep);
_game.sleep();
_game.updateUI();
Main.smSFX.getSoundByClassName(Main.HOME_MORNING_SFX_NAME).stop();
Main.musicName = Main.TITLE_MUSIC_NAME;
Main.playMusic("");
};
}
override public function disable():void{
super.disable();
_mc.exit_btn.removeEventListener(MouseEvent.CLICK, _exitClick);
_mc.sleep_btn.removeEventListener(MouseEvent.CLICK, _sleepClick);
_mc.outfit_btn.removeEventListener(MouseEvent.CLICK, _outfitClick);
}
}
}//package com.kerb.gamestation.screens
Section 34
//JobCentre (com.kerb.gamestation.screens.JobCentre)
package com.kerb.gamestation.screens {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import flash.text.*;
import com.kerb.gamestation.*;
public class JobCentre extends AbstractScreen {
private var soundPlaying:String;// = ""
public function JobCentre(_arg1:Game){
_linkage = "JobCentreAsset";
super(_arg1);
}
override public function enable():void{
var _local2:DisplayObjectContainer;
var _local3:TextField;
super.enable();
_mc.exit_btn.addEventListener(MouseEvent.CLICK, _exitClick);
_mc.toilet_btn.addEventListener(MouseEvent.CLICK, _toiletClick);
_mc.security_btn.addEventListener(MouseEvent.CLICK, _securityClick);
_mc.pizza_btn.addEventListener(MouseEvent.CLICK, _pizzaClick);
_mc.market_btn.addEventListener(MouseEvent.CLICK, _marketClick);
_mc.toilet_btn.addEventListener(MouseEvent.ROLL_OUT, _rollOut);
_mc.security_btn.addEventListener(MouseEvent.ROLL_OUT, _rollOut);
_mc.pizza_btn.addEventListener(MouseEvent.ROLL_OUT, _rollOut);
_mc.market_btn.addEventListener(MouseEvent.ROLL_OUT, _rollOut);
_mc.toilet_btn.addEventListener(MouseEvent.ROLL_OVER, _toiletRollOver);
_mc.security_btn.addEventListener(MouseEvent.ROLL_OVER, _securityRollOver);
_mc.pizza_btn.addEventListener(MouseEvent.ROLL_OVER, _pizzaRollOver);
_mc.market_btn.addEventListener(MouseEvent.ROLL_OVER, _marketRollOver);
var _local1:DisplayObjectContainer = (_mc.cards_mc as DisplayObjectContainer);
var _local4:Array = ["toilet-cleaner", "security-guard", "pizza-manager", "market-stall"];
var _local5:int;
while (_local5 < 4) {
_local2 = (_local1.getChildByName(("item" + _local5.toString())) as DisplayObjectContainer);
_local3 = (_local2.getChildByName("text_txt") as TextField);
_local3.text = TextManager.getInstance().getTextById(("job.description." + _local4[_local5]));
_local5++;
};
}
override public function supportsFadeIn():Boolean{
return (false);
}
private function _pizzaClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.showJobPanel("job.name.pizza-manager");
}
override public function disable():void{
super.disable();
_mc.exit_btn.removeEventListener(MouseEvent.CLICK, _exitClick);
_mc.toilet_btn.removeEventListener(MouseEvent.CLICK, _toiletClick);
_mc.security_btn.removeEventListener(MouseEvent.CLICK, _securityClick);
_mc.pizza_btn.removeEventListener(MouseEvent.CLICK, _pizzaClick);
_mc.market_btn.removeEventListener(MouseEvent.CLICK, _marketClick);
_mc.toilet_btn.removeEventListener(MouseEvent.ROLL_OVER, _toiletRollOver);
_mc.security_btn.removeEventListener(MouseEvent.ROLL_OVER, _securityRollOver);
_mc.pizza_btn.removeEventListener(MouseEvent.ROLL_OVER, _pizzaRollOver);
_mc.market_btn.removeEventListener(MouseEvent.ROLL_OVER, _marketRollOver);
_mc.toilet_btn.removeEventListener(MouseEvent.ROLL_OUT, _rollOut);
_mc.security_btn.removeEventListener(MouseEvent.ROLL_OUT, _rollOut);
_mc.pizza_btn.removeEventListener(MouseEvent.ROLL_OUT, _rollOut);
_mc.market_btn.removeEventListener(MouseEvent.ROLL_OUT, _rollOut);
}
private function _securityClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.showJobPanel("job.name.security-guard");
}
private function _exitClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Mall);
}
private function _marketRollOver(_arg1:MouseEvent):void{
}
private function _marketClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.showJobPanel("job.name.market-stall");
}
private function _securityRollOver(_arg1:MouseEvent):void{
}
private function _rollOut(_arg1:MouseEvent):void{
}
private function _pizzaRollOver(_arg1:MouseEvent):void{
}
private function _toiletClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.showJobPanel("job.name.toilet-cleaner");
}
private function _toiletRollOver(_arg1:MouseEvent):void{
}
}
}//package com.kerb.gamestation.screens
Section 35
//Mall (com.kerb.gamestation.screens.Mall)
package com.kerb.gamestation.screens {
import flash.events.*;
import com.kerb.gamestation.*;
public class Mall extends AbstractScreen {
public function Mall(_arg1:Game){
_linkage = "MallAsset";
Main.stopTitleMusic();
Main.playSting(Main.MALL_MUSIC_NAME);
super(_arg1);
}
override public function enable():void{
super.enable();
_mc.exit_btn.addEventListener(MouseEvent.CLICK, _exitClick);
_mc.jobCentre_btn.addEventListener(MouseEvent.CLICK, _jobCentreClick);
_mc.outfit_btn.addEventListener(MouseEvent.CLICK, _outfitClick);
}
override protected function _init():void{
super._init();
_mc.trees.mouseEnabled = false;
}
override public function disable():void{
super.disable();
_mc.exit_btn.removeEventListener(MouseEvent.CLICK, _exitClick);
_mc.jobCentre_btn.removeEventListener(MouseEvent.CLICK, _jobCentreClick);
_mc.outfit_btn.removeEventListener(MouseEvent.CLICK, _outfitClick);
}
private function _exitClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Town);
}
private function _outfitClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(OutfitShop);
}
private function _jobCentreClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(JobCentre);
}
}
}//package com.kerb.gamestation.screens
Section 36
//Nightclub (com.kerb.gamestation.screens.Nightclub)
package com.kerb.gamestation.screens {
import flash.events.*;
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.*;
public class Nightclub extends AbstractScreen {
public function Nightclub(_arg1:Game){
_linkage = "NightclubAsset";
Main.stopTitleMusic();
Main.playSting(Main.ROCK_CITY_MUSIC_NAME);
super(_arg1);
}
override public function disable():void{
super.disable();
_mc.exit_btn.removeEventListener(MouseEvent.CLICK, _exitClick);
_mc.approach_btn.removeEventListener(MouseEvent.CLICK, _approachClick);
}
private function _approachClick(_arg1:MouseEvent):void{
if (_game.approachGirl(GothGirl)){
_mc.gotoAndStop("close");
};
}
override public function enable():void{
super.enable();
_mc.exit_btn.addEventListener(MouseEvent.CLICK, _exitClick);
_mc.approach_btn.addEventListener(MouseEvent.CLICK, _approachClick);
}
private function _exitClick(_arg1:MouseEvent):void{
Main.stopTitleMusic();
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Town);
}
override public function panelClosed():void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_mc.gotoAndStop("normal");
}
}
}//package com.kerb.gamestation.screens
Section 37
//OutfitShop (com.kerb.gamestation.screens.OutfitShop)
package com.kerb.gamestation.screens {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.item.*;
import flash.text.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.ui.*;
public class OutfitShop extends AbstractScreen {
private var _panel:AbstractPanel;
private var _bought:Array;
private var index:int;// = 0
private var _outfits:Array;
private var mouseOver:Boolean;// = false
private var targetObject:Object;// = null
public function OutfitShop(_arg1:Game){
_linkage = "OutfitShopAsset";
super(_arg1);
addEventListener(Event.ADDED_TO_STAGE, _addedToStage);
}
private function _buyClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
index = parseInt(SimpleButton(_arg1.currentTarget).name.charAt(6));
_showShopPanel();
targetObject = _arg1.currentTarget;
}
private function _addedToStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _addedToStage);
_init();
}
override public function enable():void{
var _local2:SimpleButton;
super.enable();
_mc.exit_btn.addEventListener(MouseEvent.CLICK, _exitClick);
var _local1:int;
while (_local1 < 6) {
if (!_bought[_local1]){
_local2 = SimpleButton(_mc.getChildByName((("outfit" + _local1) + "_btn")));
_local2.addEventListener(MouseEvent.CLICK, _buyClick);
_local2.addEventListener(MouseEvent.ROLL_OVER, _lookClothes);
_local2.enabled = true;
};
_local1++;
};
}
private function _setOutfit(_arg1:int):void{
_noClothes(null);
trace(("type " + _arg1));
if (_arg1 == 2){
_setInPlace(_mc.gothclothes3, 397, 76.9);
};
if (_arg1 == 5){
_setInPlace(_mc.gothclothes2, 411.2, 82.7);
};
if (_arg1 == 4){
_setInPlace(_mc.armyclothes1, 409, 81.6);
};
if (_arg1 == 1){
_setInPlace(_mc.armyclothes2, 400.1, 77);
};
if (_arg1 == 3){
_setInPlace(_mc.sportclothes1, 429.4, 107.3);
};
if (_arg1 == 0){
_setInPlace(_mc.sportclothes2, 429.4, 107.3);
};
}
private function _noClothes(_arg1:MouseEvent):void{
_setInPlace(_mc.gothclothes3, -249.8, 102.9);
_setInPlace(_mc.gothclothes2, -249.8, 82.7);
_setInPlace(_mc.armyclothes1, -249.8, 81.6);
_setInPlace(_mc.armyclothes2, -249.8, 77);
_setInPlace(_mc.sportclothes1, -249.8, 107.3);
_setInPlace(_mc.sportclothes2, -249.8, 107.3);
}
private function _buyItem(_arg1:OwnedItem):Boolean{
var message:String;
var ownedItem = _arg1;
var name:String = TextManager.getInstance().getTextById(ownedItem.ownableItem.name);
var success:Boolean;
try {
_game.getPlayer().acquireItem(ownedItem);
_game.updateUI();
success = true;
message = TextManager.getInstance().getTextById("info.purchase");
} catch(e:Error) {
message = TextManager.getInstance().getTextById("info.no.money");
};
message = message.split("@@ITEM@@").join(name);
_game.showInfo(message);
return (success);
}
private function _exitClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Mall);
}
private function _deactivateButton(_arg1:SimpleButton):void{
_arg1.enabled = false;
_arg1.visible = false;
_arg1.removeEventListener(MouseEvent.CLICK, _buyClick);
}
override public function disable():void{
var _local2:SimpleButton;
super.disable();
_mc.exit_btn.removeEventListener(MouseEvent.CLICK, _exitClick);
var _local1:int;
while (_local1 < 6) {
_local2 = SimpleButton(_mc.getChildByName((("outfit" + _local1) + "_btn")));
_local2.removeEventListener(MouseEvent.CLICK, _buyClick);
_local2.enabled = false;
_local1++;
};
}
private function _onPanelAddedToStage(_arg1:Event):void{
_panel.removeEventListener(Event.ADDED_TO_STAGE, _onPanelAddedToStage);
Util.centreDisplayObject(_panel);
}
private function _lookClothes(_arg1:MouseEvent):void{
mouseOver = true;
var _local2:int = parseInt(SimpleButton(_arg1.currentTarget).name.charAt(6));
_setOutfit(_local2);
}
private function bought(_arg1:Event):void{
_panel.removeEventListener(ShopPanel.BUY_EVENT, bought);
if ((((index >= 0)) && ((index < _outfits.length)))){
if (_buyItem(_outfits[index])){
_bought[index] = true;
_deactivateButton(SimpleButton(targetObject));
trace("ITEM BOUGHT............................");
Main.playSoundFX(Main.CASH_SFX_NAME);
};
};
}
override public function supportsFadeIn():Boolean{
return (false);
}
override protected function _init():void{
var _local3:OwnedItem;
var _local4:SimpleButton;
var _local5:OwnedItem;
_outfits = [];
_bought = [];
var _local1:Array = _game.getPlayer().getOwnedOutfits();
var _local2:int;
while (_local2 < 6) {
_local3 = OwnedItemFactory.instance().createOwnedItemFromId(_local2);
_outfits.push(_local3);
_local4 = SimpleButton(_mc.getChildByName((("outfit" + _local2) + "_btn")));
TextField(_mc.getChildByName((("outfit" + _local2) + "Price_txt"))).text = ("£" + _local3.ownableItem.cost);
_bought[_local2] = false;
for each (_local5 in _local1) {
if (_local5.ownableItem.id == _local3.ownableItem.id){
_bought[_local2] = true;
break;
};
};
if (_bought[_local2]){
_deactivateButton(_local4);
} else {
_local4.addEventListener(MouseEvent.CLICK, _buyClick);
};
_local2++;
};
enable();
}
public function hidePanel():void{
if (_panel){
_panel.dispose();
_panel.removeEventListener(Event.CLOSE, _panelClose);
try {
removeChild(_panel);
} catch(e:Error) {
};
_panel = null;
};
}
private function _showShopPanel():void{
hidePanel();
_game.disable();
_panel = new ShopPanel(_game);
_panel.addEventListener(Event.CLOSE, _panelClose);
_panel.addEventListener(ShopPanel.BUY_EVENT, bought);
var _local1:OwnedItem = (_outfits[index] as OwnedItem);
var _local2 = "The ";
_local2 = (_local2 + TextManager.getInstance().getTextById(_local1.ownableItem.name));
_local2 = (_local2 + " costs £");
_local2 = (_local2 + _local1.ownableItem.cost.toString());
(_panel as ShopPanel).setText(_local2);
_panel.addEventListener(Event.ADDED_TO_STAGE, _onPanelAddedToStage);
addChild(_panel);
}
private function _panelClose(_arg1:Event=null):void{
hidePanel();
enable();
_game.enable();
dispatchEvent(new Event("panelClose"));
}
private function _setInPlace(_arg1:MovieClip, _arg2:int, _arg3:int):void{
_arg1.x = _arg2;
_arg1.y = _arg3;
}
}
}//package com.kerb.gamestation.screens
Section 38
//Town (com.kerb.gamestation.screens.Town)
package com.kerb.gamestation.screens {
import flash.events.*;
import com.kerb.utils.*;
import com.kerb.gamestation.*;
public class Town extends AbstractScreen {
public function Town(_arg1:Game){
_linkage = "TownAsset";
Main.stopTitleMusic();
Main.musicName = Main.TITLE_MUSIC_NAME;
Main.playMusic("");
super(_arg1);
}
private function _arcadeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:int = _game.getHeartLevels()[2];
if (_local2 < 100){
_game.gotoScreen(Arcade);
} else {
_game.showInfo(TextManager.getInstance().getTextById("town.won-girl-heart"));
};
}
private function _partyClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:String = TextManager.getInstance().getTextById("info.party");
_game.checkWin();
if (!_game.partyAccess){
_game.showInfo(_local2);
};
}
override public function enable():void{
super.enable();
_mc.home_btn.addEventListener(MouseEvent.CLICK, _homeClick);
_mc.mall_btn.addEventListener(MouseEvent.CLICK, _mallClick);
_mc.gamestation_btn.addEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.party_btn.addEventListener(MouseEvent.CLICK, _partyClick);
_mc.partySign_btn.addEventListener(MouseEvent.CLICK, _partySignClick);
_mc.nightclub_btn.addEventListener(MouseEvent.CLICK, _nightclubClick);
_mc.arcade_btn.addEventListener(MouseEvent.CLICK, _arcadeClick);
_mc.gym_btn.addEventListener(MouseEvent.CLICK, _gymClick);
if (!_game.checkForPartyFlash()){
_mc.partyLights.x = -2000;
};
if (_game.checkForPartyFlash()){
_mc.partyLights.x = 86.7;
};
}
private function _gamestationClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(GamestationShop);
}
private function _mallClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Mall);
}
override public function disable():void{
super.disable();
_mc.home_btn.removeEventListener(MouseEvent.CLICK, _homeClick);
_mc.mall_btn.removeEventListener(MouseEvent.CLICK, _mallClick);
_mc.nightclub_btn.removeEventListener(MouseEvent.CLICK, _nightclubClick);
_mc.arcade_btn.removeEventListener(MouseEvent.CLICK, _arcadeClick);
_mc.gym_btn.removeEventListener(MouseEvent.CLICK, _gymClick);
_mc.gamestation_btn.removeEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.party_btn.removeEventListener(MouseEvent.CLICK, _partyClick);
_mc.partySign_btn.removeEventListener(MouseEvent.CLICK, _partySignClick);
}
private function _nightclubClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:int = _game.getHeartLevels()[0];
if (_local2 < 100){
_game.gotoScreen(Nightclub);
} else {
_game.showInfo(TextManager.getInstance().getTextById("town.won-girl-heart"));
};
}
private function _homeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.gotoScreen(Home);
}
private function _partySignClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:String = TextManager.getInstance().getTextById("info.party");
_game.checkWin();
if (!_game.partyAccess){
_game.showInfo(_local2);
};
}
private function _gymClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:int = _game.getHeartLevels()[1];
if (_local2 < 100){
_game.gotoScreen(Gym);
} else {
_game.showInfo(TextManager.getInstance().getTextById("town.won-girl-heart"));
};
}
}
}//package com.kerb.gamestation.screens
Section 39
//AbstractPanel (com.kerb.gamestation.ui.AbstractPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.display.*;
import com.kerb.gamestation.*;
public class AbstractPanel extends Sprite {
protected var _game:Game;
protected var _mc:MovieClip;
protected var _linkage:String;
public function AbstractPanel(_arg1:Game){
this._game = _arg1;
addEventListener(Event.ADDED_TO_STAGE, _addedToStage);
}
private function _addedToStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _addedToStage);
_mc = Main.afm.createMovieClip("interface", _linkage);
addChild(_mc);
_init();
}
public function centreToStage():Boolean{
return (false);
}
protected function _close():void{
dispatchEvent(new Event(Event.CLOSE));
}
protected function _init():void{
}
public function dispose():void{
}
}
}//package com.kerb.gamestation.ui
Section 40
//AthleticismPanel (com.kerb.gamestation.ui.AthleticismPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
import flash.text.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.action.*;
import flash.ui.*;
public class AthleticismPanel extends AbstractPanel {
private var _timeTillPlaySound:int;// = 19
private var _lose:MovieClip;
private var _heart:MovieClip;
private var _pulse:MovieClip;
private var _t0:int;
private var _win:MovieClip;
private var _lastKeyCodeWasRightArrow:Boolean;
private var _tryagain:SimpleButton;
private var _timerSound:int;// = 0
private var _lastKeyCodeWasLeftArrow:Boolean;
private var _jaws:MovieClip;
private var _presses:int;
private var _didWin:Boolean;
private static const KEYPRESSES_PER_SECOND_TO_WIN:Number = 7;
private static const DURATION:int = 10000;
private static const MAX_KEYPRESSES_PER_SECOND:int = 11;
public function AthleticismPanel(_arg1:Game){
_linkage = "AthleticismPanelAsset";
super(_arg1);
}
private function _levelUp():void{
try {
_game.getPlayer().changeAthleticism(10, true);
_game.updateUI();
} catch(e:Error) {
if (e.message == "insufficient_ap"){
_game.showInfo(TextManager.getInstance().getTextById("info.no.ap"));
} else {
trace(e);
};
} finally {
_close();
};
}
private function _onTryAgainClicked(_arg1:MouseEvent):void{
_timeTillPlaySound = 19;
_timerSound = 0;
_lose.visible = false;
_lose.gotoAndStop(1);
_tryagain.visible = false;
_start();
}
private function _onOutAnimComplete(_arg1:Event):void{
_mc.removeEventListener(Event.COMPLETE, _onOutAnimComplete);
var _local2:TextField = (_mc.getChildByName("levelup_txt") as TextField);
_local2.multiline = true;
_local2.wordWrap = true;
_local2.selectable = false;
_local2.text = TextManager.getInstance().getTextById("gs.athleticism.pop-up.body");
var _local3:SimpleButton = (_mc.getChildByName("levelUp_btn") as SimpleButton);
if (!_local3.hasEventListener(MouseEvent.CLICK)){
_local3.addEventListener(MouseEvent.CLICK, _onLevelUpButtonClicked);
_local3.enabled = true;
};
}
private function _onGoToGame(_arg1:Event):void{
_mc.removeEventListener(Event.ENTER_FRAME, _onGoToGame);
_start();
}
private function _onLevelUpButtonClicked(_arg1:MouseEvent):void{
var _local2:SimpleButton = (_mc.getChildByName("levelUp_btn") as SimpleButton);
_local2.removeEventListener(MouseEvent.CLICK, _onLevelUpButtonClicked);
_local2.enabled = false;
_levelUp();
}
private function _onWinAnimComplete(_arg1:Event):void{
_mc.close_btn.x = -200;
_win.visible = false;
_win.gotoAndStop(1);
_mc.addEventListener(Event.COMPLETE, _onOutAnimComplete);
_mc.gotoAndPlay("out");
}
private function _onKeyUp(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.LEFT){
if (_lastKeyCodeWasRightArrow){
_presses++;
};
_lastKeyCodeWasLeftArrow = true;
_lastKeyCodeWasRightArrow = false;
} else {
if (_arg1.keyCode == Keyboard.RIGHT){
if (_lastKeyCodeWasLeftArrow){
_presses++;
};
_lastKeyCodeWasLeftArrow = false;
_lastKeyCodeWasRightArrow = true;
} else {
_lastKeyCodeWasLeftArrow = false;
_lastKeyCodeWasRightArrow = false;
};
};
}
private function _onNextClicked(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:ActionPointProcessor = new ActionPointProcessor();
var _local3:Boolean = _local2.checkGenericAction(Action.IncreaseAthleticism, _game.getPlayer());
if (_local3){
_mc.addEventListener(Event.ENTER_FRAME, _onGoToGame);
_mc.gotoAndStop("game");
} else {
_game.showInfo(TextManager.getInstance().getTextById("info.no.ap"));
_close();
};
}
private function _end():void{
if (_didWin){
if (!_win.hasEventListener(Event.COMPLETE)){
_win.addEventListener(Event.COMPLETE, _onWinAnimComplete);
};
_win.visible = true;
_win.gotoAndPlay(1);
} else {
if (!_lose.hasEventListener(Event.COMPLETE)){
_lose.addEventListener(Event.COMPLETE, _onLoseAnimComplete);
};
_lose.visible = true;
_lose.gotoAndPlay(1);
_jaws.visible = false;
_jaws.gotoAndStop(1);
};
}
private function _playSound(_arg1:int):void{
_timerSound++;
if ((((_arg1 >= 2000)) && ((_arg1 < 3000)))){
if (_timeTillPlaySound != 17){
_timerSound = 0;
};
_timeTillPlaySound = 17;
} else {
if ((((_arg1 >= 3000)) && ((_arg1 < 4000)))){
if (_timeTillPlaySound != 15){
_timerSound = 0;
};
_timeTillPlaySound = 15;
} else {
if ((((_arg1 >= 4000)) && ((_arg1 < 5000)))){
if (_timeTillPlaySound != 13){
_timerSound = 0;
};
_timeTillPlaySound = 13;
} else {
if ((((_arg1 >= 5000)) && ((_arg1 < 6000)))){
if (_timeTillPlaySound != 11){
_timerSound = 0;
};
_timeTillPlaySound = 11;
} else {
if ((((_arg1 >= 6000)) && ((_arg1 < 7000)))){
if (_timeTillPlaySound != 9){
_timerSound = 0;
};
_timeTillPlaySound = 9;
} else {
if ((((_arg1 >= 7000)) && ((_arg1 < 8000)))){
if (_timeTillPlaySound != 7){
_timerSound = 0;
};
_timeTillPlaySound = 7;
} else {
if ((_arg1 >= 8000)){
if (_timeTillPlaySound != 5){
_timerSound = 0;
};
_timeTillPlaySound = 5;
};
};
};
};
};
};
};
if (_timerSound == _timeTillPlaySound){
_timerSound = 0;
Main.playSoundFX(Main.TIMER_SFX_NAME);
};
}
private function _start():void{
_heart.visible = true;
_jaws.visible = true;
stage.addEventListener(KeyboardEvent.KEY_UP, _onKeyUp);
stage.focus = stage;
_t0 = getTimer();
_pulse.gotoAndPlay(1);
_presses = 0;
_didWin = false;
var _local1:MovieClip = (_mc.getChildByName("startBashing_mc") as MovieClip);
_local1.alpha = 1;
_local1.mouseEnabled = false;
_mc.addEventListener(Event.ENTER_FRAME, _onMainEnterFrame);
}
override public function dispose():void{
_mc.removeEventListener(Event.ENTER_FRAME, _onMainEnterFrame);
(_mc.close_btn as SimpleButton).removeEventListener(MouseEvent.CLICK, _onCloseClicked);
stage.removeEventListener(KeyboardEvent.KEY_UP, _onKeyUp);
}
private function _onMainEnterFrame(_arg1:Event):void{
var _local4:int;
var _local5:Boolean;
var _local2:int = (getTimer() - _t0);
var _local3:Number = Math.min(1, (_local2 / DURATION));
_playSound(_local2);
var _local6:Number = ((1000 * _presses) / _local2);
if (_local6 > MAX_KEYPRESSES_PER_SECOND){
_local6 = MAX_KEYPRESSES_PER_SECOND;
_local5 = true;
};
_local4 = Math.ceil(((100 * _local6) / MAX_KEYPRESSES_PER_SECOND));
_heart.gotoAndStop(_local4);
if (_local6 > KEYPRESSES_PER_SECOND_TO_WIN){
_local6 = KEYPRESSES_PER_SECOND_TO_WIN;
};
_local4 = Math.ceil(((100 * _local6) / KEYPRESSES_PER_SECOND_TO_WIN));
_pulse.visible = (_local4 == 100);
var _local7:MovieClip = (_mc.getChildByName("startBashing_mc") as MovieClip);
_local7.alpha = (1 - _local3);
if ((((_local3 >= 1)) || (_local5))){
if (_local5){
(_mc.close_btn as SimpleButton).removeEventListener(MouseEvent.CLICK, _onCloseClicked);
(_mc.close_btn as SimpleButton).visible = false;
(_mc.close_btn as SimpleButton).enabled = false;
_didWin = true;
} else {
_didWin = _pulse.visible;
};
stage.removeEventListener(KeyboardEvent.KEY_UP, _onKeyUp);
_mc.removeEventListener(Event.ENTER_FRAME, _onMainEnterFrame);
_end();
};
_jaws.gotoAndStop(Math.ceil((100 * _local3)));
}
private function _onCloseClicked(_arg1:MouseEvent):void{
_close();
}
override protected function _init():void{
(_mc.next_btn as SimpleButton).addEventListener(MouseEvent.CLICK, _onNextClicked);
(_mc.close_btn as SimpleButton).addEventListener(MouseEvent.CLICK, _onCloseClicked);
_mc.gameName.text = TextManager.getInstance().getTextById("athleticism.game.name");
_mc.gameDescription.text = TextManager.getInstance().getTextById("athleticism.game.description");
_mc.stop();
var _local1:MovieClip = (_mc.getChildByName("startBashing_mc") as MovieClip);
_local1.mouseEnabled = false;
_win = _mc.win_mc;
_win.gotoAndStop(1);
_win.visible = false;
_lose = _mc.lose_mc;
_lose.visible = false;
_lose.gotoAndStop(1);
_jaws = (_mc.jaws_mc as MovieClip);
_jaws.visible = false;
_jaws.gotoAndStop(1);
_heart = (_mc.heart_mc as MovieClip);
_heart.visible = false;
_heart.gotoAndStop(1);
_pulse = (_mc.pulse_mc as MovieClip);
_pulse.visible = false;
_pulse.gotoAndStop(1);
_tryagain = (_mc.tryagain_btn as SimpleButton);
_tryagain.addEventListener(MouseEvent.CLICK, _onTryAgainClicked);
_tryagain.visible = false;
if (_game.getPlayer().getAthleticism() >= Player.MAX_STAT){
_game.showInfo(TextManager.getInstance().getTextById("info.already-at-max-stat"));
_close();
};
}
private function _onLoseAnimComplete(_arg1:Event):void{
_tryagain.visible = true;
}
}
}//package com.kerb.gamestation.ui
Section 41
//CharmPanel (com.kerb.gamestation.ui.CharmPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
import flash.text.*;
import com.kerb.gamestation.*;
public class CharmPanel extends AbstractPanel {
private var _bubble:MovieClip;
private static var _numChatupIntros:int = 0;
private static var _numChatupLines:int = 0;
public function CharmPanel(_arg1:Game){
_linkage = "CharmPanelAsset";
super(_arg1);
}
private function _onTimerComplete(_arg1:TimerEvent):void{
if (_bubble){
_bubble.parent.removeChild(_bubble);
_bubble = null;
};
_close();
}
private function _closeClick(_arg1:MouseEvent):void{
_close();
}
private function _levelUpClick(_arg1:MouseEvent):void{
var index:int;
var txt:String;
var line:String;
var e = _arg1;
try {
_game.getPlayer().changeCharm(10, true);
_game.updateUI();
index = ((Math.random() * _numChatupIntros) + 1);
txt = TextManager.getInstance().getTextById(("chatup-intro-" + index));
index = ((Math.random() * _numChatupLines) + 1);
line = TextManager.getInstance().getTextById(("chatup-" + index));
_showSpeechBubble(txt.split("@@CHATUP@@").join(line));
} catch(e:Error) {
if (e.message == "insufficient_ap"){
_game.showInfo(TextManager.getInstance().getTextById("info.no.ap"));
} else {
trace(e);
};
};
}
private function _showSpeechBubble(_arg1:String):void{
var _local2:DisplayObjectContainer = parent;
visible = false;
_bubble = (Main.afm.getAssetFactory("interface").createMovieClip("SpeechBubbleRight") as MovieClip);
_bubble.x = 110;
_bubble.y = 175;
_bubble.answer_txt.text = _arg1;
_local2.addChild(_bubble);
var _local3:Timer = new Timer(5000, 1);
_local3.addEventListener(TimerEvent.TIMER_COMPLETE, _onTimerComplete);
_local3.start();
}
override protected function _init():void{
var _local2:String;
var _local1:TextField = (_mc.getChildByName("levelup_txt") as TextField);
_local1.multiline = true;
_local1.wordWrap = true;
_local1.selectable = false;
_local1.text = TextManager.getInstance().getTextById("gs.charm.pop-up.body");
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_mc.levelUp_btn.addEventListener(MouseEvent.CLICK, _levelUpClick);
if (_numChatupLines == 0){
_local2 = "";
while (++_numChatupLines) {
_local2 = TextManager.getInstance().getTextById(("chatup-" + _numChatupLines));
if (_local2.indexOf(("chatup-" + _numChatupLines)) != -1){
_numChatupLines--;
break;
};
};
};
if (_numChatupIntros == 0){
_local2 = "";
while (++_numChatupIntros) {
_local2 = TextManager.getInstance().getTextById(("chatup-intro-" + _numChatupIntros));
if (_local2.indexOf(("chatup-intro-" + _numChatupIntros)) != -1){
_numChatupIntros--;
break;
};
};
};
if (_game.getPlayer().getCharm() >= Player.MAX_STAT){
_game.showInfo(TextManager.getInstance().getTextById("info.already-at-max-stat"));
_close();
};
}
override public function dispose():void{
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
_mc.levelUp_btn.removeEventListener(MouseEvent.CLICK, _levelUpClick);
}
}
}//package com.kerb.gamestation.ui
Section 42
//ExtendedDynamicButton (com.kerb.gamestation.ui.ExtendedDynamicButton)
package com.kerb.gamestation.ui {
import flash.display.*;
import com.kerb.utils.*;
import flash.text.*;
import com.kerb.ui.*;
public class ExtendedDynamicButton extends DynamicButton {
public function ExtendedDynamicButton(_arg1:Sprite, _arg2:String="", _arg3:Boolean=true){
super(_arg1, _arg2, _arg3);
}
public function setBoughtIconVisibility(_arg1:Boolean):void{
up.bought.visible = _arg1;
over.bought.visible = _arg1;
down.bought.visible = _arg1;
}
public function getLabelID():String{
return (labelID);
}
override public function initText():void{
var _local2:TextField;
var _local3:DisplayObjectContainer;
var _local4:DisplayObject;
if (labelID != ""){
if (((!((select == null))) && (!((select.getChildByName("label_txt") == null))))){
TextManager.getInstance().setTextField((select.getChildByName("label_txt") as TextField), labelID);
};
};
var _local1:Array = [up, over, down];
for each (_local3 in _local1) {
if (labelID != ""){
_local2 = (_local3.getChildByName("label_txt") as TextField);
_local2.autoSize = TextFieldAutoSize.LEFT;
TextManager.getInstance().setTextField(_local2, labelID);
_local4 = _local3.getChildByName("img");
if (_local4){
_local4.y = ((_local2.y + _local2.textHeight) + 10);
};
};
};
}
public function setLabelID(_arg1:String):void{
this.labelID = _arg1;
initText();
}
}
}//package com.kerb.gamestation.ui
Section 43
//GirlPanel (com.kerb.gamestation.ui.GirlPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.item.*;
import com.kerb.logger.*;
import flash.text.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.question.*;
import com.kerb.gamestation.screens.*;
import com.kerb.ui.*;
public class GirlPanel extends AbstractPanel {
private var _player:Player;
private var _scrollDir:Number;
private var _screen:AbstractScreen;
private var _girl:Girl;
private var _pulse:MovieClip;
private var _multichoiceButtons:Array;
private var _itemButtons:Array;
private var _answers:Array;
private var _content:Sprite;
private var _items:Array;
private var _previousStanding:int;
private var _question:Question;
private var _scrollMin:Number;
private var _pulseTimer:Timer;
private var _scrollMaxSpeed:Number;
private var _scrollMax:Number;
private var _scrollRate:Number;
private var _originalSpeechBubbleBackgroundHeight:Number;
public function GirlPanel(_arg1:Game){
_linkage = "GirlPanelAsset";
super(_arg1);
}
private function _closePresentPanelClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_mc.presentPanel.visible = false;
}
private function _upPressed(_arg1:MouseEvent):void{
_scrollDir = 1;
}
private function _snub():void{
var response = "";
try {
response = _girl.snubPlayer();
_setSpeechBubble(response);
} catch(e:Error) {
KerbLog.instance().info(e.message);
};
_showGirlResponse("angry");
}
private function _closeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
private function _getGiftResponseTextKey(_arg1:Boolean):String{
var _local2 = 1;
var _local3:String = (("talk.general.gift-response." + (_arg1) ? "positive-" : "negative-") + _local2.toString());
var _local4:Array = [];
while (TextManager.getInstance().hasId(_local3)) {
_local4.push(_local3);
_local2++;
_local3 = (("talk.general.gift-response." + (_arg1) ? "positive-" : "negative-") + _local2.toString());
};
if (_local4.length > 0){
return (_local4[((Math.random() * _local4.length) | 0)]);
};
return (null);
}
private function _talk(_arg1:Boolean=false):void{
var allowTest = _arg1;
_clear();
var response = "";
try {
response = _girl.talkToPlayer(_game.getPlayer(), allowTest);
if (response == "test"){
_askTestQuestion();
} else {
_setSpeechBubble(response);
_showGirlResponse();
};
} catch(e:Error) {
if (e.message == "insufficient_ap"){
_game.showInfo(TextManager.getInstance().getTextById("info.no.ap"));
_showGirlResponse("angry");
} else {
KerbLog.instance().info(e.message);
};
};
_game.updateUI();
}
private function _enterFrame(_arg1:Event):void{
_scrollRate = (_scrollRate + (0.1 * (_scrollDir - _scrollRate)));
var _local2:Number = Math.round(((_scrollMaxSpeed * _scrollRate) + _content.y));
_local2 = Math.min(_scrollMax, Math.max(_scrollMin, _local2));
_content.y = _local2;
}
private function _initPresentPanel():void{
_mc.presentPanel.close_btn.addEventListener(MouseEvent.CLICK, _closePresentPanelClick);
_mc.presentPanel.up_btn.addEventListener(MouseEvent.MOUSE_DOWN, _upPressed);
_mc.presentPanel.down_btn.addEventListener(MouseEvent.MOUSE_DOWN, _downPressed);
stage.addEventListener(MouseEvent.MOUSE_UP, _mouseUp);
_mc.presentPanel.visible = false;
_content = new Sprite();
_mc.presentPanel.addChild(_content);
_content.mask = _mc.presentPanel.contentMask;
_scrollMaxSpeed = 10;
}
private function _presentClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_clear();
if (!_initPresents()){
_game.showInfo(TextManager.getInstance().getTextById("info.no.presents"));
} else {
_mc.presentPanel.visible = true;
};
}
public function setGirl(_arg1:Girl):void{
_girl = _arg1;
_previousStanding = _girl.getStanding();
}
override public function dispose():void{
var _local1:DynamicButton;
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
_mc.talk_btn.removeEventListener(MouseEvent.CLICK, _talkClick);
_mc.question_btn.removeEventListener(MouseEvent.CLICK, _questionClick);
_mc.present_btn.removeEventListener(MouseEvent.CLICK, _presentClick);
_mc.removeEventListener(Event.ENTER_FRAME, _updateGirl);
_mc.presentPanel.close_btn.removeEventListener(MouseEvent.CLICK, _closePresentPanelClick);
_mc.presentPanel.up_btn.removeEventListener(MouseEvent.MOUSE_DOWN, _upPressed);
_mc.presentPanel.down_btn.removeEventListener(MouseEvent.MOUSE_DOWN, _downPressed);
_mc.presentPanel.removeEventListener(Event.ENTER_FRAME, _enterFrame);
stage.removeEventListener(MouseEvent.MOUSE_UP, _mouseUp);
for each (_local1 in _multichoiceButtons) {
_local1.removeEventListener(MouseEvent.CLICK, _multichoiceClick);
};
for each (_local1 in _itemButtons) {
_local1.removeEventListener(MouseEvent.CLICK, _presentItemClick);
};
}
private function _presentItemClick(_arg1:MouseEvent):void{
var btn:ExtendedDynamicButton;
var ownedItem:OwnedItem;
var lovesItem:Boolean;
var e = _arg1;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var i:int;
while (i < _itemButtons.length) {
btn = _itemButtons[i];
if (e.currentTarget == btn){
ownedItem = (_items[i] as OwnedItem);
if (_girl.alreadyOwnsItem(ownedItem.ownableItem)){
_setSpeechBubble("talk.general.girl-already-owns-item");
_showGirlResponse("angry");
} else {
try {
lovesItem = _girl.lovesItem(ownedItem.ownableItem);
_game.getPlayer().giveItemToGirl(ownedItem, _girl);
_setSpeechBubble(_getGiftResponseTextKey(lovesItem));
_showGirlResponse((lovesItem) ? "smile" : "angry");
} catch(e:Error) {
if (e.message == "snub"){
_snub();
} else {
if (e.message == "insufficient_ap"){
_game.showInfo(TextManager.getInstance().getTextById("info.no.ap"));
_showGirlResponse("angry");
};
};
};
};
_mc.presentPanel.visible = false;
break;
};
i = (i + 1);
};
}
private function _updateGirl(_arg1:Event):void{
var _local3:String;
var _local4:String;
var _local2:MovieClip = _screen.getMC().girl;
if (_local2){
_local3 = ((_girl.getStanding() < 41)) ? "normal" : "normal_smile";
_local4 = _local2.currentLabel;
if (_local4 != _local3){
if (_local2.animation){
if (_local2.animation.currentFrame == _local2.animation.totalFrames){
_local2.gotoAndStop(_local3);
};
};
};
};
_mc.heart.gotoAndStop(_girl.getStanding());
if (_previousStanding < _girl.getStanding()){
_pulse.visible = true;
_killPulseTimer();
_pulseTimer = new Timer(2500, 1);
_pulseTimer.addEventListener(TimerEvent.TIMER_COMPLETE, _onPulseTimer);
_pulseTimer.start();
_previousStanding = _girl.getStanding();
if (_girl.getStanding() >= Girl.MAX_STANDING){
_game.getPlayer().giveAP(1);
_talk();
};
};
}
private function _initPresents():Boolean{
var _local3:MovieClip;
var _local4:ExtendedDynamicButton;
var _local6:DynamicButton;
var _local7:OwnedItem;
var _local8:MovieClip;
_content.x = _mc.presentPanel.contentMask.x;
_content.y = _mc.presentPanel.contentMask.y;
_scrollDir = 0;
_scrollRate = 0;
var _local1:Array = _game.getPlayer().getOwnedGifts();
var _local2:Number = 0;
var _local5:Number = 15;
for each (_local6 in _itemButtons) {
_local6.removeEventListener(MouseEvent.CLICK, _presentItemClick);
_content.removeChild(_local6.mcRef);
};
_items = new Array();
_itemButtons = new Array();
for each (_local7 in _local1) {
if (_local7.ownableItem.isGift){
_local3 = Main.afm.createMovieClip("interface", "ItemButtonAsset");
_local3.y = _local2;
_local8 = Main.afm.createMovieClip("interface", _local7.ownableItem.linkage);
_local8.name = "img";
_local8.x = ((0.5 * (_local3.up.bg.width - _local8.width)) + _local3.up.bg.x);
_local3.up.addChildAt(_local8, 1);
_local8 = Main.afm.createMovieClip("interface", _local7.ownableItem.linkage);
_local8.name = "img";
_local8.x = ((0.5 * (_local3.over.bg.width - _local8.width)) + _local3.over.bg.x);
_local3.over.addChildAt(_local8, 1);
_local8 = Main.afm.createMovieClip("interface", _local7.ownableItem.linkage);
_local8.name = "img";
_local8.x = ((0.5 * (_local3.down.bg.width - _local8.width)) + _local3.down.bg.x);
_local3.down.addChildAt(_local8, 1);
_content.addChild(_local3);
_local4 = new ExtendedDynamicButton(_local3, _local7.ownableItem.name);
_local4.addEventListener(MouseEvent.CLICK, _presentItemClick);
_local4.setBoughtIconVisibility(false);
_local2 = (_local2 + (_local3.height + _local5));
_items.push(_local7);
_itemButtons.push(_local4);
};
};
if (_local2 > _mc.presentPanel.contentMask.height){
_scrollMax = _content.y;
_scrollMin = ((_content.y + _mc.presentPanel.contentMask.height) - _content.height);
_mc.presentPanel.addEventListener(Event.ENTER_FRAME, _enterFrame);
} else {
_mc.presentPanel.up_btn.visible = false;
_mc.presentPanel.down_btn.visible = false;
_mc.presentPanel.removeEventListener(Event.ENTER_FRAME, _enterFrame);
};
return ((_local1.length > 0));
}
private function _talkClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_talk(true);
}
private function _questionClick(_arg1:MouseEvent):void{
var e = _arg1;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_clear();
KerbLog.instance().info("GirlPanel::_questionClick: looking for a new question to ask ...");
KerbLog.instance().info((" excluding question ids: " + _girl.getQuestionIdsAsked()));
_question = QuestionFactory.instance().getRandomQuestion(_girl.getQuestionIdsAsked());
if (_question == null){
KerbLog.instance().info(" couldn't find a question (there are none left!)");
_talk();
return;
};
KerbLog.instance().info((" found question id " + _question.id));
var answer = "";
try {
switch (true){
case (_girl is PopGirl):
answer = _question.pop;
break;
case (_girl is SportyGirl):
answer = _question.sporty;
break;
case (_girl is GothGirl):
answer = _question.goth;
break;
};
_girl.askQuestion(_question, _game.getPlayer());
_mc.question_txt.text = TextManager.getInstance().getTextById(_question.playerToGirl);
_setSpeechBubble(answer);
_showGirlResponse("thinking");
} catch(e:Error) {
if (e.message == "snub"){
_snub();
} else {
if (e.message == "already_answered"){
_setSpeechBubble("talk.general.girl-already-answered-question-today");
_showGirlResponse("angry");
} else {
if (e.message == "use_talk"){
_talk();
} else {
if (e.message == "insufficient_ap"){
_game.showInfo(TextManager.getInstance().getTextById("info.no.ap"));
_showGirlResponse("angry");
};
};
};
};
};
_game.updateUI();
}
private function _killPulseTimer():void{
if (_pulseTimer){
_pulseTimer.stop();
_pulseTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, _onPulseTimer);
_pulseTimer = null;
};
}
private function _onPulseTimer(_arg1:TimerEvent):void{
_killPulseTimer();
_pulse.visible = false;
}
private function _clear():void{
var _local1:ExtendedDynamicButton;
_mc.question_txt.text = "";
_mc.speechBubble.answer_txt.text = "";
_mc.speechBubble.visible = false;
for each (_local1 in _multichoiceButtons) {
_local1.visible = false;
};
}
private function _setSpeechBubble(_arg1:String):void{
var _local2:TextField = (_mc.speechBubble.answer_txt as TextField);
_local2.selectable = false;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.autoSize = TextFieldAutoSize.LEFT;
_local2.text = "line1\nline2";
var _local3:Number = _local2.textHeight;
_local2.text = TextManager.getInstance().getTextById(_arg1);
var _local4:Number = _local2.textHeight;
var _local5:Number = (_local4 - _local3);
_mc.speechBubble.bg_mc.height = (_originalSpeechBubbleBackgroundHeight + _local5);
_mc.speechBubble.visible = true;
}
private function _downPressed(_arg1:MouseEvent):void{
_scrollDir = -1;
}
private function _mouseUp(_arg1:MouseEvent):void{
_scrollDir = 0;
}
private function _multichoiceClick(_arg1:MouseEvent):void{
var correctAnswer:Boolean;
var btn:ExtendedDynamicButton;
var e = _arg1;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var userChoice:int = parseInt(e.currentTarget.name.charAt(11));
var textKey:String = _answers[userChoice];
try {
correctAnswer = _girl.receiveAnswerFromPlayer(_question, _game.getPlayer(), textKey);
_mc.question_txt.text = "";
} catch(e:Error) {
_mc.question_txt.text = e;
};
_showGirlResponse((correctAnswer) ? "smile" : "angry");
for each (btn in _multichoiceButtons) {
btn.visible = false;
};
_mc.speechBubble.answer_txt.text = "";
_mc.speechBubble.visible = false;
_game.updateUI();
}
public function setScreen(_arg1:AbstractScreen):void{
_screen = _arg1;
}
override protected function _init():void{
var _local3:ExtendedDynamicButton;
_originalSpeechBubbleBackgroundHeight = _mc.speechBubble.bg_mc.height;
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_mc.talk_btn.addEventListener(MouseEvent.CLICK, _talkClick);
_mc.question_btn.addEventListener(MouseEvent.CLICK, _questionClick);
_mc.present_btn.addEventListener(MouseEvent.CLICK, _presentClick);
_mc.addEventListener(Event.ENTER_FRAME, _updateGirl);
_initPresentPanel();
var _local1:Array = [_mc.multichoice0_btn, _mc.multichoice1_btn, _mc.multichoice2_btn, _mc.multichoice3_btn];
_multichoiceButtons = new Array();
var _local2:int;
while (_local2 < _local1.length) {
_local3 = new ExtendedDynamicButton(_local1[_local2]);
_multichoiceButtons.push(_local3);
_local3.visible = false;
_local3.addEventListener(MouseEvent.CLICK, _multichoiceClick);
_local1[_local2].up.num_txt.text = (_local2 + 1);
_local1[_local2].over.num_txt.text = (_local2 + 1);
_local1[_local2].down.num_txt.text = (_local2 + 1);
_local2++;
};
_mc.speechBubble.visible = false;
_pulse = (_mc.getChildByName("pulse_mc") as MovieClip);
_pulse.visible = false;
}
private function _askTestQuestion():void{
var _local4:ExtendedDynamicButton;
KerbLog.instance().info("GirlPanel::_askTestQuestion:");
KerbLog.instance().info((" can test the player on the following question ids that have already been asked but not yet tested: " + _girl.getQuestionIdsAskedButNotYetTested()));
var _local1:Array = _girl.getQuestionIdsAskedButNotYetTested();
var _local2:int = _local1[((Math.random() * _local1.length) | 0)];
_question = QuestionFactory.instance().getQuestionFromId(_local2);
KerbLog.instance().info((" have picked question id " + _question.id));
_mc.question_txt.text = TextManager.getInstance().getTextById(_question.girlToPlayer);
_answers = _girl.getAnswersToQuestion(_question);
var _local3:int;
while (_local3 < _answers.length) {
_local4 = _multichoiceButtons[_local3];
if (_local4){
_local4.setLabelID(_answers[_local3]);
_local4.visible = true;
};
_local3++;
};
}
private function _showGirlResponse(_arg1:String=""):void{
var _local2:int;
if (_arg1 == ""){
_local2 = _girl.getStanding();
if (_local2 < 16){
_arg1 = "angry";
Main.playSoundFX(Main.KNOCK_BACK_SFX_NAME);
} else {
if (_local2 < 41){
_arg1 = "thinking";
} else {
if (_local2 < 100){
_arg1 = "smile";
} else {
_arg1 = "sexy";
Main.playSoundFX(Main.COMPLIMENT_SFX_NAME);
};
};
};
};
if (_screen.getMC().girl){
_screen.getMC().girl.gotoAndStop(_arg1);
};
}
}
}//package com.kerb.gamestation.ui
Section 44
//HelpPanel (com.kerb.gamestation.ui.HelpPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.utils.*;
import com.kerb.utils.*;
import flash.text.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.screens.*;
public class HelpPanel extends AbstractPanel {
private static var _dict:Dictionary;
public function HelpPanel(_arg1:Game){
_linkage = "HelpPanelAsset";
super(_arg1);
if (!_dict){
_dict = new Dictionary();
_dict[Arcade] = "hint.girls";
_dict[GamestationShop] = "hint.gamestation";
_dict[Gym] = "hint.girls";
_dict[Home] = "hint.home";
_dict[JobCentre] = "hint.job";
_dict[Mall] = "hint.mall";
_dict[Nightclub] = "hint.girls";
_dict[OutfitShop] = "hint.clothing";
_dict[Town] = "hint.map";
};
}
private function _closeClick(_arg1:MouseEvent):void{
_close();
}
override public function dispose():void{
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
}
override protected function _init():void{
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
var _local1:TextField = (_mc.getChildByName("help_txt") as TextField);
_local1.multiline = true;
_local1.selectable = false;
_local1.wordWrap = true;
_local1.autoSize = TextFieldAutoSize.LEFT;
var _local2:Class = _game.getCurrentScreenClass();
var _local3:String = _dict[_local2];
if (_local3){
if (TextManager.getInstance().hasId(_local3)){
_local1.text = TextManager.getInstance().getTextById(_local3);
};
};
}
}
}//package com.kerb.gamestation.ui
Section 45
//InfoPanel (com.kerb.gamestation.ui.InfoPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import com.kerb.gamestation.*;
public class InfoPanel extends AbstractPanel {
protected var _timer:Timer;
protected static const MAX_DISPLAY_TIME:int = 3000;
protected static const MIN_DISPLAY_TIME:int = 1500;
public function InfoPanel(_arg1:Game){
_linkage = "InfoPanelAsset";
super(_arg1);
}
override public function dispose():void{
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, _timerComplete);
_timer = null;
stage.removeEventListener(MouseEvent.MOUSE_DOWN, _click);
}
protected function _timerComplete(_arg1:TimerEvent):void{
_close();
}
override public function centreToStage():Boolean{
return (true);
}
protected function _click(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
override protected function _init():void{
_mc.label_txt.autoSize = TextFieldAutoSize.CENTER;
stage.addEventListener(MouseEvent.MOUSE_DOWN, _click);
}
public function setText(_arg1:String):void{
_mc.label_txt.text = _arg1;
_mc.label_txt.y = (((0.5 * (_mc.bg.height - _mc.label_txt.height)) + _mc.bg.y) - 5);
var _local2:int = ((((MAX_DISPLAY_TIME - MIN_DISPLAY_TIME) * (_mc.label_txt.numLines - 1)) / 2) + MIN_DISPLAY_TIME);
_timer = new Timer(_local2);
_timer.addEventListener(TimerEvent.TIMER, _timerComplete);
_timer.start();
}
}
}//package com.kerb.gamestation.ui
Section 46
//IntelligencePanel (com.kerb.gamestation.ui.IntelligencePanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
import flash.text.*;
import com.kerb.gamestation.*;
public class IntelligencePanel extends AbstractPanel {
private static var _numGames:int = 0;
private static var _numIntros:int = 0;
public function IntelligencePanel(_arg1:Game){
_linkage = "IntelligencePanelAsset";
super(_arg1);
}
private function _levelUpClick(_arg1:MouseEvent):void{
var index:int;
var txt:String;
var line:String;
var e = _arg1;
try {
_game.getPlayer().changeIntelligence(10, true);
_game.updateUI();
index = ((Math.random() * _numIntros) + 1);
txt = TextManager.getInstance().getTextById(("intelligence-intro-" + index));
index = ((Math.random() * _numGames) + 1);
line = TextManager.getInstance().getTextById(("top100.game-" + index));
_mc.speechBubble.answer_txt.text = txt.split("@@GAME@@").join(line);
_mc.speechBubble.visible = true;
_close();
} catch(e:Error) {
if (e.message == "insufficient_ap"){
_game.showInfo(TextManager.getInstance().getTextById("info.no.ap"));
} else {
trace(e);
};
};
}
private function _closeClick(_arg1:MouseEvent):void{
_close();
}
override public function centreToStage():Boolean{
return (true);
}
override public function dispose():void{
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
_mc.levelUp_btn.removeEventListener(MouseEvent.CLICK, _levelUpClick);
}
override protected function _init():void{
var _local2:String;
var _local1:TextField = (_mc.getChildByName("levelup_txt") as TextField);
_local1.multiline = true;
_local1.wordWrap = true;
_local1.selectable = false;
_local1.text = TextManager.getInstance().getTextById("gs.intelligence.pop-up.body");
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_mc.levelUp_btn.addEventListener(MouseEvent.CLICK, _levelUpClick);
_mc.speechBubble.visible = false;
if (_numIntros == 0){
_local2 = "";
while (++_numIntros) {
_local2 = TextManager.getInstance().getTextById(("intelligence-intro-" + _numIntros));
if (_local2.indexOf(("intelligence-intro-" + _numIntros)) != -1){
_numIntros--;
break;
};
};
};
if (_numGames == 0){
_local2 = "";
while (++_numGames) {
_local2 = TextManager.getInstance().getTextById(("top100.game-" + _numGames));
if (_local2.indexOf(("top100.game-" + _numGames)) != -1){
_numGames--;
break;
};
};
};
if (_game.getPlayer().getIntelligence() >= Player.MAX_STAT){
_game.showInfo(TextManager.getInstance().getTextById("info.already-at-max-stat"));
_close();
};
}
}
}//package com.kerb.gamestation.ui
Section 47
//InventoryPanel (com.kerb.gamestation.ui.InventoryPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.item.*;
import flash.text.*;
import com.kerb.gamestation.*;
public class InventoryPanel extends AbstractPanel {
private var _scrollDir:Number;
private var _scrollMaxSpeed2:Number;
private var _scrollMin:Number;
private var _scrollRate2:Number;
private var _scrollMaxSpeed:Number;
private var _scrollDir2:Number;
private var _scrollMax2:Number;
private var _scrollMax:Number;
private var _scrollMin2:Number;
private var _content2:Sprite;
private var _content:Sprite;
private var _scrollRate:Number;
public function InventoryPanel(_arg1:Game){
_linkage = "InventoryPanelAsset";
super(_arg1);
}
private function _upPressed(_arg1:MouseEvent):void{
_scrollDir = 1;
}
private function _up2Pressed(_arg1:MouseEvent):void{
_scrollDir2 = 1;
}
private function _enterFrame(_arg1:Event):void{
_scrollRate = (_scrollRate + (0.1 * (_scrollDir - _scrollRate)));
var _local2:Number = Math.round(((_scrollMaxSpeed * _scrollRate) + _content.y));
_local2 = Math.min(_scrollMax, Math.max(_scrollMin, _local2));
_content.y = _local2;
}
private function _down2Pressed(_arg1:MouseEvent):void{
_scrollDir2 = -1;
}
private function _downPressed(_arg1:MouseEvent):void{
_scrollDir = -1;
}
private function _enterFrame2(_arg1:Event):void{
_scrollRate2 = (_scrollRate2 + (0.1 * (_scrollDir2 - _scrollRate2)));
var _local2:Number = Math.round(((_scrollMaxSpeed2 * _scrollRate2) + _content2.y));
_local2 = Math.min(_scrollMax2, Math.max(_scrollMin2, _local2));
_content2.y = _local2;
}
override public function dispose():void{
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
_mc.up_btn.removeEventListener(MouseEvent.MOUSE_DOWN, _upPressed);
_mc.down_btn.removeEventListener(MouseEvent.MOUSE_DOWN, _downPressed);
_mc.up2_btn.removeEventListener(MouseEvent.MOUSE_DOWN, _up2Pressed);
_mc.down2_btn.removeEventListener(MouseEvent.MOUSE_DOWN, _down2Pressed);
_mc.removeEventListener(Event.ENTER_FRAME, _enterFrame);
_mc.removeEventListener(Event.ENTER_FRAME, _enterFrame2);
stage.removeEventListener(MouseEvent.MOUSE_UP, _mouseUp);
}
private function _mouseUp(_arg1:MouseEvent):void{
_scrollDir = 0;
_scrollDir2 = 0;
}
public function setHeartLevels(_arg1:Array):void{
_mc.gothHeart.gotoAndStop(_arg1[0]);
_mc.sportyHeart.gotoAndStop(_arg1[1]);
_mc.popHeart.gotoAndStop(_arg1[2]);
}
override protected function _init():void{
var _local4:OwnedItem;
var _local9:MovieClip;
var _local11:TextField;
var _local12:DisplayObject;
var _local13:MovieClip;
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_content = new Sprite();
_content.x = _mc.contentMask.x;
_content.y = _mc.contentMask.y;
_mc.addChild(_content);
_content.mask = _mc.contentMask;
_content2 = new Sprite();
_content2.x = _mc.contentMask2.x;
_content2.y = _mc.contentMask2.y;
_mc.addChild(_content2);
_content2.mask = _mc.contentMask2;
var _local1:Player = _game.getPlayer();
var _local2:Array = _local1.getOwnedOutfits();
var _local3:Array = _local1.getOwnedGifts();
var _local5:int;
var _local6:int;
var _local7 = 10;
var _local8 = 15;
var _local10:int;
for each (_local4 in _local2) {
_local10++;
_local9 = Main.afm.createMovieClip("interface", "ItemButtonAsset");
_local9.over.visible = false;
_local9.down.visible = false;
_local9.hit.visible = false;
_local9.up.bought.visible = false;
_local9.up.label_txt.text = TextManager.getInstance().getTextById(_local4.ownableItem.name);
_local13 = Main.afm.createMovieClip("interface", _local4.ownableItem.linkage);
_local13.x = ((0.5 * (_local9.up.bg.width - _local13.width)) + _local9.up.bg.x);
_local13.y = ((0.5 * (_local9.up.bg.height - _local13.height)) + _local9.up.bg.y);
_local9.up.addChildAt(_local13, 1);
_local9.x = _local5;
_local9.y = _local6;
_content.addChild(_local9);
_local5 = (_local5 + (_local9.width + _local7));
if (_local5 > (_mc.contentMask.width - _local9.width)){
_local5 = 0;
_local6 = (_local6 + (_local9.height + _local8));
};
};
_mc.up_btn.addEventListener(MouseEvent.MOUSE_DOWN, _upPressed);
_mc.down_btn.addEventListener(MouseEvent.MOUSE_DOWN, _downPressed);
stage.addEventListener(MouseEvent.MOUSE_UP, _mouseUp);
if ((((_local6 > _mc.contentMask.height)) || ((_local10 > 2)))){
_scrollMax = _content.y;
_scrollMin = ((_content.y + _mc.contentMask.height) - _content.height);
_mc.addEventListener(Event.ENTER_FRAME, _enterFrame);
} else {
_mc.up_btn.visible = false;
_mc.down_btn.visible = false;
};
_local5 = 0;
_local6 = (_content2.height + _local8);
_local10 = 0;
for each (_local4 in _local3) {
_local9 = Main.afm.createMovieClip("interface", "ItemButtonAsset");
_local9.over.visible = false;
_local9.down.visible = false;
_local9.hit.visible = false;
_local9.up.bought.visible = false;
_local11 = (_local9.up.label_txt as TextField);
_local11.multiline = true;
_local11.wordWrap = true;
_local11.selectable = false;
_local11.autoSize = TextFieldAutoSize.CENTER;
_local11.text = TextManager.getInstance().getTextById(_local4.ownableItem.name);
_local13 = Main.afm.createMovieClip("interface", _local4.ownableItem.linkage);
_local13.name = "img";
_local13.x = ((0.5 * (_local9.up.bg.width - _local13.width)) + _local9.up.bg.x);
_local13.y = ((_local11.y + _local11.textHeight) + 10);
_local9.up.addChildAt(_local13, 1);
_local9.x = _local5;
_local9.y = _local6;
_content2.addChild(_local9);
_local5 = (_local5 + (_local9.width + _local7));
if (((!(_local12)) || ((_local9.height > _local12.height)))){
_local12 = _local9;
};
if (_local5 > (_mc.contentMask2.width - _local9.width)){
_local5 = 0;
_local6 = (_local6 + (_local12.height + _local8));
_local12 = null;
};
};
_mc.up2_btn.addEventListener(MouseEvent.MOUSE_DOWN, _up2Pressed);
_mc.down2_btn.addEventListener(MouseEvent.MOUSE_DOWN, _down2Pressed);
stage.addEventListener(MouseEvent.MOUSE_UP, _mouseUp);
if ((((_local6 > _mc.contentMask2.height)) || ((_local10 > 2)))){
_scrollMax2 = _content2.y;
_scrollMin2 = ((_content2.y + _mc.contentMask2.height) - _content2.height);
_mc.addEventListener(Event.ENTER_FRAME, _enterFrame2);
} else {
_mc.up2_btn.visible = false;
_mc.down2_btn.visible = false;
};
_scrollDir = 0;
_scrollRate = 0;
_scrollMaxSpeed = 10;
_scrollDir2 = 0;
_scrollRate2 = 0;
_scrollMaxSpeed2 = 10;
}
private function _closeClick(_arg1:MouseEvent):void{
_close();
}
}
}//package com.kerb.gamestation.ui
Section 48
//JobPanel (com.kerb.gamestation.ui.JobPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import com.kerb.utils.*;
import com.kerb.logger.*;
import flash.text.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.job.*;
public class JobPanel extends AbstractPanel {
private var _job:Job;
public function JobPanel(_arg1:Game){
_linkage = "JobPanelAsset";
super(_arg1);
}
override protected function _init():void{
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_mc.job_btn.addEventListener(MouseEvent.CLICK, _jobClick);
}
private function _closeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
override public function centreToStage():Boolean{
return (true);
}
private function _jobClick(_arg1:MouseEvent):void{
var msg:String;
var numDays:int;
var sick:String;
var e = _arg1;
var jp:JobProcessor = new JobProcessor();
try {
jp.process(_job, _game.getPlayer());
_game.addDays(jp.getDayDelta());
msg = TextManager.getInstance().getTextById("job.outcome");
numDays = (jp.getDayDelta() - jp.getSickDelta());
msg = msg.split("@@DAYS@@").join(numDays);
msg = msg.split("@@PLURAL@@").join(((numDays)>1) ? "s" : "");
msg = msg.split("@@NAME@@").join(TextManager.getInstance().getTextById(_job.name));
msg = msg.split("@@INCOME@@").join(jp.getMoneyDelta());
if (jp.getSickDelta() > 0){
sick = TextManager.getInstance().getTextById("job.sick");
sick = sick.split("@@DAYS@@").join(jp.getSickDelta());
sick = sick.split("@@PLURAL@@").join(((jp.getSickDelta())>1) ? "s" : "");
sick = sick.split("@@COST@@").join(jp.getCostDelta());
msg = ((msg + " ") + sick);
};
KerbLog.instance().info(msg);
_game.showInfo(msg);
} catch(e:Error) {
if (e.message == "insufficient_ap"){
_game.showInfo(TextManager.getInstance().getTextById("info.no.ap"));
} else {
trace(e);
};
};
_game.updateUI();
}
public function setType(_arg1:String):void{
var _local3:TextField;
var _local4:int;
var _local5:int;
_job = JobFactory.instance().getJobFromName(_arg1);
var _local2:String = _job.confirmation;
if (_local2){
_local3 = (_mc.description_txt as TextField);
_local3.autoSize = TextFieldAutoSize.CENTER;
_local3.multiline = true;
_local3.wordWrap = true;
_local3.selectable = false;
_local4 = _local3.textHeight;
_local3.text = TextManager.getInstance().getTextById(_local2);
_local5 = _local3.textHeight;
_local3.y = (_local3.y - (0.5 * (_local5 - _local4)));
};
}
override public function dispose():void{
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
_mc.job_btn.removeEventListener(MouseEvent.CLICK, _jobClick);
}
}
}//package com.kerb.gamestation.ui
Section 49
//OutfitPanel (com.kerb.gamestation.ui.OutfitPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.item.*;
import com.kerb.gamestation.*;
public class OutfitPanel extends AbstractPanel {
private var _outfits:Array;
private var _outfitButtons:Array;
public function OutfitPanel(_arg1:Game){
_linkage = "OutfitPanelAsset";
super(_arg1);
}
private function _deactivateButton(_arg1:ExtendedDynamicButton):void{
_arg1.disable();
_arg1.mcRef.alpha = 0.5;
_arg1.setBoughtIconVisibility(true);
}
override public function dispose():void{
var _local1:ExtendedDynamicButton;
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
for each (_local1 in _outfitButtons) {
_local1.removeEventListener(MouseEvent.CLICK, _outfitClick);
};
}
private function _buyItem(_arg1:OwnedItem):void{
var message:String;
var ownedItem = _arg1;
var name:String = TextManager.getInstance().getTextById(ownedItem.ownableItem.name);
try {
_game.getPlayer().acquireItem(ownedItem);
_game.updateUI();
message = TextManager.getInstance().getTextById("info.purchase");
} catch(e:Error) {
message = TextManager.getInstance().getTextById("info.no.money");
};
message = message.split("@@ITEM@@").join(name);
_game.showInfo(message);
}
private function _closeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
private function _outfitClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_deactivateButton(ExtendedDynamicButton(_arg1.currentTarget));
var _local2:int = _outfitButtons.indexOf(_arg1.currentTarget);
if ((((_local2 >= 0)) && ((_local2 < _outfits.length)))){
_buyItem(_outfits[_local2]);
};
}
override protected function _init():void{
var _local3:OwnedItem;
var _local4:MovieClip;
var _local5:ExtendedDynamicButton;
var _local6:MovieClip;
var _local7:Boolean;
var _local8:OwnedItem;
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_outfits = [];
_outfitButtons = [];
var _local1:Array = _game.getPlayer().getOwnedOutfits();
var _local2:int;
while (_local2 < 6) {
_local3 = OwnedItemFactory.instance().createOwnedItemFromId(_local2);
_outfits.push(_local3);
_local4 = MovieClip(_mc.getChildByName((("outfit" + _local2) + "_btn")));
_local5 = new ExtendedDynamicButton(_local4, _local3.ownableItem.name);
_local5.setBoughtIconVisibility(false);
_outfitButtons.push(_local5);
_local4.up.price_txt.text = ("£" + _local3.ownableItem.cost);
_local4.over.price_txt.text = ("£" + _local3.ownableItem.cost);
_local4.down.price_txt.text = ("£" + _local3.ownableItem.cost);
_local6 = Main.afm.createMovieClip("interface", _local3.ownableItem.linkage);
_local6.x = ((0.5 * (_local4.up.bg.width - _local6.width)) + _local4.up.bg.x);
_local6.y = ((0.5 * (_local4.up.bg.height - _local6.height)) + _local4.up.bg.y);
_local4.up.addChildAt(_local6, 1);
_local6 = Main.afm.createMovieClip("interface", _local3.ownableItem.linkage);
_local6.x = ((0.5 * (_local4.over.bg.width - _local6.width)) + _local4.over.bg.x);
_local6.y = ((0.5 * (_local4.over.bg.height - _local6.height)) + _local4.over.bg.y);
_local4.over.addChildAt(_local6, 1);
_local6 = Main.afm.createMovieClip("interface", _local3.ownableItem.linkage);
_local6.x = ((0.5 * (_local4.down.bg.width - _local6.width)) + _local4.down.bg.x);
_local6.y = ((0.5 * (_local4.down.bg.height - _local6.height)) + _local4.down.bg.y);
_local4.down.addChildAt(_local6, 1);
_local7 = false;
for each (_local8 in _local1) {
if (_local8.ownableItem.id == _local3.ownableItem.id){
_local7 = true;
break;
};
};
if (_local7){
_deactivateButton(_local5);
} else {
_local5.addEventListener(MouseEvent.CLICK, _outfitClick);
};
_local2++;
};
}
}
}//package com.kerb.gamestation.ui
Section 50
//PresentPanel (com.kerb.gamestation.ui.PresentPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.item.*;
import com.kerb.gamestation.*;
public class PresentPanel extends AbstractPanel {
private var _scrollDir:Number;
private var _scrollMin:Number;
private var _items:Array;
private var _scrollMaxSpeed:Number;
private var _content:Sprite;
private var _scrollMax:Number;
private var _presents:Array;
private var _scrollRate:Number;
private var _itemButtons:Array;
private var _content2:Sprite;
private var _counter:int;// = 0
private var _contentArray:Array;
public function PresentPanel(_arg1:Game){
_contentArray = new Array(_content, _content2);
_linkage = "PresentPanelAsset";
super(_arg1);
}
private function _itemClick(_arg1:MouseEvent):void{
var _local3:ExtendedDynamicButton;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:int;
while (_local2 < _itemButtons.length) {
_local3 = _itemButtons[_local2];
if (_arg1.currentTarget == _local3){
_buyItem(_items[_local2]);
_local3.setBoughtIconVisibility(true);
break;
};
_local2++;
};
}
private function _enterFrame(_arg1:Event):void{
_scrollRate = (_scrollRate + (0.1 * (_scrollDir - _scrollRate)));
var _local2:Number = Math.round(((_scrollMaxSpeed * _scrollRate) + _content.y));
_local2 = Math.min(_scrollMax, Math.max(_scrollMin, _local2));
_content.y = _local2;
}
private function _closeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
private function _upPressed(_arg1:MouseEvent):void{
_scrollDir = 1;
}
private function _buyItem(_arg1:OwnableItem):void{
var name:String;
var message:String;
var ownableItem = _arg1;
var ownedItem:OwnedItem = OwnedItemFactory.instance().createOwnedItemFromName(ownableItem.name);
try {
_game.getPlayer().acquireItem(ownedItem);
_game.updateUI();
} catch(e:Error) {
name = TextManager.getInstance().getTextById(ownableItem.name);
message = TextManager.getInstance().getTextById("info.no.money");
message = message.split("@@ITEM@@").join(name);
_game.showInfo(message);
};
}
private function _downPressed(_arg1:MouseEvent):void{
_scrollDir = -1;
}
override public function dispose():void{
var _local1:ExtendedDynamicButton;
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
_mc.up_btn.removeEventListener(MouseEvent.MOUSE_DOWN, _upPressed);
_mc.down_btn.removeEventListener(MouseEvent.MOUSE_DOWN, _downPressed);
_mc.removeEventListener(Event.ENTER_FRAME, _enterFrame);
stage.removeEventListener(MouseEvent.MOUSE_UP, _mouseUp);
for each (_local1 in _itemButtons) {
_local1.removeEventListener(MouseEvent.CLICK, _itemClick);
};
}
private function _mouseUp(_arg1:MouseEvent):void{
_scrollDir = 0;
}
override protected function _init():void{
var _local6:MovieClip;
var _local7:ExtendedDynamicButton;
var _local8:DisplayObject;
var _local9:OwnableItem;
var _local10:MovieClip;
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_mc.up_btn.addEventListener(MouseEvent.MOUSE_DOWN, _upPressed);
_mc.down_btn.addEventListener(MouseEvent.MOUSE_DOWN, _downPressed);
stage.addEventListener(MouseEvent.MOUSE_UP, _mouseUp);
var _local1 = 35;
var _local2 = 15;
var _local3:int;
var _local4:int;
_content = new Sprite();
_content.x = _mc.contentMask.x;
_content.y = _mc.contentMask.y;
_mc.addChild(_content);
_content.mask = _mc.contentMask;
_contentArray[0] = _content;
_scrollDir = 0;
_scrollRate = 0;
_scrollMaxSpeed = 10;
var _local5:Array = OwnedItemFactory.instance().getAllOwnableItems();
_items = [];
_itemButtons = [];
for each (_local9 in _local5) {
if (!_local9.isGift){
} else {
_local6 = Main.afm.createMovieClip("interface", "ItemButtonAsset");
_local6.y = _local4;
_local10 = Main.afm.createMovieClip("interface", _local9.linkage);
_local10.name = "img";
_local10.x = ((0.5 * (_local6.up.bg.width - _local10.width)) + _local6.up.bg.x);
_local6.up.addChildAt(_local10, 1);
_local10 = Main.afm.createMovieClip("interface", _local9.linkage);
_local10.name = "img";
_local10.x = ((0.5 * (_local6.over.bg.width - _local10.width)) + _local6.over.bg.x);
_local6.over.addChildAt(_local10, 1);
_local10 = Main.afm.createMovieClip("interface", _local9.linkage);
_local10.name = "img";
_local10.x = ((0.5 * (_local6.down.bg.width - _local10.width)) + _local6.down.bg.x);
_local6.down.addChildAt(_local10, 1);
_local6.x = _local3;
_local6.y = _local4;
_contentArray[0].addChild(_local6);
_local3 = (_local3 + (_local6.width + _local1));
_local7 = new ExtendedDynamicButton(_local6, _local9.name);
_local7.addEventListener(MouseEvent.CLICK, _itemClick);
_local7.setBoughtIconVisibility(false);
if (((!(_local8)) || ((_local6.height > _local8.height)))){
_local8 = _local6;
};
if (_local3 > (_mc.contentMask.width - _local6.width)){
_local3 = 0;
_local4 = (_local4 + (_local8.height + _local2));
_local8 = null;
};
_items.push(_local9);
_itemButtons.push(_local7);
};
};
if (_local4 > _mc.contentMask.height){
_scrollMax = _content.y;
_scrollMin = ((_content.y + _mc.contentMask.height) - _content.height);
_mc.addEventListener(Event.ENTER_FRAME, _enterFrame);
} else {
_mc.up_btn.visible = false;
_mc.down_btn.visible = false;
};
}
}
}//package com.kerb.gamestation.ui
Section 51
//SavePanel (com.kerb.gamestation.ui.SavePanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import com.kerb.utils.*;
import com.kerb.gamestation.*;
public class SavePanel extends AbstractPanel {
public function SavePanel(_arg1:Game){
_linkage = "SavePanelAsset";
super(_arg1);
}
private function _closeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
private function _saveClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:String = _mc.input_txt.text;
if (_local2.length > 0){
if (_game.save(_local2)){
_game.showInfo(TextManager.getInstance().getTextById("info.save.ok"));
} else {
_game.showInfo(TextManager.getInstance().getTextById("info.save.error"));
};
};
}
override public function dispose():void{
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
_mc.save_btn.removeEventListener(MouseEvent.CLICK, _saveClick);
}
override protected function _init():void{
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_mc.save_btn.addEventListener(MouseEvent.CLICK, _saveClick);
stage.focus = _mc.input_txt;
}
}
}//package com.kerb.gamestation.ui
Section 52
//ShopPanel (com.kerb.gamestation.ui.ShopPanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.text.*;
import com.kerb.gamestation.*;
public class ShopPanel extends AbstractPanel {
private var _text:String;
public static const BUY_EVENT:String = "Bought";
public function ShopPanel(_arg1:Game){
_linkage = "ShopPanelAsset";
super(_arg1);
}
override public function centreToStage():Boolean{
return (true);
}
private function _closeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
override public function dispose():void{
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
}
private function _confirmClick(_arg1:MouseEvent):void{
dispatchEvent(new Event(ShopPanel.BUY_EVENT));
_close();
}
override protected function _init():void{
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_mc.confirm_btn.addEventListener(MouseEvent.CLICK, _confirmClick);
var _local1:TextField = (_mc.getChildByName("text_txt") as TextField);
_local1.multiline = true;
_local1.selectable = false;
_local1.wordWrap = true;
_local1.autoSize = TextFieldAutoSize.CENTER;
var _local2:Number = _local1.textHeight;
_local1.text = _text;
var _local3:Number = _local1.textHeight;
var _local4:Number = (_local3 - _local2);
_local1.y = (_local1.y - (0.5 * _local4));
}
public function setText(_arg1:String):void{
_text = _arg1;
}
}
}//package com.kerb.gamestation.ui
Section 53
//SpeechBubblePanel (com.kerb.gamestation.ui.SpeechBubblePanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import com.kerb.gamestation.*;
public class SpeechBubblePanel extends AbstractPanel {
protected var _timer:Timer;
protected static const MAX_DISPLAY_TIME:int = 3000;
protected static const MIN_DISPLAY_TIME:int = 1500;
public function SpeechBubblePanel(_arg1:Game){
_linkage = "SpeechBubblePanelAsset";
super(_arg1);
}
override public function dispose():void{
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, _timerComplete);
_timer = null;
stage.removeEventListener(MouseEvent.MOUSE_DOWN, _click);
}
protected function _timerComplete(_arg1:TimerEvent):void{
_close();
}
protected function _click(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
override protected function _init():void{
stage.addEventListener(MouseEvent.MOUSE_DOWN, _click);
}
public function setText(_arg1:String):void{
var _local2:TextField = (_mc.speechBubble.answer_txt as TextField);
_local2.selectable = false;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.autoSize = TextFieldAutoSize.LEFT;
var _local3:Number = _local2.textHeight;
_mc.speechBubble.answer_txt.text = _arg1;
var _local4:Number = _local2.textHeight;
var _local5:Number = (_local4 - _local3);
var _local6:DisplayObject = (_mc.speechBubble.bg_mc as DisplayObject);
(_mc.speechBubble.bg_mc as DisplayObject).height = (_local6.height + _local5);
var _local7:int = ((((MAX_DISPLAY_TIME - MIN_DISPLAY_TIME) * (_mc.speechBubble.answer_txt.numLines - 1)) / 2) + MIN_DISPLAY_TIME);
_timer = new Timer(_local7);
_timer.addEventListener(TimerEvent.TIMER, _timerComplete);
_timer.start();
}
}
}//package com.kerb.gamestation.ui
Section 54
//UI (com.kerb.gamestation.ui.UI)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.display.*;
import com.kerb.gamestation.owner.*;
import flash.net.*;
import com.kerb.gamestation.*;
import com.kerb.gamestation.screens.*;
import com.kerb.tracking.*;
public class UI extends Sprite {
private var _panel:AbstractPanel;
private var _game:Game;
private var _mc:MovieClip;
public function UI(_arg1:Game){
this._game = _arg1;
_mc = Main.afm.createMovieClip("interface", "UIAsset");
addChild(_mc);
_mc.charm.meter.stop();
_mc.intelligence.meter.stop();
_mc.athleticism.meter.stop();
_mc.frame.mouseEnabled = false;
cash = 0;
ap = 0;
day = 1;
enable();
_displayCorrectSoundSign();
}
public function hide(_arg1:Object):void{
_arg1.x = -100;
}
public function enable():void{
_mc.inventory_btn.enabled = true;
_mc.save_btn.enabled = true;
_mc.help_btn.enabled = true;
_mc.gamestation_btn.addEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.inventory_btn.addEventListener(MouseEvent.CLICK, _inventoryClick);
_mc.save_btn.addEventListener(MouseEvent.CLICK, _saveClick);
_mc.help_btn.addEventListener(MouseEvent.CLICK, _helpClick);
_mc.sound_btn.addEventListener(MouseEvent.CLICK, _soundClick);
_mc.soundselected_btn.addEventListener(MouseEvent.CLICK, _soundSelectedClick);
}
public function showOutfitPanel():void{
_showPanel(OutfitPanel);
}
private function _displayCorrectSoundSign():void{
if (Main.SoundMuted){
hide(_mc.sound_btn);
show(_mc.soundselected_btn);
} else {
hide(_mc.soundselected_btn);
show(_mc.sound_btn);
};
}
public function set athleticism(_arg1:int):void{
var _local4:MovieClip;
var _local2:int = (_mc.athleticism.meter as MovieClip).currentFrame;
var _local3:int = (100 - _arg1);
if (_local3 < 1){
_local3 = 1;
} else {
if (_local3 > 100){
_local3 = 100;
};
};
_mc.athleticism.meter.gotoAndStop(_local3);
if (_local3 != _local2){
_local4 = (_mc.athleticism.feedback_mc as MovieClip);
_local4.gotoAndPlay("go");
};
}
public function showIntelligencePanel():void{
_showPanel(IntelligencePanel);
}
public function showCharmPanel():void{
_showPanel(CharmPanel);
}
public function showGirlPanel(_arg1:Girl, _arg2:AbstractScreen):void{
_showPanel(GirlPanel);
GirlPanel(_panel).setGirl(_arg1);
GirlPanel(_panel).setScreen(_arg2);
}
private function _showPanel(_arg1:Class):void{
hidePanel();
_panel = new _arg1(_game);
_panel.addEventListener(Event.CLOSE, _panelClose);
_panel.addEventListener(Event.ADDED_TO_STAGE, _onPanelAddedToStage);
addChild(_panel);
}
private function _saveClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(607);
_game.disable();
_showPanel(SavePanel);
}
private function _gamestationClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(606);
navigateToURL(new URLRequest("http://www.gamestation.co.uk/"), "_blank");
}
private function _soundSelectedClick(_arg1:MouseEvent):void{
Main.SoundMuted = false;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
Main.musicName = Main.TITLE_MUSIC_NAME;
Main.playMusic("");
if (_game.cheat){
_game.addDays(10);
};
hide(_mc.soundselected_btn);
show(_mc.sound_btn);
}
private function _helpClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.disable();
_showPanel(HelpPanel);
}
private function _soundClick(_arg1:MouseEvent):void{
Main.stopTitleMusic();
Main.SoundMuted = true;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
hide(_mc.sound_btn);
show(_mc.soundselected_btn);
Main.stopTitleMusic();
}
public function showAthleticismPanel():void{
_showPanel(AthleticismPanel);
}
public function dispose():void{
hidePanel();
disable();
}
public function showSpeechBubblePanel(_arg1:String):void{
_showPanel(SpeechBubblePanel);
SpeechBubblePanel(_panel).setText(_arg1);
}
public function showJobPanel(_arg1:String):void{
_showPanel(JobPanel);
JobPanel(_panel).setType(_arg1);
}
public function set ap(_arg1:int):void{
_mc.ap.label_txt.text = _arg1.toString();
}
public function set cash(_arg1:int):void{
_mc.cash.label_txt.text = _arg1.toString();
}
public function disable():void{
_mc.inventory_btn.enabled = false;
_mc.save_btn.enabled = false;
_mc.help_btn.enabled = false;
_mc.gamestation_btn.removeEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.inventory_btn.removeEventListener(MouseEvent.CLICK, _inventoryClick);
_mc.save_btn.removeEventListener(MouseEvent.CLICK, _saveClick);
_mc.help_btn.removeEventListener(MouseEvent.CLICK, _helpClick);
_mc.sound_btn.removeEventListener(MouseEvent.CLICK, _soundClick);
_mc.soundselected_btn.removeEventListener(MouseEvent.CLICK, _soundSelectedClick);
}
public function hidePanel():void{
if (_panel){
_panel.dispose();
_panel.removeEventListener(Event.CLOSE, _panelClose);
try {
removeChild(_panel);
} catch(e:Error) {
};
_panel = null;
};
}
public function showWardrobePanel():void{
_showPanel(WardrobePanel);
}
public function showPresentPanel():void{
_showPanel(PresentPanel);
}
public function set charm(_arg1:int):void{
var _local4:MovieClip;
var _local2:int = (_mc.charm.meter as MovieClip).currentFrame;
var _local3:int = (100 - _arg1);
if (_local3 < 1){
_local3 = 1;
} else {
if (_local3 > 100){
_local3 = 100;
};
};
_mc.charm.meter.gotoAndStop(_local3);
if (_local3 != _local2){
_local4 = (_mc.charm.feedback_mc as MovieClip);
_local4.gotoAndPlay("go");
};
}
private function _onPanelAddedToStage(_arg1:Event):void{
_panel.removeEventListener(Event.ADDED_TO_STAGE, _onPanelAddedToStage);
if (_panel.centreToStage()){
Util.centreDisplayObject(_panel);
};
}
private function _inventoryClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_game.disable();
_showPanel(InventoryPanel);
InventoryPanel(_panel).setHeartLevels(_game.getHeartLevels());
}
public function set day(_arg1:int):void{
_mc.day.label_txt.text = _arg1.toString();
}
public function showInfoPanel(_arg1:String):void{
_showPanel(InfoPanel);
InfoPanel(_panel).setText(_arg1);
}
private function _panelClose(_arg1:Event=null):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
hidePanel();
enable();
_game.enable();
dispatchEvent(new Event("panelClose"));
}
public function show(_arg1:Object):void{
_arg1.x = 552.9;
_arg1.y = 4;
}
public function set intelligence(_arg1:int):void{
var _local4:MovieClip;
var _local2:int = (_mc.intelligence.meter as MovieClip).currentFrame;
var _local3:int = (100 - _arg1);
if (_local3 < 1){
_local3 = 1;
} else {
if (_local3 > 100){
_local3 = 100;
};
};
_mc.intelligence.meter.gotoAndStop(_local3);
if (_local3 != _local2){
_local4 = (_mc.intelligence.feedback_mc as MovieClip);
_local4.gotoAndPlay("go");
};
}
}
}//package com.kerb.gamestation.ui
Section 55
//WardrobePanel (com.kerb.gamestation.ui.WardrobePanel)
package com.kerb.gamestation.ui {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.item.*;
import com.kerb.gamestation.*;
public class WardrobePanel extends AbstractPanel {
private var _outfits:Array;
private var _outfitButtons:Array;
public function WardrobePanel(_arg1:Game){
_linkage = "WardrobePanelAsset";
super(_arg1);
}
override public function dispose():void{
var _local1:ExtendedDynamicButton;
_mc.close_btn.removeEventListener(MouseEvent.CLICK, _closeClick);
for each (_local1 in _outfitButtons) {
_local1.removeEventListener(MouseEvent.CLICK, _outfitClick);
};
}
private function _closeClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_close();
}
private function _outfitClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:int = parseInt(_arg1.currentTarget.name.charAt(6));
_game.wearOutfit(_outfits[_local2]);
}
override protected function _init():void{
var _local3:MovieClip;
var _local4:ExtendedDynamicButton;
var _local5:OwnedItem;
var _local6:MovieClip;
var _local7:OwnableItem;
var _local8:Boolean;
_mc.close_btn.addEventListener(MouseEvent.CLICK, _closeClick);
_outfits = _game.getPlayer().getOwnedOutfits();
_outfitButtons = new Array();
var _local1:int;
var _local2:int;
while (_local2 < 6) {
_local3 = MovieClip(_mc.getChildByName((("outfit" + _local2) + "_btn")));
if (_local2 < _outfits.length){
_local5 = _outfits[_local2];
_local3.visible = true;
_local4 = new ExtendedDynamicButton(_local3, _local5.ownableItem.name);
_local4.addEventListener(MouseEvent.CLICK, _outfitClick);
_local4.setBoughtIconVisibility(false);
_local7 = _game.getPlayer().getOutfit();
_local8 = ((_local7) && ((_local7.id == _local5.ownableItem.id)));
_local6 = Main.afm.createMovieClip("interface", _local5.ownableItem.linkage);
_local6.x = ((0.5 * (_local3.up.bg.width - _local6.width)) + _local3.up.bg.x);
_local6.y = ((0.5 * (_local3.up.bg.height - _local6.height)) + _local3.up.bg.y);
_local3.up.addChildAt(_local6, 1);
_local6.selected.visible = _local8;
_local6 = Main.afm.createMovieClip("interface", _local5.ownableItem.linkage);
_local6.x = ((0.5 * (_local3.over.bg.width - _local6.width)) + _local3.over.bg.x);
_local6.y = ((0.5 * (_local3.over.bg.height - _local6.height)) + _local3.over.bg.y);
_local3.over.addChildAt(_local6, 1);
_local6.selected.visible = _local8;
_local6 = Main.afm.createMovieClip("interface", _local5.ownableItem.linkage);
_local6.x = ((0.5 * (_local3.down.bg.width - _local6.width)) + _local3.down.bg.x);
_local6.y = ((0.5 * (_local3.down.bg.height - _local6.height)) + _local3.down.bg.y);
_local3.down.addChildAt(_local6, 1);
_local6.selected.visible = _local8;
_outfitButtons.push(_local4);
_local1++;
} else {
_local3.visible = false;
};
if (_local1 == 0){
_game.showInfo(TextManager.getInstance().getTextById("info.no.wardrobe"));
};
_local2++;
};
}
}
}//package com.kerb.gamestation.ui
Section 56
//Game (com.kerb.gamestation.Game)
package com.kerb.gamestation {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.gamestation.owner.*;
import com.kerb.gamestation.item.*;
import com.kerb.logger.*;
import flash.net.*;
import com.kerb.gamestation.screens.*;
import com.kerb.gamestation.ui.*;
import com.kerb.tracking.*;
public final class Game extends Sprite {
private var _player:Player;
private var _screen:AbstractScreen;
private var _pop:PopGirl;
private var _sporty:SportyGirl;
private var _ui:UI;
private var _screenContainer:Sprite;
private var _partyAllowed:Boolean;// = false
private var _goth:GothGirl;
private var _currGirl:Girl;
private var _cheat:Boolean;// = false
private static const SHARED_OBJECT_NAME:String = "GamestationGirls";
public static var _day:int;
public function Game(){
_screenContainer = new Sprite();
_player = new Player();
_sporty = new SportyGirl();
_goth = new GothGirl();
_pop = new PopGirl();
super();
_init();
}
public function enable():void{
_screen.enable();
_ui.enable();
}
public function showPresentSelector():void{
disable();
_ui.showPresentPanel();
}
public function showIntelligencePanel():void{
disable();
_ui.showIntelligencePanel();
}
public function restore(_arg1:String):void{
var _local3:Object;
var _local2:SharedObject = SharedObject.getLocal(SHARED_OBJECT_NAME);
if (_local2.data[("save" + _arg1)]){
_local3 = _local2.data[("save" + _arg1)];
_day = _local3.day;
_player.restoreFrom(_local3);
_sporty.restoreFrom(_local3);
_goth.restoreFrom(_local3);
_pop.restoreFrom(_local3);
_player.listOwnedItems();
_sporty.listOwnedItems();
_goth.listOwnedItems();
_pop.listOwnedItems();
showInfo(TextManager.getInstance().getTextById("info.load.ok"));
} else {
showInfo(TextManager.getInstance().getTextById("info.load.error"));
throw (new Error());
};
}
public function showOutfitPanel():void{
disable();
_ui.showOutfitPanel();
}
public function addDays(_arg1:int):void{
var _dayDelta = _arg1;
_day = (_day + _dayDelta);
_sporty.newDay();
_goth.newDay();
_pop.newDay();
updateUI();
Main.days = _day;
if (Main.days >= Main.NO_OF_DAYS_TO_LOSE){
trace("YOU LOSE!!!!!!!!");
if (_screen){
_ui.hidePanel();
_screen.dispose();
try {
_screenContainer.removeChild(_screen);
} catch(e:Error) {
};
_screen = null;
};
_ui.removeEventListener("panelClose", _panelClose);
_ui.dispose();
_partyAllowed = true;
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function updateUI():void{
_ui.cash = _player.getMoney();
_ui.ap = _player.getAP();
_ui.charm = _player.getCharm();
_ui.intelligence = _player.getIntelligence();
_ui.athleticism = _player.getAthleticism();
_ui.day = _day;
gotGirlTrackingMonitor();
}
public function getHeartLevels():Array{
return ([_goth.getStanding(), _sporty.getStanding(), _pop.getStanding()]);
}
public function set cheat(_arg1:Boolean):void{
_cheat = _arg1;
}
public function getCurrentScreenClass():Class{
if (((_screen) && ((_screen is AbstractScreen)))){
return ((getDefinitionByName(getQualifiedClassName(_screen)) as Class));
};
return (null);
}
public function gotoScreen(_arg1:Class):void{
var ScreenClass = _arg1;
if (_screen){
_ui.hidePanel();
_screen.dispose();
try {
_screenContainer.removeChild(_screen);
} catch(e:Error) {
};
_screen = null;
};
_screen = new ScreenClass(this);
_screenContainer.addChild(_screen);
}
private function _uiReady(_arg1:Event):void{
var e = _arg1;
_ui.removeEventListener(Event.ADDED_TO_STAGE, _uiReady);
var tryToLoadGame = !((Main.loadGameKey == ""));
var startNewGame:Boolean;
if (tryToLoadGame){
try {
restore(Main.loadGameKey);
startNewGame = false;
} catch(e:Error) {
KerbLog.instance().info("failed to load game, so starting a new one instead");
} finally {
Main.loadGameKey = "";
};
};
if (startNewGame){
_day = 1;
_player.acquireMoney(Player.INIT_MONEY);
_player.giveAP(Player.INIT_AP);
_player.changeCharm(Player.INIT_CHARM, false);
_player.changeIntelligence(Player.INIT_INTELLIGENCE, false);
_player.changeAthleticism(Player.INIT_ATHLETICISM, false);
};
gotoScreen(Town);
updateUI();
}
public function showWardrobePanel():void{
disable();
_ui.showWardrobePanel();
}
public function checkWin():void{
if (((((((_goth.willGoToPartyWithPlayer()) && (_sporty.willGoToPartyWithPlayer()))) && (_pop.willGoToPartyWithPlayer()))) || (_partyAllowed))){
if (_screen){
_ui.hidePanel();
_screen.dispose();
try {
_screenContainer.removeChild(_screen);
} catch(e:Error) {
};
_screen = null;
};
_ui.removeEventListener("panelClose", _panelClose);
_ui.dispose();
_partyAllowed = true;
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function gotGirlTrackingMonitor():void{
if (((!(_goth.won)) && (_goth.willGoToPartyWithPlayer()))){
_goth.won = true;
DoubleQuick.event(597);
};
if (((!(_sporty.won)) && (_sporty.willGoToPartyWithPlayer()))){
_sporty.won = true;
DoubleQuick.event(600);
};
if (((!(_pop.won)) && (_pop.willGoToPartyWithPlayer()))){
_pop.won = true;
DoubleQuick.event(599);
};
}
public function checkForPartyFlash():Boolean{
if (((((((_goth.willGoToPartyWithPlayer()) && (_sporty.willGoToPartyWithPlayer()))) && (_pop.willGoToPartyWithPlayer()))) || (_partyAllowed))){
return (true);
};
return (false);
}
public function showCharmPanel():void{
disable();
_ui.showCharmPanel();
}
public function showInfo(_arg1:String):void{
_ui.showInfoPanel(_arg1);
}
public function get cheat():Boolean{
return (_cheat);
}
public function getPlayer():Player{
return (_player);
}
public function showSpeechBubble(_arg1:String):void{
_ui.showSpeechBubblePanel(_arg1);
}
public function set partyAccess(_arg1:Boolean):void{
_partyAllowed = _arg1;
}
public function showAthleticismPanel():void{
disable();
_ui.showAthleticismPanel();
}
private function _dispose():void{
disable();
_ui.removeEventListener("panelClose", _panelClose);
_ui.dispose();
}
public function wearOutfit(_arg1:OwnedItem):void{
_player.equipOutfit(_arg1);
var _local2:String = TextManager.getInstance().getTextById(_arg1.ownableItem.name);
var _local3:String = TextManager.getInstance().getTextById("info.wardrobe");
_local3 = _local3.split("@@OUTFIT@@").join(_local2);
showInfo(_local3);
}
public function approachGirl(_arg1:Class):Boolean{
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Array;
var _local7:Boolean;
var _local8:Boolean;
var _local9:String;
var _local10:int;
var _local2:Girl;
if ((_sporty is _arg1)){
_local2 = _sporty;
} else {
if ((_goth is _arg1)){
_local2 = _goth;
} else {
if ((_pop is _arg1)){
_local2 = _pop;
};
};
};
if (_local2.willTalkToPlayer(_player)){
_ui.showGirlPanel(_local2, _screen);
disable();
return (true);
};
_local3 = _local2.charmOK(_player);
_local4 = _local2.intelligenceOK(_player);
_local5 = _local2.athleticismOK(_player);
_local6 = [];
if (!_local3){
_local6.push(TextManager.getInstance().getTextById("snub.reason.charm"));
};
if (!_local4){
_local6.push(TextManager.getInstance().getTextById("snub.reason.intelligence"));
};
if (!_local5){
_local6.push(TextManager.getInstance().getTextById("snub.reason.athleticism"));
};
_local7 = !(_local2.likesPlayerOutfit(_player.getOutfit()));
_local8 = ((_local2.likesPlayerOutfit(_player.getOutfit())) && (!(_local2.lovesPlayerOutfit(_player.getOutfit()))));
_local9 = "";
if (_local7){
_local9 = (_local9 + TextManager.getInstance().getTextById("snub.reason.outfit"));
_local9 = (_local9 + ".");
} else {
if (_local8){
_local9 = (_local9 + TextManager.getInstance().getTextById("snub.reason.cheap-outfit"));
_local9 = (_local9 + ".");
if (_local6.length > 0){
_local9 = (_local9 + " Also, ");
_local10 = int((Math.random() * _local6.length));
_local9 = (_local9 + _local6[_local10].charAt(0).toLowerCase());
_local9 = (_local9 + _local6[_local10].substr(1));
_local9 = (_local9 + ".");
};
} else {
if (_local6.length > 0){
_local10 = int((Math.random() * _local6.length));
_local9 = (_local9 + _local6[_local10]);
_local9 = (_local9 + ".");
_local6.splice(_local10, 1);
};
if (_local6.length > 0){
_local9 = (_local9 + " Also, ");
_local10 = int((Math.random() * _local6.length));
_local9 = (_local9 + _local6[_local10].charAt(0).toLowerCase());
_local9 = (_local9 + _local6[_local10].substr(1));
_local9 = (_local9 + ".");
};
};
};
KerbLog.instance().info(_local9);
showSpeechBubble(_local9);
return (false);
}
public function disable():void{
_screen.disable();
_ui.disable();
}
public function get partyAccess():Boolean{
return (_partyAllowed);
}
public function showJobPanel(_arg1:String):void{
disable();
_ui.showJobPanel(_arg1);
}
public function sleep():void{
var _local2:String;
_newDay();
var _local1:int = _player.getAP();
if (_local1 < Player.AP_FOR_SLEEP){
_player.giveAP((Player.AP_FOR_SLEEP - _local1));
_local2 = TextManager.getInstance().getTextById("info.sleep");
_local2 = _local2.split("@@AP_SLEEP@@").join((Player.AP_FOR_SLEEP - _local1));
showInfo(_local2);
};
}
public function clearSharedObject():void{
var _local1:SharedObject = SharedObject.getLocal(SHARED_OBJECT_NAME);
_local1.clear();
}
private function _panelClose(_arg1:Event):void{
_screen.panelClosed();
}
private function _newDay():void{
_day++;
_sporty.newDay();
_goth.newDay();
_pop.newDay();
updateUI();
}
public function save(_arg1:String):Boolean{
var id = _arg1;
var so:SharedObject = SharedObject.getLocal(SHARED_OBJECT_NAME);
var data:Object = so.data;
data[("save" + id)] = {};
var o:Object = data[("save" + id)];
o.day = _day;
_player.saveTo(o);
_sporty.saveTo(o);
_goth.saveTo(o);
_pop.saveTo(o);
try {
so.flush();
return (true);
} catch(e:Error) {
};
return (false);
}
private function _init():void{
_day = 0;
_ui = new UI(this);
_ui.addEventListener("panelClose", _panelClose);
_ui.addEventListener(Event.ADDED_TO_STAGE, _uiReady);
addChild(_screenContainer);
addChild(_ui);
}
}
}//package com.kerb.gamestation
Section 57
//GameLose (com.kerb.gamestation.GameLose)
package com.kerb.gamestation {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import com.kerb.tracking.*;
public class GameLose extends Sprite {
private var _panel:MovieClip;
private var _mc:MovieClip;
private var _mc2:MovieClip;
private static const SHARED_OBJECT_NAME:String = "GamestationGirlsDownload";
public function GameLose(){
_mc = new MovieClip();
_mc2 = new MovieClip();
super();
_mc = Main.afm.createMovieClip("party", "PartyDeniedAsset");
addChild(_mc);
_mc2 = Main.afm.createMovieClip("interface", "UIFinalAsset");
addChild(_mc2);
addEventListener(Event.ADDED_TO_STAGE, _addedToStage);
DoubleQuick.event(602);
_mc.party.results.results_txt.text = (("IT TOOK YOU " + Main.days) + " DAYS!");
Main.days = 0;
Game._day = 0;
_displayCorrectSoundSign();
}
private function _downloadClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(603);
navigateToURL(new URLRequest("http://www.gamestation.co.uk/giftselector/"), "_blank");
SimpleButton(_mc.party.dload_btn).enabled = false;
_mc.party.dload_btn.removeEventListener(MouseEvent.CLICK, _downloadClick);
}
private function _addedToStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _addedToStage);
_init();
}
public function hide(_arg1:Object):void{
_arg1.x = -100;
}
private function _displayCorrectSoundSign():void{
if (Main.SoundMuted){
hide(_mc2.sound_btn);
show(_mc2.soundselected_btn);
} else {
hide(_mc2.soundselected_btn);
show(_mc2.sound_btn);
};
}
private function _soundClick(_arg1:MouseEvent):void{
Main.stopTitleMusic();
Main.SoundMuted = true;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
hide(_mc2.sound_btn);
show(_mc2.soundselected_btn);
}
private function _panelClose(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_panel.close_btn.removeEventListener(MouseEvent.CLICK, _panelClose);
removeChild(_panel);
_panel = null;
}
private function _init():void{
_mc2.gamestation_btn.addEventListener(MouseEvent.CLICK, _gamestationClick);
_mc2.sound_btn.addEventListener(MouseEvent.CLICK, _soundClick);
_mc2.soundselected_btn.addEventListener(MouseEvent.CLICK, _soundSelectedClick);
_mc.party.dload_btn.addEventListener(MouseEvent.CLICK, _downloadClick);
_mc.party.tellYourFriend_btn.addEventListener(MouseEvent.CLICK, _tellFriendClick);
_mc.party.playGameAgain_btn.addEventListener(MouseEvent.CLICK, _playAgainClick);
}
private function _gamestationClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(606);
navigateToURL(new URLRequest("http://www.gamestation.co.uk/"), "_blank");
}
private function _soundSelectedClick(_arg1:MouseEvent):void{
Main.SoundMuted = false;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
Main.playMusic("");
hide(_mc2.soundselected_btn);
show(_mc2.sound_btn);
}
private function _complete():void{
_mc2.gamestation_btn.removeEventListener(MouseEvent.CLICK, _gamestationClick);
_mc2.sound_btn.removeEventListener(MouseEvent.CLICK, _soundClick);
_mc2.soundselected_btn.removeEventListener(MouseEvent.CLICK, _soundSelectedClick);
_mc.party.dload_btn.removeEventListener(MouseEvent.CLICK, _downloadClick);
_mc.party.tellYourFriend_btn.removeEventListener(MouseEvent.CLICK, _tellFriendClick);
_mc.party.playGameAgain_btn.removeEventListener(MouseEvent.CLICK, _playAgainClick);
dispatchEvent(new Event(Event.COMPLETE));
}
private function _tellFriendClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(605);
_panel = Main.afm.createMovieClip("interface", "TellFriendPanelAsset");
_panel.close_btn.addEventListener(MouseEvent.CLICK, _panelClose);
stage.focus = _panel.message_txt;
addChild(_panel);
}
private function _playAgainClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(604);
_complete();
}
public function show(_arg1:Object):void{
_arg1.x = 552.9;
_arg1.y = 4;
}
}
}//package com.kerb.gamestation
Section 58
//GameWin (com.kerb.gamestation.GameWin)
package com.kerb.gamestation {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import com.kerb.tracking.*;
public class GameWin extends Sprite {
private var _panel:MovieClip;
private var _mc:MovieClip;
private var _mc2:MovieClip;
private static const SHARED_OBJECT_NAME:String = "GamestationGirlsDownload";
public function GameWin(){
_mc = new MovieClip();
_mc2 = new MovieClip();
super();
_mc = Main.afm.createMovieClip("party", "PartyAsset");
addChild(_mc);
_mc2 = Main.afm.createMovieClip("interface", "UIFinalAsset");
addChild(_mc2);
addEventListener(Event.ADDED_TO_STAGE, _addedToStage);
DoubleQuick.event(601);
_displayCorrectSoundSign();
_mc.party.results.results_txt.text = (("IT TOOK YOU " + Main.days) + " DAYS!");
Main.days = 0;
Game._day = 0;
Main.stopTitleMusic();
Main.playMusic(Main.PARTY_MUSIC_NAME);
Main.musicName = Main.PARTY_MUSIC_NAME;
}
private function _downloadClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(603);
navigateToURL(new URLRequest("http://www.gamestation.co.uk/giftselector/"), "_blank");
SimpleButton(_mc.party.dload_btn).enabled = false;
_mc.party.dload_btn.removeEventListener(MouseEvent.CLICK, _downloadClick);
}
private function _addedToStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _addedToStage);
_init();
}
public function hide(_arg1:Object):void{
_arg1.x = -100;
}
private function _displayCorrectSoundSign():void{
if (Main.SoundMuted){
hide(_mc2.sound_btn);
show(_mc2.soundselected_btn);
} else {
hide(_mc2.soundselected_btn);
show(_mc2.sound_btn);
};
}
private function _soundClick(_arg1:MouseEvent):void{
Main.stopTitleMusic();
Main.SoundMuted = true;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
hide(_mc2.sound_btn);
show(_mc2.soundselected_btn);
Main.stopTitleMusic();
}
private function _panelClose(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_panel.close_btn.removeEventListener(MouseEvent.CLICK, _panelClose);
removeChild(_panel);
_panel = null;
}
private function _init():void{
_mc2.gamestation_btn.addEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.party.dload_btn.addEventListener(MouseEvent.CLICK, _downloadClick);
_mc.party.tellYourFriend_btn.addEventListener(MouseEvent.CLICK, _tellFriendClick);
_mc.party.playGameAgain_btn.addEventListener(MouseEvent.CLICK, _playAgainClick);
_mc2.sound_btn.addEventListener(MouseEvent.CLICK, _soundClick);
_mc2.soundselected_btn.addEventListener(MouseEvent.CLICK, _soundSelectedClick);
}
private function _gamestationClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(606);
navigateToURL(new URLRequest("http://www.gamestation.co.uk/"), "_blank");
}
private function _soundSelectedClick(_arg1:MouseEvent):void{
Main.SoundMuted = false;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
Main.playMusic("");
hide(_mc2.soundselected_btn);
show(_mc2.sound_btn);
}
private function _complete():void{
_mc2.gamestation_btn.removeEventListener(MouseEvent.CLICK, _gamestationClick);
_mc2.sound_btn.removeEventListener(MouseEvent.CLICK, _soundClick);
_mc2.soundselected_btn.removeEventListener(MouseEvent.CLICK, _soundSelectedClick);
_mc.party.dload_btn.removeEventListener(MouseEvent.CLICK, _downloadClick);
_mc.party.tellYourFriend_btn.removeEventListener(MouseEvent.CLICK, _tellFriendClick);
_mc.party.playGameAgain_btn.removeEventListener(MouseEvent.CLICK, _playAgainClick);
dispatchEvent(new Event(Event.COMPLETE));
}
private function _tellFriendClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(605);
_panel = Main.afm.createMovieClip("interface", "TellFriendPanelAsset");
_panel.close_btn.addEventListener(MouseEvent.CLICK, _panelClose);
stage.focus = _panel.message_txt;
addChild(_panel);
}
private function _playAgainClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
Main.stopTitleMusic();
DoubleQuick.event(604);
_complete();
}
public function show(_arg1:Object):void{
_arg1.x = 552.9;
_arg1.y = 4;
}
}
}//package com.kerb.gamestation
Section 59
//Instructions (com.kerb.gamestation.Instructions)
package com.kerb.gamestation {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import flash.net.*;
import flash.text.*;
import com.kerb.tracking.*;
public class Instructions extends Sprite {
private var _mc:MovieClip;
public function Instructions(){
_mc = Main.afm.createMovieClip("interface", "InstructionsAsset");
_mc.addEventListener(Event.INIT, _onTimelineInitialized);
addChild(_mc);
_mc.gamestation_btn.addEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.sound_btn.addEventListener(MouseEvent.CLICK, _soundClick);
_mc.soundselected_btn.addEventListener(MouseEvent.CLICK, _soundSelectedClick);
_mc.next_btn.addEventListener(MouseEvent.CLICK, _next1Click, false, 0, true);
_mc.gamestation_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.next_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.sound_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.soundselected_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
_displayCorrectSoundSign();
}
public function hide(_arg1:Object):void{
_arg1.x = -100;
}
public function show(_arg1:Object):void{
_arg1.x = 552.9;
_arg1.y = 4;
}
private function _displayCorrectSoundSign():void{
if (Main.SoundMuted){
hide(_mc.sound_btn);
show(_mc.soundselected_btn);
} else {
hide(_mc.soundselected_btn);
show(_mc.sound_btn);
};
}
private function _next2Click(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_mc.next_btn.removeEventListener(MouseEvent.CLICK, _next2Click);
_complete();
}
private function _next1Click(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_mc.next_btn.removeEventListener(MouseEvent.CLICK, _next1Click);
_mc.next_btn.addEventListener(MouseEvent.CLICK, _next2Click, false, 0, true);
var _local2:TextField = (_mc.getChildByName("body_txt") as TextField);
_local2.text = TextManager.getInstance().getTextById("instructions.screen2");
}
private function _gamestationClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(606);
navigateToURL(new URLRequest("http://www.gamestation.co.uk/"), "_blank");
}
private function _rollOver(_arg1:MouseEvent):void{
}
private function _onTimelineInitialized(_arg1:Event):void{
_mc.removeEventListener(Event.INIT, _onTimelineInitialized);
var _local2:TextField = (_mc.getChildByName("body_txt") as TextField);
_local2.selectable = false;
_local2.multiline = true;
_local2.wordWrap = true;
_local2.autoSize = TextFieldAutoSize.LEFT;
_local2.text = TextManager.getInstance().getTextById("instructions.screen1");
}
private function _soundClick(_arg1:MouseEvent):void{
Main.stopTitleMusic();
Main.SoundMuted = true;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
hide(_mc.sound_btn);
show(_mc.soundselected_btn);
Main.stopTitleMusic();
}
private function _soundSelectedClick(_arg1:MouseEvent):void{
Main.SoundMuted = false;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
Main.playMusic("");
hide(_mc.soundselected_btn);
show(_mc.sound_btn);
}
private function _complete():void{
_mc.gamestation_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.next_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.sound_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.soundselected_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.gamestation_btn.removeEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.sound_btn.removeEventListener(MouseEvent.CLICK, _soundClick);
_mc.soundselected_btn.removeEventListener(MouseEvent.CLICK, _soundSelectedClick);
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package com.kerb.gamestation
Section 60
//IPersistable (com.kerb.gamestation.IPersistable)
package com.kerb.gamestation {
public interface IPersistable {
function saveTo(_arg1:Object):void;
function restoreFrom(_arg1:Object):void;
}
}//package com.kerb.gamestation
Section 61
//Main (com.kerb.gamestation.Main)
package com.kerb.gamestation {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import com.kerb.sound.*;
import com.kerb.logger.*;
import com.kerb.tracking.*;
public final class Main extends Sprite {
private var InterfaceSWFBytes:Class;
private var _section:Sprite;
private var SoundsSWFBytes:Class;
private var PartySWFBytes:Class;
private var ScreensSWFBytes:Class;
private var text_en_GB:Class;
public static const GAMESTATION_MUSIC_NAME:String = "GamestationSound";
public static const JOBCENTRE_PIZZA_SFX_NAME:String = "jobcentrePizzaSound";
public static const BUTTON_ROLLOVER_SFX_NAME:String = "ButtonRollOver1";
public static const ROCK_CITY_MUSIC_NAME:String = "RockCitySound";
public static const MALL_MUSIC_NAME:String = "MallSound";
public static const ARCADE_MACHINE_SFX_NAME:String = "arcadeMchineSound";
public static const ARCADE_MUSIC_NAME:String = "ArcadeSound";
public static const LOSE:String = "Lose";
public static const COMPLIMENT_SFX_NAME:String = "ComplimentSound";
public static const ILL_SFX_NAME:String = "IllSound";
public static const PARTY_MUSIC_NAME:String = "WinSound";
public static const GYM_MUSIC_NAME:String = "GymSound";
public static const HEART_INCREASE_SFX_NAME:String = "heartIncreaseSound";
public static const CASH_SFX_NAME:String = "cashSound";
public static const KNOCK_BACK_SFX_NAME:String = "KnockBackSound";
public static const HOME_MORNING_SFX_NAME:String = "homeSleepMorningSound";
public static const JOBCENTRE_MARKET_SFX_NAME:String = "jobcentreMarketSound";
public static const smSFX:SoundManager = new SoundManager();
public static const HEART_DECREASE_SFX_NAME:String = "heartDecreaseSound";
public static const TOWN_MUSIC_NAME:String = "townSound";
public static const JOBCENTRE_CLEANER_SFX_NAME:String = "jobcentrerCleanerSound";
public static const NO_OF_DAYS_TO_LOSE:int = 101;
public static const afm:AssetFactoryManager = new AssetFactoryManager();
public static const smMusic:SoundManager = new SoundManager();
public static const TITLE_MUSIC_NAME:String = "TitleLoopSound";
public static const BUTTON_PRESS_SFX_NAME:String = "ButtonPressSound1";
public static const HOME_NIGHT_SFX_NAME:String = "homeSleepNightSound";
public static const JOBCENTRE_SECURITY_SFX_NAME:String = "jobcentreSecuritySound";
public static const TIMER_SFX_NAME:String = "CountDownSound";
private static var firstPlay:Boolean = true;
private static var firstPlay2:Boolean = true;
public static var SoundMuted:Boolean = false;
public static var loadGameKey:String = "";
private static var soundFXName:String = "";
public static var days:int = 0;
public static var musicName:String = "";
public function Main(){
text_en_GB = Main_text_en_GB;
InterfaceSWFBytes = Main_InterfaceSWFBytes;
ScreensSWFBytes = Main_ScreensSWFBytes;
PartySWFBytes = Main_PartySWFBytes;
SoundsSWFBytes = Main_SoundsSWFBytes;
super();
addEventListener(Event.ADDED_TO_STAGE, _addedToStage);
}
private function _init():void{
SoundMuted = false;
_initTracking();
_initText();
initSounds();
_initSection(Title);
}
private function _addedToStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _addedToStage);
KerbLog.instance().stage = stage;
KerbLog.instance().level = KerbLogLevel.None;
KerbLog.instance().info("Welcome to Gamestation Girls.");
afm.addEventListener(Event.COMPLETE, _assetFactoryManagerReady);
afm.addAssetFactory("interface", InterfaceSWFBytes);
afm.addAssetFactory("screens", ScreensSWFBytes);
afm.addAssetFactory("party", PartySWFBytes);
afm.addAssetFactory("sound", SoundsSWFBytes);
}
private function _sectionComplete(_arg1:Event):void{
if (days >= Main.NO_OF_DAYS_TO_LOSE){
_initSection(GameLose);
return;
};
switch (true){
case (_section is Title):
_initSection(((loadGameKey)=="") ? Instructions : Game);
break;
case (_section is Instructions):
_initSection(Game);
break;
case (_section is Game):
_initSection(GameWin);
break;
case (_section is GameWin):
_initSection(Game);
break;
default:
_initSection(Title);
break;
};
}
protected function initSounds():void{
smSFX.registerSound(afm.createExtendedSound("sound", BUTTON_ROLLOVER_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", BUTTON_PRESS_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", TIMER_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", COMPLIMENT_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", KNOCK_BACK_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", ARCADE_MACHINE_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", HEART_DECREASE_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", HEART_INCREASE_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", HOME_MORNING_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", HOME_NIGHT_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", CASH_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", ILL_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", JOBCENTRE_MARKET_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", JOBCENTRE_PIZZA_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", JOBCENTRE_SECURITY_SFX_NAME));
smSFX.registerSound(afm.createExtendedSound("sound", JOBCENTRE_CLEANER_SFX_NAME));
smMusic.registerSound(afm.createExtendedSound("sound", PARTY_MUSIC_NAME));
smMusic.registerSound(afm.createExtendedSound("sound", TITLE_MUSIC_NAME));
smMusic.registerSound(afm.createExtendedSound("sound", ROCK_CITY_MUSIC_NAME));
smMusic.registerSound(afm.createExtendedSound("sound", MALL_MUSIC_NAME));
smMusic.registerSound(afm.createExtendedSound("sound", GYM_MUSIC_NAME));
smMusic.registerSound(afm.createExtendedSound("sound", GAMESTATION_MUSIC_NAME));
smMusic.registerSound(afm.createExtendedSound("sound", ARCADE_MUSIC_NAME));
smMusic.registerSound(afm.createExtendedSound("sound", TOWN_MUSIC_NAME));
}
private function _initTracking():void{
DoubleQuick.init(root, 64);
DoubleQuick.event(595);
}
private function _assetFactoryManagerReady(_arg1:Event):void{
afm.removeEventListener(Event.COMPLETE, _assetFactoryManagerReady);
_init();
}
private function _initText():void{
TextManager.getInstance().initFromClass(text_en_GB);
}
private function _initSection(_arg1:Class):void{
if (_section){
_section.removeEventListener(Event.COMPLETE, _sectionComplete);
removeChild(_section);
_section = null;
};
_section = new (_arg1);
_section.addEventListener(Event.COMPLETE, _sectionComplete);
_section.x = 10;
addChild(_section);
if ((_section is GameWin)){
graphics.beginFill(0, 1);
graphics.lineStyle(2, 0);
graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
graphics.endFill();
};
}
public static function playSting(_arg1:String):void{
if (((SoundMuted) || ((_arg1 == musicName)))){
return;
};
if (_arg1 != ""){
musicName = _arg1;
};
stopTitleMusic();
firstPlay = false;
smMusic.getSoundByClassName(_arg1).play(0, 1);
smMusic.getSoundByClassName(_arg1).addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
private static function soundCompleteHandler(_arg1:Event):void{
playMusic(TITLE_MUSIC_NAME);
musicName = TITLE_MUSIC_NAME;
}
public static function stopTitleMusic():void{
if (((SoundMuted) || (firstPlay))){
return;
};
Main.smMusic.getSoundByClassName(musicName).stop();
}
public static function playMusic(_arg1:String):void{
if (((SoundMuted) || ((_arg1 == musicName)))){
return;
};
if (_arg1 != ""){
musicName = _arg1;
};
stopTitleMusic();
firstPlay = false;
smMusic.getSoundByClassName(musicName).play(0, 999);
}
public static function playSoundFX(_arg1:String):void{
if (SoundMuted){
return;
};
if (!firstPlay2){
smSFX.getSoundByClassName(soundFXName).stop();
};
firstPlay2 = false;
soundFXName = _arg1;
smSFX.getSoundByClassName(_arg1).play(0, 1);
}
}
}//package com.kerb.gamestation
Section 62
//Main_InterfaceSWFBytes (com.kerb.gamestation.Main_InterfaceSWFBytes)
package com.kerb.gamestation {
import mx.core.*;
public class Main_InterfaceSWFBytes extends ByteArrayAsset {
}
}//package com.kerb.gamestation
Section 63
//Main_PartySWFBytes (com.kerb.gamestation.Main_PartySWFBytes)
package com.kerb.gamestation {
import mx.core.*;
public class Main_PartySWFBytes extends ByteArrayAsset {
}
}//package com.kerb.gamestation
Section 64
//Main_ScreensSWFBytes (com.kerb.gamestation.Main_ScreensSWFBytes)
package com.kerb.gamestation {
import mx.core.*;
public class Main_ScreensSWFBytes extends ByteArrayAsset {
}
}//package com.kerb.gamestation
Section 65
//Main_SoundsSWFBytes (com.kerb.gamestation.Main_SoundsSWFBytes)
package com.kerb.gamestation {
import mx.core.*;
public class Main_SoundsSWFBytes extends ByteArrayAsset {
}
}//package com.kerb.gamestation
Section 66
//Main_text_en_GB (com.kerb.gamestation.Main_text_en_GB)
package com.kerb.gamestation {
import mx.core.*;
public class Main_text_en_GB extends ByteArrayAsset {
}
}//package com.kerb.gamestation
Section 67
//Preloader (com.kerb.gamestation.Preloader)
package com.kerb.gamestation {
import flash.events.*;
import flash.display.*;
import com.kerb.game.*;
import com.kerb.utils.*;
import flash.utils.*;
public final class Preloader extends AbstractPreload {
private var _af:AssetFactory;
private var swfBytes:Class;
private var _clip:MovieClip;
public function Preloader(){
swfBytes = Preloader_swfBytes;
super();
stop();
_af = new AssetFactory();
_af.addEventListener(AssetFactory.EVENT_ASSET_FACTORY_READY, _onAssetFactoryReady);
_af.initialize(swfBytes);
}
private function _drawLetterbox():void{
var _local1:int = loaderInfo.width;
var _local2:int = loaderInfo.height;
var _local3:Sprite = new Sprite();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0);
_local4.drawRect(-1000, -1000, (2000 + _local1), 1000);
_local4.drawRect(-1000, _local2, (2000 + _local1), 1000);
_local4.drawRect(-1000, -1000, 1000, (1000 + _local2));
_local4.drawRect(_local1, -1000, 1000, (1000 + _local2));
_local4.endFill();
addChild(_local3);
}
private function _preloadComplete():void{
var _local1:Class;
if (currentFrame == 1){
nextFrame();
} else {
removeEventListener(Event.ENTER_FRAME, _onEnterFrame);
_local1 = Class(getDefinitionByName("GamestationGirls"));
addChild((new (_local1) as DisplayObject));
removeChild(_clip);
_clip = null;
};
}
private function _onEnterFrame(_arg1:Event):void{
var _local2:int = root.loaderInfo.bytesLoaded;
var _local3:int = root.loaderInfo.bytesTotal;
var _local4:int = Math.ceil(((100 * _local2) / _local3));
if (_clip.currentFrame != _local4){
_clip.gotoAndStop(_local4);
};
if (_local4 >= 100){
_preloadComplete();
};
}
private function _onAssetFactoryReady(_arg1:Event):void{
_af.removeEventListener(AssetFactory.EVENT_ASSET_FACTORY_READY, _onAssetFactoryReady);
_clip = (_af.createDisplayObject("PreloadAsset") as MovieClip);
addChildAt(_clip, 0);
_af = null;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.stageFocusRect = false;
_drawLetterbox();
addEventListener(Event.ENTER_FRAME, _onEnterFrame);
}
}
}//package com.kerb.gamestation
Section 68
//Preloader_swfBytes (com.kerb.gamestation.Preloader_swfBytes)
package com.kerb.gamestation {
import mx.core.*;
public class Preloader_swfBytes extends ByteArrayAsset {
}
}//package com.kerb.gamestation
Section 69
//Title (com.kerb.gamestation.Title)
package com.kerb.gamestation {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import com.kerb.tracking.*;
public class Title extends Sprite {
private var _panel:MovieClip;
private var _mc:MovieClip;
public function Title(){
_mc = Main.afm.createMovieClip("interface", "TitleAsset");
_mc.x = 10;
addChild(_mc);
_mc.gamestation_btn.addEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.next_btn.addEventListener(MouseEvent.CLICK, _nextClick, false, 0, true);
_mc.load_btn.addEventListener(MouseEvent.CLICK, _loadClick, false, 0, true);
_mc.sound_btn.addEventListener(MouseEvent.CLICK, _soundClick);
_mc.soundselected_btn.addEventListener(MouseEvent.CLICK, _soundSelectedClick);
_mc.gamestation_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.next_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.load_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.sound_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.soundselected_btn.addEventListener(MouseEvent.ROLL_OVER, _rollOver);
Main.stopTitleMusic();
Main.playSting(Main.TOWN_MUSIC_NAME);
}
public function hide(_arg1:Object):void{
_arg1.x = -100;
}
private function _loadClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_panel = Main.afm.createMovieClip("interface", "LoadPanelAsset");
_panel.load_btn.addEventListener(MouseEvent.CLICK, _loadGameClick);
_panel.close_btn.addEventListener(MouseEvent.CLICK, _closePanelClick);
stage.focus = _panel.input_txt;
DoubleQuick.event(598);
_mc.addChild(_panel);
}
private function _closePanelClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
_mc.removeChild(_panel);
_panel.load_btn.removeEventListener(MouseEvent.CLICK, _loadGameClick);
_panel.close_btn.removeEventListener(MouseEvent.CLICK, _closePanelClick);
_panel = null;
}
public function show(_arg1:Object):void{
_arg1.x = 552.9;
_arg1.y = 4;
}
private function _rollOver(_arg1:MouseEvent):void{
}
private function _loadGameClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
var _local2:String = _panel.input_txt.text;
if (_local2.length > 0){
Main.loadGameKey = _local2;
_complete();
};
}
private function _gamestationClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(606);
navigateToURL(new URLRequest("http://www.gamestation.co.uk/"), "_blank");
}
private function _nextClick(_arg1:MouseEvent):void{
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
DoubleQuick.event(596);
_complete();
}
private function _soundClick(_arg1:MouseEvent):void{
Main.stopTitleMusic();
Main.SoundMuted = true;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
hide(_mc.sound_btn);
show(_mc.soundselected_btn);
Main.stopTitleMusic();
}
private function _soundSelectedClick(_arg1:MouseEvent):void{
Main.SoundMuted = false;
Main.playSoundFX(Main.BUTTON_PRESS_SFX_NAME);
Main.playMusic("");
hide(_mc.soundselected_btn);
show(_mc.sound_btn);
}
private function _complete():void{
_mc.gamestation_btn.removeEventListener(MouseEvent.CLICK, _gamestationClick);
_mc.next_btn.removeEventListener(MouseEvent.CLICK, _nextClick);
_mc.load_btn.removeEventListener(MouseEvent.CLICK, _loadClick);
_mc.sound_btn.removeEventListener(MouseEvent.CLICK, _soundClick);
_mc.soundselected_btn.removeEventListener(MouseEvent.CLICK, _soundSelectedClick);
_mc.gamestation_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.next_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.load_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.sound_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
_mc.soundselected_btn.removeEventListener(MouseEvent.ROLL_OVER, _rollOver);
if (_panel){
_panel.load_btn.removeEventListener(MouseEvent.CLICK, _loadGameClick);
_panel.close_btn.removeEventListener(MouseEvent.CLICK, _closePanelClick);
};
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package com.kerb.gamestation
Section 70
//Util (com.kerb.gamestation.Util)
package com.kerb.gamestation {
import flash.display.*;
public final class Util {
private static const STAGE_WIDTH:int = 610;
private static const STAGE_HEIGHT:int = 430;
public function Util(){
throw (new Error("class is static"));
}
public static function shuffleArray(_arg1:Array, _arg2:int=0, _arg3:int=0):void{
var _local5:int;
var _local6:*;
if (_arg3 == 0){
_arg3 = (_arg1.length - 1);
};
var _local4:int = _arg3;
while (_local4 > _arg2) {
_local5 = (Math.floor((Math.random() * _arg3)) + _arg2);
_local6 = _arg1[_local4];
_arg1[_local4] = _arg1[_local5];
_arg1[_local5] = _local6;
_local4--;
};
}
public static function centreDisplayObject(_arg1:DisplayObject):void{
_arg1.x = ((0.5 * STAGE_WIDTH) - (0.5 * _arg1.width));
_arg1.y = ((0.5 * STAGE_HEIGHT) - (0.5 * _arg1.height));
}
}
}//package com.kerb.gamestation
Section 71
//KerbLog (com.kerb.logger.KerbLog)
package com.kerb.logger {
import flash.events.*;
import flash.display.*;
public final class KerbLog extends EventDispatcher {
private var _view:KerbLogView;
private var _level:KerbLogLevel;
private var _entries:Array;
private static const MAX_ENTRIES:uint = 100;
private static var _allow:Boolean = false;
private static var _instance:KerbLog = null;
public function KerbLog(){
if (!_allow){
throw (new Error("direct instantiation of uk.kerb.utils.logger.Log is forbidden"));
};
_entries = new Array();
_level = KerbLogLevel.Info;
_view = new KerbLogView(this);
}
public function set stage(_arg1:Stage):void{
_view.stage = _arg1;
}
private function _add(_arg1:String):void{
_entries.push(new KerbLogEntry(_arg1));
if (_entries.length > MAX_ENTRIES){
_entries.shift();
};
}
public function fatal(_arg1:String):void{
_add(_arg1);
if ((((((_level == KerbLogLevel.Fatal)) || ((_level == KerbLogLevel.Info)))) || ((_level == KerbLogLevel.Debug)))){
_dispatch();
};
}
public function info(_arg1:String):void{
_add(_arg1);
if ((((_level == KerbLogLevel.Info)) || ((_level == KerbLogLevel.Debug)))){
_dispatch();
};
}
public function set level(_arg1:KerbLogLevel):void{
_level = _arg1;
}
private function _dispatch():void{
dispatchEvent(new KerbLogEvent(_entries[(_entries.length - 1)]));
}
public function debug(_arg1:String):void{
_add(_arg1);
if (_level == KerbLogLevel.Debug){
_dispatch();
};
}
public function get level():KerbLogLevel{
return (_level);
}
public static function instance():KerbLog{
if (_instance == null){
_allow = true;
_instance = new (KerbLog);
_allow = false;
};
return (_instance);
}
}
}//package com.kerb.logger
Section 72
//KerbLogEntry (com.kerb.logger.KerbLogEntry)
package com.kerb.logger {
final class KerbLogEntry {
private var _message:String;
private var _date:Date;
function KerbLogEntry(_arg1:String){
_message = _arg1;
_date = new Date();
}
public function get message():String{
return (_message);
}
public function get date():Date{
return (_date);
}
}
}//package com.kerb.logger
Section 73
//KerbLogEvent (com.kerb.logger.KerbLogEvent)
package com.kerb.logger {
import flash.events.*;
final class KerbLogEvent extends Event {
private var _logEntry:KerbLogEntry;
public static const TYPE:String = "onLogEntry";
function KerbLogEvent(_arg1:KerbLogEntry){
super(TYPE);
_logEntry = _arg1;
}
public function get logEntry():KerbLogEntry{
return (_logEntry);
}
}
}//package com.kerb.logger
Section 74
//KerbLogLevel (com.kerb.logger.KerbLogLevel)
package com.kerb.logger {
public final class KerbLogLevel {
public static const Debug:KerbLogLevel = new (KerbLogLevel);
;
public static const Fatal:KerbLogLevel = new (KerbLogLevel);
;
public static const Info:KerbLogLevel = new (KerbLogLevel);
;
public static const None:KerbLogLevel = new (KerbLogLevel);
;
}
}//package com.kerb.logger
Section 75
//KerbLogView (com.kerb.logger.KerbLogView)
package com.kerb.logger {
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.display.*;
import com.kerb.logger.*;
import flash.text.*;
import flash.ui.*;
final class KerbLogView {
private var _container:Sprite;
private var _log:KerbLog;
private var _timer:Timer;// = null
private var _dragBar:Sprite;
private var _closeButton:Sprite;
private var _textField:TextField;
private var _frames:uint;// = 0
private var _minimized:Boolean;// = false
private var _clearButton:Sprite;
private var _minButton:Sprite;
private var _copyButton:Sprite;
private var _fps:TextField;
private var _greyBox:Sprite;
private var _stage:Stage;
private static const HEIGHT:uint = 100;
private static const DRAG_BAR_HEIGHT:uint = 10;
private static const COLOUR_BLUE:uint = 0xFF;
private static const MARGIN:uint = 5;
private static const COLOUR_GREEN:uint = 0x66CC00;
private static const COLOUR_GREY:uint = 0x999999;
private static const BUTTON_LENGTH:uint = 10;
private static const DISPLAY_FONT_SIZE:uint = 11;
private static const COLOUR_WHITE:uint = 0xFFFFFF;
private static const COLOUR_RED:uint = 0xFF0000;
private static const DISPLAY_FONT_COLOUR:uint = 0xFFFFFF;
function KerbLogView(_arg1:KerbLog){
_log = _arg1;
_log.addEventListener(KerbLogEvent.TYPE, _eventHandler);
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, _onTimer);
}
private function _onCloseButtonClick(_arg1:MouseEvent):void{
_container.visible = false;
}
private function _createMinButton():void{
_minButton = new Sprite();
_minButton.x = ((_container.width - (2.5 * BUTTON_LENGTH)) - MARGIN);
_minButton.y = MARGIN;
_minButton.graphics.beginFill(COLOUR_RED);
_minButton.graphics.lineStyle(0, COLOUR_WHITE);
_minButton.graphics.drawRect(0, 0, BUTTON_LENGTH, BUTTON_LENGTH);
_minButton.graphics.endFill();
_minButton.graphics.moveTo(0, (BUTTON_LENGTH / 2));
_minButton.graphics.lineTo(BUTTON_LENGTH, (BUTTON_LENGTH / 2));
_minButton.buttonMode = true;
_minButton.addEventListener(MouseEvent.CLICK, _onMinButtonClick, false, 0, true);
_container.addChild(_minButton);
}
private function _createGraphics():void{
if (_container == null){
_createContainer();
_createDragBar();
_createFPSTextField();
_createCloseButton();
_createMinButton();
_createClearButton();
_createCopyButton();
_createTextField();
_container.addEventListener(MouseEvent.MOUSE_OVER, _onMouseOver);
_timer.start();
_container.addEventListener(Event.ENTER_FRAME, _onEnterFrame);
} else {
if (!_container.visible){
_container.visible = true;
};
};
}
private function _onDragBarMouseUp(_arg1:MouseEvent):void{
_container.removeEventListener(MouseEvent.MOUSE_MOVE, _onContainerMouseMove);
_container.stopDrag();
}
private function _onDragBarMouseDown(_arg1:MouseEvent):void{
_container.addEventListener(MouseEvent.MOUSE_MOVE, _onContainerMouseMove);
_container.startDrag();
}
private function _onEnterFrame(_arg1:Event):void{
_frames++;
}
private function _onCopyButtonClick(_arg1:MouseEvent):void{
System.setClipboard(_textField.text);
}
private function _createCopyButton():void{
_copyButton = new Sprite();
_copyButton.x = ((_container.width - (5.5 * BUTTON_LENGTH)) - MARGIN);
_copyButton.y = MARGIN;
_copyButton.graphics.beginFill(COLOUR_GREEN);
_copyButton.graphics.lineStyle(0, COLOUR_WHITE);
_copyButton.graphics.drawRect(0, 0, BUTTON_LENGTH, BUTTON_LENGTH);
_copyButton.graphics.endFill();
_copyButton.buttonMode = true;
_copyButton.addEventListener(MouseEvent.CLICK, _onCopyButtonClick, false, 0, true);
_container.addChild(_copyButton);
}
private function _onTimer(_arg1:TimerEvent):void{
_fps.text = (String(_frames) + " fps");
_frames = 0;
}
private function _onMinButtonClick(_arg1:MouseEvent):void{
_doMinButtonClick();
}
private function _createDragBar():void{
_dragBar = new Sprite();
_dragBar.x = 0;
_dragBar.y = 0;
_dragBar.graphics.beginFill(COLOUR_BLUE);
_dragBar.graphics.lineStyle(0, COLOUR_WHITE, 0);
_dragBar.graphics.drawRect(0, 0, _container.width, (2 * BUTTON_LENGTH));
_dragBar.graphics.endFill();
_dragBar.buttonMode = true;
_dragBar.addEventListener(MouseEvent.MOUSE_DOWN, _onDragBarMouseDown, false, 0, true);
_dragBar.addEventListener(MouseEvent.MOUSE_UP, _onDragBarMouseUp, false, 0, true);
_container.addChild(_dragBar);
}
private function _createFPSTextField():void{
_fps = new TextField();
_fps.x = MARGIN;
_fps.y = 1;
_fps.width = 100;
_fps.height = 30;
_fps.autoSize = TextFieldAutoSize.NONE;
_fps.embedFonts = false;
_fps.antiAliasType = AntiAliasType.NORMAL;
_fps.wordWrap = true;
_fps.selectable = false;
_fps.mouseEnabled = false;
_fps.defaultTextFormat = new TextFormat("_typewriter", DISPLAY_FONT_SIZE, DISPLAY_FONT_COLOUR);
_container.addChild(_fps);
}
private function _eventHandler(_arg1:KerbLogEvent):void{
var _local2:String;
_createGraphics();
if (_textField != null){
_local2 = ((timeTo24HourString(_arg1.logEntry.date) + ": ") + _arg1.logEntry.message);
_textField.appendText((_local2 + "\n"));
trace(_local2);
_textField.scrollV = _textField.maxScrollV;
};
}
private function _doMinButtonClick():void{
_minimized = !(_minimized);
_greyBox.visible = !(_minimized);
_textField.visible = !(_minimized);
_container.y = ((_stage.stageHeight - (_minimized) ? (2 * BUTTON_LENGTH) : HEIGHT) - MARGIN);
}
private function _createClearButton():void{
_clearButton = new Sprite();
_clearButton.x = ((_container.width - (4 * BUTTON_LENGTH)) - MARGIN);
_clearButton.y = MARGIN;
_clearButton.graphics.beginFill(COLOUR_GREY);
_clearButton.graphics.lineStyle(0, COLOUR_WHITE);
_clearButton.graphics.drawRect(0, 0, BUTTON_LENGTH, BUTTON_LENGTH);
_clearButton.graphics.endFill();
_clearButton.buttonMode = true;
_clearButton.addEventListener(MouseEvent.CLICK, _onClearButtonClick, false, 0, true);
_container.addChild(_clearButton);
}
private function _createTextField():void{
_textField = new TextField();
_textField.x = MARGIN;
_textField.y = ((2 * BUTTON_LENGTH) + MARGIN);
_textField.width = (_container.width - (2 * MARGIN));
_textField.height = ((_container.height - (2 * BUTTON_LENGTH)) - (2 * MARGIN));
_textField.autoSize = TextFieldAutoSize.NONE;
_textField.embedFonts = false;
_textField.antiAliasType = AntiAliasType.NORMAL;
_textField.wordWrap = true;
_textField.defaultTextFormat = new TextFormat("_typewriter", DISPLAY_FONT_SIZE, DISPLAY_FONT_COLOUR);
_container.addChild(_textField);
}
private function _onClearButtonClick(_arg1:MouseEvent):void{
_textField.text = "";
}
private function _createContainer():void{
_container = new Sprite();
_container.x = MARGIN;
_container.y = ((_stage.stageHeight - HEIGHT) - MARGIN);
_greyBox = new Sprite();
_greyBox.graphics.beginFill(COLOUR_GREY);
_greyBox.graphics.drawRect(0, 0, (_stage.stageWidth - (2 * MARGIN)), (HEIGHT - (2 * BUTTON_LENGTH)));
_greyBox.graphics.endFill();
_greyBox.y = (2 * BUTTON_LENGTH);
_container.addChild(_greyBox);
_stage.addChild(_container);
}
private function _createCloseButton():void{
_closeButton = new Sprite();
_closeButton.x = ((_container.width - BUTTON_LENGTH) - MARGIN);
_closeButton.y = MARGIN;
_closeButton.graphics.beginFill(COLOUR_RED);
_closeButton.graphics.lineStyle(0, COLOUR_WHITE);
_closeButton.graphics.drawRect(0, 0, BUTTON_LENGTH, BUTTON_LENGTH);
_closeButton.graphics.endFill();
_closeButton.graphics.moveTo(0, 0);
_closeButton.graphics.lineTo(BUTTON_LENGTH, BUTTON_LENGTH);
_closeButton.graphics.moveTo(BUTTON_LENGTH, 0);
_closeButton.graphics.lineTo(0, BUTTON_LENGTH);
_closeButton.buttonMode = true;
_closeButton.addEventListener(MouseEvent.CLICK, _onCloseButtonClick, false, 0, true);
_container.addChild(_closeButton);
}
private function _onContainerMouseMove(_arg1:MouseEvent):void{
_arg1.updateAfterEvent();
}
private function _onMouseOver(_arg1:MouseEvent):void{
Mouse.show();
}
public function set stage(_arg1:Stage):void{
_stage = _arg1;
}
public static function timeTo24HourString(_arg1:Date):String{
var _local2 = "";
_local2 = (_local2 + numberToFixedLengthString(_arg1.getHours(), 2, 0, "0"));
_local2 = (_local2 + ":");
_local2 = (_local2 + numberToFixedLengthString(_arg1.getMinutes(), 2, 0, "0"));
_local2 = (_local2 + ":");
_local2 = (_local2 + numberToFixedLengthString(_arg1.getSeconds(), 2, 0, "0"));
return (_local2);
}
public static function numberToFixedLengthString(_arg1:Number, _arg2:uint=4, _arg3:uint=4, _arg4:String=" "):String{
var _local5:String = String(((_arg1 == 0)) ? _arg1 : _arg1.toFixed(_arg3));
var _local6:uint = _arg2;
if (_arg3 > 0){
_local6 = (_local6 + (1 + _arg3));
};
_arg4 = _arg4.charAt(0);
while (_local5.length < _local6) {
_local5 = (_arg4 + _local5);
};
return (_local5);
}
}
}//package com.kerb.logger
Section 76
//ExtendedSound (com.kerb.sound.ExtendedSound)
package com.kerb.sound {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class ExtendedSound extends Sound {
protected var fadeStartVolume:Number;
protected var panStartPosition:Number;
protected var stopAfterFade:Boolean;
protected var masterVolume:Number;// = 1
protected var panTimer:Timer;
protected var fadeTimer:Timer;
protected var paused:Boolean;
protected var fadeDuration:Number;
protected var fadeStartTime:Number;
protected var fadeEndVolume:Number;
protected var playingLoops:Number;
protected var panEndPosition:Number;
protected var actualVolume:Number;// = 1
protected var panStartTime:Number;
protected var panDuration:Number;
protected var pauseTime:Number;
protected var transform:SoundTransform;
protected var soundChannel:SoundChannel;
private static const TIMER_UPDATE_RATE:Number = 20;
public function stop():void{
stopFade();
if (soundChannel != null){
soundChannel.stop();
soundChannel.removeEventListener(Event.SOUND_COMPLETE, onSoundComplete);
soundChannel = null;
stopFade();
};
}
protected function updatePan(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number = ((getTimer() - panStartTime) / panDuration);
if (_local3 >= 1){
stopPan();
_local2 = panEndPosition;
} else {
if (_local3 > 0){
_local2 = ((_local3 * (panEndPosition - panStartPosition)) + panStartPosition);
};
};
if (soundChannel == null){
return;
};
var _local4:Number = soundChannel.soundTransform.volume;
transform = new SoundTransform(_local4, _local2);
soundChannel.soundTransform = transform;
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
if (((soundChannel) && (soundChannel.soundTransform))){
fadeStartTime = getTimer();
fadeDuration = _arg2;
fadeStartVolume = (soundChannel.soundTransform.volume / masterVolume);
fadeEndVolume = _arg1;
startFade();
};
}
public function setMasterVolume(_arg1:Number):void{
var _local2:Number;
masterVolume = Math.max(0, Math.min(1, _arg1));
if (soundChannel != null){
_local2 = soundChannel.soundTransform.pan;
transform = new SoundTransform((actualVolume * masterVolume), _local2);
soundChannel.soundTransform = transform;
};
}
protected function stopFade():void{
if (((!((fadeTimer == null))) && (fadeTimer.running))){
fadeTimer.reset();
};
}
public function setVolume(_arg1:Number):void{
var _local2:Number;
if (soundChannel != null){
actualVolume = Math.max(0, Math.min(1, _arg1));
_local2 = soundChannel.soundTransform.pan;
transform = new SoundTransform((actualVolume * masterVolume), _local2);
soundChannel.soundTransform = transform;
stopFade();
};
}
public function fadeOut(_arg1:Number=0):void{
if ((((((_arg1 > 0)) && (soundChannel))) && (soundChannel.soundTransform))){
fadeStartTime = getTimer();
fadeDuration = _arg1;
fadeStartVolume = (soundChannel.soundTransform.volume / masterVolume);
fadeEndVolume = 0;
stopAfterFade = true;
startFade();
} else {
stop();
};
}
override public function play(_arg1:Number=0, _arg2:int=0, _arg3:SoundTransform=null):SoundChannel{
if (_arg3 != null){
actualVolume = _arg3.volume;
} else {
actualVolume = 1;
_arg3 = new SoundTransform(masterVolume);
};
_arg3.volume = (actualVolume * masterVolume);
soundChannel = super.play(_arg1, _arg2, _arg3);
if (soundChannel != null){
soundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete);
};
playingLoops = _arg2;
transform = _arg3;
paused = false;
return (soundChannel);
}
protected function stopPan():void{
if (((!((panTimer == null))) && (panTimer.running))){
panTimer.reset();
};
}
protected function onSoundComplete(_arg1:Event):void{
dispatchEvent(_arg1);
}
public function get position():Number{
if (soundChannel == null){
return (0);
};
return (soundChannel.position);
}
public function fadeIn(_arg1:Number=0, _arg2:Number=1, _arg3:Number=0, _arg4:int=0, _arg5:Number=0):SoundChannel{
fadeStartVolume = Math.max(0, Math.min(1, _arg1));
play(_arg5, _arg4, new SoundTransform((fadeStartVolume * masterVolume)));
if (_arg3 > 0){
fadeStartTime = getTimer();
fadeDuration = _arg3;
fadeEndVolume = Math.max(0, Math.min(1, _arg2));
startFade();
};
return (soundChannel);
}
public function setPan(_arg1:Number):void{
var _local2:Number;
if (soundChannel != null){
_arg1 = Math.max(-1, Math.min(1, _arg1));
_local2 = soundChannel.soundTransform.volume;
transform = new SoundTransform(_local2, _arg1);
soundChannel.soundTransform = transform;
stopPan();
};
}
protected function startPan():void{
if (panTimer == null){
panTimer = new Timer(TIMER_UPDATE_RATE);
panTimer.addEventListener(TimerEvent.TIMER, updatePan);
};
stopPan();
panTimer.start();
}
protected function updateFade(_arg1:TimerEvent):void{
var _local2:Number = ((getTimer() - fadeStartTime) / fadeDuration);
if (_local2 >= 1){
if (stopAfterFade){
stopAfterFade = false;
stop();
} else {
stopFade();
};
actualVolume = fadeEndVolume;
} else {
if (_local2 > 0){
actualVolume = ((_local2 * (fadeEndVolume - fadeStartVolume)) + fadeStartVolume);
};
};
if (soundChannel == null){
return;
};
var _local3:Number = soundChannel.soundTransform.pan;
transform = new SoundTransform((actualVolume * masterVolume), _local3);
soundChannel.soundTransform = transform;
}
public function getSoundChannel():SoundChannel{
return (soundChannel);
}
override public function toString():String{
var _local1:String = getQualifiedClassName(this);
if (soundChannel != null){
_local1 = (_local1 + ((" vol[" + (soundChannel.soundTransform.volume / masterVolume)) + "]"));
_local1 = (_local1 + ((" pan[" + soundChannel.soundTransform.pan) + "]"));
};
return (_local1);
}
public function pause():void{
if (soundChannel == null){
return;
};
pauseTime = soundChannel.position;
stop();
}
public function panTo(_arg1:Number, _arg2:Number):void{
if (_arg2 > 0){
panStartTime = getTimer();
panDuration = _arg2;
panStartPosition = soundChannel.soundTransform.pan;
panEndPosition = _arg1;
startPan();
} else {
setPan(_arg1);
};
}
public function unpause():void{
play(pauseTime, playingLoops, transform);
}
protected function startFade():void{
if (fadeTimer == null){
fadeTimer = new Timer(TIMER_UPDATE_RATE);
fadeTimer.addEventListener(TimerEvent.TIMER, updateFade);
};
stopFade();
fadeTimer.start();
}
}
}//package com.kerb.sound
Section 77
//SoundManager (com.kerb.sound.SoundManager)
package com.kerb.sound {
import flash.utils.*;
public class SoundManager {
private var sounds:Array;
private var prevMasterVolume:Number;
private var muteState:Boolean;// = false
private var masterVolume:Number;// = 1
public function SoundManager(){
prevMasterVolume = masterVolume;
sounds = new Array();
super();
}
public function unregisterSound(_arg1:String):void{
if (sounds[_arg1] != null){
sounds[_arg1].stop();
sounds[_arg1] = null;
};
}
public function stopAllSounds():void{
var _local1:String;
for (_local1 in sounds) {
sounds[_local1].stop();
};
}
public function setMasterVolume(_arg1:Number):void{
var _local2:String;
prevMasterVolume = masterVolume;
masterVolume = Math.max(0, Math.min(1, _arg1));
for (_local2 in sounds) {
sounds[_local2].setMasterVolume(masterVolume);
};
}
public function get muted():Boolean{
return (muteState);
}
public function registerSound(_arg1:ExtendedSound, _arg2:String=null, _arg3:Boolean=false):void{
if (_arg2 == null){
_arg2 = getQualifiedClassName(_arg1);
};
if (sounds[_arg2] != null){
if (_arg3){
unregisterSound(_arg2);
} else {
throw (new Error((("Class name conflict: A sound with the class name [" + _arg2) + "] already exists in SoundManager.")));
};
};
sounds[_arg2] = _arg1;
_arg1.setMasterVolume(masterVolume);
}
public function unmute():void{
if (muteState){
muteState = false;
setMasterVolume(prevMasterVolume);
};
}
public function getSoundByClassName(_arg1:String):ExtendedSound{
return (sounds[_arg1]);
}
public function mute():void{
if (!muteState){
muteState = true;
setMasterVolume(0);
};
}
public function toString():String{
var _local2:String;
var _local1 = "====================\n";
_local1 = (_local1 + "SoundManager\n");
_local1 = (_local1 + "--------------------\n");
_local1 = (_local1 + (("master vol[" + masterVolume) + "]\n"));
_local1 = (_local1 + "--------------------");
for (_local2 in sounds) {
_local1 = (_local1 + ("\n" + sounds[_local2].toString()));
};
_local1 = (_local1 + "\n====================");
return (_local1);
}
}
}//package com.kerb.sound
Section 78
//DoubleQuick (com.kerb.tracking.DoubleQuick)
package com.kerb.tracking {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.net.*;
public class DoubleQuick {
private static const SO_SESSION_PROPERTY_NAME:String = "sessionkey";
private static const SO_NAME:String = "doublequick";
private static const TICKER_PERIOD:Number = 30000;
private static const TRACKER_SESSION_URL:String = "http://doublequick.kerb.co.uk/tracking/session.htm";
private static const TICKER_URL:String = "http://doublequick.kerb.co.uk/tracking/ticker.htm";
private static const TRACKER_URL:String = "http://doublequick.kerb.co.uk/tracking/trackflash.htm";
private static const SO_EXPIRY_PROPERTY_NAME:String = "expo";
private static var tickerURL:URLRequest = null;
private static var initialised:Boolean = false;
private static var queue:Array = new Array();
private static var projectId:Number;
private static var baseurl:String;
private static var dq:DoubleQuick;
private static var traceEvents:Boolean;
public function startTimer():void{
var _local1:Timer = new Timer(TICKER_PERIOD, 0);
_local1.start();
_local1.addEventListener(TimerEvent.TIMER, pingProxy, false, 0, true);
}
public function pingProxy(_arg1:TimerEvent):void{
DoubleQuick.ping();
}
private static function doTrace(_arg1:String):void{
if (traceEvents){
trace(_arg1);
};
}
public static function event(_arg1:Number):void{
var loader:URLLoader;
var request:URLRequest;
var watchId = _arg1;
if (!initialised){
doTrace((("DoubleQuick event " + watchId) + " queued"));
queue.push(watchId);
} else {
doTrace(("DoubleQuick event " + watchId));
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(IOErrorEvent.IO_ERROR, onError, false, 0, true);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, false, 0, true);
request = generateURL(watchId);
request.method = URLRequestMethod.GET;
try {
loader.load(request);
} catch(error:Error) {
onError();
};
};
}
public static function click(_arg1:Number, _arg2:String=null):void{
doTrace(("DoubleQuick clickThrough " + _arg1));
navigateToURL(generateURL(_arg1), _arg2);
}
private static function onInit(_arg1:Event):void{
var _local4:Date;
var _local2:URLLoader = URLLoader(_arg1.target);
var _local3:SharedObject = SharedObject.getLocal(DoubleQuick.SO_NAME);
if (((!((_local2.data["sessionkey"] == ""))) && (!((_local2.data["sessionkey"] == null))))){
doTrace(("DoubleQuick acquired session key " + _local2.data["sessionkey"]));
_local3.setProperty(DoubleQuick.SO_SESSION_PROPERTY_NAME, _local2.data["sessionkey"]);
_local4 = new Date((new Date().getTime() + ((_local2.data["timeout"] * 60) * 1000)));
_local3.setProperty(DoubleQuick.SO_EXPIRY_PROPERTY_NAME, _local4);
};
DoubleQuick.initialisationFinished();
}
public static function init(_arg1:DisplayObject, _arg2:Number, _arg3:Boolean=true):void{
var loader:URLLoader;
var request:URLRequest;
var root = _arg1;
var _projectId = _arg2;
var _traceEvents = _arg3;
projectId = _projectId;
traceEvents = _traceEvents;
baseurl = root.loaderInfo.url;
doTrace(((("DoubleQuick initialising with project " + projectId) + " and baseurl ") + baseurl));
var so:SharedObject = SharedObject.getLocal(DoubleQuick.SO_NAME);
var isExpired:Boolean;
var currentDate:Date = new Date();
if (currentDate < so.data[DoubleQuick.SO_EXPIRY_PROPERTY_NAME]){
isExpired = false;
};
if ((((so.data[DoubleQuick.SO_SESSION_PROPERTY_NAME] == undefined)) || (isExpired))){
doTrace("DoubleQuick requesting new session key");
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, onInit, false, 0, true);
loader.addEventListener(IOErrorEvent.IO_ERROR, onError, false, 0, true);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, false, 0, true);
request = new URLRequest(((TRACKER_SESSION_URL + "?project=") + projectId));
request.method = URLRequestMethod.GET;
try {
loader.load(request);
} catch(error:Error) {
onError();
};
} else {
DoubleQuick.initialisationFinished();
};
}
public static function initialisationFinished():void{
doTrace("DoubleQuick initialised");
initialised = true;
var _local1:int;
while (_local1 < queue.length) {
event(queue[_local1]);
_local1++;
};
queue = new Array();
var _local2:SharedObject = SharedObject.getLocal(DoubleQuick.SO_NAME);
tickerURL = new URLRequest(((((TICKER_URL + "?project=") + projectId) + "&session=") + _local2.data[DoubleQuick.SO_SESSION_PROPERTY_NAME]));
tickerURL.method = URLRequestMethod.GET;
dq = new (DoubleQuick);
dq.startTimer();
}
private static function onError(_arg1:Event=null):void{
}
public static function ping():void{
var loader:URLLoader;
if (tickerURL != null){
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(IOErrorEvent.IO_ERROR, onError, false, 0, true);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, false, 0, true);
doTrace("DoubleQuick ticker");
try {
loader.load(tickerURL);
} catch(error:Error) {
onError();
};
};
}
private static function generateURL(_arg1:Number):URLRequest{
var _local2:SharedObject = SharedObject.getLocal(DoubleQuick.SO_NAME);
var _local3:String = ((((((((TRACKER_URL + "?watch=") + _arg1) + "&project=") + projectId) + "&session=") + _local2.data[DoubleQuick.SO_SESSION_PROPERTY_NAME]) + "&baseurl=") + escape(baseurl));
return (new URLRequest(_local3));
}
}
}//package com.kerb.tracking
Section 79
//DynamicButton (com.kerb.ui.DynamicButton)
package com.kerb.ui {
import flash.events.*;
import flash.display.*;
import com.kerb.utils.*;
import flash.text.*;
public class DynamicButton extends EventDispatcher {
protected var select:MovieClip;
protected var labelID:String;
protected var over:MovieClip;
protected var mc:Sprite;
protected var up:MovieClip;
protected var down:MovieClip;
protected var label:String;
public function DynamicButton(_arg1:Sprite, _arg2:String="", _arg3:Boolean=true){
this.mc = _arg1;
this.labelID = _arg2;
if (_arg1 == null){
throw (new Error("Null movieclip passed to DynamicButton"));
};
if ((((((((_arg1.getChildByName("up") == null)) || ((_arg1.getChildByName("down") == null)))) || ((_arg1.getChildByName("over") == null)))) || ((_arg1.getChildByName("hit") == null)))){
throw (new Error((("DynamicButton \"" + _arg1) + "\" does not have all states")));
};
_arg1.addEventListener(MouseEvent.CLICK, onClick, false, 0, _arg3);
_arg1.addEventListener(MouseEvent.ROLL_OVER, onRollOver, false, 0, _arg3);
_arg1.addEventListener(MouseEvent.ROLL_OUT, onRollOut, false, 0, _arg3);
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, _arg3);
_arg1.buttonMode = true;
_arg1.mouseChildren = false;
var _local4:Sprite = (_arg1.getChildByName("hit") as Sprite);
_arg1.hitArea = _local4;
_local4.visible = false;
_local4.mouseEnabled = false;
_local4.mouseChildren = false;
up = (_arg1.getChildByName("up") as MovieClip);
over = (_arg1.getChildByName("over") as MovieClip);
down = (_arg1.getChildByName("down") as MovieClip);
select = (_arg1.getChildByName("select") as MovieClip);
initText();
_arg1.removeChild(over);
_arg1.removeChild(down);
if (select != null){
_arg1.removeChild(select);
};
}
public function enable():void{
mc.mouseEnabled = true;
}
protected function onMouseDown(_arg1:MouseEvent):void{
if (up.parent){
mc.removeChild(up);
};
if (over.parent){
mc.removeChild(over);
};
if (!down.parent){
mc.addChild(down);
};
down.gotoAndPlay(1);
dispatchEvent(_arg1);
}
public function get name():String{
return (mc.name);
}
public function initText():void{
if (labelID != ""){
if (up.getChildByName("label_txt") != null){
TextManager.getInstance().setTextField((up.getChildByName("label_txt") as TextField), labelID);
};
if (over.getChildByName("label_txt") != null){
TextManager.getInstance().setTextField((over.getChildByName("label_txt") as TextField), labelID);
};
if (down.getChildByName("label_txt") != null){
TextManager.getInstance().setTextField((down.getChildByName("label_txt") as TextField), labelID);
};
if (((!((select == null))) && (!((select.getChildByName("label_txt") == null))))){
TextManager.getInstance().setTextField((select.getChildByName("label_txt") as TextField), labelID);
};
};
}
public function dispose():void{
mc.buttonMode = false;
mc.mouseEnabled = false;
mc.removeEventListener(MouseEvent.CLICK, onClick);
mc.removeEventListener(MouseEvent.ROLL_OVER, onRollOver);
mc.removeEventListener(MouseEvent.ROLL_OUT, onRollOut);
mc.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
}
public function set visible(_arg1:Boolean):void{
mc.visible = _arg1;
}
public function get alpha():Number{
return (mc.alpha);
}
private function onClick(_arg1:MouseEvent):void{
dispatchEvent(_arg1);
}
protected function onRollOver(_arg1:MouseEvent):void{
if (up.parent){
mc.removeChild(up);
};
if (!over.parent){
mc.addChild(over);
};
if (down.parent){
mc.removeChild(down);
};
over.gotoAndPlay(1);
dispatchEvent(_arg1);
}
protected function onRollOut(_arg1:MouseEvent):void{
if (!up.parent){
mc.addChild(up);
};
if (over.parent){
mc.removeChild(over);
};
if (down.parent){
mc.removeChild(down);
};
up.gotoAndPlay(1);
dispatchEvent(_arg1);
}
public function get mcRef():Sprite{
return (mc);
}
public function set selected(_arg1:Boolean):void{
if (!select){
return;
};
if (_arg1){
mc.mouseEnabled = false;
up.visible = false;
down.visible = false;
over.visible = false;
if (!select.parent){
mc.addChild(select);
};
} else {
mc.mouseEnabled = true;
up.visible = true;
down.visible = true;
over.visible = true;
if (select.parent){
mc.removeChild(select);
};
};
}
public function disable():void{
mc.mouseEnabled = false;
}
public function get visible():Boolean{
return (mc.visible);
}
public function set alpha(_arg1:Number):void{
mc.alpha = _arg1;
}
}
}//package com.kerb.ui
Section 80
//AssetFactory (com.kerb.utils.AssetFactory)
package com.kerb.utils {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import com.kerb.sound.*;
public final class AssetFactory extends EventDispatcher {
private var _loader:Loader;// = null
public static const EVENT_ASSET_FACTORY_READY:String = "EVENT_ASSET_FACTORY_READY";
public function initialize(_arg1:Class):void{
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.INIT, _onLibraryReady);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, _onIOError);
_loader.loadBytes(new (_arg1));
}
public function createExtendedSound(_arg1:String):ExtendedSound{
var _local2:Class = Class(_loader.contentLoaderInfo.applicationDomain.getDefinition(_arg1));
return ((new (_local2) as ExtendedSound));
}
public function createDisplayObject(_arg1:String):DisplayObject{
var _local2:Class = Class(_loader.contentLoaderInfo.applicationDomain.getDefinition(_arg1));
return ((new (_local2) as DisplayObject));
}
private function _onLibraryReady(_arg1:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.INIT, _onLibraryReady);
dispatchEvent(new Event(EVENT_ASSET_FACTORY_READY));
}
public function createSound(_arg1:String):Sound{
var _local2:Class = Class(_loader.contentLoaderInfo.applicationDomain.getDefinition(_arg1));
return ((new (_local2) as Sound));
}
public function createMovieClip(_arg1:String):MovieClip{
var _local2:Class = Class(_loader.contentLoaderInfo.applicationDomain.getDefinition(_arg1));
return ((new (_local2) as MovieClip));
}
public function createBitmapDataObject(_arg1:String):BitmapData{
var _local2:Class = Class(_loader.contentLoaderInfo.applicationDomain.getDefinition(_arg1));
return ((new _local2(0, 0) as BitmapData));
}
private function _onIOError(_arg1:Event):void{
}
}
}//package com.kerb.utils
Section 81
//AssetFactoryManager (com.kerb.utils.AssetFactoryManager)
package com.kerb.utils {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.media.*;
import com.kerb.sound.*;
public class AssetFactoryManager extends EventDispatcher {
protected var numFactories:int;
protected var numLoaded:int;
protected var assetFactories:Dictionary;
public function AssetFactoryManager(){
assetFactories = new Dictionary();
numFactories = 0;
numLoaded = 0;
}
public function createExtendedSound(_arg1:String, _arg2:String):ExtendedSound{
if (assetFactories[_arg1]){
return (assetFactories[_arg1].createExtendedSound(_arg2));
};
return (null);
}
public function createDisplayObject(_arg1:String, _arg2:String):DisplayObject{
if (assetFactories[_arg1]){
return (assetFactories[_arg1].createDisplayObject(_arg2));
};
return (null);
}
protected function onAssetFactoryReady(_arg1:Event):void{
_arg1.target.removeEventListener(AssetFactory.EVENT_ASSET_FACTORY_READY, onAssetFactoryReady);
if (++numLoaded == numFactories){
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function createBitmapDataObject(_arg1:String, _arg2:String):BitmapData{
if (assetFactories[_arg1]){
return (assetFactories[_arg1].createBitmapDataObject(_arg2));
};
return (null);
}
public function getAssetFactory(_arg1:String):AssetFactory{
return (assetFactories[_arg1]);
}
public function createSound(_arg1:String, _arg2:String):Sound{
if (assetFactories[_arg1]){
return (assetFactories[_arg1].createSound(_arg2));
};
return (null);
}
public function addAssetFactory(_arg1:String, _arg2:Class):void{
var _local3:AssetFactory = new AssetFactory();
assetFactories[_arg1] = _local3;
numFactories++;
_local3.addEventListener(AssetFactory.EVENT_ASSET_FACTORY_READY, onAssetFactoryReady);
_local3.initialize(_arg2);
}
public function createMovieClip(_arg1:String, _arg2:String):MovieClip{
if (assetFactories[_arg1]){
return (assetFactories[_arg1].createMovieClip(_arg2));
};
return (null);
}
}
}//package com.kerb.utils
Section 82
//TextManager (com.kerb.utils.TextManager)
package com.kerb.utils {
import flash.utils.*;
import flash.text.*;
public class TextManager {
private var _xmlData:XML;
private var _fontOverrideFunction:Function;
private static var instance:TextManager;
public function setRawTextField(_arg1:TextField, _arg2:String, _arg3:Boolean=false):void{
var _local4:TextFormat;
if (_fontOverrideFunction != null){
_fontOverrideFunction(_arg1);
};
if (_arg3){
_arg1.htmlText = _arg2;
} else {
if ((((((((_fontOverrideFunction == null)) && ((_arg1.length > 0)))) && (!(_arg1.defaultTextFormat.bold)))) && (_arg1.getTextFormat(0).bold))){
_local4 = new TextFormat();
_local4.bold = true;
_arg1.defaultTextFormat = _local4;
};
_arg1.text = _arg2;
};
}
public function setTextField(_arg1:TextField, _arg2:String, _arg3:Boolean=false):void{
setRawTextField(_arg1, getTextById(_arg2), _arg3);
}
public function setFontOverrideFunction(_arg1:Function):void{
_fontOverrideFunction = _arg1;
}
public function init(_arg1:XML):void{
this._xmlData = _arg1;
}
public function getTextById(_arg1:String):String{
var result:String;
var id = _arg1;
if (_xmlData){
result = _xmlData.text.(@id == id);
if (result){
return (result);
};
return ((("[[" + id) + "]]"));
//unresolved jump
};
return (id);
}
public function centerTextField(_arg1:TextField, _arg2:Boolean=true):void{
_arg1.y = ((_arg2) ? 0 : _arg1.y + ((_arg1.height - (_arg1.textHeight + 4)) / 2));
}
public function hasId(_arg1:String):Boolean{
var result:String;
var id = _arg1;
if (_xmlData){
result = _xmlData.text.(@id == id);
if (result){
return (true);
};
};
return (false);
}
public function initFromClass(_arg1:Class):void{
var _local3:XML;
var _local2:ByteArray = ByteArray(new (_arg1));
var _local4:String = _local2.readUTFBytes(3);
if (_local4.length == 1){
this._xmlData = new XML(_local2.readUTFBytes((_local2.length - 3)));
} else {
this._xmlData = new XML((_local4 + _local2.readUTFBytes((_local2.length - 3))));
};
}
public static function getInstance():TextManager{
if (instance == null){
instance = new (TextManager);
};
return (instance);
}
}
}//package com.kerb.utils
Section 83
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray {
}
}//package mx.core
Section 84
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.4.0.9271";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 85
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "3.4.0.9271";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 86
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "3.4.0.9271";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 87
//FlexVersion (mx.core.FlexVersion)
package mx.core {
import mx.resources.*;
public class FlexVersion {
public static const VERSION_2_0_1:uint = 33554433;
public static const CURRENT_VERSION:uint = 50331648;
public static const VERSION_3_0:uint = 50331648;
public static const VERSION_2_0:uint = 33554432;
public static const VERSION_ALREADY_READ:String = "versionAlreadyRead";
public static const VERSION_ALREADY_SET:String = "versionAlreadySet";
mx_internal static const VERSION:String = "3.4.0.9271";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
mx_internal static function changeCompatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
_compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function set compatibilityVersion(_arg1:uint):void{
var _local2:String;
if (_arg1 == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ);
};
_compatibilityVersion = _arg1;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(_arg1:Function):void{
_compatibilityErrorFunction = _arg1;
}
public static function set compatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var _local1:uint = ((compatibilityVersion >> 24) & 0xFF);
var _local2:uint = ((compatibilityVersion >> 16) & 0xFF);
var _local3:uint = (compatibilityVersion & 0xFFFF);
return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString()));
}
}
}//package mx.core
Section 88
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 89
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(_arg1:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 90
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.core
Section 91
//IContainer (mx.core.IContainer)
package mx.core {
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import mx.managers.*;
public interface IContainer extends IUIComponent {
function set hitArea(_arg1:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(_arg1:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(_arg1:Boolean):void;
function set creatingContentPane(_arg1:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(_arg1:DisplayObject):int;
function set doubleClickEnabled(_arg1:Boolean):void;
function getObjectsUnderPoint(_arg1:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(_arg1:Boolean):void;
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(_arg1:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(_arg1:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(_arg1:Boolean):void;
function getChildAt(_arg1:int):DisplayObject;
function set soundTransform(_arg1:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(_arg1:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(_arg1:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(_arg1:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(_arg1:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(_arg1:Boolean):void;
function set buttonMode(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(_arg1:DisplayObject):DisplayObject;
function set tabIndex(_arg1:int):void;
function addChild(_arg1:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean;
}
}//package mx.core
Section 92
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 93
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
import flash.utils.*;
public interface IFlexModuleFactory {
function get preloadedRSLs():Dictionary;
function allowInsecureDomain(... _args):void;
function create(... _args):Object;
function allowDomain(... _args):void;
function info():Object;
}
}//package mx.core
Section 94
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateSize():void;
function invalidateDisplayList():void;
function invalidateProperties():void;
}
}//package mx.core
Section 95
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 96
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 97
//IRectangularBorder (mx.core.IRectangularBorder)
package mx.core {
import flash.geom.*;
public interface IRectangularBorder extends IBorder {
function get backgroundImageBounds():Rectangle;
function get hasBackgroundImage():Boolean;
function set backgroundImageBounds(_arg1:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 98
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 99
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup)
package mx.core {
import flash.events.*;
public interface ISWFBridgeGroup {
function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider;
function removeChildBridge(_arg1:IEventDispatcher):void;
function get parentBridge():IEventDispatcher;
function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void;
function set parentBridge(_arg1:IEventDispatcher):void;
function containsBridge(_arg1:IEventDispatcher):Boolean;
function getChildBridges():Array;
}
}//package mx.core
Section 100
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider)
package mx.core {
import flash.events.*;
public interface ISWFBridgeProvider {
function get childAllowsParent():Boolean;
function get swfBridge():IEventDispatcher;
function get parentAllowsChild():Boolean;
}
}//package mx.core
Section 101
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(_arg1:Sprite):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function set isPopUp(_arg1:Boolean):void;
function get explicitMinHeight():Number;
function get percentWidth():Number;
function get isPopUp():Boolean;
function get owner():DisplayObjectContainer;
function get percentHeight():Number;
function get baselinePosition():Number;
function owns(_arg1:DisplayObject):Boolean;
function initialize():void;
function get maxWidth():Number;
function get minWidth():Number;
function getExplicitOrMeasuredWidth():Number;
function get explicitMaxWidth():Number;
function get explicitMaxHeight():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function set percentWidth(_arg1:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function set explicitWidth(_arg1:Number):void;
function set measuredMinHeight(_arg1:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(_arg1:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(_arg1:Number):void;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function set document(_arg1:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 102
//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 103
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var classMap:Object = {};
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class = classMap[_arg1];
if (!_local2){
throw (new Error((("No class registered for interface '" + _arg1) + "'.")));
};
return (_local2["getInstance"]());
}
}
}//package mx.core
Section 104
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public static function set catchCallLaterExceptions(_arg1:Boolean):void{
_catchCallLaterExceptions = _arg1;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(_arg1:Boolean):void{
designTime = _arg1;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 105
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.4.0.9271";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
this._module = _arg7;
}
public function get module():IModuleInfo{
if (_module){
return (_module);
};
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module));
}
}
}//package mx.events
Section 106
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.4.0.9271";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 107
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.4.0.9271";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 108
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.4.0.9271";
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
var _local6:int = (leftShadow) ? leftShadow.width : 0;
var _local7:int = (rightShadow) ? rightShadow.width : 0;
var _local8:int = (topShadow) ? topShadow.height : 0;
var _local9:int = (bottomShadow) ? bottomShadow.height : 0;
var _local10:int = (_local6 + _local7);
var _local11:int = (_local8 + _local9);
var _local12:Number = ((_arg5 + _local11) / 2);
var _local13:Number = ((_arg4 + _local10) / 2);
var _local14:Matrix = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
var _local3:Shape = new FlexShape();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2);
var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6);
var _local9:Number = (_local7.left - _local8.left);
var _local10:Number = (_local8.right - _local7.right);
var _local11:Number = (_local7.top - _local8.top);
var _local12:Number = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
var _local13:Point = new Point(0, 0);
var _local14:Rectangle = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 109
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function moveFocus(_arg1:String, _arg2:DisplayObject=null):void;
function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function removeSWFBridge(_arg1:IEventDispatcher):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 110
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package mx.managers
Section 111
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.events.*;
import flash.display.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(_arg1:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.managers
Section 112
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function validateNow():void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function isInvalid():Boolean;
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
}
}//package mx.managers
Section 113
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function set processedDescriptors(_arg1:Boolean):void;
}
}//package mx.managers
Section 114
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function set focusPane(_arg1:Sprite):void;
function get toolTipChildren():IChildList;
function useSWFBridge():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function deployMouseShields(_arg1:Boolean):void;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void;
function getSandboxRoot():DisplayObject;
function get swfBridgeGroup():ISWFBridgeGroup;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function get document():Object;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function getTopLevelRoot():DisplayObject;
function removeChildBridge(_arg1:IEventDispatcher):void;
function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function deactivate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(_arg1:int):void;
function isTopLevel():Boolean;
function isTopLevelRoot():Boolean;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle;
}
}//package mx.managers
Section 115
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var changingListenersInOtherSystemManagers:Boolean;
public static var bootstrapLoaderInfoURL:String;
public static var showMouseCursor:Boolean;
public static var dispatchingEventToOtherSystemManagers:Boolean;
}
}//package mx.managers
Section 116
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 117
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.4.0.9271";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import flash.display.*;
import flash.net.*;
import mx.events.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
var _local4:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local4 = new ModuleEvent(ModuleEvent.PROGRESS);
_local4.bytesLoaded = info.size;
_local4.bytesTotal = info.size;
dispatchEvent(_local4);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2, _arg3);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
loader.content.removeEventListener("error", moduleErrorHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
loader.content.addEventListener("error", moduleErrorHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
private function loadBytes(_arg1:ApplicationDomain, _arg2:ByteArray):void{
var _local3:LoaderContext = new LoaderContext();
_local3.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local3)){
_local3["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.loadBytes(_arg2, _local3);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_arg3){
loadBytes(_arg1, _arg3);
return;
};
if (_url.indexOf("published://") == 0){
return;
};
var _local4:URLRequest = new URLRequest(_url);
var _local5:LoaderContext = new LoaderContext();
_local5.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local5.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local5.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local4, _local5);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function moduleErrorHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
if ((_arg1 is ModuleEvent)){
_local2 = ModuleEvent(_arg1);
} else {
_local2 = new ModuleEvent(ModuleEvent.ERROR);
};
dispatchEvent(_local2);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.READY);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(_local2);
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 118
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 119
//IResourceBundle (mx.resources.IResourceBundle)
package mx.resources {
public interface IResourceBundle {
function get content():Object;
function get locale():String;
function get bundleName():String;
}
}//package mx.resources
Section 120
//IResourceManager (mx.resources.IResourceManager)
package mx.resources {
import flash.events.*;
import flash.system.*;
public interface IResourceManager extends IEventDispatcher {
function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean;
function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class;
function getLocales():Array;
function removeResourceBundlesForLocale(_arg1:String):void;
function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle;
function get localeChain():Array;
function getInt(_arg1:String, _arg2:String, _arg3:String=null):int;
function update():void;
function set localeChain(_arg1:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(_arg1:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(_arg1:String):Array;
function removeResourceBundle(_arg1:String, _arg2:String):void;
function getObject(_arg1:String, _arg2:String, _arg3:String=null);
function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String;
function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void;
function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void;
function getPreferredLocaleChain():Array;
function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function initializeLocaleChain(_arg1:Array):void;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 121
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 122
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
import mx.core.*;
public class LocaleSorter {
mx_internal static const VERSION:String = "3.4.0.9271";
private static function normalizeLocale(_arg1:String):String{
return (_arg1.toLowerCase().replace(/-/g, "_"));
}
public static function sortLocalesByPreference(_arg1:Array, _arg2:Array, _arg3:String=null, _arg4:Boolean=false):Array{
var result:Array;
var hasLocale:Object;
var i:int;
var j:int;
var k:int;
var l:int;
var locale:String;
var plocale:LocaleID;
var appLocales = _arg1;
var systemPreferences = _arg2;
var ultimateFallbackLocale = _arg3;
var addAll = _arg4;
var promote:Function = function (_arg1:String):void{
if (typeof(hasLocale[_arg1]) != "undefined"){
result.push(appLocales[hasLocale[_arg1]]);
delete hasLocale[_arg1];
};
};
result = [];
hasLocale = {};
var locales:Array = trimAndNormalize(appLocales);
var preferenceLocales:Array = trimAndNormalize(systemPreferences);
addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale);
j = 0;
while (j < locales.length) {
hasLocale[locales[j]] = j;
j = (j + 1);
};
i = 0;
l = preferenceLocales.length;
while (i < l) {
plocale = LocaleID.fromString(preferenceLocales[i]);
promote(preferenceLocales[i]);
promote(plocale.toString());
while (plocale.transformToParent()) {
promote(plocale.toString());
};
plocale = LocaleID.fromString(preferenceLocales[i]);
j = 0;
while (j < l) {
locale = preferenceLocales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
j = 0;
k = locales.length;
while (j < k) {
locale = locales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
i = (i + 1);
};
if (addAll){
j = 0;
k = locales.length;
while (j < k) {
promote(locales[j]);
j = (j + 1);
};
};
return (result);
}
private static function addUltimateFallbackLocale(_arg1:Array, _arg2:String):void{
var _local3:String;
if (((!((_arg2 == null))) && (!((_arg2 == ""))))){
_local3 = normalizeLocale(_arg2);
if (_arg1.indexOf(_local3) == -1){
_arg1.push(_local3);
};
};
}
private static function trimAndNormalize(_arg1:Array):Array{
var _local2:Array = [];
var _local3:int;
while (_local3 < _arg1.length) {
_local2.push(normalizeLocale(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package mx.resources
class LocaleID {
private var privateLangs:Boolean;// = false
private var script:String;// = ""
private var variants:Array;
private var privates:Array;
private var extensions:Object;
private var lang:String;// = ""
private var region:String;// = ""
private var extended_langs:Array;
public static const STATE_PRIMARY_LANGUAGE:int = 0;
public static const STATE_REGION:int = 3;
public static const STATE_EXTENDED_LANGUAGES:int = 1;
public static const STATE_EXTENSIONS:int = 5;
public static const STATE_SCRIPT:int = 2;
public static const STATE_VARIANTS:int = 4;
public static const STATE_PRIVATES:int = 6;
private function LocaleID(){
extended_langs = [];
variants = [];
extensions = {};
privates = [];
super();
}
public function equals(_arg1:LocaleID):Boolean{
return ((toString() == _arg1.toString()));
}
public function canonicalize():void{
var _local1:String;
for (_local1 in extensions) {
if (extensions.hasOwnProperty(_local1)){
if (extensions[_local1].length == 0){
delete extensions[_local1];
} else {
extensions[_local1] = extensions[_local1].sort();
};
};
};
extended_langs = extended_langs.sort();
variants = variants.sort();
privates = privates.sort();
if (script == ""){
script = LocaleRegistry.getScriptByLang(lang);
};
if ((((script == "")) && (!((region == ""))))){
script = LocaleRegistry.getScriptByLangAndRegion(lang, region);
};
if ((((region == "")) && (!((script == ""))))){
region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
};
}
public function toString():String{
var _local2:String;
var _local1:Array = [lang];
Array.prototype.push.apply(_local1, extended_langs);
if (script != ""){
_local1.push(script);
};
if (region != ""){
_local1.push(region);
};
Array.prototype.push.apply(_local1, variants);
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1.push(_local2);
Array.prototype.push.apply(_local1, extensions[_local2]);
};
};
if (privates.length > 0){
_local1.push("x");
Array.prototype.push.apply(_local1, privates);
};
return (_local1.join("_"));
}
public function isSiblingOf(_arg1:LocaleID):Boolean{
return ((((lang == _arg1.lang)) && ((script == _arg1.script))));
}
public function transformToParent():Boolean{
var _local2:String;
var _local3:Array;
var _local4:String;
if (privates.length > 0){
privates.splice((privates.length - 1), 1);
return (true);
};
var _local1:String;
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1 = _local2;
};
};
if (_local1){
_local3 = extensions[_local1];
if (_local3.length == 1){
delete extensions[_local1];
return (true);
};
_local3.splice((_local3.length - 1), 1);
return (true);
};
if (variants.length > 0){
variants.splice((variants.length - 1), 1);
return (true);
};
if (script != ""){
if (LocaleRegistry.getScriptByLang(lang) != ""){
script = "";
return (true);
};
if (region == ""){
_local4 = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
if (_local4 != ""){
region = _local4;
script = "";
return (true);
};
};
};
if (region != ""){
if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){
region = "";
return (true);
};
};
if (extended_langs.length > 0){
extended_langs.splice((extended_langs.length - 1), 1);
return (true);
};
return (false);
}
public static function fromString(_arg1:String):LocaleID{
var _local5:Array;
var _local8:String;
var _local9:int;
var _local10:String;
var _local2:LocaleID = new (LocaleID);
var _local3:int = STATE_PRIMARY_LANGUAGE;
var _local4:Array = _arg1.replace(/-/g, "_").split("_");
var _local6:int;
var _local7:int = _local4.length;
while (_local6 < _local7) {
_local8 = _local4[_local6].toLowerCase();
if (_local3 == STATE_PRIMARY_LANGUAGE){
if (_local8 == "x"){
_local2.privateLangs = true;
} else {
if (_local8 == "i"){
_local2.lang = (_local2.lang + "i-");
} else {
_local2.lang = (_local2.lang + _local8);
_local3 = STATE_EXTENDED_LANGUAGES;
};
};
} else {
_local9 = _local8.length;
if (_local9 == 0){
} else {
_local10 = _local8.charAt(0).toLowerCase();
if ((((_local3 <= STATE_EXTENDED_LANGUAGES)) && ((_local9 == 3)))){
_local2.extended_langs.push(_local8);
if (_local2.extended_langs.length == 3){
_local3 = STATE_SCRIPT;
};
} else {
if ((((_local3 <= STATE_SCRIPT)) && ((_local9 == 4)))){
_local2.script = _local8;
_local3 = STATE_REGION;
} else {
if ((((_local3 <= STATE_REGION)) && ((((_local9 == 2)) || ((_local9 == 3)))))){
_local2.region = _local8;
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 <= STATE_VARIANTS)) && ((((((((_local10 >= "a")) && ((_local10 <= "z")))) && ((_local9 >= 5)))) || ((((((_local10 >= "0")) && ((_local10 <= "9")))) && ((_local9 >= 4)))))))){
_local2.variants.push(_local8);
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 < STATE_PRIVATES)) && ((_local9 == 1)))){
if (_local8 == "x"){
_local3 = STATE_PRIVATES;
_local5 = _local2.privates;
} else {
_local3 = STATE_EXTENSIONS;
_local5 = ((_local2.extensions[_local8]) || ([]));
_local2.extensions[_local8] = _local5;
};
} else {
if (_local3 >= STATE_EXTENSIONS){
_local5.push(_local8);
};
};
};
};
};
};
};
};
_local6++;
};
_local2.canonicalize();
return (_local2);
}
}
class LocaleRegistry {
private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28};
private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"];
private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}};
private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32};
private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}};
private function LocaleRegistry(){
}
public static function getScriptByLangAndRegion(_arg1:String, _arg2:String):String{
var _local3:Object = SCRIPT_ID_BY_LANG_AND_REGION[_arg1];
if (_local3 == null){
return ("");
};
var _local4:Object = _local3[_arg2];
if (_local4 == null){
return ("");
};
return (SCRIPTS[int(_local4)].toLowerCase());
}
public static function getScriptByLang(_arg1:String):String{
var _local2:Object = SCRIPT_ID_BY_LANG[_arg1];
if (_local2 == null){
return ("");
};
return (SCRIPTS[int(_local2)].toLowerCase());
}
public static function getDefaultRegionForLangAndScript(_arg1:String, _arg2:String):String{
var _local3:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[_arg1];
var _local4:Object = SCRIPT_BY_ID[_arg2];
if ((((_local3 == null)) || ((_local4 == null)))){
return ("");
};
return (((_local3[int(_local4)]) || ("")));
}
}
Section 123
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle implements IResourceBundle {
mx_internal var _locale:String;
private var _content:Object;
mx_internal var _bundleName:String;
mx_internal static const VERSION:String = "3.4.0.9271";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(_arg1:String=null, _arg2:String=null){
_content = {};
super();
mx_internal::_locale = _arg1;
mx_internal::_bundleName = _arg2;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(_arg1:String):String{
return (String(_getObject(_arg1)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String = _getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array = _getObject(_arg1).split(",");
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getObject(_arg1:String):Object{
return (_getObject(_arg1));
}
private function _getObject(_arg1:String):Object{
var _local2:Object = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(_arg1:String):Number{
return (Number(_getObject(_arg1)));
}
private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{
var _local3:Class;
if (_arg2.hasDefinition(_arg1)){
_local3 = (_arg2.getDefinition(_arg1) as Class);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:String;
var _local4:Class;
var _local5:Object;
var _local6:ResourceBundle;
if (!_arg2){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = (((mx_internal::locale + "$") + _arg1) + "_properties");
_local4 = getClassByName(_local3, _arg2);
if (!_local4){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, _arg2);
};
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, _arg2);
};
if (((!(_local4)) && (mx_internal::backupApplicationDomain))){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
};
};
if (_local4){
_local5 = new (_local4);
if ((_local5 is ResourceBundle)){
_local6 = ResourceBundle(_local5);
return (_local6);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 124
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
try {
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
} catch(e:Error) {
instance = new ResourceManagerImpl();
};
};
return (instance);
}
}
}//package mx.resources
Section 125
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function getPreferredLocaleChain():Array{
return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function initializeLocaleChain(_arg1:Array):void{
localeChain = LocaleSorter.sortLocalesByPreference(_arg1, getSystemPreferredLocales(), null, true);
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
private function getSystemPreferredLocales():Array{
var _local1:Array;
if (Capabilities["languages"]){
_local1 = Capabilities["languages"];
} else {
_local1 = [Capabilities.language];
};
return (_local1);
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:String;
var _local3:ResourceModuleInfo = resourceModules[_arg1];
if (!_local3){
return;
};
if (_local3.resourceModule){
_local4 = _local3.resourceModule.resourceBundles;
if (_local4){
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local7 = _local4[_local6].locale;
_local8 = _local4[_local6].bundleName;
removeResourceBundle(_local7, _local8);
_local6++;
};
};
};
resourceModules[_arg1] = null;
delete resourceModules[_arg1];
_local3.moduleInfo.unload();
if (_arg2){
this.update();
};
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 126
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import mx.styles.*;
import flash.display.*;
import mx.skins.*;
import mx.graphics.*;
import mx.utils.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = Math.max((radius - Math.max(_local6.top, _local6.left, _local6.right)), 0);
_local10 = (bRoundedCorners) ? Math.max((radius - Math.max(_local6.bottom, _local6.left, _local6.right)), 0) : 0;
radiusObj = {tl:_local9, tr:_local9, bl:_local10, br:_local10};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local11 = getStyle("highlightAlphas");
_local12 = (_local11) ? _local11[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local12, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 127
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import mx.core.*;
import mx.styles.*;
import flash.display.*;
import mx.skins.*;
import mx.utils.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.4.0.9271";
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(_arg1:Object):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function registerEffects(_arg1:Array):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function getClassStyleDeclarations():Array{
return ([]);
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("focusBlendMode");
var _local4:Number = getStyle("focusAlpha");
var _local5:Number = getStyle("focusColor");
var _local6:Number = getStyle("cornerRadius");
var _local7:Number = getStyle("focusThickness");
var _local8:String = getStyle("focusRoundedCorners");
var _local9:Number = getStyle("themeColor");
var _local10:Number = _local5;
if (isNaN(_local10)){
_local10 = _local9;
};
var _local11:Graphics = graphics;
_local11.clear();
if (_local3){
blendMode = _local3;
};
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 128
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.4.0.9271";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 129
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import mx.styles.*;
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return ((_styleName) ? _styleName.getStyle(_arg1) : null);
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function get measuredHeight():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Object;
var _local12:Graphics = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
override public function get width():Number{
return (_width);
}
public function invalidateProperties():void{
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get styleName():Object{
return (_styleName);
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
public function invalidateSize():void{
}
public function validateProperties():void{
}
}
}//package mx.skins
Section 130
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import mx.styles.*;
import flash.system.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import mx.resources.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.4.0.9271";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
if (((((_backgroundImageBounds) && (_arg1))) && (_backgroundImageBounds.equals(_arg1)))){
return;
};
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 131
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.display.*;
import mx.managers.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.4.0.9271";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
super();
if (_arg1){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = _arg1;
var target = _arg2;
var filterMap = _arg3;
var nodeAddedToChain:Boolean;
var originalChain:Object = chain;
if (filterMap){
chain = {};
};
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (filterMap){
if (nodeAddedToChain){
filteredChain = {};
filterObjectFactory = function ():void{
};
filterObjectFactory.prototype = originalChain;
filteredChain = new (filterObjectFactory);
for (i in chain) {
if (filterMap[i] != null){
filteredChain[filterMap[i]] = chain[i];
};
};
chain = filteredChain;
chain[FILTERMAP_PROP] = filterMap;
} else {
chain = originalChain;
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local7:int;
var _local8:Object;
var _local3:Object = getStyle(_arg1);
var _local4:Boolean;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
var _local5:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local6:int = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
var _local6:Object;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
_local5 = styleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local6 = _local4[FILTERMAP_PROP];
if (_local6){
if (_local6[_arg1] != null){
_local4[_local6[_arg1]] = _arg2;
};
} else {
_local4[_arg1] = _arg2;
};
};
}
}
}//package mx.styles
Section 132
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(_arg1:Object):void;
function styleChanged(_arg1:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 133
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function get className():String;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(_arg1:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function getStyle(_arg1:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 134
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function registerInheritingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(_arg1):Boolean;
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function set typeSelectorCache(_arg1:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(_arg1:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 135
//IStyleManager2 (mx.styles.IStyleManager2)
package mx.styles {
import flash.events.*;
import flash.system.*;
public interface IStyleManager2 extends IStyleManager {
function get selectors():Array;
function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
}
}//package mx.styles
Section 136
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 137
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.4.0.9271";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function get selectors():Array{
return (impl.selectors);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 138
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 139
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
import mx.core.*;
public class ColorUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number = ((_arg1 >> 16) & 0xFF);
var _local4:Number = ((_arg1 >> 8) & 0xFF);
var _local5:Number = (_arg1 & 0xFF);
var _local6:Number = ((_arg2 >> 16) & 0xFF);
var _local7:Number = ((_arg2 >> 8) & 0xFF);
var _local8:Number = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 140
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number = (_arg2 + _arg4);
var _local11:Number = (_arg3 + _arg5);
var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
var _local13:Number = (_arg9 * 0.292893218813453);
var _local14:Number = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 141
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import mx.core.*;
import flash.utils.*;
import flash.display.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 142
//StringUtil (mx.utils.StringUtil)
package mx.utils {
import mx.core.*;
public class StringUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
var _local3:int = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local4:Array;
if (_arg1 == null){
return ("");
};
var _local3:uint = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
var _local5:int;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 143
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 144
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 145
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 146
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropdown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingLeft = 5;
this.fontWeight = "normal";
this.cornerRadius = 0;
this.paddingRight = 5;
this.dropShadowEnabled = true;
this.shadowDirection = "center";
this.leading = 0;
this.borderThickness = 0;
this.shadowDistance = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 147
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 148
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.borderThickness = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 149
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 4;
this.borderColor = 13510953;
this.paddingLeft = 4;
this.color = 0xFFFFFF;
this.fontWeight = "bold";
this.paddingRight = 4;
this.shadowColor = 0;
this.fontSize = 9;
this.paddingBottom = 4;
this.borderStyle = "errorTipRight";
};
};
}
}
}//package
Section 150
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.modalTransparencyBlur = 3;
this.verticalGridLineColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.textAlign = "left";
this.disabledIconColor = 0x999999;
this.stroked = false;
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.fontStyle = "normal";
this.borderSides = "left top right bottom";
this.borderThickness = 1;
this.modalTransparencyDuration = 100;
this.useRollOver = true;
this.strokeWidth = 1;
this.filled = true;
this.borderColor = 12040892;
this.horizontalGridLines = false;
this.horizontalGridLineColor = 0xF7F7F7;
this.shadowCapColor = 14015965;
this.fontGridFitType = "pixel";
this.horizontalAlign = "left";
this.modalTransparencyColor = 0xDDDDDD;
this.disabledColor = 11187123;
this.borderSkin = HaloBorder;
this.dropShadowColor = 0;
this.paddingBottom = 0;
this.indentation = 17;
this.version = "3.0.0";
this.fontThickness = 0;
this.verticalGridLines = true;
this.embedFonts = false;
this.fontSharpness = 0;
this.shadowDirection = "center";
this.textDecoration = "none";
this.selectionDuration = 250;
this.bevel = true;
this.fillColor = 0xFFFFFF;
this.focusBlendMode = "normal";
this.dropShadowEnabled = false;
this.textRollOverColor = 2831164;
this.textIndent = 0;
this.fontSize = 10;
this.openDuration = 250;
this.closeDuration = 250;
this.kerning = false;
this.paddingTop = 0;
this.highlightAlphas = [0.3, 0];
this.cornerRadius = 0;
this.horizontalGap = 8;
this.textSelectedColor = 2831164;
this.paddingLeft = 0;
this.modalTransparency = 0.5;
this.roundedBottomCorners = true;
this.repeatDelay = 500;
this.selectionDisabledColor = 0xDDDDDD;
this.fontAntiAliasType = "advanced";
this.focusSkin = HaloFocusRect;
this.verticalGap = 6;
this.leading = 2;
this.shadowColor = 0xEEEEEE;
this.backgroundAlpha = 1;
this.iconColor = 0x111111;
this.focusAlpha = 0.4;
this.borderAlpha = 1;
this.focusThickness = 2;
this.themeColor = 40447;
this.backgroundSize = "auto";
this.indicatorGap = 14;
this.letterSpacing = 0;
this.fontFamily = "Verdana";
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.color = 734012;
this.paddingRight = 0;
this.errorColor = 0xFF0000;
this.verticalAlign = "top";
this.focusRoundedCorners = "tl tr bl br";
this.shadowDistance = 2;
this.repeatInterval = 35;
};
};
}
}
}//package
Section 151
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 152
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 153
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".linkButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.paddingLeft = 2;
this.paddingRight = 2;
this.paddingBottom = 2;
};
};
}
}
}//package
Section 154
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.borderAlpha = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 155
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.paddingLeft = 0;
this.horizontalAlign = "left";
this.paddingRight = 0;
this.backgroundImage = "";
this.paddingBottom = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 156
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".popUpMenu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "left";
this.fontWeight = "normal";
};
};
}
}
}//package
Section 157
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 158
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.highlightColor = 12897484;
this.borderColor = 14015965;
this.paddingLeft = 5;
this.shadowCapColor = 14015965;
this.paddingRight = 5;
this.shadowColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.backgroundColor = 0xFFFFFF;
this.borderCapColor = 9542041;
};
};
}
}
}//package
Section 159
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 160
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 161
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.color = 0xFFFFFF;
};
};
}
}
}//package
Section 162
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 163
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 164
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 165
//en_US$core_properties (en_US$core_properties)
package {
import mx.resources.*;
public class en_US$core_properties extends ResourceBundle {
public function en_US$core_properties(){
super("en_US", "core");
}
override protected function getContent():Object{
var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."};
return (_local1);
}
}
}//package
Section 166
//en_US$skins_properties (en_US$skins_properties)
package {
import mx.resources.*;
public class en_US$skins_properties extends ResourceBundle {
public function en_US$skins_properties(){
super("en_US", "skins");
}
override protected function getContent():Object{
var _local1:Object = {notLoaded:"Unable to load '{0}'."};
return (_local1);
}
}
}//package
Section 167
//en_US$styles_properties (en_US$styles_properties)
package {
import mx.resources.*;
public class en_US$styles_properties extends ResourceBundle {
public function en_US$styles_properties(){
super("en_US", "styles");
}
override protected function getContent():Object{
var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."};
return (_local1);
}
}
}//package
Section 168
//GamestationGirls (GamestationGirls)
package {
import flash.events.*;
import flash.display.*;
import com.kerb.gamestation.*;
public class GamestationGirls extends Sprite {
public function GamestationGirls(){
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
private function onAddedToStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
var _local2:int = loaderInfo.width;
var _local3:int = loaderInfo.height;
var _local4:Sprite = new Sprite();
var _local5:Graphics = _local4.graphics;
_local5.beginFill(0);
_local5.drawRect(-1000, -1000, (2000 + _local2), 1000);
_local5.drawRect(-1000, _local3, (2000 + _local2), 1000);
_local5.drawRect(-1000, -1000, 1000, (1000 + _local3));
_local5.drawRect(_local2, -1000, 1000, (1000 + _local3));
_local5.endFill();
addChild(_local4);
addChildAt(new Main(), 0);
}
}
}//package