STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229595 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2595 · P5190 |
This is the info page for Flash #189777 |
Build housing so that your workers have a place to live. |
Win by meeting all the level's goals. You can check your progress at the top of the screen. |
Select buildings you've constructed and use the action buttons to interact with the world. |
1. |
BUILD |
2. |
MANAGE |
3. |
GOALS |
Apartments Add medium amount of workers. |
House Add small amount of workers. |
Condos Add large amount of workers. |
Car Dealership Sell cars to your workers so they can go to work in style. |
Car Factory Gives the ability to create cars. |
SUV Factory Gives the ability to create SUV cars. |
Hybrid Factory Gives the ability to create Hybrid cars. |
Gas Station Enables your workers to drive cars. |
BUILDINGS |
Outsource Car Production Outsource car production. |
FEMA Building Protect the homeland from world disasters. |
Park Family fun for cheap. |
Bank Take out a loan and pay debt off. |
Shopping Mall Buy the latest fashions for all. |
Movie Theater The hottest summer blockbusters shown here. |
Stadium Entertainment from baseball, football, and Monster truck rallies. |
Research Facility Gives the ability to research certain technology. |
Hospital Keep your workers healthy and happy. |
Capital Create legislation and government decisions. |
Federal Reserve Make financial tweaks to the market. |
White House Elect a President and lead your world to succes. |
Stock Market Play your odds on the stock market. |
Military Base Wage war, protect your world, and turn tail and run. |
United Nations Help bring peace to the world one child at a time. |
Border Crossing Add medium amount of foreign workers. |
Sewer Plant Facilitates worker waste making a cleaner environment. |
Nuclear Power Plant Gives the ability to support more than 100 workers. |
Oil Refinery Gives the ability to harvest oil. |
Mining Factory Gives the ability to harvest metals. |
Mineral Deposit Build a Mining Facility on top. |
Port Exports Sell cars to foreign countries. |
Oil Vein Build an Oil Refinery on top. |
Port Imports Buy cars from foreign countries. |
High Rise Condos Add bulk amount of workers. |
Large Scale Outsourcing Increase profits by outsourcing production in bulk. |
Large Scale Sales Increase profits by selling cars in bulk. |
Government Healthcare Make medicine available to everyone. |
aBc |
MISSION NUM |
ActionScript [AS3]
Section 1//AssistProtectionAction (actions.AssistProtectionAction) package actions { import com.urbansquall.wrighton.*; public class AssistProtectionAction extends GameAction { public static var action_workers_assist:Class = AssistProtectionAction_action_workers_assist; public function AssistProtectionAction(){ this.m_description = "Help during a disaster, +50% for a short period"; this.m_icon = new action_workers_assist(); this.m_reloadTime = 40000; this.m_resources = new IndecisionResources(); } } }//package actionsSection 2//AssistProtectionAction_action_workers_assist (actions.AssistProtectionAction_action_workers_assist) package actions { import mx.core.*; public class AssistProtectionAction_action_workers_assist extends BitmapAsset { } }//package actionsSection 3//BuildCarAction (actions.BuildCarAction) package actions { import com.urbansquall.wrighton.*; public class BuildCarAction extends GameAction { public static var ButtonImage:Class = BuildCarAction_ButtonImage; public function BuildCarAction(){ this.m_description = "Build a car"; this.m_icon = new ButtonImage(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -150; (this.m_resources as IndecisionResources).carsBasic = 1; (this.m_resources as IndecisionResources).oil = -2; (this.m_resources as IndecisionResources).metal = -4; } } }//package actionsSection 4//BuildCarAction_ButtonImage (actions.BuildCarAction_ButtonImage) package actions { import mx.core.*; public class BuildCarAction_ButtonImage extends BitmapAsset { } }//package actionsSection 5//BuildHybridAction (actions.BuildHybridAction) package actions { import com.urbansquall.wrighton.*; public class BuildHybridAction extends GameAction { public static var ButtonImage:Class = BuildHybridAction_ButtonImage; public function BuildHybridAction(){ this.m_description = "Build a Hybrid"; this.m_icon = new ButtonImage(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -600; (this.m_resources as IndecisionResources).carsHybrid = 1; (this.m_resources as IndecisionResources).metal = -6; (this.m_resources as IndecisionResources).happiness = -1; } } }//package actionsSection 6//BuildHybridAction_ButtonImage (actions.BuildHybridAction_ButtonImage) package actions { import mx.core.*; public class BuildHybridAction_ButtonImage extends BitmapAsset { } }//package actionsSection 7//BuildSuvAction (actions.BuildSuvAction) package actions { import com.urbansquall.wrighton.*; public class BuildSuvAction extends GameAction { public static var ButtonImage:Class = BuildSuvAction_ButtonImage; public function BuildSuvAction(){ this.m_description = "Build an SUV"; this.m_icon = new ButtonImage(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -300; (this.m_resources as IndecisionResources).carsSuv = 1; (this.m_resources as IndecisionResources).oil = -4; (this.m_resources as IndecisionResources).metal = -8; (this.m_resources as IndecisionResources).happiness = -3; } } }//package actionsSection 8//BuildSuvAction_ButtonImage (actions.BuildSuvAction_ButtonImage) package actions { import mx.core.*; public class BuildSuvAction_ButtonImage extends BitmapAsset { } }//package actionsSection 9//BuyCarBulkAction (actions.BuyCarBulkAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class BuyCarBulkAction extends GameAction { public static var ButtonCarImage:Class = BuyCarBulkAction_ButtonCarImage; public function BuyCarBulkAction(){ this.m_description = "Buy Car in Bulk"; this.m_icon = new ButtonCarImage(); this.m_reloadTime = 40000; this.m_objectRequirements = [CarFactory]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -369; (this.m_resources as IndecisionResources).carsBasic = 3; (this.m_resources as IndecisionResources).happiness = -1; (this.m_resources as IndecisionResources).global = 1; } } }//package actionsSection 10//BuyCarBulkAction_ButtonCarImage (actions.BuyCarBulkAction_ButtonCarImage) package actions { import mx.core.*; public class BuyCarBulkAction_ButtonCarImage extends BitmapAsset { } }//package actionsSection 11//BuyHybridBulkAction (actions.BuyHybridBulkAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class BuyHybridBulkAction extends GameAction { public static var ButtonHybridImage:Class = BuyHybridBulkAction_ButtonHybridImage; public function BuyHybridBulkAction(){ this.m_description = "Buy Hybrid in Bulk"; this.m_icon = new ButtonHybridImage(); this.m_reloadTime = 40000; this.m_objectRequirements = [HybridFactory]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -1552; (this.m_resources as IndecisionResources).carsHybrid = 3; (this.m_resources as IndecisionResources).happiness = -5; (this.m_resources as IndecisionResources).global = 5; } } }//package actionsSection 12//BuyHybridBulkAction_ButtonHybridImage (actions.BuyHybridBulkAction_ButtonHybridImage) package actions { import mx.core.*; public class BuyHybridBulkAction_ButtonHybridImage extends BitmapAsset { } }//package actionsSection 13//BuySuvBulkAction (actions.BuySuvBulkAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class BuySuvBulkAction extends GameAction { public static var ButtonSuvImage:Class = BuySuvBulkAction_ButtonSuvImage; public function BuySuvBulkAction(){ this.m_description = "Buy SUV in Bulk"; this.m_icon = new ButtonSuvImage(); this.m_reloadTime = 40000; this.m_objectRequirements = [SuvFactory]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -742; (this.m_resources as IndecisionResources).carsSuv = 3; (this.m_resources as IndecisionResources).happiness = -3; (this.m_resources as IndecisionResources).global = 3; } } }//package actionsSection 14//BuySuvBulkAction_ButtonSuvImage (actions.BuySuvBulkAction_ButtonSuvImage) package actions { import mx.core.*; public class BuySuvBulkAction_ButtonSuvImage extends BitmapAsset { } }//package actionsSection 15//CloseBorderAction (actions.CloseBorderAction) package actions { import com.urbansquall.wrighton.*; public class CloseBorderAction extends GameAction { public static var action_border_close:Class = CloseBorderAction_action_border_close; public function CloseBorderAction(){ this.m_description = "Close border"; this.m_icon = new action_border_close(); this.m_reloadTime = 0; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).totalWorkers = -10; (this.m_resources as IndecisionResources).workers = 0; (this.m_resources as IndecisionResources).happiness = 20; (this.m_resources as IndecisionResources).global = -20; } } }//package actionsSection 16//CloseBorderAction_action_border_close (actions.CloseBorderAction_action_border_close) package actions { import mx.core.*; public class CloseBorderAction_action_border_close extends BitmapAsset { } }//package actionsSection 17//ColdWarAction (actions.ColdWarAction) package actions { import com.urbansquall.wrighton.*; public class ColdWarAction extends GameAction { public static var action_war_coldwar_enter:Class = ColdWarAction_action_war_coldwar_enter; public function ColdWarAction(){ this.m_description = "Start a Cold War"; this.m_icon = new action_war_coldwar_enter(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 2; (this.m_resources as IndecisionResources).global = -2; (this.m_resources as IndecisionResources).money = -500; (this.m_resources as IndecisionResources).metal = -5; (this.m_resources as IndecisionResources).oil = -3; } } }//package actionsSection 18//ColdWarAction_action_war_coldwar_enter (actions.ColdWarAction_action_war_coldwar_enter) package actions { import mx.core.*; public class ColdWarAction_action_war_coldwar_enter extends BitmapAsset { } }//package actionsSection 19//CureWorldHungerAction (actions.CureWorldHungerAction) package actions { import com.urbansquall.wrighton.*; public class CureWorldHungerAction extends GameAction { public static var action_hunger_cure:Class = CureWorldHungerAction_action_hunger_cure; public function CureWorldHungerAction(){ this.m_description = "Cure world hunger"; this.m_icon = new action_hunger_cure(); this.m_reloadTime = 180000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -550; (this.m_resources as IndecisionResources).oil = -5; (this.m_resources as IndecisionResources).happiness = -5; (this.m_resources as IndecisionResources).global = 5; } } }//package actionsSection 20//CureWorldHungerAction_action_hunger_cure (actions.CureWorldHungerAction_action_hunger_cure) package actions { import mx.core.*; public class CureWorldHungerAction_action_hunger_cure extends BitmapAsset { } }//package actionsSection 21//EconomistNegativeAction (actions.EconomistNegativeAction) package actions { import com.urbansquall.wrighton.*; public class EconomistNegativeAction extends GameAction { public static var Icon:Class = EconomistNegativeAction_Icon; public function EconomistNegativeAction(){ this.m_description = "Decrease taxes by -25%"; this.m_icon = new Icon(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 3; } } }//package actionsSection 22//EconomistNegativeAction_Icon (actions.EconomistNegativeAction_Icon) package actions { import mx.core.*; public class EconomistNegativeAction_Icon extends BitmapAsset { } }//package actionsSection 23//EconomistNeutralAction (actions.EconomistNeutralAction) package actions { import com.urbansquall.wrighton.*; public class EconomistNeutralAction extends GameAction { public static var Icon:Class = EconomistNeutralAction_Icon; public function EconomistNeutralAction(){ this.m_description = "Increase taxes by +10%"; this.m_icon = new Icon(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 1; } } }//package actionsSection 24//EconomistNeutralAction_Icon (actions.EconomistNeutralAction_Icon) package actions { import mx.core.*; public class EconomistNeutralAction_Icon extends BitmapAsset { } }//package actionsSection 25//EconomistPositiveAction (actions.EconomistPositiveAction) package actions { import com.urbansquall.wrighton.*; public class EconomistPositiveAction extends GameAction { public static var Icon:Class = EconomistPositiveAction_Icon; public function EconomistPositiveAction(){ this.m_description = "Increase taxes by +25%"; this.m_icon = new Icon(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -3; } } }//package actionsSection 26//EconomistPositiveAction_Icon (actions.EconomistPositiveAction_Icon) package actions { import mx.core.*; public class EconomistPositiveAction_Icon extends BitmapAsset { } }//package actionsSection 27//ElectEconomistAction (actions.ElectEconomistAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class ElectEconomistAction extends UpgradeAction { public static const DESC:String = "Elect a President that will affect taxes and bonds"; public static var action_elect_economist:Class = ElectEconomistAction_action_elect_economist; public function ElectEconomistAction(){ this.m_description = DESC; this.m_icon = new action_elect_economist(); this.m_reloadTime = 20000; this.m_upgradesTo = WhiteHouseEconomist; } } }//package actionsSection 28//ElectEconomistAction_action_elect_economist (actions.ElectEconomistAction_action_elect_economist) package actions { import mx.core.*; public class ElectEconomistAction_action_elect_economist extends BitmapAsset { } }//package actionsSection 29//ElectGlobalistAction (actions.ElectGlobalistAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class ElectGlobalistAction extends UpgradeAction { public static const DESC:String = "Elect a President that will affect imports and exports"; public static var action_elect_globalist:Class = ElectGlobalistAction_action_elect_globalist; public function ElectGlobalistAction(){ this.m_description = DESC; this.m_icon = new action_elect_globalist(); this.m_reloadTime = 20000; this.m_upgradesTo = WhiteHouseGlobalist; } } }//package actionsSection 30//ElectGlobalistAction_action_elect_globalist (actions.ElectGlobalistAction_action_elect_globalist) package actions { import mx.core.*; public class ElectGlobalistAction_action_elect_globalist extends BitmapAsset { } }//package actionsSection 31//ElectLaborerAction (actions.ElectLaborerAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class ElectLaborerAction extends UpgradeAction { public static const DESC:String = "Elect a President that will affect workers"; public static var action_elect_laborer:Class = ElectLaborerAction_action_elect_laborer; public function ElectLaborerAction(){ this.m_description = DESC; this.m_icon = new action_elect_laborer(); this.m_reloadTime = 20000; this.m_upgradesTo = WhiteHouseLaborer; } } }//package actionsSection 32//ElectLaborerAction_action_elect_laborer (actions.ElectLaborerAction_action_elect_laborer) package actions { import mx.core.*; public class ElectLaborerAction_action_elect_laborer extends BitmapAsset { } }//package actionsSection 33//EmissionsTreatyAction (actions.EmissionsTreatyAction) package actions { import com.urbansquall.wrighton.*; public class EmissionsTreatyAction extends GameAction { public static var action_treaty_emissions:Class = EmissionsTreatyAction_action_treaty_emissions; public function EmissionsTreatyAction(){ this.m_description = "Increase sales of hybrid cars"; this.m_icon = new action_treaty_emissions(); this.m_reloadTime = 180000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -5; (this.m_resources as IndecisionResources).global = 5; } } }//package actionsSection 34//EmissionsTreatyAction_action_treaty_emissions (actions.EmissionsTreatyAction_action_treaty_emissions) package actions { import mx.core.*; public class EmissionsTreatyAction_action_treaty_emissions extends BitmapAsset { } }//package actionsSection 35//ExportCarAction (actions.ExportCarAction) package actions { import com.urbansquall.wrighton.*; public class ExportCarAction extends GameAction { public static var ButtonCarImage:Class = ExportCarAction_ButtonCarImage; public function ExportCarAction(){ this.m_description = "Export Basic Car"; this.m_icon = new ButtonCarImage(); this.m_reloadTime = 10000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 195; (this.m_resources as IndecisionResources).carsBasic = -1; (this.m_resources as IndecisionResources).global = -1; } } }//package actionsSection 36//ExportCarAction_ButtonCarImage (actions.ExportCarAction_ButtonCarImage) package actions { import mx.core.*; public class ExportCarAction_ButtonCarImage extends BitmapAsset { } }//package actionsSection 37//ExportHybridAction (actions.ExportHybridAction) package actions { import com.urbansquall.wrighton.*; public class ExportHybridAction extends GameAction { public static var ButtonHybridImage:Class = ExportHybridAction_ButtonHybridImage; public function ExportHybridAction(){ this.m_description = "Export Hybrid Car"; this.m_icon = new ButtonHybridImage(); this.m_reloadTime = 10000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 900; (this.m_resources as IndecisionResources).carsHybrid = -1; (this.m_resources as IndecisionResources).global = -5; } } }//package actionsSection 38//ExportHybridAction_ButtonHybridImage (actions.ExportHybridAction_ButtonHybridImage) package actions { import mx.core.*; public class ExportHybridAction_ButtonHybridImage extends BitmapAsset { } }//package actionsSection 39//ExportSuvAction (actions.ExportSuvAction) package actions { import com.urbansquall.wrighton.*; public class ExportSuvAction extends GameAction { public static var ButtonSuvImage:Class = ExportSuvAction_ButtonSuvImage; public function ExportSuvAction(){ this.m_description = "Export SUV"; this.m_icon = new ButtonSuvImage(); this.m_reloadTime = 10000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 375; (this.m_resources as IndecisionResources).carsSuv = -1; (this.m_resources as IndecisionResources).global = -3; } } }//package actionsSection 40//ExportSuvAction_ButtonSuvImage (actions.ExportSuvAction_ButtonSuvImage) package actions { import mx.core.*; public class ExportSuvAction_ButtonSuvImage extends BitmapAsset { } }//package actionsSection 41//ForeignRetreatAction (actions.ForeignRetreatAction) package actions { import com.urbansquall.wrighton.*; public class ForeignRetreatAction extends GameAction { public static var action_war_retreat:Class = ForeignRetreatAction_action_war_retreat; public function ForeignRetreatAction(){ this.m_description = "Withdraw troops from abroad, reduces car sale effectivenes for 1 minute"; this.m_icon = new action_war_retreat(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -5; (this.m_resources as IndecisionResources).global = 5; } } }//package actionsSection 42//ForeignRetreatAction_action_war_retreat (actions.ForeignRetreatAction_action_war_retreat) package actions { import mx.core.*; public class ForeignRetreatAction_action_war_retreat extends BitmapAsset { } }//package actionsSection 43//ForeignWarAction (actions.ForeignWarAction) package actions { import com.urbansquall.wrighton.*; public class ForeignWarAction extends GameAction { public static var action_war_start:Class = ForeignWarAction_action_war_start; public function ForeignWarAction(){ this.m_description = "Start a war"; this.m_icon = new action_war_start(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 5; (this.m_resources as IndecisionResources).global = -5; } } }//package actionsSection 44//ForeignWarAction_action_war_start (actions.ForeignWarAction_action_war_start) package actions { import mx.core.*; public class ForeignWarAction_action_war_start extends BitmapAsset { } }//package actionsSection 45//FreeTradeAction (actions.FreeTradeAction) package actions { import com.urbansquall.wrighton.*; public class FreeTradeAction extends GameAction { public static var action_global_free:Class = FreeTradeAction_action_global_free; public function FreeTradeAction(){ this.m_description = "Enact Free Trade"; this.m_icon = new action_global_free(); this.m_reloadTime = 180000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -5; (this.m_resources as IndecisionResources).global = 5; } } }//package actionsSection 46//FreeTradeAction_action_global_free (actions.FreeTradeAction_action_global_free) package actions { import mx.core.*; public class FreeTradeAction_action_global_free extends BitmapAsset { } }//package actionsSection 47//GlobalistNegativeAction (actions.GlobalistNegativeAction) package actions { import com.urbansquall.wrighton.*; public class GlobalistNegativeAction extends GameAction { public static var action_tariffs_lower:Class = GlobalistNegativeAction_action_tariffs_lower; public function GlobalistNegativeAction(){ this.m_description = "Decrease cost of import purchases by -25% "; this.m_icon = new action_tariffs_lower(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).global = 5; } } }//package actionsSection 48//GlobalistNegativeAction_action_tariffs_lower (actions.GlobalistNegativeAction_action_tariffs_lower) package actions { import mx.core.*; public class GlobalistNegativeAction_action_tariffs_lower extends BitmapAsset { } }//package actionsSection 49//GlobalistNeutralAction (actions.GlobalistNeutralAction) package actions { import com.urbansquall.wrighton.*; public class GlobalistNeutralAction extends GameAction { public static var action_global_barter:Class = GlobalistNeutralAction_action_global_barter; public function GlobalistNeutralAction(){ this.m_description = "Increase amount of oil and metal received from a worker by +10%"; this.m_icon = new action_global_barter(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).global = 1; } } }//package actionsSection 50//GlobalistNeutralAction_action_global_barter (actions.GlobalistNeutralAction_action_global_barter) package actions { import mx.core.*; public class GlobalistNeutralAction_action_global_barter extends BitmapAsset { } }//package actionsSection 51//GlobalistPositiveAction (actions.GlobalistPositiveAction) package actions { import com.urbansquall.wrighton.*; public class GlobalistPositiveAction extends GameAction { public static var action_tariffs_raise:Class = GlobalistPositiveAction_action_tariffs_raise; public function GlobalistPositiveAction(){ this.m_description = "Increase money received from exports by +25% "; this.m_icon = new action_tariffs_raise(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).global = -5; } } }//package actionsSection 52//GlobalistPositiveAction_action_tariffs_raise (actions.GlobalistPositiveAction_action_tariffs_raise) package actions { import mx.core.*; public class GlobalistPositiveAction_action_tariffs_raise extends BitmapAsset { } }//package actionsSection 53//GotoStadiumAction (actions.GotoStadiumAction) package actions { import com.urbansquall.wrighton.*; public class GotoStadiumAction extends GameAction { public static var action_goto_stadium:Class = GotoStadiumAction_action_goto_stadium; public function GotoStadiumAction(){ this.m_description = "Go to the stadium"; this.m_icon = new action_goto_stadium(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -200; (this.m_resources as IndecisionResources).happiness = 9; } } }//package actionsSection 54//GotoStadiumAction_action_goto_stadium (actions.GotoStadiumAction_action_goto_stadium) package actions { import mx.core.*; public class GotoStadiumAction_action_goto_stadium extends BitmapAsset { } }//package actionsSection 55//ImpeachPresidentAction (actions.ImpeachPresidentAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class ImpeachPresidentAction extends GameAction { public static var action_president_impeach:Class = ImpeachPresidentAction_action_president_impeach; public function ImpeachPresidentAction(){ this.m_description = "Impeach the current president"; this.m_icon = new action_president_impeach(); this.m_reloadTime = 20000; this.m_objectRequirements = [[WhiteHouseEconomist, WhiteHouseGlobalist, WhiteHouseLaborer]]; this.m_resources = new IndecisionResources(); } } }//package actionsSection 56//ImpeachPresidentAction_action_president_impeach (actions.ImpeachPresidentAction_action_president_impeach) package actions { import mx.core.*; public class ImpeachPresidentAction_action_president_impeach extends BitmapAsset { } }//package actionsSection 57//ImportCarAction (actions.ImportCarAction) package actions { import com.urbansquall.wrighton.*; public class ImportCarAction extends GameAction { public static var ButtonCarImage:Class = ImportCarAction_ButtonCarImage; public function ImportCarAction(){ this.m_description = "Buy Car"; this.m_icon = new ButtonCarImage(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -140; (this.m_resources as IndecisionResources).global = 1; } } }//package actionsSection 58//ImportCarAction_ButtonCarImage (actions.ImportCarAction_ButtonCarImage) package actions { import mx.core.*; public class ImportCarAction_ButtonCarImage extends BitmapAsset { } }//package actionsSection 59//ImportHybridAction (actions.ImportHybridAction) package actions { import com.urbansquall.wrighton.*; public class ImportHybridAction extends GameAction { public static var ButtonHybridImage:Class = ImportHybridAction_ButtonHybridImage; public function ImportHybridAction(){ this.m_description = "Buy Hybrid"; this.m_icon = new ButtonHybridImage(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -652; (this.m_resources as IndecisionResources).global = 5; } } }//package actionsSection 60//ImportHybridAction_ButtonHybridImage (actions.ImportHybridAction_ButtonHybridImage) package actions { import mx.core.*; public class ImportHybridAction_ButtonHybridImage extends BitmapAsset { } }//package actionsSection 61//ImportSuvAction (actions.ImportSuvAction) package actions { import com.urbansquall.wrighton.*; public class ImportSuvAction extends GameAction { public static var ButtonSuvImage:Class = ImportSuvAction_ButtonSuvImage; public function ImportSuvAction(){ this.m_description = "Buy SUV"; this.m_icon = new ButtonSuvImage(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -303; (this.m_resources as IndecisionResources).global = 3; } } }//package actionsSection 62//ImportSuvAction_ButtonSuvImage (actions.ImportSuvAction_ButtonSuvImage) package actions { import mx.core.*; public class ImportSuvAction_ButtonSuvImage extends BitmapAsset { } }//package actionsSection 63//InvestBlueChipAction (actions.InvestBlueChipAction) package actions { import com.urbansquall.wrighton.*; public class InvestBlueChipAction extends GameAction { public static const DESC:String = "Put $300 on a blue chip stock with a 25% chance of return after 30 seconds"; public static var ButtonImage:Class = InvestBlueChipAction_ButtonImage; public function InvestBlueChipAction(){ this.m_description = DESC; this.m_icon = new ButtonImage(); this.m_reloadTime = 30000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 1; (this.m_resources as IndecisionResources).global = -1; } } }//package actionsSection 64//InvestBlueChipAction_ButtonImage (actions.InvestBlueChipAction_ButtonImage) package actions { import mx.core.*; public class InvestBlueChipAction_ButtonImage extends BitmapAsset { } }//package actionsSection 65//InvestIPOAction (actions.InvestIPOAction) package actions { import com.urbansquall.wrighton.*; public class InvestIPOAction extends GameAction { public static const DESC:String = "Put $600 on IPO with a 5% chance of return after 30 seconds"; public static var ButtonImage:Class = InvestIPOAction_ButtonImage; public function InvestIPOAction(){ this.m_description = DESC; this.m_icon = new ButtonImage(); this.m_reloadTime = 30000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -1; (this.m_resources as IndecisionResources).global = 1; } } }//package actionsSection 66//InvestIPOAction_ButtonImage (actions.InvestIPOAction_ButtonImage) package actions { import mx.core.*; public class InvestIPOAction_ButtonImage extends BitmapAsset { } }//package actionsSection 67//LaborerNegativeAction (actions.LaborerNegativeAction) package actions { import com.urbansquall.wrighton.*; public class LaborerNegativeAction extends GameAction { public static var action_labor_elderly:Class = LaborerNegativeAction_action_labor_elderly; public function LaborerNegativeAction(){ this.m_description = "Decrease amount of oil and metal received from a worker by -25%"; this.m_icon = new action_labor_elderly(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 3; } } }//package actionsSection 68//LaborerNegativeAction_action_labor_elderly (actions.LaborerNegativeAction_action_labor_elderly) package actions { import mx.core.*; public class LaborerNegativeAction_action_labor_elderly extends BitmapAsset { } }//package actionsSection 69//LaborerNeutralAction (actions.LaborerNeutralAction) package actions { import com.urbansquall.wrighton.*; public class LaborerNeutralAction extends GameAction { public static var action_labor_alien:Class = LaborerNeutralAction_action_labor_alien; public function LaborerNeutralAction(){ this.m_description = "Increase amount of oil and metal received from a worker by +10%"; this.m_icon = new action_labor_alien(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 1; } } }//package actionsSection 70//LaborerNeutralAction_action_labor_alien (actions.LaborerNeutralAction_action_labor_alien) package actions { import mx.core.*; public class LaborerNeutralAction_action_labor_alien extends BitmapAsset { } }//package actionsSection 71//LaborerPositiveAction (actions.LaborerPositiveAction) package actions { import com.urbansquall.wrighton.*; public class LaborerPositiveAction extends GameAction { public static var action_labor_child:Class = LaborerPositiveAction_action_labor_child; public function LaborerPositiveAction(){ this.m_description = "Increase amount of oil and metal received from a worker by 25%."; this.m_icon = new action_labor_child(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -3; } } }//package actionsSection 72//LaborerPositiveAction_action_labor_child (actions.LaborerPositiveAction_action_labor_child) package actions { import mx.core.*; public class LaborerPositiveAction_action_labor_child extends BitmapAsset { } }//package actionsSection 73//LowerRatesAction (actions.LowerRatesAction) package actions { import com.urbansquall.wrighton.*; public class LowerRatesAction extends GameAction { public static var action_lower_rates:Class = LowerRatesAction_action_lower_rates; public function LowerRatesAction(){ this.m_description = "Decrease interest rates, lower stock market performance"; this.m_icon = new action_lower_rates(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 1; (this.m_resources as IndecisionResources).global = -1; } } }//package actionsSection 74//LowerRatesAction_action_lower_rates (actions.LowerRatesAction_action_lower_rates) package actions { import mx.core.*; public class LowerRatesAction_action_lower_rates extends BitmapAsset { } }//package actionsSection 75//LowerTaxesAction (actions.LowerTaxesAction) package actions { import com.urbansquall.wrighton.*; public class LowerTaxesAction extends GameAction { public static var action_taxes_lower:Class = LowerTaxesAction_action_taxes_lower; public function LowerTaxesAction(){ this.m_description = "Lower taxes by 10%"; this.m_icon = new action_taxes_lower(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 5; } } }//package actionsSection 76//LowerTaxesAction_action_taxes_lower (actions.LowerTaxesAction_action_taxes_lower) package actions { import mx.core.*; public class LowerTaxesAction_action_taxes_lower extends BitmapAsset { } }//package actionsSection 77//MallShopAction (actions.MallShopAction) package actions { import com.urbansquall.wrighton.*; public class MallShopAction extends GameAction { public static var action_mall_shop:Class = MallShopAction_action_mall_shop; public function MallShopAction(){ this.m_description = "Shop at the mall"; this.m_icon = new action_mall_shop(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -50; (this.m_resources as IndecisionResources).happiness = 2; } } }//package actionsSection 78//MallShopAction_action_mall_shop (actions.MallShopAction_action_mall_shop) package actions { import mx.core.*; public class MallShopAction_action_mall_shop extends BitmapAsset { } }//package actionsSection 79//OfferCareAction (actions.OfferCareAction) package actions { import com.urbansquall.wrighton.*; public class OfferCareAction extends GameAction { public static var action_hospital_assist:Class = OfferCareAction_action_hospital_assist; public function OfferCareAction(){ this.m_description = "Offer care"; this.m_icon = new action_hospital_assist(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -100; (this.m_resources as IndecisionResources).happiness = 5; (this.m_resources as IndecisionResources).global = -1; } } }//package actionsSection 80//OfferCareAction_action_hospital_assist (actions.OfferCareAction_action_hospital_assist) package actions { import mx.core.*; public class OfferCareAction_action_hospital_assist extends BitmapAsset { } }//package actionsSection 81//OfferGovernmentCareAction (actions.OfferGovernmentCareAction) package actions { import com.urbansquall.wrighton.*; public class OfferGovernmentCareAction extends GameAction { public static var action_govt_assist:Class = OfferGovernmentCareAction_action_govt_assist; public function OfferGovernmentCareAction(){ this.m_description = "Offer care"; this.m_icon = new action_govt_assist(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).debt = -100; (this.m_resources as IndecisionResources).happiness = 1; (this.m_resources as IndecisionResources).global = 5; } } }//package actionsSection 82//OfferGovernmentCareAction_action_govt_assist (actions.OfferGovernmentCareAction_action_govt_assist) package actions { import mx.core.*; public class OfferGovernmentCareAction_action_govt_assist extends BitmapAsset { } }//package actionsSection 83//OpenBorderAction (actions.OpenBorderAction) package actions { import com.urbansquall.wrighton.*; public class OpenBorderAction extends GameAction { public static var action_border_open:Class = OpenBorderAction_action_border_open; public function OpenBorderAction(){ this.m_description = "Open the border fence"; this.m_icon = new action_border_open(); this.m_reloadTime = 0; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).totalWorkers = 10; (this.m_resources as IndecisionResources).workers = 0; (this.m_resources as IndecisionResources).happiness = -20; (this.m_resources as IndecisionResources).global = 20; } } }//package actionsSection 84//OpenBorderAction_action_border_open (actions.OpenBorderAction_action_border_open) package actions { import mx.core.*; public class OpenBorderAction_action_border_open extends BitmapAsset { } }//package actionsSection 85//OutsourceCreateCarAction (actions.OutsourceCreateCarAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class OutsourceCreateCarAction extends GameAction { public static var ButtonCarImage:Class = OutsourceCreateCarAction_ButtonCarImage; public function OutsourceCreateCarAction(){ this.m_description = "Create Car"; this.m_icon = new ButtonCarImage(); this.m_objectRequirements = [CarFactory]; this.m_reloadTime = 40000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).oil = -2; (this.m_resources as IndecisionResources).metal = -4; (this.m_resources as IndecisionResources).money = -112; (this.m_resources as IndecisionResources).happiness = -1; (this.m_resources as IndecisionResources).global = 1; (this.m_resources as IndecisionResources).carsBasic = 1; } } }//package actionsSection 86//OutsourceCreateCarAction_ButtonCarImage (actions.OutsourceCreateCarAction_ButtonCarImage) package actions { import mx.core.*; public class OutsourceCreateCarAction_ButtonCarImage extends BitmapAsset { } }//package actionsSection 87//OutsourceCreateHybridAction (actions.OutsourceCreateHybridAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class OutsourceCreateHybridAction extends GameAction { public static var ButtonHybridImage:Class = OutsourceCreateHybridAction_ButtonHybridImage; public function OutsourceCreateHybridAction(){ this.m_description = "Create Hybrid"; this.m_icon = new ButtonHybridImage(); this.m_objectRequirements = [HybridFactory]; this.m_reloadTime = 40000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).oil = -6; (this.m_resources as IndecisionResources).money = -450; (this.m_resources as IndecisionResources).happiness = -5; (this.m_resources as IndecisionResources).global = 5; (this.m_resources as IndecisionResources).carsHybrid = 1; } } }//package actionsSection 88//OutsourceCreateHybridAction_ButtonHybridImage (actions.OutsourceCreateHybridAction_ButtonHybridImage) package actions { import mx.core.*; public class OutsourceCreateHybridAction_ButtonHybridImage extends BitmapAsset { } }//package actionsSection 89//OutsourceCreateSuvAction (actions.OutsourceCreateSuvAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class OutsourceCreateSuvAction extends GameAction { public static var ButtonSuvImage:Class = OutsourceCreateSuvAction_ButtonSuvImage; public function OutsourceCreateSuvAction(){ this.m_description = "Create SUV"; this.m_icon = new ButtonSuvImage(); this.m_objectRequirements = [SuvFactory]; this.m_reloadTime = 40000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).oil = -4; (this.m_resources as IndecisionResources).metal = -8; (this.m_resources as IndecisionResources).money = -225; (this.m_resources as IndecisionResources).happiness = -3; (this.m_resources as IndecisionResources).global = 3; (this.m_resources as IndecisionResources).carsSuv = 1; } } }//package actionsSection 90//OutsourceCreateSuvAction_ButtonSuvImage (actions.OutsourceCreateSuvAction_ButtonSuvImage) package actions { import mx.core.*; public class OutsourceCreateSuvAction_ButtonSuvImage extends BitmapAsset { } }//package actionsSection 91//PayDebtAction (actions.PayDebtAction) package actions { import com.urbansquall.wrighton.*; public class PayDebtAction extends GameAction { public static var ButtonPayDebt:Class = PayDebtAction_ButtonPayDebt; public function PayDebtAction(){ this.m_description = "Pay Some Debt"; this.m_icon = new ButtonPayDebt(); this.m_reloadTime = 1000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -1000; (this.m_resources as IndecisionResources).debt = 1000; (this.m_resources as IndecisionResources).happiness = 1; } } }//package actionsSection 92//PayDebtAction_ButtonPayDebt (actions.PayDebtAction_ButtonPayDebt) package actions { import mx.core.*; public class PayDebtAction_ButtonPayDebt extends BitmapAsset { } }//package actionsSection 93//PayDebtMoreAction (actions.PayDebtMoreAction) package actions { import com.urbansquall.wrighton.*; public class PayDebtMoreAction extends GameAction { public static var ButtonPayDebt:Class = PayDebtMoreAction_ButtonPayDebt; public function PayDebtMoreAction(){ this.m_description = "Pay More Debt"; this.m_icon = new ButtonPayDebt(); this.m_reloadTime = 1000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -5000; (this.m_resources as IndecisionResources).debt = 5000; (this.m_resources as IndecisionResources).happiness = 5; } } }//package actionsSection 94//PayDebtMoreAction_ButtonPayDebt (actions.PayDebtMoreAction_ButtonPayDebt) package actions { import mx.core.*; public class PayDebtMoreAction_ButtonPayDebt extends BitmapAsset { } }//package actionsSection 95//PrepareProtectionAction (actions.PrepareProtectionAction) package actions { import com.urbansquall.wrighton.*; public class PrepareProtectionAction extends GameAction { public static var action_workers_prepare:Class = PrepareProtectionAction_action_workers_prepare; public function PrepareProtectionAction(){ this.m_description = "Prepare for disaster, +25% protection over a longer period"; this.m_icon = new action_workers_prepare(); this.m_reloadTime = 40000; this.m_resources = new IndecisionResources(); } } }//package actionsSection 96//PrepareProtectionAction_action_workers_prepare (actions.PrepareProtectionAction_action_workers_prepare) package actions { import mx.core.*; public class PrepareProtectionAction_action_workers_prepare extends BitmapAsset { } }//package actionsSection 97//RaiseRatesAction (actions.RaiseRatesAction) package actions { import com.urbansquall.wrighton.*; public class RaiseRatesAction extends GameAction { public static var action_raise_rates:Class = RaiseRatesAction_action_raise_rates; public function RaiseRatesAction(){ this.m_description = "Increase interest rates, increase stock market performance"; this.m_icon = new action_raise_rates(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -1; (this.m_resources as IndecisionResources).global = 1; } } }//package actionsSection 98//RaiseRatesAction_action_raise_rates (actions.RaiseRatesAction_action_raise_rates) package actions { import mx.core.*; public class RaiseRatesAction_action_raise_rates extends BitmapAsset { } }//package actionsSection 99//RaiseTaxesAction (actions.RaiseTaxesAction) package actions { import com.urbansquall.wrighton.*; public class RaiseTaxesAction extends GameAction { public static var action_taxes_raise:Class = RaiseTaxesAction_action_taxes_raise; public function RaiseTaxesAction(){ this.m_description = "Raise taxes by 10%"; this.m_icon = new action_taxes_raise(); this.m_reloadTime = 20000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -5; } } }//package actionsSection 100//RaiseTaxesAction_action_taxes_raise (actions.RaiseTaxesAction_action_taxes_raise) package actions { import mx.core.*; public class RaiseTaxesAction_action_taxes_raise extends BitmapAsset { } }//package actionsSection 101//RepairDamagedBuildingAction (actions.RepairDamagedBuildingAction) package actions { import com.urbansquall.wrighton.*; public class RepairDamagedBuildingAction extends GameAction { public static var action_rebuild:Class = RepairDamagedBuildingAction_action_rebuild; public function RepairDamagedBuildingAction(){ this.m_description = "Rebuild a destroyed building"; this.m_icon = new action_rebuild(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); } } }//package actionsSection 102//RepairDamagedBuildingAction_action_rebuild (actions.RepairDamagedBuildingAction_action_rebuild) package actions { import mx.core.*; public class RepairDamagedBuildingAction_action_rebuild extends BitmapAsset { } }//package actionsSection 103//SellCarAction (actions.SellCarAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class SellCarAction extends GameAction { public static var ButtonCarImage:Class = SellCarAction_ButtonCarImage; public function SellCarAction(){ this.m_description = "Sell Car"; this.m_icon = new ButtonCarImage(); this.m_reloadTime = 2000; this.m_objectRequirements = [GasStation]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 187; (this.m_resources as IndecisionResources).carsBasic = -1; (this.m_resources as IndecisionResources).happiness = 1; } } }//package actionsSection 104//SellCarAction_ButtonCarImage (actions.SellCarAction_ButtonCarImage) package actions { import mx.core.*; public class SellCarAction_ButtonCarImage extends BitmapAsset { } }//package actionsSection 105//SellCarBulkAction (actions.SellCarBulkAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class SellCarBulkAction extends GameAction { public static var ButtonCarImage:Class = SellCarBulkAction_ButtonCarImage; public function SellCarBulkAction(){ this.m_description = "Sell Car in Bulk"; this.m_icon = new ButtonCarImage(); this.m_reloadTime = 2000; this.m_objectRequirements = [GasStation]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 617; (this.m_resources as IndecisionResources).carsBasic = -3; (this.m_resources as IndecisionResources).happiness = 1; (this.m_resources as IndecisionResources).global = -1; } } }//package actionsSection 106//SellCarBulkAction_ButtonCarImage (actions.SellCarBulkAction_ButtonCarImage) package actions { import mx.core.*; public class SellCarBulkAction_ButtonCarImage extends BitmapAsset { } }//package actionsSection 107//SellHybridAction (actions.SellHybridAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class SellHybridAction extends GameAction { public static var ButtonHybridImage:Class = SellHybridAction_ButtonHybridImage; public function SellHybridAction(){ this.m_description = "Sell Hybrid"; this.m_icon = new ButtonHybridImage(); this.m_reloadTime = 2000; this.m_objectRequirements = [GasStation]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 870; (this.m_resources as IndecisionResources).carsHybrid = -1; (this.m_resources as IndecisionResources).happiness = 5; } } }//package actionsSection 108//SellHybridAction_ButtonHybridImage (actions.SellHybridAction_ButtonHybridImage) package actions { import mx.core.*; public class SellHybridAction_ButtonHybridImage extends BitmapAsset { } }//package actionsSection 109//SellHybridBulkAction (actions.SellHybridBulkAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class SellHybridBulkAction extends GameAction { public static var ButtonHybridImage:Class = SellHybridBulkAction_ButtonHybridImage; public function SellHybridBulkAction(){ this.m_description = "Sell Hybrid in Bulk"; this.m_icon = new ButtonHybridImage(); this.m_reloadTime = 2000; this.m_objectRequirements = [GasStation]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 3000; (this.m_resources as IndecisionResources).carsHybrid = -3; (this.m_resources as IndecisionResources).happiness = 5; (this.m_resources as IndecisionResources).global = -5; } } }//package actionsSection 110//SellHybridBulkAction_ButtonHybridImage (actions.SellHybridBulkAction_ButtonHybridImage) package actions { import mx.core.*; public class SellHybridBulkAction_ButtonHybridImage extends BitmapAsset { } }//package actionsSection 111//SellSuvAction (actions.SellSuvAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class SellSuvAction extends GameAction { public static var ButtonSuvImage:Class = SellSuvAction_ButtonSuvImage; public function SellSuvAction(){ this.m_description = "Sell SUV"; this.m_icon = new ButtonSuvImage(); this.m_reloadTime = 2000; this.m_objectRequirements = [GasStation]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 405; (this.m_resources as IndecisionResources).carsSuv = -1; (this.m_resources as IndecisionResources).happiness = 3; } } }//package actionsSection 112//SellSuvAction_ButtonSuvImage (actions.SellSuvAction_ButtonSuvImage) package actions { import mx.core.*; public class SellSuvAction_ButtonSuvImage extends BitmapAsset { } }//package actionsSection 113//SellSuvBulkAction (actions.SellSuvBulkAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class SellSuvBulkAction extends GameAction { public static var ButtonSuvImage:Class = SellSuvBulkAction_ButtonSuvImage; public function SellSuvBulkAction(){ this.m_description = "Sell SUV in Bulk"; this.m_icon = new ButtonSuvImage(); this.m_reloadTime = 2000; this.m_objectRequirements = [GasStation]; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = 1336; (this.m_resources as IndecisionResources).carsSuv = -3; (this.m_resources as IndecisionResources).happiness = 3; (this.m_resources as IndecisionResources).global = -3; } } }//package actionsSection 114//SellSuvBulkAction_ButtonSuvImage (actions.SellSuvBulkAction_ButtonSuvImage) package actions { import mx.core.*; public class SellSuvBulkAction_ButtonSuvImage extends BitmapAsset { } }//package actionsSection 115//StockMarketPayDebt (actions.StockMarketPayDebt) package actions { import com.urbansquall.wrighton.*; public class StockMarketPayDebt extends GameAction { public static var action_debt_pay:Class = StockMarketPayDebt_action_debt_pay; public function StockMarketPayDebt(){ this.m_description = "Pay off some debt"; this.m_icon = new action_debt_pay(); this.m_reloadTime = 1000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = 3; (this.m_resources as IndecisionResources).money = -300; (this.m_resources as IndecisionResources).debt = 300; } } }//package actionsSection 116//StockMarketPayDebt_action_debt_pay (actions.StockMarketPayDebt_action_debt_pay) package actions { import mx.core.*; public class StockMarketPayDebt_action_debt_pay extends BitmapAsset { } }//package actionsSection 117//TakeOutLoanAction (actions.TakeOutLoanAction) package actions { import com.urbansquall.wrighton.*; public class TakeOutLoanAction extends GameAction { public static var ButtonLoan:Class = TakeOutLoanAction_ButtonLoan; public function TakeOutLoanAction(){ this.m_description = "Take Out Loan"; this.m_icon = new ButtonLoan(); this.m_reloadTime = 30000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).happiness = -5; } } }//package actionsSection 118//TakeOutLoanAction_ButtonLoan (actions.TakeOutLoanAction_ButtonLoan) package actions { import mx.core.*; public class TakeOutLoanAction_ButtonLoan extends BitmapAsset { } }//package actionsSection 119//UnlockHybridAction (actions.UnlockHybridAction) package actions { import com.urbansquall.wrighton.*; public class UnlockHybridAction extends GameAction { public static var Icon:Class = UnlockHybridAction_Icon; public function UnlockHybridAction(){ this.m_icon = new Icon(); this.m_description = "Unlock Hybrid Car Factories"; this.m_reloadTime = 60000; } } }//package actionsSection 120//UnlockHybridAction_Icon (actions.UnlockHybridAction_Icon) package actions { import mx.core.*; public class UnlockHybridAction_Icon extends BitmapAsset { } }//package actionsSection 121//UnlockMining2Action (actions.UnlockMining2Action) package actions { import com.urbansquall.wrighton.*; public class UnlockMining2Action extends GameAction { public static var Icon:Class = UnlockMining2Action_Icon; public function UnlockMining2Action(){ this.m_icon = new Icon(); this.m_description = "Unlock Level 2 Mining Facilities"; this.m_reloadTime = 60000; } } }//package actionsSection 122//UnlockMining2Action_Icon (actions.UnlockMining2Action_Icon) package actions { import mx.core.*; public class UnlockMining2Action_Icon extends BitmapAsset { } }//package actionsSection 123//UnlockMining3Action (actions.UnlockMining3Action) package actions { import com.urbansquall.wrighton.*; public class UnlockMining3Action extends GameAction { public static var Icon:Class = UnlockMining3Action_Icon; public function UnlockMining3Action(){ this.m_icon = new Icon(); this.m_description = "Unlock Level 3 Mining Facilities"; this.m_reloadTime = 60000; } } }//package actionsSection 124//UnlockMining3Action_Icon (actions.UnlockMining3Action_Icon) package actions { import mx.core.*; public class UnlockMining3Action_Icon extends BitmapAsset { } }//package actionsSection 125//UnlockOilRefinery3Action (actions.UnlockOilRefinery3Action) package actions { import com.urbansquall.wrighton.*; public class UnlockOilRefinery3Action extends GameAction { public static var Icon:Class = UnlockOilRefinery3Action_Icon; public function UnlockOilRefinery3Action(){ this.m_icon = new Icon(); this.m_description = "Unlock Level 3 Oil Refineries"; this.m_reloadTime = 60000; } } }//package actionsSection 126//UnlockOilRefinery3Action_Icon (actions.UnlockOilRefinery3Action_Icon) package actions { import mx.core.*; public class UnlockOilRefinery3Action_Icon extends BitmapAsset { } }//package actionsSection 127//UnlockSuvAction (actions.UnlockSuvAction) package actions { import com.urbansquall.wrighton.*; public class UnlockSuvAction extends GameAction { public static var Icon:Class = UnlockSuvAction_Icon; public function UnlockSuvAction(){ this.m_icon = new Icon(); this.m_description = "Unlock Suv Car Factories"; this.m_reloadTime = 60000; } } }//package actionsSection 128//UnlockSuvAction_Icon (actions.UnlockSuvAction_Icon) package actions { import mx.core.*; public class UnlockSuvAction_Icon extends BitmapAsset { } }//package actionsSection 129//UpgradeCarFactoryAction (actions.UpgradeCarFactoryAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class UpgradeCarFactoryAction extends UpgradeAction { public static var UpgradeImage:Class = UpgradeCarFactoryAction_UpgradeImage; public function UpgradeCarFactoryAction(){ this.m_icon = new UpgradeImage(); this.m_objectRequirements = [ResearchFacility]; this.m_upgradesTo = SuvFactory; this.m_reloadTime = 0; } } }//package actionsSection 130//UpgradeCarFactoryAction_UpgradeImage (actions.UpgradeCarFactoryAction_UpgradeImage) package actions { import mx.core.*; public class UpgradeCarFactoryAction_UpgradeImage extends BitmapAsset { } }//package actionsSection 131//UpgradeMiningFacilityAction (actions.UpgradeMiningFacilityAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class UpgradeMiningFacilityAction extends UpgradeAction { public static var UpgradeImage:Class = UpgradeMiningFacilityAction_UpgradeImage; public function UpgradeMiningFacilityAction(){ this.m_icon = new UpgradeImage(); this.m_objectRequirements = [ResearchFacility]; this.m_description = "Upgrade to a total of 5 workers"; this.m_upgradesTo = MiningFacilityLevel2; this.m_reloadTime = 20000; } } }//package actionsSection 132//UpgradeMiningFacilityAction_UpgradeImage (actions.UpgradeMiningFacilityAction_UpgradeImage) package actions { import mx.core.*; public class UpgradeMiningFacilityAction_UpgradeImage extends BitmapAsset { } }//package actionsSection 133//UpgradeMiningFacilityLevel2Action (actions.UpgradeMiningFacilityLevel2Action) package actions { import com.urbansquall.wrighton.*; import objects.*; public class UpgradeMiningFacilityLevel2Action extends UpgradeAction { public static var UpgradeImage:Class = UpgradeMiningFacilityLevel2Action_UpgradeImage; public function UpgradeMiningFacilityLevel2Action(){ this.m_icon = new UpgradeImage(); this.m_objectRequirements = [ResearchFacility]; this.m_upgradesTo = MiningFacilityLevel3; this.m_reloadTime = 20000; } } }//package actionsSection 134//UpgradeMiningFacilityLevel2Action_UpgradeImage (actions.UpgradeMiningFacilityLevel2Action_UpgradeImage) package actions { import mx.core.*; public class UpgradeMiningFacilityLevel2Action_UpgradeImage extends BitmapAsset { } }//package actionsSection 135//UpgradeOilRefineryAction (actions.UpgradeOilRefineryAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class UpgradeOilRefineryAction extends UpgradeAction { public static var UpgradeImage:Class = UpgradeOilRefineryAction_UpgradeImage; public function UpgradeOilRefineryAction(){ this.m_icon = new UpgradeImage(); this.m_upgradesTo = OilRefineryLevel2; this.m_reloadTime = 20000; } } }//package actionsSection 136//UpgradeOilRefineryAction_UpgradeImage (actions.UpgradeOilRefineryAction_UpgradeImage) package actions { import mx.core.*; public class UpgradeOilRefineryAction_UpgradeImage extends BitmapAsset { } }//package actionsSection 137//UpgradeOilRefineryLevel2Action (actions.UpgradeOilRefineryLevel2Action) package actions { import com.urbansquall.wrighton.*; import objects.*; public class UpgradeOilRefineryLevel2Action extends UpgradeAction { public static var UpgradeImage:Class = UpgradeOilRefineryLevel2Action_UpgradeImage; public function UpgradeOilRefineryLevel2Action(){ this.m_icon = new UpgradeImage(); this.m_objectRequirements = [ResearchFacility]; this.m_upgradesTo = OilRefineryLevel3; this.m_reloadTime = 20000; } } }//package actionsSection 138//UpgradeOilRefineryLevel2Action_UpgradeImage (actions.UpgradeOilRefineryLevel2Action_UpgradeImage) package actions { import mx.core.*; public class UpgradeOilRefineryLevel2Action_UpgradeImage extends BitmapAsset { } }//package actionsSection 139//UpgradeSuvFactoryAction (actions.UpgradeSuvFactoryAction) package actions { import com.urbansquall.wrighton.*; import objects.*; public class UpgradeSuvFactoryAction extends UpgradeAction { public static var UpgradeImage:Class = UpgradeSuvFactoryAction_UpgradeImage; public function UpgradeSuvFactoryAction(){ this.m_icon = new UpgradeImage(); this.m_objectRequirements = [ResearchFacility]; this.m_upgradesTo = HybridFactory; this.m_reloadTime = 0; } } }//package actionsSection 140//UpgradeSuvFactoryAction_UpgradeImage (actions.UpgradeSuvFactoryAction_UpgradeImage) package actions { import mx.core.*; public class UpgradeSuvFactoryAction_UpgradeImage extends BitmapAsset { } }//package actionsSection 141//WatchMovieAction (actions.WatchMovieAction) package actions { import com.urbansquall.wrighton.*; public class WatchMovieAction extends GameAction { public static var action_watch_movies:Class = WatchMovieAction_action_watch_movies; public function WatchMovieAction(){ this.m_description = "Watch a movie"; this.m_icon = new action_watch_movies(); this.m_reloadTime = 60000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -125; (this.m_resources as IndecisionResources).happiness = 5; } } }//package actionsSection 142//WatchMovieAction_action_watch_movies (actions.WatchMovieAction_action_watch_movies) package actions { import mx.core.*; public class WatchMovieAction_action_watch_movies extends BitmapAsset { } }//package actionsSection 143//VisitParkAction (actions.VisitParkAction) package actions { import com.urbansquall.wrighton.*; public class VisitParkAction extends GameAction { public static var actions_visit_park:Class = VisitParkAction_actions_visit_park; public function VisitParkAction(){ this.m_description = "Visit the park"; this.m_icon = new actions_visit_park(); this.m_reloadTime = 30000; this.m_resources = new IndecisionResources(); (this.m_resources as IndecisionResources).money = -25; (this.m_resources as IndecisionResources).happiness = 1; } } }//package actionsSection 144//VisitParkAction_actions_visit_park (actions.VisitParkAction_actions_visit_park) package actions { import mx.core.*; public class VisitParkAction_actions_visit_park extends BitmapAsset { } }//package actionsSection 145//CarAutomataType (automata.CarAutomataType) package automata { import com.urbansquall.wrighton.*; public class CarAutomataType extends AutomataType { public static var CarSE:Class = CarAutomataType_CarSE; public static var CarSW:Class = CarAutomataType_CarSW; public static var CarNE:Class = CarAutomataType_CarNE; public static var CarNW:Class = CarAutomataType_CarNW; public function CarAutomataType(){ m_speedModifier = 1; createAnimation(Automata.DIRECTION_NE, CarNE); createAnimation(Automata.DIRECTION_NW, CarNW); createAnimation(Automata.DIRECTION_SE, CarSE); createAnimation(Automata.DIRECTION_SW, CarSW); } } }//package automataSection 146//CarAutomataType_CarNE (automata.CarAutomataType_CarNE) package automata { import mx.core.*; public class CarAutomataType_CarNE extends BitmapAsset { } }//package automataSection 147//CarAutomataType_CarNW (automata.CarAutomataType_CarNW) package automata { import mx.core.*; public class CarAutomataType_CarNW extends BitmapAsset { } }//package automataSection 148//CarAutomataType_CarSE (automata.CarAutomataType_CarSE) package automata { import mx.core.*; public class CarAutomataType_CarSE extends BitmapAsset { } }//package automataSection 149//CarAutomataType_CarSW (automata.CarAutomataType_CarSW) package automata { import mx.core.*; public class CarAutomataType_CarSW extends BitmapAsset { } }//package automataSection 150//HybridAutomataType (automata.HybridAutomataType) package automata { import com.urbansquall.wrighton.*; public class HybridAutomataType extends AutomataType { public static var CarSE:Class = HybridAutomataType_CarSE; public static var CarSW:Class = HybridAutomataType_CarSW; public static var CarNE:Class = HybridAutomataType_CarNE; public static var CarNW:Class = HybridAutomataType_CarNW; public function HybridAutomataType(){ m_speedModifier = 1.1; createAnimation(Automata.DIRECTION_NE, CarNE); createAnimation(Automata.DIRECTION_NW, CarNW); createAnimation(Automata.DIRECTION_SE, CarSE); createAnimation(Automata.DIRECTION_SW, CarSW); } } }//package automataSection 151//HybridAutomataType_CarNE (automata.HybridAutomataType_CarNE) package automata { import mx.core.*; public class HybridAutomataType_CarNE extends BitmapAsset { } }//package automataSection 152//HybridAutomataType_CarNW (automata.HybridAutomataType_CarNW) package automata { import mx.core.*; public class HybridAutomataType_CarNW extends BitmapAsset { } }//package automataSection 153//HybridAutomataType_CarSE (automata.HybridAutomataType_CarSE) package automata { import mx.core.*; public class HybridAutomataType_CarSE extends BitmapAsset { } }//package automataSection 154//HybridAutomataType_CarSW (automata.HybridAutomataType_CarSW) package automata { import mx.core.*; public class HybridAutomataType_CarSW extends BitmapAsset { } }//package automataSection 155//PersonAutomataType (automata.PersonAutomataType) package automata { import com.urbansquall.wrighton.*; public class PersonAutomataType extends AutomataType { public static var Person1Front1:Class = PersonAutomataType_Person1Front1; public static var Person1Front2:Class = PersonAutomataType_Person1Front2; public static var Person1Front3:Class = PersonAutomataType_Person1Front3; public static var Person1Front4:Class = PersonAutomataType_Person1Front4; public static var Person1Front5:Class = PersonAutomataType_Person1Front5; public static var Person1Front6:Class = PersonAutomataType_Person1Front6; public static var Person3Front5:Class = PersonAutomataType_Person3Front5; public static var Person3Front1:Class = PersonAutomataType_Person3Front1; public static var Person1Back1:Class = PersonAutomataType_Person1Back1; public static var Person1Back2:Class = PersonAutomataType_Person1Back2; public static var Person1Back3:Class = PersonAutomataType_Person1Back3; public static var Person1Back4:Class = PersonAutomataType_Person1Back4; public static var Person1Back5:Class = PersonAutomataType_Person1Back5; public static var Person1Back6:Class = PersonAutomataType_Person1Back6; public static var Person3Front2:Class = PersonAutomataType_Person3Front2; public static var Person3Front3:Class = PersonAutomataType_Person3Front3; public static var Person3Front4:Class = PersonAutomataType_Person3Front4; public static var Person3Front6:Class = PersonAutomataType_Person3Front6; public static var Person2Back1:Class = PersonAutomataType_Person2Back1; public static var Person2Back3:Class = PersonAutomataType_Person2Back3; public static var Person2Back5:Class = PersonAutomataType_Person2Back5; public static var Person2Back2:Class = PersonAutomataType_Person2Back2; public static var Person2Back4:Class = PersonAutomataType_Person2Back4; public static var Person2Back6:Class = PersonAutomataType_Person2Back6; public static var Person2Front1:Class = PersonAutomataType_Person2Front1; public static var Person2Front3:Class = PersonAutomataType_Person2Front3; public static var Person2Front4:Class = PersonAutomataType_Person2Front4; public static var Person2Front5:Class = PersonAutomataType_Person2Front5; public static var Person2Front6:Class = PersonAutomataType_Person2Front6; public static var Person2Front2:Class = PersonAutomataType_Person2Front2; public static var Person3Back3:Class = PersonAutomataType_Person3Back3; public static var Person3Back4:Class = PersonAutomataType_Person3Back4; public static var Person3Back5:Class = PersonAutomataType_Person3Back5; public static var Person3Back6:Class = PersonAutomataType_Person3Back6; public static var Person3Back1:Class = PersonAutomataType_Person3Back1; public static var Person3Back2:Class = PersonAutomataType_Person3Back2; public function PersonAutomataType(){ m_speedModifier = 0.8; var _local1:Number = Math.random(); if (_local1 > 0.66){ createAnimation(Automata.DIRECTION_S, Person1Front1, Person1Front2, Person1Front3, Person1Front4, Person1Front5, Person1Front6); createAnimation(Automata.DIRECTION_N, Person1Back1, Person1Back2, Person1Back3, Person1Back4, Person1Back5, Person1Back6); } else { if (_local1 > 0.33){ createAnimation(Automata.DIRECTION_S, Person2Front1, Person2Front2, Person2Front3, Person2Front4, Person2Front5, Person2Front6); createAnimation(Automata.DIRECTION_N, Person2Back1, Person2Back2, Person2Back3, Person2Back4, Person2Back5, Person2Back6); } else { createAnimation(Automata.DIRECTION_S, Person3Front1, Person3Front2, Person3Front3, Person3Front4, Person3Front5, Person3Front6); createAnimation(Automata.DIRECTION_N, Person3Back1, Person3Back2, Person3Back3, Person3Back4, Person3Back5, Person3Back6); }; }; } } }//package automataSection 156//PersonAutomataType_Person1Back1 (automata.PersonAutomataType_Person1Back1) package automata { import mx.core.*; public class PersonAutomataType_Person1Back1 extends BitmapAsset { } }//package automataSection 157//PersonAutomataType_Person1Back2 (automata.PersonAutomataType_Person1Back2) package automata { import mx.core.*; public class PersonAutomataType_Person1Back2 extends BitmapAsset { } }//package automataSection 158//PersonAutomataType_Person1Back3 (automata.PersonAutomataType_Person1Back3) package automata { import mx.core.*; public class PersonAutomataType_Person1Back3 extends BitmapAsset { } }//package automataSection 159//PersonAutomataType_Person1Back4 (automata.PersonAutomataType_Person1Back4) package automata { import mx.core.*; public class PersonAutomataType_Person1Back4 extends BitmapAsset { } }//package automataSection 160//PersonAutomataType_Person1Back5 (automata.PersonAutomataType_Person1Back5) package automata { import mx.core.*; public class PersonAutomataType_Person1Back5 extends BitmapAsset { } }//package automataSection 161//PersonAutomataType_Person1Back6 (automata.PersonAutomataType_Person1Back6) package automata { import mx.core.*; public class PersonAutomataType_Person1Back6 extends BitmapAsset { } }//package automataSection 162//PersonAutomataType_Person1Front1 (automata.PersonAutomataType_Person1Front1) package automata { import mx.core.*; public class PersonAutomataType_Person1Front1 extends BitmapAsset { } }//package automataSection 163//PersonAutomataType_Person1Front2 (automata.PersonAutomataType_Person1Front2) package automata { import mx.core.*; public class PersonAutomataType_Person1Front2 extends BitmapAsset { } }//package automataSection 164//PersonAutomataType_Person1Front3 (automata.PersonAutomataType_Person1Front3) package automata { import mx.core.*; public class PersonAutomataType_Person1Front3 extends BitmapAsset { } }//package automataSection 165//PersonAutomataType_Person1Front4 (automata.PersonAutomataType_Person1Front4) package automata { import mx.core.*; public class PersonAutomataType_Person1Front4 extends BitmapAsset { } }//package automataSection 166//PersonAutomataType_Person1Front5 (automata.PersonAutomataType_Person1Front5) package automata { import mx.core.*; public class PersonAutomataType_Person1Front5 extends BitmapAsset { } }//package automataSection 167//PersonAutomataType_Person1Front6 (automata.PersonAutomataType_Person1Front6) package automata { import mx.core.*; public class PersonAutomataType_Person1Front6 extends BitmapAsset { } }//package automataSection 168//PersonAutomataType_Person2Back1 (automata.PersonAutomataType_Person2Back1) package automata { import mx.core.*; public class PersonAutomataType_Person2Back1 extends BitmapAsset { } }//package automataSection 169//PersonAutomataType_Person2Back2 (automata.PersonAutomataType_Person2Back2) package automata { import mx.core.*; public class PersonAutomataType_Person2Back2 extends BitmapAsset { } }//package automataSection 170//PersonAutomataType_Person2Back3 (automata.PersonAutomataType_Person2Back3) package automata { import mx.core.*; public class PersonAutomataType_Person2Back3 extends BitmapAsset { } }//package automataSection 171//PersonAutomataType_Person2Back4 (automata.PersonAutomataType_Person2Back4) package automata { import mx.core.*; public class PersonAutomataType_Person2Back4 extends BitmapAsset { } }//package automataSection 172//PersonAutomataType_Person2Back5 (automata.PersonAutomataType_Person2Back5) package automata { import mx.core.*; public class PersonAutomataType_Person2Back5 extends BitmapAsset { } }//package automataSection 173//PersonAutomataType_Person2Back6 (automata.PersonAutomataType_Person2Back6) package automata { import mx.core.*; public class PersonAutomataType_Person2Back6 extends BitmapAsset { } }//package automataSection 174//PersonAutomataType_Person2Front1 (automata.PersonAutomataType_Person2Front1) package automata { import mx.core.*; public class PersonAutomataType_Person2Front1 extends BitmapAsset { } }//package automataSection 175//PersonAutomataType_Person2Front2 (automata.PersonAutomataType_Person2Front2) package automata { import mx.core.*; public class PersonAutomataType_Person2Front2 extends BitmapAsset { } }//package automataSection 176//PersonAutomataType_Person2Front3 (automata.PersonAutomataType_Person2Front3) package automata { import mx.core.*; public class PersonAutomataType_Person2Front3 extends BitmapAsset { } }//package automataSection 177//PersonAutomataType_Person2Front4 (automata.PersonAutomataType_Person2Front4) package automata { import mx.core.*; public class PersonAutomataType_Person2Front4 extends BitmapAsset { } }//package automataSection 178//PersonAutomataType_Person2Front5 (automata.PersonAutomataType_Person2Front5) package automata { import mx.core.*; public class PersonAutomataType_Person2Front5 extends BitmapAsset { } }//package automataSection 179//PersonAutomataType_Person2Front6 (automata.PersonAutomataType_Person2Front6) package automata { import mx.core.*; public class PersonAutomataType_Person2Front6 extends BitmapAsset { } }//package automataSection 180//PersonAutomataType_Person3Back1 (automata.PersonAutomataType_Person3Back1) package automata { import mx.core.*; public class PersonAutomataType_Person3Back1 extends BitmapAsset { } }//package automataSection 181//PersonAutomataType_Person3Back2 (automata.PersonAutomataType_Person3Back2) package automata { import mx.core.*; public class PersonAutomataType_Person3Back2 extends BitmapAsset { } }//package automataSection 182//PersonAutomataType_Person3Back3 (automata.PersonAutomataType_Person3Back3) package automata { import mx.core.*; public class PersonAutomataType_Person3Back3 extends BitmapAsset { } }//package automataSection 183//PersonAutomataType_Person3Back4 (automata.PersonAutomataType_Person3Back4) package automata { import mx.core.*; public class PersonAutomataType_Person3Back4 extends BitmapAsset { } }//package automataSection 184//PersonAutomataType_Person3Back5 (automata.PersonAutomataType_Person3Back5) package automata { import mx.core.*; public class PersonAutomataType_Person3Back5 extends BitmapAsset { } }//package automataSection 185//PersonAutomataType_Person3Back6 (automata.PersonAutomataType_Person3Back6) package automata { import mx.core.*; public class PersonAutomataType_Person3Back6 extends BitmapAsset { } }//package automataSection 186//PersonAutomataType_Person3Front1 (automata.PersonAutomataType_Person3Front1) package automata { import mx.core.*; public class PersonAutomataType_Person3Front1 extends BitmapAsset { } }//package automataSection 187//PersonAutomataType_Person3Front2 (automata.PersonAutomataType_Person3Front2) package automata { import mx.core.*; public class PersonAutomataType_Person3Front2 extends BitmapAsset { } }//package automataSection 188//PersonAutomataType_Person3Front3 (automata.PersonAutomataType_Person3Front3) package automata { import mx.core.*; public class PersonAutomataType_Person3Front3 extends BitmapAsset { } }//package automataSection 189//PersonAutomataType_Person3Front4 (automata.PersonAutomataType_Person3Front4) package automata { import mx.core.*; public class PersonAutomataType_Person3Front4 extends BitmapAsset { } }//package automataSection 190//PersonAutomataType_Person3Front5 (automata.PersonAutomataType_Person3Front5) package automata { import mx.core.*; public class PersonAutomataType_Person3Front5 extends BitmapAsset { } }//package automataSection 191//PersonAutomataType_Person3Front6 (automata.PersonAutomataType_Person3Front6) package automata { import mx.core.*; public class PersonAutomataType_Person3Front6 extends BitmapAsset { } }//package automataSection 192//SuvAutomataType (automata.SuvAutomataType) package automata { import com.urbansquall.wrighton.*; public class SuvAutomataType extends AutomataType { public static var CarSE:Class = SuvAutomataType_CarSE; public static var CarSW:Class = SuvAutomataType_CarSW; public static var CarNE:Class = SuvAutomataType_CarNE; public static var CarNW:Class = SuvAutomataType_CarNW; public function SuvAutomataType(){ m_speedModifier = 0.9; createAnimation(Automata.DIRECTION_NE, CarNE); createAnimation(Automata.DIRECTION_NW, CarNW); createAnimation(Automata.DIRECTION_SE, CarSE); createAnimation(Automata.DIRECTION_SW, CarSW); } } }//package automataSection 193//SuvAutomataType_CarNE (automata.SuvAutomataType_CarNE) package automata { import mx.core.*; public class SuvAutomataType_CarNE extends BitmapAsset { } }//package automataSection 194//SuvAutomataType_CarNW (automata.SuvAutomataType_CarNW) package automata { import mx.core.*; public class SuvAutomataType_CarNW extends BitmapAsset { } }//package automataSection 195//SuvAutomataType_CarSE (automata.SuvAutomataType_CarSE) package automata { import mx.core.*; public class SuvAutomataType_CarSE extends BitmapAsset { } }//package automataSection 196//SuvAutomataType_CarSW (automata.SuvAutomataType_CarSW) package automata { import mx.core.*; public class SuvAutomataType_CarSW extends BitmapAsset { } }//package automataSection 197//UfoAutomataType (automata.UfoAutomataType) package automata { import com.urbansquall.wrighton.*; public class UfoAutomataType extends AutomataType { public static var ufoArt:Class = UfoAutomataType_ufoArt; public function UfoAutomataType(){ m_speedModifier = 1.5; createAnimation(Automata.DIRECTION_NE, ufoArt); createAnimation(Automata.DIRECTION_NW, ufoArt); createAnimation(Automata.DIRECTION_SE, ufoArt); createAnimation(Automata.DIRECTION_SW, ufoArt); } } }//package automataSection 198//UfoAutomataType_ufoArt (automata.UfoAutomataType_ufoArt) package automata { import mx.core.*; public class UfoAutomataType_ufoArt extends BitmapAsset { } }//package automataSection 199//SoundSystem (com.urbansquall.audio.SoundSystem) package com.urbansquall.audio { import flash.events.*; import flash.media.*; import flash.utils.*; public class SoundSystem { private var m_loopMap:Dictionary; private var m_isMuted:Boolean; private var m_effectMasterVolumeModifier:Number;// = 0.75 private var m_muteCallbacks:Array; private var m_loopMasterVolumeModifier:Number;// = 0.6 private var m_volume:Number; private static var s_singleton:SoundSystem = null; public function SoundSystem(){ m_loopMap = new Dictionary(); m_isMuted = false; m_volume = 1; m_muteCallbacks = []; } public function createLoop(_arg1:String, _arg2:Sound, _arg3:Number=1, _arg4:Boolean=true):Boolean{ if (m_loopMap[_arg1] != null){ return (false); }; var _local5:BackgroundLoop = new BackgroundLoop(); _local5.id = _arg1; _local5.customVolume = _arg3; var _local6:SoundTransform = new SoundTransform(); _local6.volume = (_arg3 * m_loopMasterVolumeModifier); _local5.sound = _arg2; m_loopMap[_arg1] = _local5; if (_arg4){ _local5.loopChannel = _arg2.play(0, 999999999, _local6); }; return (true); } private function updateMute():void{ var _local1:Function; if (m_isMuted){ changeVolume(0); } else { changeVolume(m_volume); }; for each (_local1 in m_muteCallbacks) { _local1(); }; } public function getMasterEffectVolume():Number{ return (m_effectMasterVolumeModifier); } public function playSound(_arg1:Sound, _arg2:Number=1, _arg3:Function=null):void{ var _local4:SoundTransform = new SoundTransform(); _local4.volume = (_arg2 * m_effectMasterVolumeModifier); var _local5:SoundChannel = _arg1.play(0, 1, _local4); if (_arg3 != null){ _local5.addEventListener(Event.SOUND_COMPLETE, _arg3); }; } public function toggleMute():void{ m_isMuted = !(m_isMuted); updateMute(); } public function stopLoop(_arg1:String):Boolean{ var _local2:BackgroundLoop = m_loopMap[_arg1]; if (_local2 != null){ if (_local2.loopChannel != null){ _local2.loopChannel.stop(); _local2.loopChannel = null; }; return (true); }; return (false); } public function mute():void{ m_isMuted = true; updateMute(); } public function setMaxVolume(_arg1:Number):void{ m_volume = _arg1; } public function getMasterLoopVolume():Number{ return (m_loopMasterVolumeModifier); } public function isMuted():Boolean{ return (m_isMuted); } public function setMasterLoopVolume(_arg1:Number):void{ var _local2:BackgroundLoop; var _local3:SoundChannel; var _local4:Number; _arg1 = (Math.floor((_arg1 * 100)) / 100); for each (_local2 in m_loopMap) { _local3 = _local2.loopChannel; _local4 = (_local2.customVolume * _arg1); if (_local4 > 1){ _local4 = 1; }; if (_local4 < 0){ _local4 = 0; }; if (_local3 != null){ _local3.soundTransform = new SoundTransform(_local4); }; }; m_loopMasterVolumeModifier = _arg1; } public function isPlaying(_arg1:String):Boolean{ var _local2:BackgroundLoop = m_loopMap[_arg1]; if (_local2 != null){ if (_local2.loopChannel != null){ if (_local2.loopChannel.position > 0){ return (true); }; }; }; return (false); } public function startLoop(_arg1:String, _arg2:Number=1):Boolean{ var _local4:SoundTransform; var _local3:BackgroundLoop = m_loopMap[_arg1]; if (_local3 != null){ if (isPlaying(_arg1)){ return (false); }; _local4 = new SoundTransform(); _local4.volume = (_arg2 * m_loopMasterVolumeModifier); _local3.loopChannel = _local3.sound.play(0, 999999999, _local4); return (true); }; return (false); } public function setMasterEffectVolume(_arg1:Number):void{ _arg1 = (Math.floor((_arg1 * 100)) / 100); if (_arg1 > 1){ _arg1 = 1; }; if (_arg1 < 0){ _arg1 = 0; }; m_effectMasterVolumeModifier = _arg1; } public function changeVolume(_arg1:Number):void{ var _local2:SoundTransform = new SoundTransform(); _local2.volume = _arg1; SoundMixer.soundTransform = _local2; } public function changeLoopVolume(_arg1:String, _arg2:Number):Boolean{ var _local4:SoundTransform; var _local3:BackgroundLoop = m_loopMap[_arg1]; if (_local3 == null){ return (false); }; _local3.customVolume = _arg2; if (_local3.loopChannel != null){ _local4 = new SoundTransform((_arg2 * m_loopMasterVolumeModifier)); _local3.loopChannel.soundTransform = _local4; }; return (true); } public function unmute():void{ m_isMuted = false; updateMute(); } public function destroyLoop(_arg1:String):Boolean{ var _local2:BackgroundLoop = m_loopMap[_arg1]; if (_local2 != null){ if (_local2.loopChannel != null){ _local2.loopChannel.stop(); _local2.loopChannel = null; }; _local2.sound = null; _local2 = null; delete m_loopMap[_arg1]; return (true); }; return (false); } public function addMuteCallback(_arg1:Function):void{ m_muteCallbacks.push(_arg1); } public static function get instance():SoundSystem{ if (s_singleton == null){ s_singleton = new (SoundSystem); }; return (s_singleton); } } }//package com.urbansquall.audio import flash.media.*; class BackgroundLoop { public var customVolume:Number; public var sound:Sound; public var id:String; public var loopChannel:SoundChannel; private function BackgroundLoop(){ } }Section 200//InitializingSprite (com.urbansquall.display.InitializingSprite) package com.urbansquall.display { import flash.events.*; import flash.display.*; public class InitializingSprite extends Sprite { public function InitializingSprite(){ this.addEventListener(Event.ADDED_TO_STAGE, initHandler, false, 0, true); } protected function init():void{ } private function initHandler(_arg1:Event):void{ this.removeEventListener(Event.ADDED_TO_STAGE, initHandler); init(); } } }//package com.urbansquall.displaySection 201//DepthSorter (com.urbansquall.graphics.DepthSorter) package com.urbansquall.graphics { import flash.display.*; public class DepthSorter { private var m_items:Array; private var m_container:DisplayObjectContainer; public function DepthSorter(_arg1:DisplayObjectContainer){ m_items = new Array(); m_container = _arg1; } public function addItem(_arg1:ISortable):void{ m_items.push(_arg1); } public function removeItem(_arg1:ISortable):void{ var _local3:ISortable; var _local2:int; while (_local2 < m_items.length) { _local3 = m_items[_local2]; if (_local3 == _arg1){ m_items.splice(_local2, 1); return; }; _local2++; }; } private function compareFunction(_arg1:ISortable, _arg2:ISortable):int{ if (_arg1.sortValue > _arg2.sortValue){ return (1); }; if (_arg1.sortValue < _arg2.sortValue){ return (-1); }; return (0); } public function sortDepths():void{ var _local2:DisplayObject; m_items.sort(compareFunction); var _local1:int = m_items.length; while (--_local1 >= 0) { _local2 = m_items[_local1].sortDisplay; if (_local2 == null){ m_items.splice(_local1, 1); } else { if (m_container.getChildAt(_local1) != _local2){ m_container.setChildIndex(_local2, _local1); }; }; }; } public function dispose():void{ m_items.splice(0); m_container = null; } } }//package com.urbansquall.graphicsSection 202//ISortable (com.urbansquall.graphics.ISortable) package com.urbansquall.graphics { import flash.display.*; public interface ISortable { function get sortValue():Number; function get sortDisplay():DisplayObject; } }//package com.urbansquall.graphicsSection 203//PointUtils (com.urbansquall.math.PointUtils) package com.urbansquall.math { import flash.geom.*; public class PointUtils { public static function normalizeVector(_arg1:Point, _arg2:Number=1):void{ var _local3:Number = (_arg2 / calculateVectorLength(_arg1)); if (isFinite(_local3)){ _arg1.x = (_arg1.x * _local3); _arg1.y = (_arg1.y * _local3); }; } public static function calculateDeltaVector(_arg1:Point, _arg2:Point):Point{ var _local3:Point = new Point((_arg2.x - _arg1.x), (_arg2.y - _arg1.y)); return (_local3); } public static function calculateVectorLength(_arg1:Point):Number{ return (Math.sqrt(((_arg1.x * _arg1.x) + (_arg1.y * _arg1.y)))); } } }//package com.urbansquall.mathSection 204//SeededRandom (com.urbansquall.math.SeededRandom) package com.urbansquall.math { public class SeededRandom { private var m_startingSeed:Number; private var m_seed:Number; private static var A:Number = 9301; private static var C:Number = 49297; private static var M:Number = 233280; public function SeededRandom(_arg1:Number=NaN){ if (isNaN(_arg1)){ m_startingSeed = new Date().time; } else { m_startingSeed = _arg1; }; m_seed = m_startingSeed; } public function get startingSeed():Number{ return (m_startingSeed); } public function randomBoolean():Boolean{ return ((nextRandom() < 0.5)); } public function nextRandom():Number{ m_seed = (((m_seed * A) + C) % M); return ((m_seed / M)); } public function get currentSeed():Number{ return (m_seed); } public function randomInteger(_arg1:Number=10, _arg2:Number=1):int{ return (Math.floor(randomNumber(_arg1, _arg2))); } public function randomNumber(_arg1:Number=10, _arg2:Number=1):Number{ return (((nextRandom() * ((_arg1 - _arg2) + 1)) + _arg2)); } } }//package com.urbansquall.mathSection 205//Metronome (com.urbansquall.metronome.Metronome) package com.urbansquall.metronome { import flash.events.*; import flash.utils.*; public class Metronome { private var m_baseIterationFrequency:int; private var m_timedEvents:Dictionary; private var m_masterPause:Boolean; private var m_isRunning:Boolean; private var m_timer:Timer; var m_timeOfLastUpdate:Number; public function Metronome(_arg1:int=33, _arg2:Boolean=true){ m_masterPause = false; m_isRunning = false; m_timedEvents = new Dictionary(); m_baseIterationFrequency = _arg1; m_timer = new Timer(m_baseIterationFrequency); m_timer.addEventListener(TimerEvent.TIMER, pulse); if (_arg2){ this.start(); }; } public function resumeListener(_arg1:String):void{ var _local2:TimerInfo = m_timedEvents[_arg1]; if (_local2 != null){ _local2.resume(); }; } public function stop():void{ m_isRunning = false; m_timer.stop(); } public function pauseListener(_arg1:String):void{ var _local2:TimerInfo = m_timedEvents[_arg1]; if (_local2 != null){ _local2.pause(); }; } public function get isRunning():Boolean{ return (m_isRunning); } public function pauseAll():void{ m_masterPause = true; } public function removeListener(_arg1:String):void{ var _local2:TimerInfo = m_timedEvents[_arg1]; if (_local2 != null){ _local2.dispose(); }; delete m_timedEvents[_arg1]; } private function pulse(_arg1:Event):void{ var _local4:TimerInfo; var _local2:Number = getTimer(); var _local3:Number = (_local2 - m_timeOfLastUpdate); m_timeOfLastUpdate = _local2; for each (_local4 in m_timedEvents) { if (((_local4.isPaused) || (((m_masterPause) && (_local4.isPausable))))){ } else { _local4.accruedTime = (_local4.accruedTime + _local3); if (((!(_local4.shouldCatchUp)) && ((_local4.accruedTime >= _local4.frequency)))){ _local4.accruedTime = _local4.frequency; }; while (_local4.accruedTime >= _local4.frequency) { _local4.accruedTime = (_local4.accruedTime - _local4.frequency); _local4.callback(new TickEvent(_local4.getDeltaExecutionTime(getTimer()), _local4.frequency, --_local4.executeCount)); if (isFinite(_local4.executeCount)){ if (_local4.executeCount <= 0){ this.removeListener(_local4.key); break; }; }; }; }; }; } public function resetListenerExecutionCount(_arg1:String):void{ var _local2:TimerInfo = m_timedEvents[_arg1]; if (_local2 != null){ _local2.resetExecutionCount(); }; } public function dispose():void{ var _local1:TimerInfo; m_timer.stop(); m_timer.removeEventListener(TimerEvent.TIMER, pulse); m_timer = null; for each (_local1 in m_timedEvents) { delete m_timedEvents[_local1.key]; _local1.dispose(); }; m_timedEvents = null; } public function start():void{ m_isRunning = true; m_timeOfLastUpdate = getTimer(); m_timer.start(); } public function resetListenerAccruedTime(_arg1:String):void{ var _local2:TimerInfo = m_timedEvents[_arg1]; if (_local2 != null){ _local2.accruedTime = 0; }; } public function get baseIterationFrequency():int{ return (m_baseIterationFrequency); } public function resumeAll():void{ m_masterPause = false; } public function addListener(_arg1:String, _arg2:Function, _arg3:int=-1, _arg4:Number=INF, _arg5:Boolean=true, _arg6:Boolean=true):void{ if (m_timedEvents[_arg1] != null){ trace((("addListener. Key is already in use: \"" + _arg1) + "\"")); return; }; if (_arg3 < m_baseIterationFrequency){ _arg3 = m_baseIterationFrequency; }; m_timedEvents[_arg1] = new TimerInfo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } public function get isPaused():Boolean{ return (m_masterPause); } } }//package com.urbansquall.metronome import flash.utils.*; class TimerInfo { private var m_paused:Boolean; private var callback:Function; private var m_isPausable:Boolean; private var accruedTime:Number; private var m_deltaFromLastExecution:int; private var executeCount:Number; private var frequency:Number; private var m_baseExecuteCount:Number; private var key:String; private var m_shouldCatchUp:Boolean; private function TimerInfo(_arg1:String, _arg2:Function, _arg3:Number, _arg4:Number, _arg5:Boolean, _arg6:Boolean){ key = _arg1; callback = _arg2; frequency = _arg3; m_isPausable = _arg5; accruedTime = 0; if (_arg4 <= 0){ throw (new ArgumentError("Metronome: execution count must be a positive number", _arg4)); }; executeCount = _arg4; m_baseExecuteCount = _arg4; m_paused = false; m_shouldCatchUp = _arg6; m_deltaFromLastExecution = getTimer(); } private function get isPausable():Boolean{ return (m_isPausable); } private function get shouldCatchUp():Boolean{ return (m_shouldCatchUp); } private function resetExecutionCount():void{ executeCount = m_baseExecuteCount; } private function getDeltaExecutionTime(_arg1:int):int{ var _local2:Number = ((_arg1 - m_deltaFromLastExecution) - frequency); m_deltaFromLastExecution = _arg1; return (_local2); } private function dispose():void{ callback = null; } private function resume():void{ m_paused = false; } private function pause():void{ m_paused = true; } private function get isPaused():Boolean{ if (!this.isPausable){ return (false); }; return (m_paused); } }Section 206//TickEvent (com.urbansquall.metronome.TickEvent) package com.urbansquall.metronome { import flash.events.*; import com.urbansquall.utils.*; public class TickEvent extends Event { private var m_deltaTime:Number; private var m_executionsLeft:Number; private var m_frequency:Number; public static const TICK:String = "metronome_tickevent"; public function TickEvent(_arg1:Number, _arg2:Number, _arg3:Number){ super(_slot1.TICK, false, false); m_deltaTime = _arg1; m_frequency = _arg2; m_executionsLeft = _arg3; } override public function toString():String{ return (Reflection.getPublicPropertiesAsString(this, false, " | ")); } public function get executionsLeft():Number{ return (m_executionsLeft); } public function get deltaTime():Number{ return (m_deltaTime); } public function get frequency():Number{ return (m_frequency); } } }//package com.urbansquall.metronomeSection 207//AbstractPreloader (com.urbansquall.preloader.AbstractPreloader) package com.urbansquall.preloader { import flash.events.*; import flash.display.*; import flash.utils.*; public class AbstractPreloader extends MovieClip { private var m_firstEnterFrame:Boolean; public function AbstractPreloader(){ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; stop(); m_firstEnterFrame = true; addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function initialize():void{ var _local1:Class = (getDefinitionByName(mainClassName) as Class); if (_local1 == null){ throw (new Error("AbstractPreloader:initialize. There was no class matching that name. Did you remember to override mainClassName?")); }; var _local2:DisplayObject = (new (_local1) as DisplayObject); if (_local2 == null){ throw (new Error("AbstractPreloader:initialize. Main class needs to inherit from Sprite or MovieClip.")); }; addChildAt(_local2, 0); } protected function endLoading():void{ } protected function beginLoading():void{ } private function onEnterFrame(_arg1:Event):void{ var _local2:Number; if (m_firstEnterFrame){ m_firstEnterFrame = false; if (root.loaderInfo.bytesLoaded >= root.loaderInfo.bytesTotal){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); initialize(); } else { beginLoading(); }; return; }; if (root.loaderInfo.bytesLoaded >= root.loaderInfo.bytesTotal){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); initialize(); endLoading(); } else { _local2 = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal); updateLoading(_local2); }; } protected function get mainClassName():String{ return ("Main"); } protected function updateLoading(_arg1:Number):void{ } } }//package com.urbansquall.preloaderSection 208//BlittedAnimation (com.urbansquall.skew.BlittedAnimation) package com.urbansquall.skew { import flash.display.*; import flash.geom.*; public class BlittedAnimation { private var m_currentFrame:int; private var m_frames:Array; private var m_canvas:BitmapData; public function BlittedAnimation(_arg1:BitmapData){ m_canvas = _arg1; m_frames = []; m_currentFrame = 0; } public function addFrame(_arg1:BitmapData):void{ m_frames.push(_arg1); if (m_frames.length == 1){ render(); }; } private function render():void{ m_canvas.unlock(); m_canvas.fillRect(m_canvas.rect, 0); m_canvas.copyPixels(m_frames[m_currentFrame], m_frames[m_currentFrame].rect, new Point(0, 0)); m_canvas.lock(); } public function incrementFrame():void{ m_currentFrame++; if (m_currentFrame >= m_frames.length){ m_currentFrame = 0; }; render(); } public static function createFromBitmapArray(_arg1:BitmapData, _arg2:Array):BlittedAnimation{ var _local4:BitmapData; var _local3:BlittedAnimation = new BlittedAnimation(_arg1); for each (_local4 in _arg2) { _local3.addFrame(_local4); }; return (_local3); } } }//package com.urbansquall.skewSection 209//IsoSlicer (com.urbansquall.skew.IsoSlicer) package com.urbansquall.skew { import flash.display.*; import flash.geom.*; public class IsoSlicer { public static function split(_arg1:Bitmap, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Bitmap):Array{ var _local12:int; var _local13:int; var _local14:int; var _local15:Bitmap; var _local16:SKImage; var _local7:Array = []; var _local8:int = _arg2; var _local9:int = ((_arg3 / 2) * (_arg4 + _arg5)); var _local10:int = ((_arg1.height - _local9) + _arg3); var _local11:int; while (_local11 < _arg4) { _local7.push([]); _local12 = 0; while (_local12 < _arg5) { _local13 = ((_arg2 / 2) * (_local11 + ((_arg5 - _local12) - 1))); _local14 = ((_arg3 / 2) * (_local11 + _local12)); _local15 = new Bitmap(_arg1.bitmapData); _local16 = new SKImage(_local15, (_arg2 / 2), (_local10 - (_arg3 / 2))); _local16.scrollRect = new Rectangle(_local13, _local14, _local8, _local10); _local7[_local11].push(_local16); _local12++; }; _local11++; }; return (_local7); } } }//package com.urbansquall.skewSection 210//SKEntity (com.urbansquall.skew.SKEntity) package com.urbansquall.skew { import flash.display.*; public class SKEntity extends SKObject { public function SKEntity(_arg1:Bitmap, _arg2:Number, _arg3:Number, _arg4:SKLayer){ m_layer = _arg4; var _local5:SKImage = new SKImage(new Bitmap(_arg1.bitmapData), (_arg1.width / 2), (_arg1.height - (m_layer.tileHeight / 2)), SKImage.ON_TOP); super([[_local5]], _arg1); px = _arg2; py = _arg3; } } }//package com.urbansquall.skewSection 211//SKImage (com.urbansquall.skew.SKImage) package com.urbansquall.skew { import flash.display.*; import flash.geom.*; import com.urbansquall.graphics.*; class SKImage implements ISortable { private var m_wrapper:Sprite; private var m_bitmap:Bitmap; private var m_tieBreaker:int; private var m_xOffset:Number; private var m_yOffset:Number; private var m_py:Number; private var m_px:Number; public static const ON_BOTTOM:int = 0; public static const ON_TOP:int = 1; function SKImage(_arg1:Bitmap, _arg2:Number, _arg3:Number, _arg4:int=0){ m_xOffset = _arg2; m_yOffset = _arg3; m_tieBreaker = _arg4; m_bitmap = _arg1; m_bitmap.cacheAsBitmap = true; m_bitmap.x = -(m_xOffset); m_bitmap.y = -(m_yOffset); m_wrapper = new Sprite(); m_wrapper.addChild(m_bitmap); } public function get sortDisplay():DisplayObject{ return (m_wrapper); } public function get px():Number{ return (m_px); } public function get py():Number{ return (m_py); } public function set py(_arg1:Number):void{ m_py = _arg1; m_wrapper.y = m_py; } public function set px(_arg1:Number):void{ m_px = _arg1; m_wrapper.x = m_px; } public function set mask(_arg1:DisplayObject):void{ _arg1.cacheAsBitmap = true; _arg1.x = -(m_xOffset); _arg1.y = -(m_yOffset); m_wrapper.addChild(_arg1); m_bitmap.mask = _arg1; } public function set scrollRect(_arg1:Rectangle):void{ m_bitmap.scrollRect = _arg1; } function getPixelAt(_arg1:Number, _arg2:Number):uint{ var _local3:Number = ((_arg1 + m_xOffset) + m_bitmap.scrollRect.x); var _local4:Number = ((_arg2 + m_yOffset) + m_bitmap.scrollRect.y); return (m_bitmap.bitmapData.getPixel32(_local3, _local4)); } public function get bitmapRef():Bitmap{ return (m_bitmap); } public function get image():Sprite{ return (m_wrapper); } public function get bitmapData():BitmapData{ return (m_bitmap.bitmapData); } public function get sortValue():Number{ return (((m_wrapper.y * 10) + m_tieBreaker)); } } }//package com.urbansquall.skewSection 212//SKLayer (com.urbansquall.skew.SKLayer) package com.urbansquall.skew { import flash.display.*; import flash.geom.*; import com.urbansquall.graphics.*; import flash.utils.*; public class SKLayer { private var m_objects:Array; private var m_tileHeight:int; private var m_numberColumns:Number; private var m_numberRows:Number; private var m_depthSorter:DepthSorter; private var m_name:String; private var m_edgeMask:Bitmap; private var m_tileWidth:int; private var m_canvas:Sprite; private var m_tiles:Dictionary; public function SKLayer(_arg1:String, _arg2:int, _arg3:int, _arg4:Bitmap){ m_name = _arg1; m_canvas = new Sprite(); m_tileWidth = _arg2; m_tileHeight = _arg3; m_edgeMask = _arg4; m_depthSorter = new DepthSorter(m_canvas); m_objects = []; m_tiles = new Dictionary(); m_canvas.y = (m_tileHeight / 2); } function pickObject(_arg1:int, _arg2:int):SKObject{ var _local7:SKObject; var _local8:Array; var _local9:SKImage; var _local3:SKObject; var _local4:Number = Number.NEGATIVE_INFINITY; var _local5:int = (_arg1 - m_canvas.x); var _local6:int = (_arg2 - m_canvas.y); for each (_local7 in m_objects) { for each (_local8 in _local7.images) { for each (_local9 in _local8) { if (_local4 > _local9.py){ } else { if (_local9.getPixelAt((_local5 - _local9.px), (_local6 - _local9.py)) != 0){ _local4 = _local9.py; _local3 = _local7; }; }; }; }; }; return (_local3); } public function createEntity(_arg1:Bitmap, _arg2:Number, _arg3:Number):SKEntity{ var _local4:SKEntity = new SKEntity(_arg1, _arg2, _arg3, this); addEntity(_local4); return (_local4); } public function createTile(_arg1:Bitmap, _arg2:int, _arg3:int, _arg4:int, _arg5:int):SKTile{ var _local6:SKTile = new SKTile(_arg1, _arg2, _arg3, this); addTile(_local6, _arg4, _arg5); return (_local6); } public function get edgeMask():Bitmap{ return (m_edgeMask); } private function registerObject(_arg1:SKObject):void{ var _local2:Array; var _local3:SKImage; m_objects.push(_arg1); for each (_local2 in _arg1.images) { for each (_local3 in _local2) { m_canvas.addChild(_local3.image); }; }; } public function get name():String{ return (m_name); } public function removeTileByCoordinateSafe(_arg1:int, _arg2:int):void{ var a_col = _arg1; var a_row = _arg2; try { removeTileByCoordinate(a_col, a_row); } catch(er:Error) { }; } public function removeEntity(_arg1:SKEntity):void{ unregisterObject(_arg1); untrackDepth(_arg1); } public function getTile(_arg1:int, _arg2:int):SKTile{ return (m_tiles[getKeyFromTilePosition(_arg1, _arg2)]); } function get canvas():Sprite{ return (m_canvas); } public function removeTile(_arg1:SKTile):void{ unregisterObject(_arg1); untrackTile(_arg1); untrackDepth(_arg1); } private function trackDepth(_arg1:SKObject):void{ _arg1.registerWithDepthSorter(m_depthSorter); sortDepths(); } public function getCoordinatesFromPosition(_arg1:int, _arg2:int):Point{ var _local3:int = ((this.tileWidth * (_arg1 - _arg2)) / 2); var _local4:int = ((this.tileHeight * (_arg1 + _arg2)) / 2); return (new Point(_local3, _local4)); } private function untrackDepth(_arg1:SKObject):void{ _arg1.unregisterWithDepthSorter(m_depthSorter); } public function removeTileByCoordinate(_arg1:int, _arg2:int):void{ var _local3:SKTile = getTile(_arg1, _arg2); if (_local3 == null){ throw (new Error((((("There is no tile at (" + _arg1) + ", ") + _arg2) + ")"))); }; removeTile(_local3); } public function get allTiles():Array{ var _local2:SKTile; var _local1:Array = new Array(); for each (_local2 in m_tiles) { _local1.push(_local2); }; return (_local1); } function untrackTile(_arg1:SKTile):void{ var _local3:int; var _local4:int; var _local5:int; var _local2:int; while (_local2 < _arg1.columnCount) { _local3 = 0; while (_local3 < _arg1.rowCount) { _local4 = (_local2 + _arg1.column); _local5 = (_local3 + _arg1.row); delete m_tiles[getKeyFromTilePosition(_local4, _local5)]; _local3++; }; _local2++; }; } public function addEntity(_arg1:SKEntity):void{ registerObject(_arg1); trackDepth(_arg1); } private function getKeyFromTilePosition(_arg1:int, _arg2:int):String{ return (((_arg1.toString() + ",") + _arg2.toString())); } public function tile(_arg1:Bitmap, _arg2:int, _arg3:int):void{ var _local5:int; var _local6:Bitmap; var _local4:int; while (_local4 < _arg2) { _local5 = 0; while (_local5 < _arg3) { _local6 = new Bitmap(_arg1.bitmapData); createTile(_local6, 1, 1, _local4, _local5); _local5++; }; _local4++; }; } public function addTile(_arg1:SKTile, _arg2:int, _arg3:int):void{ if (getTile(_arg2, _arg3) != null){ throw (new Error((((("There is already a tile at this position. (" + _arg2) + ", ") + _arg3) + ")"))); }; registerObject(_arg1); _arg1.snapToGrid(_arg2, _arg3); trackDepth(_arg1); } public function sortDepths():void{ m_depthSorter.sortDepths(); } public function tileIsAvailable(_arg1:int, _arg2:int):Boolean{ return ((getTile(_arg1, _arg2) == null)); } public function getPositionFromCoordinates(_arg1:int, _arg2:int):SKTilePosition{ var _local3:int = ((_arg2 / m_tileHeight) + (_arg1 / m_tileWidth)); var _local4:int = ((_arg2 / m_tileHeight) - (_arg1 / m_tileWidth)); return (new SKTilePosition(_local3, _local4)); } public function get tileHeight():int{ return (m_tileHeight); } function trackTile(_arg1:SKTile):void{ var _local3:int; var _local4:int; var _local5:int; var _local2:int; while (_local2 < _arg1.columnCount) { _local3 = 0; while (_local3 < _arg1.rowCount) { _local4 = (_local2 + _arg1.column); _local5 = (_local3 + _arg1.row); if (getTile(_local4, _local5) != null){ throw (new Error((((("There is already a tile at (" + _local4) + ", ") + _local5) + ")"))); }; m_tiles[getKeyFromTilePosition(_local4, _local5)] = _arg1; _local3++; }; _local2++; }; } private function getObjectFromSprite(_arg1:Sprite):SKObject{ var _local2:SKObject; for each (_local2 in m_objects) { if (((_local2.hasSprite(_arg1)) && (_local2.mouseEnabled))){ return (_local2); }; }; return (null); } private function unregisterObject(_arg1:SKObject):void{ var _local3:Array; var _local4:SKImage; var _local2:int = m_objects.indexOf(_arg1); if (_local2 >= 0){ m_objects.splice(_local2, 1); }; for each (_local3 in _arg1.images) { for each (_local4 in _local3) { m_canvas.removeChild(_local4.image); }; }; } function pickTile(_arg1:int, _arg2:int):SKTile{ var _local3:int = ((_arg2 / m_tileHeight) + (_arg1 / m_tileWidth)); var _local4:int = ((_arg2 / m_tileHeight) - (_arg1 / m_tileWidth)); return (getTile(_local3, _local4)); } public function get tileWidth():int{ return (m_tileWidth); } } }//package com.urbansquall.skewSection 213//SKObject (com.urbansquall.skew.SKObject) package com.urbansquall.skew { import flash.display.*; import com.urbansquall.graphics.*; public class SKObject { protected var m_images:Array; private var m_bitmapRef:Bitmap; private var m_px:Number; private var m_py:Number; private var m_slicedBitmapRef:Array; private var m_visible:Boolean; protected var m_mouseEnabled:Boolean; protected var m_layer:SKLayer; public static const NO_POSITION:int = -1229; public function SKObject(_arg1:Array, _arg2:Bitmap){ var _local3:Array; var _local4:SKImage; super(); m_bitmapRef = _arg2; m_images = _arg1; m_mouseEnabled = true; m_visible = true; m_px = 0; m_py = 0; m_slicedBitmapRef = new Array(); for each (_local3 in m_images) { for each (_local4 in _local3) { m_slicedBitmapRef.push(_local4.bitmapRef); }; }; } function hasSprite(_arg1:Sprite):Boolean{ var _local2:Array; var _local3:SKImage; for each (_local2 in m_images) { for each (_local3 in _local2) { if (_local3.image == _arg1){ return (true); }; }; }; return (false); } public function get px():Number{ return (m_px); } public function get py():Number{ return (m_py); } public function snapToGrid(_arg1:int, _arg2:int):void{ this.px = ((m_layer.tileWidth * (_arg1 - _arg2)) / 2); this.py = ((m_layer.tileHeight * (_arg1 + _arg2)) / 2); } public function set px(_arg1:Number):void{ var _local3:int; var _local4:SKImage; m_px = _arg1; var _local2:int; while (_local2 < m_images.length) { _local3 = 0; while (_local3 < m_images[_local2].length) { _local4 = m_images[_local2][_local3]; _local4.px = (m_px + ((m_layer.tileWidth * (_local2 - _local3)) / 2)); _local3++; }; _local2++; }; } public function get layer():SKLayer{ return (m_layer); } public function set py(_arg1:Number):void{ var _local3:int; var _local4:SKImage; m_py = _arg1; var _local2:int; while (_local2 < m_images.length) { _local3 = 0; while (_local3 < m_images[_local2].length) { _local4 = m_images[_local2][_local3]; _local4.py = (m_py + ((m_layer.tileHeight * (_local2 + _local3)) / 2)); _local3++; }; _local2++; }; } public function get mouseEnabled():Boolean{ return (m_mouseEnabled); } public function get bitmapPiecesRef():Array{ return (m_slicedBitmapRef); } function get images():Array{ return (m_images); } public function get bitmapRef():Bitmap{ return (m_bitmapRef); } function registerWithDepthSorter(_arg1:DepthSorter):void{ var _local2:Array; var _local3:SKImage; for each (_local2 in m_images) { for each (_local3 in _local2) { _arg1.addItem(_local3); }; }; } public function get visible():Boolean{ return (m_visible); } public function set mouseEnabled(_arg1:Boolean):void{ m_mouseEnabled = _arg1; } function unregisterWithDepthSorter(_arg1:DepthSorter):void{ var _local2:Array; var _local3:SKImage; for each (_local2 in m_images) { for each (_local3 in _local2) { _arg1.removeItem(_local3); }; }; } public function set visible(_arg1:Boolean):void{ var _local2:Array; var _local3:SKImage; if (m_visible != _arg1){ m_visible = _arg1; for each (_local2 in m_images) { for each (_local3 in _local2) { _local3.bitmapRef.visible = m_visible; }; }; }; } } }//package com.urbansquall.skewSection 214//SKScene (com.urbansquall.skew.SKScene) package com.urbansquall.skew { import flash.display.*; public class SKScene extends Sprite { private var m_layers:Array; public function SKScene(){ m_layers = []; } public function pickObject(_arg1:String, _arg2:int, _arg3:int):SKObject{ var _local4:SKLayer = lookupLayer(_arg1); if (_local4 == null){ throw (new Error(("No layer exists with name " + _arg1))); }; return (_local4.pickObject(_arg2, _arg3)); } public function pickTile(_arg1:String, _arg2:int, _arg3:int):SKTile{ var _local4:SKLayer = lookupLayer(_arg1); if (_local4 == null){ throw (new Error(("No layer exists with name " + _arg1))); }; return (_local4.pickTile(_arg2, _arg3)); } public function lookupLayer(_arg1:String):SKLayer{ var _local2:SKLayer; for each (_local2 in m_layers) { if (_local2.name == _arg1){ return (_local2); }; }; return (null); } public function addLayer(_arg1:SKLayer):void{ if (lookupLayer(_arg1.name) != null){ throw (new Error(("A layer already exists with this name: " + _arg1.name))); }; m_layers.push(_arg1); this.addChild(_arg1.canvas); } } }//package com.urbansquall.skewSection 215//SKTile (com.urbansquall.skew.SKTile) package com.urbansquall.skew { import flash.display.*; public class SKTile extends SKObject { private var m_numCols:int; private var m_row:int; private var m_numRows:int; private var m_col:int; public function SKTile(_arg1:Bitmap, _arg2:int, _arg3:int, _arg4:SKLayer){ m_numCols = _arg2; m_numRows = _arg3; m_col = SKObject.NO_POSITION; m_row = SKObject.NO_POSITION; m_layer = _arg4; super(IsoSlicer.split(_arg1, m_layer.tileWidth, m_layer.tileHeight, _arg2, _arg3, m_layer.edgeMask), _arg1); } public function get rowCount():int{ return (m_numRows); } override public function snapToGrid(_arg1:int, _arg2:int):void{ if ((((_arg1 == m_col)) && ((_arg2 == m_row)))){ return; }; super.snapToGrid(_arg1, _arg2); if (((!((_arg1 == SKObject.NO_POSITION))) && (!((_arg2 == SKObject.NO_POSITION))))){ m_layer.untrackTile(this); }; m_col = _arg1; m_row = _arg2; m_layer.trackTile(this); } public function get column():int{ return (m_col); } public function get columnCount():int{ return (m_numCols); } public function get row():int{ return (m_row); } } }//package com.urbansquall.skewSection 216//SKTilePosition (com.urbansquall.skew.SKTilePosition) package com.urbansquall.skew { public class SKTilePosition { private var m_row:int; private var m_col:int; public function SKTilePosition(_arg1:int, _arg2:int){ m_col = _arg1; m_row = _arg2; } public function set row(_arg1:int):void{ m_row = _arg1; } public function get column():int{ return (m_col); } public function get row():int{ return (m_row); } public function set column(_arg1:int):void{ m_col = _arg1; } public function get key():String{ return (((column + ",") + row)); } } }//package com.urbansquall.skewSection 217//UrbansquallLabel (com.urbansquall.ui.UrbansquallLabel) package com.urbansquall.ui { import flash.display.*; import flash.text.*; public class UrbansquallLabel extends Sprite { private const k_widthPadding:int = 8; private const k_heightPadding:int = 2; protected var m_background:DisplayObject; protected var m_format:TextFormat; protected var m_text:TextField; public function UrbansquallLabel(_arg1:DisplayObject=null, _arg2:TextFormat=null){ m_text = new TextField(); m_text.selectable = false; m_text.autoSize = TextFieldAutoSize.LEFT; m_format = ((_arg2) || (new TextFormat())); m_text.defaultTextFormat = m_format; m_background = _arg1; if (m_background != null){ this.addChild(_arg1); }; this.addChild(m_text); } public function set bold(_arg1:Boolean):void{ m_format.bold = true; m_text.setTextFormat(m_format); m_text.defaultTextFormat = m_format; } override public function set width(_arg1:Number):void{ var _local2:Number; m_text.width = _arg1; if (m_background != null){ _local2 = (m_text.width + (k_widthPadding * 2)); if (_local2 > _arg1){ m_background.width = _local2; } else { m_background.width = _arg1; }; m_text.x = ((m_background.width - m_text.width) / 2); }; } override public function set height(_arg1:Number):void{ var _local2:Number; m_text.height = _arg1; if (m_background != null){ _local2 = (m_text.height + (k_heightPadding * 2)); if (_local2 > _arg1){ m_background.height = _local2; } else { m_background.height = _arg1; }; m_text.y = ((m_background.height - m_text.height) / 2); }; } public function getTextField():TextField{ return (m_text); } public function set multiline(_arg1:Boolean):void{ m_text.multiline = _arg1; } public function alignRight():void{ m_format.align = TextFormatAlign.RIGHT; m_text.setTextFormat(m_format); m_text.defaultTextFormat = m_format; } public function set text(_arg1:String):void{ m_text.text = _arg1; this.width = m_text.width; this.height = m_text.height; } public function appendText(_arg1:String):void{ m_text.appendText(_arg1); } public function set fontColor(_arg1:uint):void{ m_text.textColor = _arg1; m_format.color = _arg1; } public function alignJustified():void{ m_format.align = TextFormatAlign.JUSTIFY; m_text.setTextFormat(m_format); m_text.defaultTextFormat = m_format; } public function get text():String{ return (m_text.text); } public function set wordWrap(_arg1:Boolean):void{ m_text.wordWrap = _arg1; } public function set htmlText(_arg1:String):void{ m_text.htmlText = _arg1; this.width = m_text.width; this.height = m_text.height; } public function get htmlText():String{ return (m_text.htmlText); } public function alignCenter():void{ m_format.align = TextFormatAlign.CENTER; m_text.setTextFormat(m_format); m_text.defaultTextFormat = m_format; } public function alignLeft():void{ m_format.align = TextFormatAlign.LEFT; m_text.setTextFormat(m_format); m_text.defaultTextFormat = m_format; } public function applyStyleSheet(_arg1:StyleSheet):void{ m_text.styleSheet = _arg1; } } }//package com.urbansquall.uiSection 218//UrbansquallOverlay (com.urbansquall.ui.UrbansquallOverlay) package com.urbansquall.ui { import flash.events.*; import flash.display.*; import com.urbansquall.utils.*; import flash.filters.*; public class UrbansquallOverlay extends Sprite implements IDisposable { protected var m_frameHeight:int; protected var m_frameWidth:int; public function UrbansquallOverlay(_arg1:int, _arg2:int){ this.m_frameWidth = _arg1; this.m_frameHeight = _arg2; regenerateOverlay(); this.filters = [new DropShadowFilter(6, 45, 0, 0.7, 6, 6, 0.5)]; this.addEventListener(KeyboardEvent.KEY_DOWN, stopKeyEvent, false, 0, true); this.addEventListener(KeyboardEvent.KEY_UP, stopKeyEvent, false, 0, true); this.addEventListener(Event.ADDED_TO_STAGE, removeFocus, false, 0, true); } public function onCloseClick(_arg1:Event):void{ this.dispose(); } protected function regenerateOverlay(_arg1:int=0, _arg2:int=0):void{ this.graphics.clear(); this.graphics.beginFill(0x444444, 0.8); this.graphics.drawRect(_arg1, _arg2, m_frameWidth, m_frameHeight); this.graphics.endFill(); } private function removeFocus(_arg1:Event):void{ stage.focus = null; } private function stopKeyEvent(_arg1:KeyboardEvent):void{ } public function dispose():void{ this.graphics.clear(); if (this.parent != null){ this.parent.removeChild(this); }; this.removeEventListener(KeyboardEvent.KEY_DOWN, stopKeyEvent); this.removeEventListener(KeyboardEvent.KEY_UP, stopKeyEvent); this.removeEventListener(Event.ADDED_TO_STAGE, removeFocus); } } }//package com.urbansquall.uiSection 219//UrbansquallOverlayPanel (com.urbansquall.ui.UrbansquallOverlayPanel) package com.urbansquall.ui { public class UrbansquallOverlayPanel extends UrbansquallOverlay { private var m_panel:UrbansquallPanel; public function UrbansquallOverlayPanel(_arg1:int, _arg2:int, _arg3:UrbansquallPanel, _arg4:int=420, _arg5:int=200){ super(_arg1, _arg2); m_panel = _arg3; this.width = _arg4; this.height = _arg5; addChild(m_panel); } public function offsetPanel(_arg1:int, _arg2:int):void{ this.x = (this.x + _arg1); this.y = (this.y + _arg2); regenerateOverlay(-(this.x), -(this.y)); } override public function get width():Number{ return (m_panel.width); } override public function get height():Number{ return (m_panel.height); } override public function set width(_arg1:Number):void{ m_panel.width = _arg1; this.x = ((m_frameWidth - m_panel.width) / 2); regenerateOverlay(-(this.x), -(this.y)); } override public function set height(_arg1:Number):void{ m_panel.height = _arg1; this.y = ((m_frameHeight - m_panel.height) / 2); regenerateOverlay(-(this.x), -(this.y)); } } }//package com.urbansquall.uiSection 220//UrbansquallPanel (com.urbansquall.ui.UrbansquallPanel) package com.urbansquall.ui { import flash.display.*; public class UrbansquallPanel extends Sprite { private var m_bg:DisplayObject; public function UrbansquallPanel(_arg1:DisplayObject){ m_bg = _arg1; this.addChild(m_bg); this.buttonMode = false; } public function removeChildren():void{ var _local1:Boolean = ((m_bg == null)) ? false : true; var _local2:int = (this.numChildren - 1); while (_local2 >= 0) { if (this.getChildAt(_local2) != m_bg){ this.removeChildAt(_local2); }; _local2--; }; } override public function set width(_arg1:Number):void{ m_bg.width = _arg1; } override public function set scaleX(_arg1:Number):void{ m_bg.scaleX = _arg1; } override public function set scaleY(_arg1:Number):void{ m_bg.scaleY = _arg1; } override public function set height(_arg1:Number):void{ m_bg.height = _arg1; } } }//package com.urbansquall.uiSection 221//UrbansquallSlider (com.urbansquall.ui.UrbansquallSlider) package com.urbansquall.ui { import flash.events.*; import flash.display.*; public class UrbansquallSlider extends Sprite { private var m_thumb:Sprite; private var m_middlePiece:DisplayObject; private var m_maximumXPosition:int; private var m_callback:Function; private var m_value:Number; private var m_endPiece:DisplayObject; private var m_minimumXPosition:int; private var m_middleWidth:int; private var m_startPiece:DisplayObject; public function UrbansquallSlider(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObject, _arg4:Sprite, _arg5:Function){ m_startPiece = _arg1; m_middlePiece = _arg2; m_endPiece = _arg3; m_thumb = _arg4; m_callback = _arg5; this.addChild(m_startPiece); this.addChild(m_middlePiece); this.addChild(m_endPiece); this.addChild(m_thumb); m_thumb.buttonMode = true; m_thumb.addEventListener(MouseEvent.MOUSE_DOWN, startDragging); this.buttonMode = true; this.addEventListener(MouseEvent.CLICK, drag); centerYs(); lineUpXs(); } public function get enabled():Boolean{ return (m_thumb.visible); } public function set enabled(_arg1:Boolean):void{ m_thumb.visible = _arg1; this.buttonMode = _arg1; if (((_arg1) && (!(this.hasEventListener(MouseEvent.CLICK))))){ this.addEventListener(MouseEvent.CLICK, drag); } else { if (((!(_arg1)) && (this.hasEventListener(MouseEvent.CLICK)))){ this.removeEventListener(MouseEvent.CLICK, drag); }; }; } override public function get width():Number{ return ((m_endPiece.x + m_endPiece.width)); } override public function set width(_arg1:Number):void{ m_middleWidth = ((_arg1 - m_startPiece.width) - m_endPiece.width); m_middlePiece.width = m_middleWidth; lineUpXs(); m_minimumXPosition = ((m_startPiece.x + m_startPiece.width) + (m_thumb.width / 2)); m_maximumXPosition = (m_endPiece.x - (m_thumb.width / 2)); } private function centerYs():void{ m_startPiece.y = ((this.height - m_startPiece.height) / 2); m_middlePiece.y = ((this.height - m_middlePiece.height) / 2); m_endPiece.y = ((this.height - m_endPiece.height) / 2); m_thumb.y = (((this.height - m_thumb.height) / 2) - 2); } private function startDragging(_arg1:MouseEvent):void{ this.stage.addEventListener(MouseEvent.MOUSE_UP, stopDragging, false, 0, true); this.stage.addEventListener(MouseEvent.MOUSE_MOVE, drag, false, 0, true); } private function lineUpXs():void{ m_startPiece.x = 0; m_middlePiece.x = (m_startPiece.x + m_startPiece.width); m_endPiece.x = (m_middlePiece.x + m_middleWidth); setValue(0, false); } override public function get height():Number{ return (Math.max(m_startPiece.height, m_middlePiece.height, m_endPiece.height, m_thumb.height)); } public function setValue(_arg1:Number, _arg2:Boolean=true):void{ _arg1 = Math.max(_arg1, 0); _arg1 = Math.min(_arg1, 1); m_value = _arg1; m_thumb.x = (m_minimumXPosition + (_arg1 * (m_maximumXPosition - m_minimumXPosition))); if (_arg2){ m_callback(_arg1); }; } private function stopDragging(_arg1:MouseEvent):void{ this.stage.removeEventListener(MouseEvent.MOUSE_UP, stopDragging); this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, drag); } private function drag(_arg1:MouseEvent):void{ var _local2:int = Math.min(Math.max(this.mouseX, m_minimumXPosition), m_maximumXPosition); setValue(((_local2 - m_minimumXPosition) / (m_maximumXPosition - m_minimumXPosition))); } public function get value():Number{ return (m_value); } } }//package com.urbansquall.uiSection 222//UrbansquallToolTip (com.urbansquall.ui.UrbansquallToolTip) package com.urbansquall.ui { import flash.events.*; import flash.display.*; public class UrbansquallToolTip extends Sprite { private var m_target:DisplayObject; private var m_moveWithMouse:Boolean; protected var MOUSE_X_OFFSET:int;// = 10 protected var MOUSE_Y_OFFSET:int;// = 10 private static var s_activeToolTip:UrbansquallToolTip = null; public function UrbansquallToolTip(){ this.mouseChildren = false; this.mouseEnabled = false; this.hide(); } private function mouseOutHandler(_arg1:MouseEvent):void{ hideToolTip(); } private function removeAllListeners():void{ if (m_target != null){ m_target.removeEventListener(Event.ADDED_TO_STAGE, init); m_target.removeEventListener(Event.REMOVED_FROM_STAGE, removeFromStageHandler); m_target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); m_target.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); m_target.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } private function hide():void{ removeEventListener(Event.ENTER_FRAME, fadeInTick); removeEventListener(Event.ENTER_FRAME, fadeOutTick); this.alpha = 0; s_activeToolTip = null; } private function positionTooltip():void{ this.x = (this.stage.mouseX + MOUSE_X_OFFSET); this.y = (this.stage.mouseY + MOUSE_Y_OFFSET); if ((this.x + this.width) > this.stage.stageWidth){ this.x = (this.stage.stageWidth - this.width); }; if ((this.y + this.height) > this.stage.stageHeight){ this.y = (this.stage.stageHeight - this.height); }; } private function fadeOutTick(_arg1:Event):void{ this.removeEventListener(Event.ENTER_FRAME, fadeInTick); this.alpha = (this.alpha - 0.1); if (this.alpha < 0.1){ this.hide(); }; } private function init(_arg1:Event=null):void{ m_target.removeEventListener(Event.ADDED_TO_STAGE, init); if (m_moveWithMouse){ m_target.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); }; m_target.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); m_target.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); m_target.addEventListener(Event.REMOVED_FROM_STAGE, removeFromStageHandler); m_target.stage.addChild(this); } private function mouseOverHandler(_arg1:MouseEvent):void{ showToolTip(); } private function removeFromStageHandler(_arg1:Event):void{ hide(); removeAllListeners(); if (this.parent != null){ this.parent.removeChild(this); }; m_target = null; } private function showToolTip():void{ if (this.stage == null){ return; }; if (s_activeToolTip != null){ s_activeToolTip.hide(); }; this.removeEventListener(Event.ENTER_FRAME, fadeOutTick); this.addEventListener(Event.ENTER_FRAME, fadeInTick); positionTooltip(); s_activeToolTip = this; } private function hideToolTip():void{ if ((((this.stage == null)) || ((s_activeToolTip == null)))){ return; }; this.removeEventListener(Event.ENTER_FRAME, fadeInTick); this.addEventListener(Event.ENTER_FRAME, fadeOutTick); } private function mouseMoveHandler(_arg1:MouseEvent):void{ positionTooltip(); } public function listenForMouseEvents(_arg1:DisplayObject, _arg2:Boolean=false):void{ removeAllListeners(); m_target = _arg1; m_moveWithMouse = _arg2; if (m_target.stage == null){ m_target.addEventListener(Event.ADDED_TO_STAGE, init); } else { init(); }; } private function show():void{ removeEventListener(Event.ENTER_FRAME, fadeInTick); removeEventListener(Event.ENTER_FRAME, fadeOutTick); this.alpha = 1; } private function fadeInTick(_arg1:Event):void{ this.removeEventListener(Event.ENTER_FRAME, fadeOutTick); this.alpha = (this.alpha + 0.04); if (this.alpha > 0.9){ this.show(); }; } } }//package com.urbansquall.uiSection 223//UrbansquallVerticalScrollPane (com.urbansquall.ui.UrbansquallVerticalScrollPane) package com.urbansquall.ui { import flash.display.*; import flash.geom.*; public class UrbansquallVerticalScrollPane extends Sprite { private const k_sliderPadding:int = 4; private var m_content:Sprite; private var m_preResizeHeight:Number; private var m_slider:UrbansquallSlider; public function UrbansquallVerticalScrollPane(_arg1:DisplayObject, _arg2:Class){ m_content = new Sprite(); m_content.addChild(_arg1); m_content.scrollRect = new Rectangle(0, 0, m_content.width, m_content.height); this.addChild(m_content); m_slider = new _arg2(onSliderChange); m_slider.rotation = 90; m_slider.width = this.height; m_slider.x = (this.width + m_slider.height); this.addChild(m_slider); m_preResizeHeight = this.fullHeight; } override public function get height():Number{ return (m_slider.width); } public function resize():void{ m_content.scrollRect = new Rectangle(m_content.scrollRect.x, m_content.scrollRect.y, m_content.scrollRect.width, this.fullHeight); this.height = this.height; } override public function set height(_arg1:Number):void{ var _local4:Number; var _local2:Number = m_slider.value; var _local3:Number = m_preResizeHeight; m_slider.width = _arg1; m_slider.enabled = (this.fullHeight > _arg1); m_preResizeHeight = this.fullHeight; if (m_slider.enabled){ m_content.scrollRect = new Rectangle(m_content.scrollRect.x, m_content.scrollRect.y, m_content.scrollRect.width, _arg1); _local4 = (_local2 * (_local3 / this.fullHeight)); m_slider.setValue(_local4, false); }; } private function get fullHeight():Number{ return (m_content.getChildAt(0).height); } private function onSliderChange(_arg1:Number):void{ var _local2:Number = (_arg1 * (this.fullHeight - m_content.scrollRect.height)); m_content.scrollRect = new Rectangle(m_content.scrollRect.x, _local2, m_content.scrollRect.width, m_content.scrollRect.height); } public function setScrollPosition(_arg1:Number):void{ m_slider.setValue(_arg1); } override public function set width(_arg1:Number):void{ m_slider.x = _arg1; m_content.scrollRect = new Rectangle(m_content.scrollRect.x, m_content.scrollRect.y, (_arg1 - m_slider.height), m_content.scrollRect.height); } } }//package com.urbansquall.uiSection 224//Delegate (com.urbansquall.utils.Delegate) package com.urbansquall.utils { public class Delegate { public static function create(_arg1, _arg2:Function, ... _args):Function{ var target = _arg1; var handler = _arg2; var rest = _args; return (function (... _args){ var _local2:* = _args.concat(rest); return (handler.apply(target, _local2)); }); } } }//package com.urbansquall.utilsSection 225//IDisposable (com.urbansquall.utils.IDisposable) package com.urbansquall.utils { public interface IDisposable { function dispose():void; } }//package com.urbansquall.utilsSection 226//Reflection (com.urbansquall.utils.Reflection) package com.urbansquall.utils { import flash.utils.*; public class Reflection { public static function getPublicPropertiesAsArray(_arg1, _arg2:Boolean=false):Array{ var _local5:String; var _local3:Object = getPublicProperties(_arg1, _arg2); var _local4:Array = []; for (_local5 in _local3) { _local4.push(((_local5 + ": ") + _local3[_local5])); }; return (_local4); } public static function getPublicProperties(_arg1, _arg2:Boolean=false):Object{ var _local5:String; var _local3:XML = describeType(_arg1); var _local4:Object = {}; for each (_local5 in _local3.accessor.@name) { _local4[_local5] = _arg1[_local5]; }; return (_local4); } public static function classDerivesFromClass(_arg1:Class, _arg2:Class):Boolean{ var _local5:String; var _local3:XML = describeType(_arg1); var _local4:String = describeType(_arg2).@name; for each (_local5 in _local3..extendsClass.@type) { if (_local5 == _local4){ return (true); }; }; return (false); } public static function getPublicPropertiesAsString(_arg1, _arg2:Boolean=false, _arg3:String=" "):String{ return (getPublicPropertiesAsArray(_arg1, _arg2).join(_arg3)); } public static function getKeysForObject(_arg1:Object):Array{ var _local3:String; var _local2:Array = []; for (_local3 in _arg1) { _local2.push(_local3); }; return (_local2); } public static function getClassOfInstance(_arg1:Object):Class{ return (Class(getDefinitionByName(getQualifiedClassName(_arg1)))); } public static function getSuperClassOfInstance(_arg1:Object):Class{ return (Class(getDefinitionByName(getQualifiedSuperclassName(_arg1)))); } } }//package com.urbansquall.utilsSection 227//StringUtils (com.urbansquall.utils.StringUtils) package com.urbansquall.utils { public class StringUtils { public static function parseBBCode(_arg1:String):String{ _arg1 = _arg1.replace(/\[b\](.*?)\[\/b\]/gi, "<b>$1</b>"); _arg1 = _arg1.replace(/\[i\](.*?)\[\/i\]/gi, "<i>$1</i>"); _arg1 = _arg1.replace(/\[u\](.*?)\[\/u\]/gi, "<u>$1</u>"); _arg1 = _arg1.replace(/\[color=(.*?)\](.*?)\[\/color\]/gi, "<font color=\"$1\">$2</font>"); return (_arg1); } public static function trim(_arg1:String):String{ return ((_arg1) ? _arg1.replace(/^\s+|\s+$/, "") : ""); } public static function parseURLs(_arg1:String, _arg2:String="_new"):String{ var _local3 = "(http://)"; var _local4 = "([a-z0-9_-]+.[a-z0-9_-]+.[a-z0-9_-]+)"; var _local5:RegExp = new RegExp((_local3 + _local4), "ig"); _arg1 = _arg1.replace(_local5, "<a href=\"http://$2\"><u>$1$2</u></a>"); var _local6 = " (www.[a-z0-9_-]+.[a-z0-9_-]+)"; var _local7:RegExp = new RegExp(_local6, "ig"); _arg1 = _arg1.replace(_local7, "<a href=\"http://$1\"><u>$1</u></a>"); return (_arg1); } public static function trimLeft(_arg1:String):String{ if (_arg1 == null){ return (""); }; return (_arg1.replace(/^\s+/, "")); } public static function trimRight(_arg1:String):String{ if (_arg1 == null){ return (""); }; return (_arg1.replace(/\s+$/, "")); } public static function convertToClockTime(_arg1:int):String{ var _local2:int = Math.floor(((_arg1 / 1000) / 60)); var _local3:int = (Math.floor((_arg1 / 1000)) % 60); _local2 = Math.max(0, _local2); _local3 = Math.max(0, _local3); var _local4:String = ((_local2 < 10)) ? ("0" + _local2) : String(_local2); var _local5:String = ((_local3 < 10)) ? ("0" + _local3) : String(_local3); var _local6:String = ((_local2 + ":") + _local5); return (_local6); } public static function convertToCurrency(_arg1:Number):String{ var _local5:int; var _local6:String; var _local7:int; var _local2:String = Math.floor(_arg1).toString(); var _local3:String = (Math.round(((_arg1 - Math.floor(_arg1)) * 100)) / 100).toString(); var _local4 = 3; if (_arg1 < 0){ _local4 = (_local4 + 1); }; if (_local2.length > _local4){ _local5 = (_local2.length % 3); if (_local5){ _local6 = (_local2.substr(0, _local5) + ","); } else { _local6 = ""; }; _local7 = _local5; while (_local7 < (_local2.length - 3)) { _local6 = (_local6 + (_local2.substr(_local7, 3) + ",")); _local7 = (_local7 + 3); }; _local6 = (_local6 + _local2.substr(-3, 3)); } else { _local6 = _local2; }; while (_local3.length < 4) { _local3 = (_local3 + "0"); }; _local3 = _local3.substr(-2, 2); if (_local3 == "00"){ return (_local6); }; return (((_local6 + ".") + _local3)); } } }//package com.urbansquall.utilsSection 228//GameActionEvent (com.urbansquall.wrighton.events.GameActionEvent) package com.urbansquall.wrighton.events { import com.urbansquall.wrighton.*; public class GameActionEvent extends GameObjectEvent { private var m_action:GameAction; public static const FIRED:String = "action_fired"; public function GameActionEvent(_arg1:String, _arg2:GameAction){ super(_arg1, null, 0, 0); m_action = _arg2; } public function get action():GameAction{ return (m_action); } } }//package com.urbansquall.wrighton.eventsSection 229//GameEvent (com.urbansquall.wrighton.events.GameEvent) package com.urbansquall.wrighton.events { import flash.events.*; public class GameEvent extends Event { public function GameEvent(_arg1:String){ super(_arg1); } } }//package com.urbansquall.wrighton.eventsSection 230//GameObjectEvent (com.urbansquall.wrighton.events.GameObjectEvent) package com.urbansquall.wrighton.events { import flash.events.*; import com.urbansquall.wrighton.*; public class GameObjectEvent extends Event { private var m_gameObject:GameObject; private var m_tileX:int; private var m_tileY:int; public static const REMOVED:String = "building_removed"; public static const CONSTRUCTED:String = "building_constructed"; public static const DESTROYED:String = "building_destroyed"; public function GameObjectEvent(_arg1:String, _arg2:GameObject, _arg3:int, _arg4:int){ super(_arg1); m_gameObject = _arg2; m_tileX = _arg3; m_tileY = _arg4; } public function get gameObject():GameObject{ return (m_gameObject); } public function get tileY():int{ return (m_tileY); } public function get tileX():int{ return (m_tileX); } } }//package com.urbansquall.wrighton.eventsSection 231//Automata (com.urbansquall.wrighton.Automata) package com.urbansquall.wrighton { import flash.display.*; import com.urbansquall.skew.*; import flash.geom.*; import com.urbansquall.utils.*; import com.urbansquall.math.*; public class Automata extends SKEntity implements IDisposable { private var m_game:Game; private var m_tileDestinations:Array; private var m_type:AutomataType; private var m_currentDirection:String; private var m_waypointList:Array; private var m_move:Boolean; private var m_currentWaypointIndex:int; private var m_randomness:Number; private var m_resourcesToAddTo:IndecisionResources; private var m_carryingResources:IndecisionResources; private var m_sourceTile:GameTile; public static const DIRECTION_E:String = "E"; public static const DIRECTION_NW:String = "NW"; public static const DIRECTION_SW:String = "SW"; public static const DIRECTION_N:String = "N"; public static const DIRECTION_SE:String = "SE"; public static const DIRECTION_S:String = "S"; public static const DIRECTION_NE:String = "NE"; public static const DIRECTION_W:String = "W"; public function Automata(_arg1:Game, _arg2:AutomataType, _arg3:GameTile, _arg4:IndecisionResources=null, _arg5:SKLayer=null){ m_game = _arg1; m_type = _arg2; m_currentDirection = DIRECTION_NW; var _local6:SKLayer = ((_arg5) || (_arg3.layer)); super(getBitmapForDirection(m_currentDirection), _arg3.px, _arg3.py, _local6); this.layer.addEntity(this); this.mouseEnabled = false; this.visible = false; m_sourceTile = _arg3; m_move = false; m_randomness = 1; m_tileDestinations = [m_sourceTile]; m_currentWaypointIndex = 0; m_resourcesToAddTo = _arg4; m_carryingResources = new IndecisionResources(); m_waypointList = null; } public function get type():AutomataType{ return (m_type); } public function get tileDestinations():Array{ return (m_tileDestinations.slice()); } public function set carryingResources(_arg1:IndecisionResources):void{ m_carryingResources = _arg1; } private function changeDirection(_arg1:Boolean, _arg2:Boolean):void{ var _local4:Bitmap; var _local3:String = DIRECTION_N; if (((_arg1) && (_arg2))){ _local3 = DIRECTION_NW; } else { if (((_arg1) && (!(_arg2)))){ _local3 = DIRECTION_NE; } else { if (((!(_arg1)) && (_arg2))){ _local3 = DIRECTION_SW; } else { if (((!(_arg1)) && (!(_arg2)))){ _local3 = DIRECTION_SE; }; }; }; }; if (m_currentDirection != _local3){ _local4 = getBitmapForDirection(_local3); if (_local4 != null){ m_currentDirection = _local3; this.bitmapPiecesRef[0].bitmapData = _local4.bitmapData; }; }; } private function recalculatePath():void{ var _local2:int; var _local3:Point; var _local4:Point; var _local5:SKTilePosition; var _local6:SKTilePosition; var _local7:int; var _local8:int; m_move = false; var _local1:Array = getPrimaryWaypoints(); if (_local1.length == 1){ m_waypointList = _local1; } else { m_waypointList = new Array(); _local2 = 0; while (_local2 < _local1.length) { _local3 = _local1[_local2]; _local4 = ((_local2 == (_local1.length - 1))) ? _local1[0] : _local1[(_local2 + 1)]; _local5 = this.layer.getPositionFromCoordinates(_local4.x, _local4.y); _local6 = this.layer.getPositionFromCoordinates(_local3.x, _local3.y); _local7 = ((_local5.column > _local6.column)) ? 1 : -1; _local8 = ((_local5.row > _local6.row)) ? 1 : -1; while (((!((_local6.column == _local5.column))) || (!((_local6.row == _local5.row))))) { if ((((((Math.random() > 0.5)) || ((_local6.row == _local5.row)))) && (!((_local6.column == _local5.column))))){ _local6.column = (_local6.column + _local7); } else { _local6.row = (_local6.row + _local8); }; m_waypointList.push(this.layer.getCoordinatesFromPosition(_local6.column, _local6.row)); }; _local2++; }; }; moveToNextWaypoint(); this.visible = true; m_move = true; } public function get currentDirection():String{ return (m_currentDirection); } public function replaceTileDestination(_arg1:GameTile, _arg2:GameTile):Boolean{ var _local5:GameTile; var _local3:Boolean; var _local4:int; while (_local4 < m_tileDestinations.length) { _local5 = m_tileDestinations[_local4]; if (_local5 == _arg1){ _local3 = true; m_tileDestinations.splice(_local4, 1, _arg2); break; }; _local4++; }; if (_local3){ recalculatePath(); }; return (_local3); } public function addTileDestinationToStart(_arg1:GameTile):int{ m_tileDestinations.unshift(_arg1); recalculatePath(); return (m_tileDestinations.length); } public function addTileDestinationToEnd(_arg1:GameTile):int{ m_tileDestinations.push(_arg1); recalculatePath(); return (m_tileDestinations.length); } public function stopMovement():void{ m_move = false; } private function getBitmapForDirection(_arg1:String):Bitmap{ var _local2:Bitmap = m_type.ordinalBitmaps[_arg1]; if ((((_local2 == null)) && (/^N/i.test(_arg1)))){ _local2 = m_type.ordinalBitmaps[DIRECTION_N]; }; if ((((_local2 == null)) && (/^S/i.test(_arg1)))){ _local2 = m_type.ordinalBitmaps[DIRECTION_S]; }; return (_local2); } public function get currentDestination():Point{ return (m_waypointList[m_currentWaypointIndex]); } public function incrementFrame():void{ var _local1:BlittedAnimation; for each (_local1 in m_type.ordinalAnimations) { _local1.incrementFrame(); }; } public function changeType(_arg1:AutomataType):void{ m_type = _arg1; this.bitmapPiecesRef[0].bitmapData = getBitmapForDirection(m_currentDirection).bitmapData; } private function getPrimaryWaypoints():Array{ var _local3:GameTile; var _local1:Array = new Array(); var _local2:int; while (_local2 < m_tileDestinations.length) { _local3 = m_tileDestinations[_local2]; _local1.push(new Point(_local3.px, _local3.py)); _local2++; }; return (_local1); } private function getResourcesForTile(_arg1:Point):IndecisionResources{ var _local4:GameTile; var _local2:IndecisionResources = new IndecisionResources(); var _local3:int; while (_local3 < m_tileDestinations.length) { _local4 = m_tileDestinations[_local3]; if ((((_arg1.x == _local4.px)) && ((_arg1.y == _local4.py)))){ _local2.increaseBy(_local4.gameObject.producesOnWorkerArrival); break; }; _local3++; }; return (_local2); } public function get sourceTile():GameTile{ return (m_sourceTile); } public function removeTileDestination(_arg1:GameTile):int{ var _local4:GameTile; var _local2:Boolean; var _local3:int; while (_local3 < m_tileDestinations.length) { _local4 = m_tileDestinations[_local3]; if (_local4 == _arg1){ _local2 = true; m_tileDestinations.splice(_local3, 1); _local3--; }; _local3++; }; if (_local2){ recalculatePath(); }; return (m_tileDestinations.length); } private function moveToNextWaypoint():void{ if ((((((((m_currentWaypointIndex == 0)) && ((m_waypointList.length == 1)))) && ((this.px == sourceTile.px)))) && ((this.py == sourceTile.py)))){ m_move = false; this.visible = false; } else { m_currentWaypointIndex++; if ((((m_currentWaypointIndex >= m_waypointList.length)) || ((m_currentWaypointIndex < 0)))){ m_currentWaypointIndex = 0; }; }; m_randomness = ((Math.random() * (1.1 - 0.9)) + 0.9); } public function dispose():void{ m_move = false; m_resourcesToAddTo = null; m_carryingResources = null; m_tileDestinations = null; m_sourceTile = null; m_type = null; this.layer.removeEntity(this); } public function moveAutomataEvent(_arg1:Number):void{ var _local2:Point; var _local3:Number; var _local4:Number; if (m_move){ incrementFrame(); _local2 = PointUtils.calculateDeltaVector(new Point(this.px, this.py), this.currentDestination); _local3 = (((1 * _arg1) * m_randomness) * m_type.speedModifier); _local4 = PointUtils.calculateVectorLength(_local2); if (_local4 <= _local3){ _local3 = _local4; }; PointUtils.normalizeVector(_local2, _local3); changeDirection((_local2.y < 0), (_local2.x < 0)); this.px = (this.px + _local2.x); this.py = (this.py + _local2.y); if (_local3 == _local4){ if ((((this.px == sourceTile.px)) && ((this.py == sourceTile.py)))){ if (m_resourcesToAddTo != null){ m_carryingResources.metal = (m_carryingResources.metal * (1 + m_game.m_resourcesCollectedModifier)); m_carryingResources.oil = (m_carryingResources.oil * (1 + m_game.m_resourcesCollectedModifier)); m_carryingResources.money = (m_carryingResources.money * (1 + m_game.m_moneyCollectedModifier)); m_resourcesToAddTo.increaseBy(m_carryingResources); }; m_carryingResources = new IndecisionResources(); } else { m_carryingResources.increaseBy(getResourcesForTile(this.currentDestination)); }; moveToNextWaypoint(); }; }; } public function resumeMovement():void{ if (m_waypointList == null){ recalculatePath(); }; m_move = true; } public function get carryingResources():IndecisionResources{ return (m_carryingResources); } public function get waypointList():Array{ return (m_waypointList); } } }//package com.urbansquall.wrightonSection 232//AutomataType (com.urbansquall.wrighton.AutomataType) package com.urbansquall.wrighton { import flash.display.*; import com.urbansquall.skew.*; import flash.utils.*; public class AutomataType { private var m_ordinalBitmaps:Dictionary; protected var m_speedModifier:Number;// = 1 private var m_ordinalAnimations:Dictionary; public function AutomataType(){ m_ordinalBitmaps = new Dictionary(); m_ordinalAnimations = new Dictionary(); } public function get ordinalAnimations():Dictionary{ return (m_ordinalAnimations); } public function get ordinalBitmaps():Dictionary{ return (m_ordinalBitmaps); } public function get speedModifier():Number{ return (m_speedModifier); } protected function createAnimation(_arg1:String, ... _args):void{ var _local4:Class; m_ordinalBitmaps[_arg1] = new (_args[0]); var _local3:Array = new Array(_args.length); for each (_local4 in _args) { _local3.push((new (_local4) as Bitmap).bitmapData); }; m_ordinalAnimations[_arg1] = BlittedAnimation.createFromBitmapArray(m_ordinalBitmaps[_arg1].bitmapData, _local3); } } }//package com.urbansquall.wrightonSection 233//GameAction (com.urbansquall.wrighton.GameAction) package com.urbansquall.wrighton { import flash.display.*; public class GameAction { protected var m_objectRequirements:Array; protected var m_description:String; protected var m_icon:Bitmap; protected var m_resources:GameResources; protected var m_reloadTime:int; public function GameAction(){ m_icon = new Bitmap(); m_objectRequirements = new Array(); m_reloadTime = 1000; } public function get objectPrerequisiteRequirements():Array{ return (m_objectRequirements.slice()); } public function get resources():GameResources{ return (m_resources); } public function get reloadTime():int{ return (m_reloadTime); } public function get icon():Bitmap{ return (m_icon); } public function get description():String{ return (m_description); } } }//package com.urbansquall.wrightonSection 234//GameEngine (com.urbansquall.wrighton.GameEngine) package com.urbansquall.wrighton { import com.urbansquall.metronome.*; import com.urbansquall.utils.*; public class GameEngine extends GameTimer { private var m_gameResources:GameResources; private var m_winConditions:Array; public function GameEngine(_arg1:int=10, _arg2:Class=null){ super(_arg1); if (_arg2 == null){ _arg2 = GameResources; }; m_gameResources = new (_arg2); m_winConditions = new Array(); } public function addResourceIncreaseEvent(_arg1:String, _arg2:GameResources, _arg3:int):void{ this.addGameListener(_arg1, Delegate.create(this, increaseResourcesEvent, _arg2), _arg3); } public function get resources():GameResources{ return (m_gameResources); } private function increaseResourcesEvent(_arg1:TickEvent, _arg2:GameResources):void{ this.resources.increaseBy(_arg2); } public function get winConditions():Array{ return (m_winConditions); } } }//package com.urbansquall.wrightonSection 235//GameObject (com.urbansquall.wrighton.GameObject) package com.urbansquall.wrighton { import flash.display.*; import com.urbansquall.skew.*; public class GameObject { protected var m_objectRequirements:Array; protected var m_namePlural:String; protected var m_frequency:int; protected var m_category:String; protected var m_isRawMaterial:Boolean; protected var m_producesOnWorkerArrival:GameResources; protected var m_producesAtInterval:GameResources; protected var m_name:String; protected var m_actions:Array; protected var m_description:String; protected var m_animation:BlittedAnimation; protected var m_tileRows:int; protected var m_article:String; protected var m_tile:Bitmap; protected var m_resourceRequirements:GameResources; protected var m_tileCols:int; protected var m_isConstructable:Boolean; protected var m_mustBeBuiltOn:Class; protected var m_producesOnBuild:GameResources; protected var m_maximumAllowed:Number; public function GameObject(){ m_frequency = 1000; m_actions = new Array(); m_objectRequirements = new Array(); m_article = "a"; m_name = "Building"; m_namePlural = "Buildings"; m_description = ""; m_maximumAllowed = Infinity; m_isRawMaterial = false; m_isConstructable = true; } public function get actions():Array{ return (m_actions.slice()); } public function get name():String{ return (m_name); } public function get isUpgradable():Boolean{ var _local2:GameAction; var _local1:Boolean; for each (_local2 in m_actions) { if ((_local2 is UpgradeAction)){ _local1 = true; break; }; }; return (_local1); } protected function initializeDisplay(... _args):void{ var _local3:Class; m_tile = new (_args[0]); var _local2:Array = new Array(_args.length); for each (_local3 in _args) { _local2.push((new (_local3) as Bitmap).bitmapData); }; m_animation = BlittedAnimation.createFromBitmapArray(m_tile.bitmapData, _local2); } public function get producesAtInterval():GameResources{ return (m_producesAtInterval); } public function toStringPlural():String{ return (this.namePlural); } public function get tileRowCount():int{ return (m_tileRows); } public function get tile():Bitmap{ return (m_tile); } public function get isConstructable():Boolean{ return (m_isConstructable); } public function get hasTileRequirement():Boolean{ return (!((m_mustBeBuiltOn == null))); } public function requires(_arg1:GameObject):Boolean{ return (((m_mustBeBuiltOn == null)) ? false : (_arg1 is m_mustBeBuiltOn)); } public function get producesOnBuild():GameResources{ return (m_producesOnBuild); } public function get tileRequirement():Class{ return (m_mustBeBuiltOn); } public function get resourceRequirements():GameResources{ return (m_resourceRequirements); } public function get upgradesTo():Class{ var _local1:GameAction; var _local2:UpgradeAction; for each (_local1 in m_actions) { if ((_local1 is UpgradeAction)){ _local2 = (_local1 as UpgradeAction); return (_local2.upgradesTo); }; }; return (null); } public function get tileColumnCount():int{ return (m_tileCols); } public function get objectPrerequisiteRequirements():Array{ return (m_objectRequirements.slice()); } public function get tileClone():Bitmap{ return (new Bitmap(m_tile.bitmapData.clone())); } public function get frequency():int{ return (m_frequency); } public function get isRawMaterial():Boolean{ return (m_isRawMaterial); } public function get maximumAllowed():Number{ return (m_maximumAllowed); } public function get producesOnWorkerArrival():GameResources{ return (m_producesOnWorkerArrival); } public function get namePlural():String{ return (m_namePlural); } public function get tileAnimation():BlittedAnimation{ return (m_animation); } public function toStringSingular():String{ return (((this.article + " ") + this.name)); } public function get description():String{ return (m_description); } public function get article():String{ return (m_article); } public function get category():String{ return (m_category); } } }//package com.urbansquall.wrightonSection 236//GameResources (com.urbansquall.wrighton.GameResources) package com.urbansquall.wrighton { import com.urbansquall.utils.*; public class GameResources { var m_propertyList:Array; public function GameResources(){ m_propertyList = Reflection.getKeysForObject(Reflection.getPublicProperties(this)); m_propertyList.sort(); } public function meetsOrExceeds(_arg1:GameResources, _arg2:Boolean=false, _arg3:Array=null):Boolean{ var _local5:String; var _local4:Boolean; _arg3 = ((_arg3) || ([])); for each (_local5 in m_propertyList) { if (_arg3.indexOf(_local5) == -1){ if (((((!(_arg2)) && ((_arg1[_local5] > 0)))) && ((this[_local5] < _arg1[_local5])))){ _local4 = false; break; } else { if (((((_arg2) && ((_arg1[_local5] < 0)))) && ((this[_local5] < Math.abs(_arg1[_local5]))))){ _local4 = false; break; }; }; }; }; return (_local4); } public function reduceBy(_arg1:GameResources):void{ var _local2:String; if (_arg1 != null){ for each (_local2 in m_propertyList) { this[_local2] = (this[_local2] - _arg1[_local2]); }; }; } public function increaseAllBy(_arg1:int):void{ var _local2:String; for each (_local2 in m_propertyList) { this[_local2] = (this[_local2] + _arg1); }; } public function toStringCompare(_arg1:GameResources, _arg2:Boolean=true, _arg3:String="R: V", _arg4:String=" ", _arg5:Boolean=false, _arg6:Boolean=false):String{ var _local10:String; var _local11:String; var _local12:String; var _local7:Array = new Array(); var _local8:String = _arg4; var _local9:String = _arg3; for each (_local10 in m_propertyList) { if (((((_arg2) || (!((this[_local10] == 0))))) || (((_arg6) && ((_local10.toLowerCase() == "debt")))))){ _local11 = this[_local10]; _local12 = _arg1[_local10]; if (_arg5){ if (parseFloat(this[_local10]) > 0){ _local11 = ("+" + _local11); }; }; _local7.push(_local9.replace(/v/i, ((_local12 + "/") + _local11)).replace(/r/i, _local10)); }; }; return (_local7.join(_local8)); } public function increaseBy(_arg1:GameResources):void{ var _local2:String; if (_arg1 != null){ for each (_local2 in m_propertyList) { this[_local2] = (this[_local2] + _arg1[_local2]); }; }; } public function toString(_arg1:Boolean=true, _arg2:String="R: V", _arg3:String=" ", _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false):String{ var _local10:String; var _local11:String; var _local12:Number; var _local7:Array = new Array(); var _local8:String = _arg3; var _local9:String = _arg2; for each (_local10 in m_propertyList) { if (((((_arg1) || (!((this[_local10] == 0))))) || (((_arg5) && ((_local10.toLowerCase() == "debt")))))){ _local11 = this[_local10]; _local12 = parseFloat(this[_local10]); if (_arg4){ if (_local12 > 0){ _local11 = ("+" + _local11); }; } else { if (_arg6){ if (_local12 > 0){ _local11 = ("-" + _local11); }; }; }; _local7.push(_local9.replace(/v/i, _local11).replace(/r/i, _local10)); }; }; return (_local7.join(_local8)); } public function getAmountShortBy(_arg1:GameResources, _arg2:Boolean=false, _arg3:Array=null):GameResources{ var _local5:String; var _local6:*; var _local4:GameResources = new (Reflection.getClassOfInstance(this)); _arg3 = ((_arg3) || ([])); for each (_local5 in m_propertyList) { if (_arg3.indexOf(_local5) == -1){ _local6 = (_arg2) ? Math.abs(_arg1[_local5]) : _arg1[_local5]; if (((((!(_arg2)) && ((_arg1[_local5] > 0)))) || (((_arg2) && ((_arg1[_local5] < 0)))))){ _local4[_local5] = Math.abs(Math.min((this[_local5] - _local6), 0)); }; }; }; return (_local4); } public function clone():GameResources{ var _local2:String; var _local1:GameResources = new (Reflection.getClassOfInstance(this)); for each (_local2 in this.m_propertyList) { _local1[_local2] = this[_local2]; }; return (_local1); } } }//package com.urbansquall.wrightonSection 237//GameTile (com.urbansquall.wrighton.GameTile) package com.urbansquall.wrighton { import com.urbansquall.skew.*; public class GameTile extends SKTile { private var m_gameObject:GameObject; private var m_hitpoints:Number; private var m_actionsEnabled:Boolean; public function GameTile(_arg1:GameObject, _arg2:SKLayer){ m_gameObject = _arg1; m_actionsEnabled = true; m_hitpoints = 100; super(_arg1.tile, _arg1.tileColumnCount, _arg1.tileRowCount, _arg2); } public function get actionsEnabled():Boolean{ return (m_actionsEnabled); } public function toString():String{ return ((((("[GameTile(" + tileKey) + ")=") + ((gameObject)!=null) ? gameObject.name : "null") + "]")); } public function set actionsEnabled(_arg1:Boolean):void{ m_actionsEnabled = _arg1; } public function get gameObject():GameObject{ return (m_gameObject); } public function get hitpoints():Number{ return (m_hitpoints); } public function get tileKey():String{ return (((column + ",") + row)); } public function set hitpoints(_arg1:Number):void{ m_hitpoints = _arg1; } } }//package com.urbansquall.wrightonSection 238//GameTimer (com.urbansquall.wrighton.GameTimer) package com.urbansquall.wrighton { import com.urbansquall.metronome.*; public class GameTimer { private var m_metronome:Metronome; private var m_runtime:Number; private var m_startTime:Date; public function GameTimer(_arg1:int=50){ m_metronome = new Metronome(_arg1, false); } public function addUIListener(_arg1:String, _arg2:Function, _arg3:int=-1):void{ m_metronome.addListener(_arg1, _arg2, _arg3, Infinity, false, false); } public function startGame():void{ if (m_startTime == null){ m_startTime = new Date(); m_runtime = 0; }; m_metronome.start(); } public function removeListener(_arg1:String):void{ m_metronome.removeListener(_arg1); } public function resumeListener(_arg1:String):void{ m_metronome.resumeListener(_arg1); } public function get elapsedTime():Number{ return (m_runtime); } public function pauseListener(_arg1:String):void{ m_metronome.pauseListener(_arg1); } public function addEffectListener(_arg1:String, _arg2:Function, _arg3:int=-1, _arg4:Number=INF):void{ m_metronome.addListener(_arg1, _arg2, _arg3, _arg4, true, false); } public function addGameListener(_arg1:String, _arg2:Function, _arg3:int=-1, _arg4:Number=INF):void{ m_metronome.addListener(_arg1, _arg2, _arg3, _arg4, true, true); } public function pauseGame():void{ updateRuntime(); m_metronome.pauseAll(); } public function get baseIterationFrequency():int{ return (m_metronome.baseIterationFrequency); } public function resetListenerExecutionCount(_arg1:String):void{ m_metronome.resetListenerExecutionCount(_arg1); } public function resetListenerAccruedTime(_arg1:String):void{ m_metronome.resetListenerAccruedTime(_arg1); } private function updateRuntime():void{ var _local1:Date; if (((!(this.isPaused)) && (!((m_startTime == null))))){ _local1 = new Date(); m_runtime = (m_runtime + (_local1.getTime() - m_startTime.getTime())); m_startTime = _local1; }; } public function resumeGame():void{ updateRuntime(); m_metronome.resumeAll(); } public function get isPaused():Boolean{ return (m_metronome.isPaused); } public function stopGame():void{ updateRuntime(); m_startTime = null; m_metronome.stop(); } public function dispose():void{ m_metronome.dispose(); } public static function calculateTimingFromFramerate(_arg1:int):int{ return (Math.round((1000 / _arg1))); } } }//package com.urbansquall.wrightonSection 239//UpgradeAction (com.urbansquall.wrighton.UpgradeAction) package com.urbansquall.wrighton { public class UpgradeAction extends GameAction { protected var m_upgradesTo:Class; public function UpgradeAction(){ m_description = ""; m_resources = null; } public function get upgradesTo():Class{ return (m_upgradesTo); } } }//package com.urbansquall.wrightonSection 240//WinConditionAbstract (com.urbansquall.wrighton.WinConditionAbstract) package com.urbansquall.wrighton { public class WinConditionAbstract { protected var m_achieved:Boolean; public function WinConditionAbstract(){ m_achieved = false; } public function get achieved():Boolean{ return (m_achieved); } public function toString():String{ return (""); } public function set achieved(_arg1:Boolean):void{ m_achieved = _arg1; } } }//package com.urbansquall.wrightonSection 241//WinConditionActions (com.urbansquall.wrighton.WinConditionActions) package com.urbansquall.wrighton { public class WinConditionActions extends WinConditionAbstract { private var m_actionRequirements:Array; private var m_preface:String; public function WinConditionActions(_arg1:Array){ m_actionRequirements = _arg1; } override public function toString():String{ return (((m_preface + " ") + m_actionRequirements)); } public function get actions():Array{ return (m_actionRequirements); } } }//package com.urbansquall.wrightonSection 242//WinConditionObjects (com.urbansquall.wrighton.WinConditionObjects) package com.urbansquall.wrighton { public class WinConditionObjects extends WinConditionAbstract { private var m_objectRequirements:Array; private var m_preface:String; public function WinConditionObjects(_arg1:Array, _arg2:String="Build"){ m_objectRequirements = _arg1; m_preface = _arg2; } public function get objects():Array{ return (m_objectRequirements); } public function get prefaceString():String{ return (m_preface); } public function set prefaceString(_arg1:String):void{ m_preface = _arg1; } override public function toString():String{ return (((m_preface + " ") + m_objectRequirements)); } } }//package com.urbansquall.wrightonSection 243//WinConditionResources (com.urbansquall.wrighton.WinConditionResources) package com.urbansquall.wrighton { public class WinConditionResources extends WinConditionAbstract { private var m_resources:GameResources; private var m_preface:String; public function WinConditionResources(_arg1:GameResources=null, _arg2:String="Collect"){ m_resources = ((_arg1) || (new GameResources())); m_preface = _arg2; } public function get prefaceString():String{ return (m_preface); } public function set prefaceString(_arg1:String):void{ m_preface = _arg1; } public function get resources():GameResources{ return (m_resources); } override public function toString():String{ return (((m_preface + " ") + m_resources.toString())); } } }//package com.urbansquall.wrightonSection 244//GameServices (gs3.GameServices) package gs3 { import flash.events.*; import flash.display.*; import flash.xml.*; import util.*; import flash.net.*; public final class GameServices extends Sprite { private static var _submitToURL:String = ""; private static var _lastGameIndex:Number = 0; private static var _lastCommand:String = ""; private static var _adEnabled:Boolean = false; private static var _defaultGSHost:String = "gs.mtv-q.mtvi.com"; private static var _userCallbackFn:Function = null; private static var _defaultGameId:Number = 6; private static var _gsPath:String = ""; private static var _playBackId:String; private static var _defaultSiteId:Number = 10; private static var _defaultLoginURL:String = "communitylogin.php"; private static var _userName:String = ""; private static var _gsSyncId:Number = 0; private static var _gameIdList:Array; private static var _gameTracking:GSGameTracking = null; private static var _intlLocale:String; public static var _gsVersion:String = "3.1.2"; private static var _sendToFriendURL:String = ""; private static var _gsKey:String = ""; private static var _adTarget:String = ""; private static var _gameName:String = ""; private static var _gsSessionId:String; private static var _gsToken:String = ""; private static var _isInitialized:Boolean = false; private static var _debug:Boolean = true; private static var _defaultSubmitToURL:String = "community.php"; private static var _isEmbedded:Boolean = false; private static var _challengeToken:String = ""; private static var _movieURL:String = ""; private static var _defaultSendToFriendURL:String = "games/common/stf.php"; private static var _defaultAvatarPath:String = "games/avatarBuilder/composite.php"; private static var _gsAdService:GSAdService = null; private static var _gsSendToFriend:GSSendToFriend = null; private static var _siteId:Number = 0; private static var _gameGroupId:Number = 0; private static var _displayObjectContainer:DisplayObjectContainer; public function GameServices(_arg1:DisplayObjectContainer=null, _arg2:Function=null){ debugMsg(((((("GameServices version " + _gsVersion) + " constructing with ") + _arg1) + ", ") + _arg2)); _isInitialized = false; _lastGameIndex = 0; _gameIdList = new Array(); setCallback(_arg2); setStage(_arg1); } public function getUserChallengeCount(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("GetUserChallengeCount"); _local2.challenge_user_id = _arg1; makeServiceRequest(_local2); return (true); } public function listPublicChallengesForGameGroup(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("ListPublicChallengesForGameGroup"); _local2.game_group_id = _arg1; makeServiceRequest(_local2); return (true); } public function getGameGroupGames(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("GetGameGroupGames"); _local2.game_group_id = _arg1; makeServiceRequest(_local2); return (true); } public function getGameGroupGamesByName(_arg1:String):Boolean{ var _local2:Object; if (_arg1.length < 1){ return (false); }; _local2 = makeGSParamObject("GetGameGroupGamesByName"); _local2.game_group_name = _arg1; makeServiceRequest(_local2); return (true); } public static function showAd(_arg1:String, _arg2:Sprite):Boolean{ if (_gsAdService != null){ return (_gsAdService.showAd(_arg1, _arg2)); }; return (false); } public static function getRegistrationStatus():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetRegistrationStatus"); _local1.update_count = 0; makeServiceRequest(_local1); return (true); } public static function createNotification(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String):Boolean{ var _local5:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; if (((isNaN(_arg3)) || ((_arg3 < 1)))){ return (false); }; if (isNaN(_arg2)){ _arg2 = 0; }; _local5 = makeGSParamObject("CreateNotification"); _local5.category_id = _arg1; _local5.category_key = _arg2; _local5.recipient_id = _arg3; _local5.msg = _arg4; makeServiceRequest(_local5); return (true); } public static function declineChallenge(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("DeclineChallenge"); _local2.challenge_id = _arg1; makeServiceRequest(_local2); return (true); } public static function getUserCategoryPointsHistory(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; _local3 = makeGSParamObject("GetUserCategoryPointsHistory"); _local3.points_category_id = _arg1; _local3.category_subkey = _arg2; makeServiceRequest(_local3); return (true); } public static function acceptNotification(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("AcceptNotification"); _local2.category_id = _arg1; makeServiceRequest(_local2); return (true); } private static function setupFromFlashvars(_arg1:Object):Boolean{ var _local2:Boolean; var _local3:int; var _local4:String; _local2 = false; _local3 = 0; if (_arg1 != null){ debugMsg(("setupFromFlashvars flashVars: " + _arg1.toString())); for (_local4 in _arg1) { debugMsg(((("setupFromFlashvars flashvars." + _local4) + " = ") + _arg1[_local4])); }; if (_arg1["GSPath"]){ _gsPath = _arg1["GSPath"]; _local3++; }; if (_arg1["site_id"]){ _siteId = parseInt(_arg1["site_id"]); _local3++; }; if (_siteId < 1){ _siteId = _defaultSiteId; }; if (_arg1["locale"]){ _intlLocale = _arg1["locale"].toLowerCase(); } else { _intlLocale = "us"; }; if (_arg1["ct"]){ _challengeToken = _arg1["ct"]; } else { _challengeToken = ""; }; if (_arg1["game_id"]){ setupGameIds(_arg1["game_id"]); _local3++; } else { _gameIdList.push(("" + _defaultGameId)); }; if (_arg1["targetGame"]){ _lastGameIndex = int(_arg1["targetGame"]); if ((((_lastGameIndex < 0)) || ((_lastGameIndex > _gameIdList.length)))){ _lastGameIndex = 0; }; } else { _lastGameIndex = 0; }; if (_arg1["game_name"]){ _gameName = _arg1["game_name"]; } else { _gameName = ("unknown_game_" + _gameIdList[_lastGameIndex]); }; if (_arg1["game_group_id"]){ _gameGroupId = int(_arg1["game_group_id"]); }; if (_arg1["gstoken"]){ _gsToken = _arg1["gstoken"]; } else { _gsToken = ""; }; if (_arg1["gs_key"]){ _gsKey = _arg1["gs_key"]; _local3++; }; if (_arg1["URL"]){ _sendToFriendURL = _arg1["URL"]; }; if (_arg1["session_id"]){ _gsSessionId = _arg1["session_id"]; _local3++; }; if (_arg1["SubmitURL"]){ _submitToURL = _arg1["SubmitURL"]; }; if (_submitToURL.length < 1){ _submitToURL = ((("http://" + getHost()) + "/") + _defaultSubmitToURL); }; if (_arg1["playbackid"]){ _playBackId = _arg1["playbackid"]; }; if (_arg1["adTarget"]){ _adTarget = _arg1["adTarget"]; }; if (_arg1["adEnabled"]){ _adEnabled = (_arg1["adEnabled"] == "1"); }; if (_local3 > 3){ gsInternalInit(true); } else { debugMsg((("*** setupFromFlashvars (" + _local3) + "): Not enought info to start GS")); }; }; return (_local2); } public static function countNotifications(_arg1:Number):Boolean{ var _local2:Object; if (isNaN(_arg1)){ _arg1 = 0; }; _local2 = makeGSParamObject("CountNotifications"); _local2.category_id = _arg1; makeServiceRequest(_local2); return (true); } public static function getTargetPlatform():String{ var _local1:String; var _local2:String; _local2 = getHost(); if (_local2.indexOf(".mtvi.com") >= 2){ _local1 = _local2.substr((_local2.indexOf(".mtvi.com") - 2), 2); } else { _local1 = ""; }; return (_local1); } public static function getUserCommentsNotApproved():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetUserCommentsNotApproved"); makeServiceRequest(_local1); return (true); } public static function isIntegrated():Boolean{ return (!((_gsPath == ""))); } public static function getHost():String{ var _local1:String; var _local2:Number; var _local3:Number; _local1 = ""; if ((((_movieURL.length == 0)) || ((_movieURL.indexOf("file:") >= 0)))){ _local1 = getSubmitURL(); } else { _local1 = _movieURL; }; if (_local1.length == 0){ _local1 = _defaultGSHost; }; if (_local1.indexOf("://") >= 0){ _local2 = (_local1.indexOf("://") + 3); _local3 = _local1.indexOf("/", (_local2 + 1)); if (_local3 > (_local2 + 1)){ _local1 = _local1.substr(_local2, (_local3 - _local2)); } else { _local1 = _local1.substr(_local2); }; }; return (_local1); } public static function setGameTargetId(_arg1:Number):Boolean{ var _local2:Boolean; _local2 = false; if (!isNaN(_arg1)){ if ((((_arg1 >= 0)) && ((_arg1 <= _gameIdList.length)))){ if (_arg1 > 0){ _arg1--; }; _lastGameIndex = _arg1; _local2 = true; } else { _lastGameIndex = 0; }; }; return (_local2); } public static function addUserBuddy(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; _local3 = makeGSParamObject("AddUserBuddy"); _local3.buddy_user_id = _arg1; _local3.group_id = _arg2; makeServiceRequest(_local3); return (true); } public static function getUserCategoryPoints(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; _local3 = makeGSParamObject("GetUserCategoryPoints"); _local3.points_category_id = _arg1; _local3.category_subkey = _arg2; makeServiceRequest(_local3); return (true); } public static function getUserScoreForUser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserScore(_arg1, _arg2, _arg3, _arg4)); } private static function setupGameIds(_arg1:String):Boolean{ _gameIdList = new Array(); if (_arg1.length < 1){ _arg1 = String(_defaultGameId); }; if (_arg1.indexOf(",") > 0){ _gameIdList = _arg1.split(","); } else { _gameIdList.push(_arg1); }; return (true); } public static function debugMsg(_arg1:String):void{ if (_debug){ GenericDebugger.traceMsg(_arg1); trace(_arg1); }; } public static function clearGameData():void{ GSGameData.clear(); } public static function getGameData():String{ if (_gsSendToFriend != null){ return (_gsSendToFriend.getGameData()); }; return (""); } public static function getUserSiteExperiencePoints():Boolean{ return (ScoreSubmitInternal.context_.getUserSiteExperiencePoints()); } public static function setGameDataFromString(_arg1:String):Boolean{ return (GSGameData.fromGSGameDataString(_arg1)); } public static function getUserReviewsForUser(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; _local4 = makeGSParamObject("GetUserReviewsForUser"); _local4.user_id = _arg1; _local4.start_item = _arg2; _local4.num_items = _arg3; makeServiceRequest(_local4); return (true); } public static function getGSKey():String{ var _local1:String; _local1 = ""; if (!_isEmbedded){ _local1 = generateGSKey(); } else { if (_gsKey.length > 0){ _local1 = _gsKey; }; }; return (_local1); } public static function getUserSiteExperiencePointsForUser(_arg1:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserSiteExperiencePointsForUser(_arg1)); } public static function cancelAd():Boolean{ if (_gsAdService != null){ return (_gsAdService.cancelAd()); }; return (false); } public static function unauthSubmitScoreGetScores(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{ if (isNaN(_arg7)){ _arg7 = 0; }; if (isNaN(_arg8)){ _arg8 = -1; }; return (ScoreSubmitInternal.context_.unauthSubmitScoreGetScores(_arg1, _arg2, _arg3, "", _arg4, _arg5, _arg6, _arg7, _arg8)); } public static function getUserBadgesForGame():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetUserBadgesForGame"); _local1.game_id = getGameId(); makeServiceRequest(_local1); return (true); } public static function getScoreRanks(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Boolean{ return (ScoreSubmitInternal.context_.getScoreRanks(_arg1, _arg2, _arg3, _arg4, _arg5)); } public static function getChallengeToken():String{ return (_challengeToken); } public static function getUserVoteStatistics(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; _local3 = makeGSParamObject("GetUserVoteStatistics"); if (((!(isNaN(_arg1))) && ((_arg1 > 0)))){ _local3.user_id = _arg1; }; _local3.expected_result = _arg2; makeServiceRequest(_local3); return (true); } public static function getGSToken():String{ return (_gsToken); } public static function setChallengeToken(_arg1:String):Boolean{ _challengeToken = _arg1; return (isChallenge()); } public static function isChallenge():Boolean{ return (!((_challengeToken == ""))); } public static function getChallengeUsers(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("GetChallengeUsers"); _local2.challenge_id = _arg1; makeServiceRequest(_local2); return (true); } public static function getUserVotesForGroup(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; _local4 = makeGSParamObject("GetUserVotesForGroup"); _local4.category_id = _arg1; _local4.vote_group_key = _arg2; _local4.vote_category_key = _arg3; makeServiceRequest(_local4); return (true); } public static function getGameDataValue(_arg1:String):String{ return (GSGameData.getValue(_arg1)); } public static function getUserBuddies(_arg1:Boolean):Boolean{ var _local2:Object; _local2 = makeGSParamObject("GetUserBuddies"); _local2.accepted = (_arg1) ? "1" : "0"; makeServiceRequest(_local2); return (true); } private static function checkGSToken():Boolean{ var _local1:Boolean; var _local2:Blowfish; var _local3:String; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Number; var _local8:String; var _local9:String; var _local10:String; _local1 = false; if (_gsToken.length > 0){ _local2 = new Blowfish(); _local3 = "AC454B0933A5C19F"; _local4 = _local2.decrypt(unescape(_gsToken), _local3, null); if (_local4.length > 0){ _local5 = _local4.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local8 = _local5[_local6]; _local7 = _local8.indexOf("="); if (_local7 > 0){ _local9 = _local8.substring(0, (_local7 - 1)); _local10 = _local8.substring((_local7 + 1)); GameServices[("_" + _local9)] = _local10; }; _local6++; }; _local1 = true; }; }; return (_local1); } public static function getScoringStatsForQuiz(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; _local3 = makeGSParamObject("GetScoringStatsForQuiz"); _local3.quiz_id = _arg1; _local3.quiz_group_id = _arg2; makeServiceRequest(_local3); return (true); } public static function deleteNotification(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("DeleteNotification"); _local2.category_id = _arg1; makeServiceRequest(_local2); return (true); } public static function generateEmbedCode(_arg1:String):String{ var _local2:String; var _local3:String; var _local4:String; if (_arg1.length < 1){ _arg1 = "#000000"; } else { if (_arg1.indexOf("#") == -1){ _arg1 = ("#" + _arg1); }; }; _local2 = ((_gsPath.indexOf("http://", 0) == -1)) ? getGSWebRoot() : ""; _local3 = (((((((((((("GSPath=" + _local2) + _gsPath) + "&SubmitURL=") + getSubmitURL()) + "&URL=") + getSendToFriendURL()) + "&site_id=") + getSiteId()) + "&game_id=") + getGameId()) + "&gs_key=") + getGSKey()); _local4 = ((((((((((("<embed src=\"" + _movieURL) + "\" bgcolor=\"") + _arg1) + "\" quality=\"high\" play=\"true\" flashvars=\"") + _local3) + "\" loop=\"false\" allowscriptaccess=\"always\" pluginspage=\"http://www.adobe.com/go/getflashplayer\" ") + "type=\"application/x-shockwave-flash\" align=\"middle\" height=\"") + _displayObjectContainer.height) + "\" width=\"") + _displayObjectContainer.width) + "\">"); return (_local4); } public static function makeGSParamObject(_arg1:String):Object{ var _local2:Object; _local2 = new Object(); _local2.fn = _arg1; _local2.site_id = getSiteId(); _local2.state_seq = ++_gsSyncId; _lastCommand = _arg1; return (_local2); } public static function getUserName():String{ return (_userName); } private static function gsInternalInit(_arg1:Boolean=true):void{ if (((!(isPossibleValidSessionId(_gsSessionId))) && (_arg1))){ _isEmbedded = true; startSession(); } else { checkGSToken(); initGameTracking(); if (_gameTracking){ _gameTracking.sendHit(GSGameTracking.LOAD, ""); }; if (_adEnabled){ _gsAdService = GSAdService.getContext(); } else { adComplete(); }; _isInitialized = true; }; } public static function getUserGameGroupExperiencePointsForUser(_arg1:Number, _arg2:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserGameGroupExperiencePointsForUser(_arg1, _arg2)); } public static function adComplete():Boolean{ if (_gsAdService != null){ _userCallbackFn(null, "AdComplete"); }; return (false); } public static function getTotalVotesByUser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; _local5 = makeGSParamObject("GetTotalVotesByUserId"); if (((!(isNaN(_arg1))) && ((_arg1 > 0)))){ _local5.user_id = _arg1; }; _local5.category_id = _arg2; _local5.vote_group_key = _arg3; _local5.vote_category_key = _arg4; makeServiceRequest(_local5); return (true); } public static function addUserToChallenge(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local3 = makeGSParamObject("AddUserToChallenge"); _local3.challenge_id = _arg1; _local3.invite_user_id = _arg2; makeServiceRequest(_local3); return (true); } public static function onGSResponse(_arg1:XML):void{ var _local2:String; var _local3:GSResult; _local3 = new GSResult(_arg1); _local2 = _local3.getFunctionRequest(); if (_local2.length < 1){ _local2 = _lastCommand; }; if (_userCallbackFn != null){ _userCallbackFn(_local3, _local2); }; } public static function approveUserComment(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("ApproveUserComment"); _local2.user_comment_id = _arg1; makeServiceRequest(_local2); return (true); } public static function testChallengeToken(_arg1:String):Boolean{ var _local2:Object; _local2 = makeGSParamObject("TestChallengeToken"); _local2.challenge_token = _arg1; makeServiceRequest(_local2); return (true); } public static function deleteUserBuddy(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("DeleteUserBuddy"); _local2.buddy_user_id = _arg1; makeServiceRequest(_local2); return (true); } public static function addUserReview(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String):Boolean{ var _local5:Object; _local5 = makeGSParamObject("AddUserReview"); _local5.category_id = _arg1; _local5.review_category_key = _arg2; _local5.content_rating = _arg3; _local5.review_content = _arg4; makeServiceRequest(_local5); return (true); } public static function getPlaybackId():String{ return (_playBackId); } public static function getRegistrationStatusEx():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetRegistrationStatusEx"); _local1.update_count = 0; makeServiceRequest(_local1); return (true); } public static function getUserGameRankForUser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserGameRankForUser(_arg1, _arg2, _arg3, _arg4)); } public static function getUserReviews(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; _local5 = makeGSParamObject("GetUserReviews"); _local5.category_id = _arg1; _local5.review_category_key = _arg2; _local5.start_item = _arg3; _local5.num_items = _arg4; makeServiceRequest(_local5); return (true); } public static function getUserIntermediateScores(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserIntermediateScores(_arg1, _arg2, _arg3)); } public static function getLastCommand():String{ return (_lastCommand); } public static function sendToFriend(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String):Boolean{ var _local7:Boolean; _local7 = false; if (_userCallbackFn == null){ _local7 = false; } else { if (_gsSendToFriend == null){ _gsSendToFriend = new GSSendToFriend(_userCallbackFn); }; _local7 = _gsSendToFriend.sendToFriend(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); }; return (_local7); } public static function getNotificationsByUser(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (isNaN(_arg2)){ _arg2 = 0; }; if (isNaN(_arg3)){ _arg3 = 50; }; if (isNaN(_arg1)){ _arg1 = 0; }; _local4 = makeGSParamObject("GetNotificationsByUser"); _local4.category_id = _arg1; _local4.first_item = _arg2; _local4.num_item = _arg3; makeServiceRequest(_local4); return (true); } public static function getUserGameRank(_arg1:Number, _arg2:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserGameRank(_arg1, _arg2)); } public static function addUserCategoryPoints(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean):Boolean{ var _local5:Object; _local5 = makeGSParamObject("AddUserCategoryPoints"); _local5.points_category_id = _arg1; _local5.category_subkey = _arg2; _local5.amount = _arg3; _local5.count_in_exp = (_arg4) ? "1" : "0"; makeServiceRequest(_local5); return (true); } public static function getGameGroupUserRank(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ return (ScoreSubmitInternal.context_.getGameGroupUserRank(_arg1, _arg2, _arg3)); } public static function addUserComment(_arg1:Number, _arg2:String):Boolean{ var _local3:Object; if ((((((_arg2.length < 1)) || (isNaN(_arg1)))) || ((_arg1 < 1)))){ return (false); }; _local3 = makeGSParamObject("AddUserComment"); _local3.commented_user_id = _arg1; _local3.user_comment = _arg2; makeServiceRequest(_local3); return (true); } public static function getUserGamePlayHistoryForGame(_arg1:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserGamePlayHistoryForGame(_arg1)); } public static function addSiteUserListToChallenge(_arg1:Number, _arg2:String):Boolean{ var _local3:Object; if (((((isNaN(_arg1)) || ((_arg1 < 1)))) || ((_arg2.length < 1)))){ return (false); }; _local3 = makeGSParamObject("AddSiteUserListToChallenge"); _local3.challenge_id = _arg1; _local3.invite_site_user_id_list = _arg2; makeServiceRequest(_local3); return (true); } public static function createGameGroupChallengeForSiteUsers(_arg1:Number, _arg2:String, _arg3:String, _arg4:Number, _arg5:Boolean, _arg6:String, _arg7:String):Boolean{ var _local8:Object; _local8 = makeGSParamObject("CreateGameGroupChallengeForSiteUsers"); _local8.game_group_id = _arg1; _local8.start_time = _arg2; _local8.end_time = _arg3; _local8.num_submits_per_player = _arg4; _local8.public_results = _arg5; _local8.title = _arg6; _local8.list_of_site_user_ids = _arg7; makeServiceRequest(_local8); return (true); } private static function getLoginURL():String{ return ((getGSWebRoot() + _defaultLoginURL)); } public static function recordScore(_arg1:Number, _arg2:Number):void{ ScoreSubmitInternal.context_.recordScore(_arg1, _arg2); } public static function addSiteUserToChallenge(_arg1:Number, _arg2:String):Boolean{ var _local3:Object; if (((((isNaN(_arg1)) || ((_arg1 < 1)))) || ((_arg2.length < 1)))){ return (false); }; _local3 = makeGSParamObject("AddSiteUserToChallenge"); _local3.challenge_id = _arg1; _local3.invite_site_user_id = _arg2; makeServiceRequest(_local3); return (true); } public static function countUserCommentsForUser(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("CountUserCommentsForUser"); _local2.commented_user_id = _arg1; makeServiceRequest(_local2); return (true); } public static function getRatingRanksForGame(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ return (ScoreSubmitInternal.context_.getRatingRanksForGame(_arg1, _arg2, _arg3)); } public static function getUserRatingRanksForUser(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserRatingRanksForUser(_arg1, _arg2, _arg3)); } public static function setCallback(_arg1:Function):Boolean{ _userCallbackFn = _arg1; return (true); } public static function getUserScore(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserScore(0, _arg1, _arg2, _arg3)); } public static function getGSContentId(_arg1:String):Object{ var _local2:Object; var _local3:String; var _local4:Number; _local2 = {}; _local3 = Base64.Decode(_arg1); _local4 = new Number(_local3); _local2["contentType"] = (_local4 / 10000000000000); _local2["siteId"] = ((_local4 % 10000000000000) / 1000000000); _local2["objectId"] = (_local4 % 1000000000); return (_local2); } public static function setGameDataValue(_arg1:String, _arg2:String):Boolean{ return (GSGameData.setValue(_arg1, _arg2)); } public static function addOrUpdateVote(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Boolean{ var _local6:Object; _local6 = makeGSParamObject("AddOrUpdateVote"); _local6.category_id = _arg1; _local6.vote_group_key = _arg2; _local6.vote_category_key = _arg3; _local6.vote_category_subkey = _arg4; _local6.vote_value = _arg5; makeServiceRequest(_local6); return (true); } public static function getBuddyUsers(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("GetBuddyUsers"); _local2.buddy_user_id = _arg1; makeServiceRequest(_local2); return (true); } public static function unauthSubmitScore(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String):Boolean{ return (ScoreSubmitInternal.context_.unauthSubmitScore(_arg1, _arg2, _arg3, "", _arg4, 0, 0)); } public static function getTopLeadersForQuiz(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; _local4 = makeGSParamObject("GetTopLeadersForQuiz"); _local4.quiz_id = _arg1; _local4.quiz_group_id = _arg2; _local4.top_num_ranks = _arg3; makeServiceRequest(_local4); return (true); } public static function formatScore(_arg1:String, _arg2:String):String{ var _local3:String; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:String; _local3 = _arg1.charAt(0); _local4 = 0; _local5 = 0; _local6 = _arg1.indexOf("."); if (_local6 > 0){ if (_local6 > 1){ _local5 = parseInt(_arg1.substr(1, (_local6 - 1))); }; _local4 = parseInt(_arg1.substr((_local6 + 1))); }; if ((((_local3 == "t")) && ((_local5 == 0)))){ _local5 = 6; }; _local7 = (_local5 - _arg2.length); while (_local7 > 0) { _arg2 = ("0" + _arg2); _local7--; }; if (_arg2.length < (_local4 + 1)){ _local7 = ((_local4 - _arg2.length) + 1); while (_local7 > 0) { _arg2 = ("0" + _arg2); _local7--; }; }; if (_local3 == "d"){ if (_local4 > 0){ _arg2 = ((_arg2.substr(0, (_arg2.length - _local4)) + ".") + _arg2.substr((_arg2.length - _local4))); }; } else { if (_local3 == "t"){ _local8 = ""; if (_local4 > 0){ _local8 = ("." + _arg2.substr((_arg2.length - _local4))); _arg2 = _arg2.substr(0, (_arg2.length - _local4)); }; while (_arg2.length > 0) { _local8 = ((_arg2.substr((_arg2.length - 2), 2) + ":") + _local8); _arg2 = _arg2.substr(0, (_arg2.length - 2)); }; }; }; return (_arg2); } public static function unauthLeaderBoard(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ if (isNaN(_arg3)){ _arg3 = 0; }; if (isNaN(_arg4)){ _arg4 = -1; }; return (ScoreSubmitInternal.context_.unauthLeaderBoard(_arg1, _arg2, _arg3, _arg4)); } public static function submitScoreGetScores(_arg1:Number, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number):Boolean{ return (ScoreSubmitInternal.context_.submitScoreGetScores(_arg1, _arg2, _arg3, "", _arg4, _arg5, 0, 0)); } public static function getSendToFriendURL():String{ if (_sendToFriendURL.length < 1){ _sendToFriendURL = (("http://" + getHost()) + _defaultSendToFriendURL); }; return (_sendToFriendURL); } public static function getUserGameExperiencePoints():Boolean{ return (ScoreSubmitInternal.context_.getUserGameExperiencePoints()); } public static function findUsersEx(_arg1:String):Boolean{ var _local2:Object; if (_arg1.length < 1){ return (false); }; _local2 = makeGSParamObject("FindUsersEx"); _local2.look_for = _arg1.substr(0, 20); makeServiceRequest(_local2); return (true); } public static function addUserBuddiesToChallenge(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("AddUserBuddiesToChallenge"); _local2.challenge_id = _arg1; makeServiceRequest(_local2); return (true); } public static function getUserRatingRanksForGameForUser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserRatingRanksForGameForUser(_arg1, _arg2, _arg3, _arg4)); } public static function moveUserBuddy(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; _local3 = makeGSParamObject("MoveUserBuddy"); _local3.buddy_user_id = _arg1; _local3.new_position = _arg2; makeServiceRequest(_local3); return (true); } public static function sendHit(_arg1:String, _arg2:String):Boolean{ if (_gameTracking == null){ return (false); }; return (_gameTracking.sendHit(_arg1, _arg2)); } public static function getUserGamePlayHistory():Boolean{ return (ScoreSubmitInternal.context_.getUserGamePlayHistory()); } private static function setupFromGSResult(_arg1:GSResult):Boolean{ var _local2:Boolean; var _local3:Array; var _local4:int; _local2 = false; _local3 = _arg1.getResults(); _local4 = 0; _gameIdList = new Array(); if (_local3["GSPath"]){ _gsPath = _local3["GSPath"]; _local4++; }; if (_local3["site_id"]){ _siteId = parseInt(_local3["site_id"]); _local4++; }; if (_siteId < 1){ _siteId = _defaultSiteId; }; if (_local3["locale"]){ _intlLocale = _local3["locale"].toLowerCase(); } else { _intlLocale = "us"; }; if (_local3["ct"]){ _challengeToken = _local3["ct"]; } else { _challengeToken = ""; }; if (_local3["game_id"]){ setupGameIds(_local3["game_id"]); _local4++; } else { _gameIdList.push(("" + _defaultGameId)); }; if (_local3["targetGame"]){ _lastGameIndex = int(_local3["targetGame"]); if ((((_lastGameIndex < 0)) || ((_lastGameIndex > _gameIdList.length)))){ _lastGameIndex = 0; }; } else { _lastGameIndex = 0; }; if (_local3["game_name"]){ _gameName = _local3["game_name"]; } else { _gameName = ("unknown_game_" + _gameIdList[_lastGameIndex]); }; if (_local3["gstoken"]){ _gsToken = _local3["gstoken"]; } else { _gsToken = ""; }; if (_local3["gs_key"]){ _gsKey = _local3["gs_key"]; _local4++; }; if (_local3["URL"]){ _sendToFriendURL = _local3["URL"]; }; if (_local3["session_id"]){ _gsSessionId = _local3["session_id"]; _local4++; }; if (_local3["SubmitURL"]){ _submitToURL = _local3["SubmitURL"]; }; if (_submitToURL.length < 1){ _submitToURL = ((("http://" + getHost()) + "/") + _defaultSubmitToURL); }; if (_local3["playbackid"]){ _playBackId = _local3["playbackid"]; }; if (_local3["adTarget"]){ _adTarget = _local3["adTarget"]; }; if (_local3["adEnabled"]){ _adEnabled = (_local3["adEnabled"] == "1"); }; if (_local4 > 3){ gsInternalInit(false); } else { debugMsg((("*** SetupFromGSResult (" + _local4) + "): Not enought info to start GS")); }; return (_local2); } public static function getUserRatingRanksForGame(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ return (ScoreSubmitInternal.context_.getRatingRanksForGame(_arg1, _arg2, _arg3)); } public static function getRegistrationStatusForUser(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("GetRegistrationStatus"); _local2.update_count = 0; if (((!(isNaN(_arg1))) && ((_arg1 > 0)))){ _local2.user_id = _arg1; }; makeServiceRequest(_local2); return (true); } public static function getSiteAttributes():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetSiteAttributes"); makeServiceRequest(_local1); return (true); } public static function createGameChallenge(_arg1:String, _arg2:String, _arg3:Number, _arg4:Boolean, _arg5:String, _arg6:String):Boolean{ var _local7:Object; _local7 = makeGSParamObject("CreateGameChallenge"); _local7.game_id = getGameId(); _local7.start_time = _arg1; _local7.end_time = _arg2; _local7.num_submits_per_player = _arg3; _local7.public_results = _arg4; _local7.title = _arg5; _local7.list_of_user_ids = _arg6; makeServiceRequest(_local7); return (true); } public static function getUserProfileInfo(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("GetUserProfileInfo"); if (((!(isNaN(_arg1))) && ((_arg1 > 0)))){ _local2.user_id = _arg1; }; makeServiceRequest(_local2); return (true); } public static function removeUserComment(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("RemoveUserComment"); _local2.user_comment_id = _arg1; makeServiceRequest(_local2); return (true); } public static function deleteChallenge(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("DeleteChallenge"); _local2.challenge_id = _arg1; makeServiceRequest(_local2); return (true); } public static function getRatingRanks(_arg1:Number, _arg2:Number):Boolean{ return (ScoreSubmitInternal.context_.getRatingRanks(_arg1, _arg2)); } public static function addUserListToChallenge(_arg1:Number, _arg2:String):Boolean{ var _local3:Object; if (((((isNaN(_arg1)) || ((_arg1 < 1)))) || ((_arg2.length < 1)))){ return (false); }; _local3 = makeGSParamObject("AddUserToChallenge"); _local3.challenge_id = _arg1; _local3.invite_user_id_list = _arg2; makeServiceRequest(_local3); return (true); } public static function getUserBadges():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetUserBadges"); makeServiceRequest(_local1); return (true); } public static function getRegistrationStatusForUserEx(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("GetRegistrationStatusEx"); _local2.update_count = 0; if (((!(isNaN(_arg1))) && ((_arg1 > 0)))){ _local2.user_id = _arg1; }; makeServiceRequest(_local2); return (true); } private static function setDebug(_arg1:Boolean):void{ _debug = _arg1; } public static function getGameName():String{ return (_gameName); } public static function getUserRatingForUser(_arg1:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserRatingForUser(_arg1)); } public static function getUserCommentsForUser(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (((isNaN(_arg2)) || ((_arg2 < 0)))){ _arg2 = 0; }; if (((isNaN(_arg3)) || ((_arg3 < 0)))){ _arg3 = 10; } else { if (_arg3 > 500){ _arg3 = 500; }; }; _local4 = makeGSParamObject("GetUserCommentsForUser"); _local4.commented_user_id = _arg1; _local4.start_item = _arg2; _local4.num_items = _arg3; makeServiceRequest(_local4); return (true); } public static function getUserRatingRanks(_arg1:Number, _arg2:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserRatingRanks(_arg1, _arg2)); } public static function getSendToFriendError():String{ if (_gsSendToFriend != null){ return (_gsSendToFriend.getError()); }; return (""); } public static function getNotifications(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (isNaN(_arg2)){ _arg2 = 0; }; if (isNaN(_arg3)){ _arg3 = 50; }; if (isNaN(_arg1)){ _arg1 = 0; }; _local4 = makeGSParamObject("GetNotifications"); _local4.category_id = _arg1; _local4.first_item = _arg2; _local4.num_item = _arg3; makeServiceRequest(_local4); return (true); } public static function getGSWebRoot():String{ var _local1:String; var _local2:int; _local1 = getSubmitURL(); if (_local1.length > 0){ _local2 = _local1.indexOf("/", 8); if (_local2 != -1){ _local1 = _local1.substring(0, (_local2 + 1)); } else { _local1 = (("http://" + _defaultGSHost) + "/"); }; } else { _local1 = (("http://" + _defaultGSHost) + "/"); }; return (_local1); } public static function isLive(_arg1:Number):Boolean{ var _local2:String; _local2 = getHost(); return ((((((_local2.length > 0)) && (!((_local2 == "localhost"))))) && ((_local2.indexOf(".mtvi.", 0) < 0)))); } public static function makeGSContentId(_arg1:Number, _arg2:Number, _arg3:Number):String{ var _local4:String; var _local5:Number; _local4 = ""; if (_arg1 < 1){ _arg1 = getSiteId(); }; if (_arg3 < 1){ _arg3 = getGameId(); _arg2 = 2; }; _local5 = (((_arg2 * 10000000000000) + (_arg1 * 1000000000)) + _arg3); _local4 = Base64.Encode(_local5.toString()); return (_local4); } public static function getUserGameExperiencePointsForUser(_arg1:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserGameExperiencePointsForUser(_arg1)); } public static function getUserRating():Boolean{ return (ScoreSubmitInternal.context_.getUserRating()); } public static function countUserReviews(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; _local3 = makeGSParamObject("CountUserReviews"); _local3.category_id = _arg1; _local3.review_category_key = _arg2; makeServiceRequest(_local3); return (true); } public static function setUserIntermediateScore(_arg1:Number, _arg2:String):Boolean{ return (ScoreSubmitInternal.context_.setUserIntermediateScore(_arg1, _arg2)); } public static function getLocale():String{ return (_intlLocale); } public static function createGameGroupChallenge(_arg1:Number, _arg2:String, _arg3:String, _arg4:Number, _arg5:Boolean, _arg6:String, _arg7:String):Boolean{ var _local8:Object; _local8 = makeGSParamObject("CreateGameGroupChallenge"); _local8.game_group_id = _arg1; _local8.start_time = _arg2; _local8.end_time = _arg3; _local8.num_submits_per_player = _arg4; _local8.public_results = _arg5; _local8.title = _arg6; _local8.list_of_user_ids = _arg7; makeServiceRequest(_local8); return (true); } public static function getVersionString():String{ return (_gsVersion); } public static function loadAvatarForUser(_arg1:Number, _arg2:Number, _arg3:Sprite, _arg4:String):Sprite{ var _local5:URLVariables; var _local6:URLRequest; var _local7:Loader; if (_arg3 == null){ _arg3 = Sprite(_displayObjectContainer); }; _local5 = new URLVariables(); if (((!(isNaN(_arg1))) && ((_arg1 > 0)))){ _local5.user_id = _arg1; _local5.size = _arg2; } else { _local5.me = new Date().getTime(); _local5.size = _arg2; }; _local6 = new URLRequest((getGSWebRoot() + _defaultAvatarPath)); _local6.method = URLRequestMethod.GET; _local7 = new Loader(); _local7.load(_local6); _arg3.addChild(_local7); _local7.name = _arg4; return (Sprite(_local7)); } public static function setupSession(_arg1:GSResult):Boolean{ var _local2:Array; if (((!((_arg1 == null))) && ((_arg1.getResults().length > 0)))){ _local2 = _arg1.getResults(); _gsSessionId = _local2.session_id; _submitToURL = _local2.SubmitURL; setupGameIds(_local2.game_id); if (_local2.targetGame != null){ _lastGameIndex = parseInt(_local2.targetGame); if ((((_lastGameIndex < 0)) || ((_lastGameIndex > _gameIdList.length)))){ _lastGameIndex = 0; }; } else { _lastGameIndex = 0; }; if (_local2.game_name != null){ _gameName = _local2.game_name; }; if (_local2.game_group_id != null){ _gameGroupId = parseInt(_local2.game_group_id); }; if (_local2.gstoken != null){ _gsToken = _local2.gstoken; checkGSToken(); }; if (_local2.ct != null){ _challengeToken = _local2.ct; }; if (_local2.adTarget != null){ _adTarget = _local2.adTarget; }; if (((!((_local2.URL == null))) || (!((_local2.playbackid == null))))){ if (_gsSendToFriend == null){ _gsSendToFriend = new GSSendToFriend(_userCallbackFn); }; _gsSendToFriend._initFromGSResult(_arg1); }; if (_local2.adEnabled != null){ _adEnabled = (_local2.adEnabled == "1"); if (_adEnabled){ _gsAdService = GSAdService.getContext(); }; }; return (true); }; return (false); } public static function getUserComments(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((isNaN(_arg1)) || ((_arg1 < 0)))){ _arg1 = 0; }; if (((isNaN(_arg2)) || ((_arg2 < 0)))){ _arg2 = 10; } else { if (_arg2 > 500){ _arg2 = 500; }; }; _local3 = makeGSParamObject("GetUserComments"); _local3.start_item = _arg1; _local3.num_items = _arg2; makeServiceRequest(_local3); return (true); } public static function leaderBoard(_arg1:Number, _arg2:Number):Boolean{ return (ScoreSubmitInternal.context_.leaderBoard(_arg1, _arg2)); } public static function findUserId(_arg1:String):Boolean{ var _local2:Object; if (_arg1.length < 1){ return (false); }; _local2 = makeGSParamObject("FindUserId"); _local2.user_name = _arg1.substr(0, 20); makeServiceRequest(_local2); return (true); } public static function submitScore(_arg1:Number, _arg2:Number, _arg3:String):Boolean{ return (ScoreSubmitInternal.context_.submitScore(_arg1, _arg2, _arg3, "")); } public static function closeChallenge(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("CloseChallenge"); _local2.challenge_id = _arg1; makeServiceRequest(_local2); return (true); } public static function getNumberOfVotesPerValue():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetNumberOfVotesPerValue"); makeServiceRequest(_local1); return (true); } public static function getActiveUserCount(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ _arg1 = 1800; }; _local2 = makeGSParamObject("GetActiveUserCount"); _local2.last_interval = _arg1; makeServiceRequest(_local2); return (true); } public static function login(_arg1:String, _arg2:String):Boolean{ var _local3:Object; var _local4:GSRequest; if ((((_arg1.length > 0)) && ((_arg2.length > 0)))){ _local3 = makeGSParamObject("UserLogin"); _local3.user_name = _arg1; _local3.password = _arg2; _local4 = new GSRequest(); _local4.send(getLoginURL(), onGSResponse, _local3); return (true); }; return (false); } public static function listUserCategoryPoints():Boolean{ var _local1:Object; _local1 = makeGSParamObject("ListUserCategoryPoints"); makeServiceRequest(_local1); return (true); } public static function getQuizScoreRanksUnauth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; _local5 = makeGSParamObject("GetQuizScoreRanksUnauth"); _local5.quiz_id = _arg1; _local5.quiz_group_id = _arg2; _local5.first_rank = _arg3; _local5.num_ranks = _arg4; makeServiceRequest(_local5); return (true); } public static function getAverageVote(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; _local4 = makeGSParamObject("GetAverageVote"); _local4.vote_category_id = _arg1; _local4.vote_group_key = _arg2; _local4.vote_category_key = _arg3; makeServiceRequest(_local4); return (true); } private static function isPossibleValidSessionId(_arg1:String):Boolean{ var _local2:Boolean; var _local3:RegExp; _local2 = false; if (_arg1 != null){ _local3 = /^[a-zA-Z0-9]/; _local2 = (((_arg1.length == 32)) && (!((_local3.exec(_arg1) == null)))); }; return (_local2); } public static function getSiteUserRank():Boolean{ return (ScoreSubmitInternal.context_.getSiteUserRank()); } public static function getUserScoreRanks(_arg1:Number, _arg2:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserScoreRanks(_arg1, _arg2)); } public static function getUserGameGroupExperiencePoints(_arg1:Number):Boolean{ return (ScoreSubmitInternal.context_.getUserGameGroupExperiencePoints(_arg1)); } public static function getActiveUsers(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ _arg1 = 1800; }; if (((isNaN(_arg2)) || ((_arg2 < 1)))){ _arg2 = 1; }; if (((isNaN(_arg3)) || ((_arg3 < 1)))){ _arg3 = 50; }; _local4 = makeGSParamObject("GetActiveUsers"); _local4.last_interval = _arg1; _local4.first_pos = _arg2; _local4.num_users = _arg3; makeServiceRequest(_local4); return (true); } public static function isUserLoggedIn():Boolean{ return ((_userName.length > 0)); } private static function generateGSKey():String{ var _local1:String; _local1 = MD5.hex_md5((("GameServices" + getSiteId()) + getGameId())); return (_local1); } public static function getSubmitURL():String{ if (_submitToURL.length == 0){ _submitToURL = ((("http://" + _defaultGSHost) + "/") + _defaultSubmitToURL); }; return (_submitToURL); } public static function getQuizScoreRanks(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; _local5 = makeGSParamObject("GetQuizScoreRanks"); _local5.quiz_id = _arg1; _local5.quiz_group_id = _arg2; _local5.first_rank = _arg3; _local5.num_ranks = _arg4; makeServiceRequest(_local5); return (true); } public static function unauthSubmitScoreGetRank(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String):Boolean{ return (ScoreSubmitInternal.context_.unauthSubmitScoreGetRank(_arg1, _arg2, _arg3, "", _arg4, 0, 0)); } public static function logout():Boolean{ var _local1:Object; _local1 = makeGSParamObject("UserLogout"); makeServiceRequest(_local1); return (true); } public static function getCategoryPointsRanks(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; _local5 = makeGSParamObject("GetCategoryPointsRanks"); _local5.points_category_id = _arg1; _local5.category_subkey = _arg2; _local5.first_rank = _arg3; _local5.num_ranks = _arg4; makeServiceRequest(_local5); return (true); } public static function acceptUserBuddy(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("AcceptUserBuddy"); _local2.buddy_user_id = _arg1; makeServiceRequest(_local2); return (true); } public static function isAdEnabled():Boolean{ return (_adEnabled); } public static function countUserComments():Boolean{ var _local1:Object; _local1 = makeGSParamObject("CountUserComments"); makeServiceRequest(_local1); return (true); } public static function getGameIdFromTargetId(_arg1:Number):Number{ var _local2:Number; _local2 = 0; if (!isNaN(_arg1)){ if (_gameIdList.length > 0){ if ((((_arg1 < _gameIdList.length)) && ((_arg1 >= 0)))){ _local2 = _gameIdList[_arg1]; } else { _local2 = _gameIdList[0]; }; }; }; if (_local2 < 1){ _local2 = _defaultGameId; }; return (_local2); } public static function getSessionId():String{ if (_gsSessionId.length > 0){ return (_gsSessionId); }; return ("4fae62ce6574dab5ca443db4affa0f85"); } public static function getUserRegistration():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetUserRegistration"); makeServiceRequest(_local1); return (true); } public static function getGameId():Number{ var _local1:Number; _local1 = 0; if (_gameIdList.length > 0){ if (_lastGameIndex < _gameIdList.length){ _local1 = _gameIdList[_lastGameIndex]; } else { _local1 = _gameIdList[0]; }; }; if (_local1 < 1){ _local1 = _defaultGameId; }; return (_local1); } public static function removeUserFromChallenge(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local3 = makeGSParamObject("RemoveUserFromChallenge"); _local3.challenge_id = _arg1; _local3.remove_user_id = _arg2; makeServiceRequest(_local3); return (true); } public static function listChallenges():Boolean{ var _local1:Object; _local1 = makeGSParamObject("ListChallenges"); _local1.game_id = getGameId(); makeServiceRequest(_local1); return (true); } public static function setGameId(_arg1:Number):Boolean{ var _local2:Boolean; var _local3:Number; _local2 = false; if (!isNaN(_arg1)){ if ((((_arg1 > 0)) && ((_gameIdList.length > 0)))){ _local3 = 0; while (_local3 < _gameIdList.length) { if (_gameIdList[_local3] == _arg1){ _lastGameIndex = _local3; _local2 = true; break; }; _local3++; }; }; }; return (_local2); } public static function getUserReviewsNotApproved(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; _local3 = makeGSParamObject("GetUserReviewsNotApproved"); _local3.category_id = _arg1; _local3.review_category_key = _arg2; makeServiceRequest(_local3); return (true); } public static function getUserCategoryPointsForUser(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; _local4 = makeGSParamObject("GetUserCategoryPointsForUser"); _local4.user_id = _arg1; _local4.points_category_id = _arg2; _local4.category_subkey = _arg3; makeServiceRequest(_local4); return (true); } public static function initAdComplete():Boolean{ if (_gsAdService != null){ _userCallbackFn(null, "AdReady"); }; return (false); } public static function loadDefaultAvatar(_arg1:Number, _arg2:Number, _arg3:Sprite, _arg4:String):Sprite{ var _local5:URLVariables; var _local6:URLRequest; var _local7:Loader; if (_arg3 == null){ _arg3 = Sprite(_displayObjectContainer); }; if (((isNaN(_arg2)) || ((_arg2 < 0)))){ _arg2 = 2; }; if (((isNaN(_arg1)) || ((_arg1 < 0)))){ _arg1 = 1; }; _local5 = new URLVariables(); _local5.site_id = getSiteId(); _local5.default_index = _arg1; _local5.size = _arg2; _local6 = new URLRequest((getGSWebRoot() + _defaultAvatarPath)); _local6.method = URLRequestMethod.GET; _local7 = new Loader(); _local7.load(_local6); _arg3.addChild(_local7); _local7.name = _arg4; return (Sprite(_local7)); } public static function makeServiceRequest(_arg1:Object):void{ var _local2:GSRequest; _local2 = new GSRequest(); _local2.send(getSubmitURL(), onGSResponse, _arg1); } public static function getSiteId():Number{ return (_siteId); } public static function countUserReviewsForUser(_arg1:Number):Boolean{ var _local2:Object; _local2 = makeGSParamObject("CountUserReviewsForUser"); _local2.user_id = _arg1; makeServiceRequest(_local2); return (true); } public static function setStage(_arg1:DisplayObjectContainer, _arg2:Object=null):Boolean{ var _local3:int; var _local4:String; _displayObjectContainer = _arg1; if (_displayObjectContainer != null){ _movieURL = _displayObjectContainer.loaderInfo.url; debugMsg(("SetStage: Movie URL=" + _movieURL)); debugMsg(("SetStage flashVars: " + _displayObjectContainer.root.loaderInfo.parameters.toString())); _local3 = 0; for (_local4 in _displayObjectContainer.root.loaderInfo.parameters) { debugMsg(((("SetStage flashvars[" + _local4) + "] = ") + _displayObjectContainer.root.loaderInfo.parameters[_local4])); if ((((((((_local4 == "game_id")) || ((_local4 == "site_id")))) || ((_local4 == "gs_key")))) || ((_local4 == "session_id")))){ _local3++; }; }; if (_local3 > 2){ setupFromFlashvars(_displayObjectContainer.root.loaderInfo.parameters); } else { setupFromFlashvars(_arg2); }; }; return (true); } public static function createGameChallengeForBuddies(_arg1:String, _arg2:String, _arg3:Number, _arg4:Boolean, _arg5:String):Boolean{ var _local6:Object; _local6 = makeGSParamObject("CreateGameChallengeForBuddies"); _local6.game_id = getGameId(); _local6.start_time = _arg1; _local6.end_time = _arg2; _local6.num_submits_per_player = _arg3; _local6.public_results = _arg4; _local6.title = _arg5; makeServiceRequest(_local6); return (true); } public static function getVoteResponse(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; _local5 = makeGSParamObject("GetVoteResponse"); _local5.vote_category_id = _arg1; _local5.vote_group_key = _arg2; _local5.vote_category_key = _arg3; _local5.vote_category_subkey = _arg4; makeServiceRequest(_local5); return (true); } public static function getBaseDir():String{ var _local1:String; var _local2:Number; _local1 = ""; _local2 = _movieURL.lastIndexOf("/"); if (_local2 != -1){ _local1 = _movieURL.substring(0, (_local2 + 1)); }; return (_local1); } public static function createGameChallengeForSiteUsers(_arg1:String, _arg2:String, _arg3:Number, _arg4:Boolean, _arg5:String, _arg6:String):Boolean{ var _local7:Object; _local7 = makeGSParamObject("CreateGameChallengeForSiteUsers"); _local7.game_id = getGameId(); _local7.start_time = _arg1; _local7.end_time = _arg2; _local7.num_submits_per_player = _arg3; _local7.public_results = _arg4; _local7.title = _arg5; _local7.list_of_site_user_ids = _arg6; makeServiceRequest(_local7); return (true); } public static function findUsers(_arg1:String, _arg2:Boolean):Boolean{ var _local3:Object; if (_arg1.length < 1){ return (false); }; _local3 = makeGSParamObject("FindUsers"); _local3.user_name_part = _arg1.substr(0, 20); _local3.starts_with = (_arg2) ? "1" : "0"; makeServiceRequest(_local3); return (true); } public static function getGameBadges():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetGameBadges"); _local1.game_id = getGameId(); makeServiceRequest(_local1); return (true); } public static function isEmbedded():Boolean{ return (_isEmbedded); } protected static function startSession():Boolean{ var _local1:Object; _local1 = makeGSParamObject("StartSession"); _local1.game_id = getGameId(); _local1.gs_key = getGSKey(); makeServiceRequest(_local1); return (true); } public static function createGameGroupChallengeForBuddies(_arg1:Number, _arg2:String, _arg3:String, _arg4:Number, _arg5:Boolean, _arg6:String):Boolean{ var _local7:Object; _local7 = makeGSParamObject("CreateGameGroupChallengeForBuddies"); _local7.game_group_id = _arg1; _local7.start_time = _arg2; _local7.end_time = _arg3; _local7.num_submits_per_player = _arg4; _local7.public_results = _arg5; _local7.title = _arg6; makeServiceRequest(_local7); return (true); } public static function isSendToFriendError():Boolean{ if (_gsSendToFriend != null){ return (_gsSendToFriend.isError()); }; return (false); } public static function loadAvatar(_arg1:Number, _arg2:Sprite, _arg3:String):Sprite{ return (loadAvatarForUser(-1, _arg1, _arg2, _arg3)); } public static function initAdService():Boolean{ if (_gsAdService != null){ return (_gsAdService.initAdService()); }; return (false); } public static function listPublicChallengesForGame():Boolean{ var _local1:Object; _local1 = makeGSParamObject("ListChallengesForUser"); _local1.game_id = getGameId(); makeServiceRequest(_local1); return (true); } public static function submitScoreGetRank(_arg1:Number, _arg2:Number, _arg3:String):Boolean{ return (ScoreSubmitInternal.context_.submitScoreGetRank(_arg1, _arg2, _arg3, "")); } public static function getGameAttributes():Boolean{ var _local1:Object; _local1 = makeGSParamObject("GetGameAttributes"); _local1.game_id = getGameId(); makeServiceRequest(_local1); return (true); } public static function getChallengeScoreRanks(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local4 = makeGSParamObject("GetChallengeScoreRanks"); _local4.challenge_id = _arg1; _local4.first_rank = _arg2; _local4.num_ranks = _arg3; makeServiceRequest(_local4); return (true); } private static function setSubmitURL(_arg1:String):Boolean{ if (_arg1.length > 0){ _submitToURL = ((("http://" + _arg1) + "/") + _defaultSubmitToURL); }; return (true); } private static function initGameTracking(_arg1:String="", _arg2:Boolean=false):Boolean{ if (_gameTracking == null){ _gameTracking = new GSGameTracking(); if (_gameTracking == null){ return (false); }; }; return (_gameTracking.initGameTracking(_displayObjectContainer, _arg1, _arg2)); } public static function getChallengeInfo(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = makeGSParamObject("GetChallengeInfo"); _local2.challenge_id = _arg1; makeServiceRequest(_local2); return (true); } public static function getUserBadgesByTime(_arg1:Date, _arg2:Date):Boolean{ var _local3:Object; _local3 = makeGSParamObject("GetUserBadgesByTime"); _local3.game_id = getGameId(); _local3.start_date = _arg1; _local3.end_date = _arg2; makeServiceRequest(_local3); return (true); } public static function getGameDataCount():Number{ return (GSGameData.count()); } } }//package gs3Section 245//GSAdService (gs3.GSAdService) package gs3 { import flash.events.*; import flash.display.*; import flash.xml.*; import util.*; import flash.net.*; public class GSAdService { public static const PREROLL:String = "preroll"; public static const INTERSTITAL:String = "interstital"; public static const COAD:String = "coad"; public static const POSTROLL:String = "postroll"; public static const SPONSOR:String = "sponsor"; public static var _streamReady:Boolean = false; private static var _dartSite:String = "mtv.mtvi"; private static var _adParent:Sprite; private static var _adLoader:URLLoader; public static var _adModel:Array = []; private static var _url:String; public static var _nc:NetConnection; private static var _currentAdType:String; public static var _xml:XML; private static var _adCounter:int = 0; private static var _debug:Boolean = true; private static var _adMediaType:String = "video"; public static var _ns:NetStream; private static var _adsReady:Boolean = false; public static var _duration:Number = 0; private static var _gamesAdPrefix:String = "games/arcade/"; private static var _adMovieClip:MovieClip; private static var _context:GSAdService; public function GSAdService(){ init(); } public function showAd(_arg1:String, _arg2:Sprite):Boolean{ var _local3:Boolean; _local3 = false; GameServices.debugMsg(((("showAd: want to show " + _arg1) + " using ") + _arg2)); if (((_adsReady) && (!((_arg2 == null))))){ _nc = new NetConnection(); _nc.connect(null); _ns = new NetStream(_nc); _nc.addEventListener(NetStatusEvent.NET_STATUS, this.NSStatus); _adMovieClip = new gs_mcAdVideo(); GameServices.debugMsg(("showAd: We think we can show an ad using " + _adMovieClip)); if (_adMovieClip != null){ _adParent = _arg2; _adParent.addChild(_adMovieClip); _adMovieClip.gs_Video.attachVideo(_ns); GameServices.debugMsg(("showAd: playing " + _adModel["src"])); _ns.play(_adModel["src"].toString()); hitTrackerURL(_adModel["startTag"]); _local3 = true; _currentAdType = _arg1; _adCounter++; } else { GameServices.debugMsg("showAd: Cannot find MovieClip instance gs_mcAdVideo"); }; } else { GameServices.debugMsg(((("showAd: Missing arg: adsReady=" + _adsReady) + "; parent=") + _arg2)); }; return (_local3); } public function initAdService():Boolean{ return (init()); } public function cancelAd():Boolean{ GameServices.debugMsg("GSAdService: canceling ad"); hitTrackerURL(_adModel["endTag"]); if (_ns != null){ _ns.close(); }; if (_adMovieClip != null){ _adParent.removeChild(_adMovieClip); _adMovieClip = null; _adParent = null; }; _currentAdType = ""; _adsReady = false; return (true); } public function setDartSite(_arg1:String):void{ _dartSite = _arg1; } private function hitTrackerURL(_arg1:String):void{ var _local2:URLRequest; var _local3:URLVariables; var _local4:URLLoader; _local2 = new URLRequest(_arg1); _local3 = new URLVariables(); _local4 = new URLLoader(); GameServices.debugMsg(("GSAdService: hitting tracker URL: " + _arg1)); _local2.method = URLRequestMethod.POST; _local2.data = _local3; _local4.addEventListener(Event.COMPLETE, onTrackerComplete); _local4.load(_local2); } public function LoadAdXML(_arg1:String):void{ var _local2:URLRequest; _local2 = new URLRequest(_arg1); _adLoader = new URLLoader(); _adLoader.addEventListener(Event.COMPLETE, onXmlLoaded); _adLoader.load(_local2); } public function init():Boolean{ var _local1:DoubleClickAd; _local1 = new DoubleClickAd(); GameServices.debugMsg(("GSAdService: init() game_name is " + GameServices.getGameName())); _local1.setDartSite(_dartSite); _local1.setSections((_gamesAdPrefix + GameServices.getGameName())); _local1.setKeyValues("pos=atf;dcmt=text/xml;tag=pfadx;"); _local1.setContentType("pfadx"); _local1.setMediaType(_adMediaType); _local1.setSize("640x480"); _local1.setOrd(Math.round((Math.random() * 100000000000))); _url = _local1.getUrl(); _currentAdType = ""; _adMovieClip = null; LoadAdXML(_url); return (true); } private function onTrackerComplete(_arg1:Event):void{ GameServices.debugMsg("GSAdService: tracker Sent Successfully"); } public function NSMetaData(_arg1:Object):void{ var _local2:String; GameServices.debugMsg("NetStream.NSMetaData called:"); _duration = _arg1.duration; _streamReady = true; if (_debug){ for (_local2 in _arg1) { GameServices.debugMsg(((("NSMetaData: " + _local2) + ":\t") + _arg1[_local2])); }; }; } public function getAdCount():int{ return (_adCounter); } public function NSStatus(_arg1:NetStatusEvent):void{ var _local2:String; GameServices.debugMsg("NetStream.onStatus called:"); if (_debug){ for (_local2 in _arg1.info) { GameServices.debugMsg(((("GSAdService: NSStatus " + _local2) + ":\t") + _arg1.info[_local2])); }; GameServices.debugMsg(("Loaded: " + _ns.bytesLoaded)); GameServices.debugMsg((("bytesTotal: " + _ns.bytesTotal) + "\n")); }; if (((((_streamReady) && ((_ns.time > 0)))) && ((_ns.time >= (_duration - 0.5))))){ _streamReady = false; cancelAd(); GameServices.adComplete(); }; } public function setAdMediaType(_arg1:String):void{ _adMediaType = _arg1; } public function onXmlLoaded(_arg1:Event):void{ var _local2:XMLNode; var _local3:Array; var _local4:Number; var _local5:String; _xml = new XML(_adLoader.data); if (_debug){ trace(_xml.toXMLString()); }; _local2 = _xml.firstChild.firstChild.firstChild; _adModel["type"] = _local2.attributes.type; _adModel["duration"] = _local2.attributes.duration; _local3 = _local2.childNodes; _local4 = 0; while (_local4 < _local3.length) { _adModel[_local3[_local4].nodeName] = _local3[_local4].firstChild; _local4++; }; if (_debug){ for (_local5 in _adModel) { GameServices.debugMsg(((("GSAdService: " + _local5) + " : ") + _adModel[_local5])); }; }; _adsReady = true; GameServices.initAdComplete(); } public static function getContext():GSAdService{ if (_context == null){ _context = new (GSAdService); GameServices.debugMsg("GSAdService constructed"); }; return (_context); } } }//package gs3Section 246//GSGameData (gs3.GSGameData) package gs3 { public final class GSGameData { private static var _itemArray:Array = new Array(); public static function fromGSGameDataString(_arg1:String):Boolean{ var _local2:Boolean; var _local3:String; var _local4:String; var _local5:Array; var _local6:Number; var _local7:String; var _local8:String; var _local9:String; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local2 = false; if (_arg1.substring(0, 9).toUpperCase() == "<![CDATA["){ _local3 = _arg1.substring(9, (_arg1.length - 3)); _local4 = _local3.charAt(0); _local5 = _local3.split(_local4); _local10 = 0; _local11 = 0; _itemArray = []; _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6]; switch (_local10){ case 0: _local12 = parseInt(_local7); if (_local12 > 0){ _local10++; }; break; case 1: _local13 = _local7.indexOf("="); if (_local13 > 0){ _local8 = _local7.substring(0, _local13); _local9 = _local7.substring((_local13 + 1)); setValue(_local8, _local9); }; if (_local11 < _local12){ _local11++; } else { _local10++; }; break; default: break; }; _local6++; }; if (_local11 == _local12){ _local2 = true; }; } else { _local2 = false; }; return (_local2); } public static function toGSGameDataString(_arg1:String):String{ var _local2:String; var _local3:Number; var _local4:String; var _local5:String; var _local6:String; _local2 = ""; _local3 = 0; if (_arg1 == null){ _arg1 = ";"; } else { if (_arg1.length > 1){ _arg1 = _arg1.charAt(0); } else { if (_arg1.length == 0){ _arg1 = ";"; }; }; }; for (_local4 in _itemArray) { _local3++; _local5 = _itemArray[_local4]; _local2 = (_local2 + (((_local4 + "=") + _local5) + _arg1)); }; if (_local3 > 0){ if (_local3 < 10){ _local6 = ("0" + _local3); } else { _local6 = ("" + _local3); }; _local2 = ((((("<![CDATA[" + _arg1) + _local6) + _arg1) + _local2) + "]]>"); } else { _local2 = ""; }; return (_local2); } public static function count():Number{ var _local1:Number; var _local2:String; _local1 = 0; for (_local2 in _itemArray) { _local1++; }; return (_local1); } public static function isSet(_arg1:String):Boolean{ return (!((_itemArray[_arg1] == null))); } public static function getArray():Array{ return (_itemArray); } public static function getValue(_arg1:String):String{ return (_itemArray[_arg1]); } public static function toString():String{ return (toGSGameDataString(";")); } public static function clear():void{ _itemArray = new Array(); } public static function setValue(_arg1:String, _arg2:String):Boolean{ _itemArray[_arg1] = _arg2; return (true); } } }//package gs3Section 247//GSGameTracking (gs3.GSGameTracking) package gs3 { import flash.display.*; public final class GSGameTracking { private var _trackingObj:TrackingSingleton;// = null private var _displayContainer:DisplayObjectContainer; public static const PLAY:String = "PLAY"; public static const GAMEOVER:String = "GAMEOVER"; public static const ZONECHANGE:String = "ZONECHG"; public static const LOAD:String = "LOAD"; public static const UNLOAD:String = "UNLOAD"; public function GSGameTracking(){ _trackingObj = null; super(); } public function isInitialized():Boolean{ return (TrackingSingleton.isInitialized()); } public function getVersionString():String{ return (TrackingSingleton.getVersionString()); } public function sendHit(_arg1:String, _arg2:String):Boolean{ var _local3:Boolean; _local3 = false; if (_trackingObj == null){ _trackingObj = TrackingSingleton.getInstance(null, "", false); }; if (_trackingObj != null){ _local3 = _trackingObj.sendHit(_arg1, _arg2); } else { _local3 = false; }; return (_local3); } public function initGameTracking(_arg1:DisplayObjectContainer, _arg2:String="", _arg3:Boolean=false):Boolean{ _displayContainer = _arg1; _trackingObj = TrackingSingleton.getInstance(_arg1, _arg2, _arg3); return (TrackingSingleton.isInitialized()); } } }//package gs3Section 248//GSRequest (gs3.GSRequest) package gs3 { import flash.events.*; import flash.xml.*; import flash.net.*; public final class GSRequest extends EventDispatcher { private var _callback:Function;// = null private var _gsLoader:URLLoader; public function GSRequest(){ _callback = null; super(); } public function send(_arg1:String, _arg2:Function, _arg3:Object):void{ var gsVariables:URLVariables; var name:String; var gsServer:URLRequest; var gsDomain:String; var url = _arg1; var callback = _arg2; var params = _arg3; gsVariables = new URLVariables(); for (name in params) { gsVariables[name] = params[name]; }; if (GameServices.getGSToken().length > 0){ gsVariables["gstoken"] = GameServices.getGSToken(); gsVariables["site_id"] = GameServices.getSiteId(); }; if (GameServices.getChallengeToken().length > 0){ gsVariables["ct"] = GameServices.getChallengeToken(); }; try { gsServer = new URLRequest(url); gsDomain = GameServices.getGSWebRoot(); _callback = callback; gsServer.method = URLRequestMethod.POST; gsServer.data = gsVariables; _gsLoader = new URLLoader(); _gsLoader.addEventListener(Event.COMPLETE, onGSRequestComplete); _gsLoader.load(gsServer); } catch(err:Error) { GameServices.debugMsg(((("GSRequest: Error loading URL=" + url) + "; err=") + err.message)); }; } private function onGSRequestComplete(_arg1:Event):void{ var gsResultXML:XMLDocument; var event = _arg1; try { gsResultXML = new XMLDocument(); gsResultXML.ignoreWhite = true; gsResultXML.parseXML(unescape(_gsLoader.data)); if (_callback != null){ _callback(gsResultXML); }; } catch(e:TypeError) { GameServices.debugMsg(("onGSRequestComplete: Could not parse GS Response\n\n" + _gsLoader.data)); }; } } }//package gs3Section 249//GSResult (gs3.GSResult) package gs3 { import flash.xml.*; import util.*; public final class GSResult { private var _message:String;// = "" private var _success:Boolean;// = false private var _outparams:Object;// = null private var _passthru:Object;// = null private var _results:Array;// = null private var _extended_info:String;// = "" public function GSResult(_arg1:XML){ var _local2:XMLNode; var _local3:Object; _success = false; _message = ""; _results = null; _outparams = null; _passthru = null; _extended_info = ""; super(); _local2 = _arg1.toString(); if (!_local2.hasChildNodes()){ _message = "UNKNOWN_ERROR"; return; }; _local3 = XML2Object.parse(_local2); if (_local3 == null){ _message = "INVALID_XML"; return; }; if ((((((_local3.results == null)) || ((_local3.results.status == null)))) || ((_local3.results.status.success == null)))){ _message = "INVALID_RESPONSE_FORMAT"; return; }; _success = (_local3.results.status.success == 1); if (_local3.results.status.message != null){ _message = _local3.results.status.message; if (_local3.results.status.extended_info != null){ this["extended_info"] = _local3.results.status.extended_info; }; }; if (_local3.results.outparams != null){ _outparams = _local3.results.outparams; }; if (_local3.results.result != null){ if ((_local3.results.result.row is Array)){ _results = _local3.results.result.row; } else { if (_local3.results.result.row != null){ _results = [_local3.results.result.row]; } else { _results = [_local3.results.result]; }; }; }; if (_local3.results.passthru != null){ _passthru = _local3.results.passthru; }; doSpecialProcessing(); } public function getStateSequence():Number{ return (parseInt(this._passthru[0].state_seq)); } public function getExtendedInfo():String{ if (this.isError()){ return (this._extended_info); }; return (""); } public function getErrorMessage():String{ if (this.isError()){ return (this._message); }; return (""); } private function doSpecialProcessing():void{ var _local1:String; var _local2:Number; GameServices.debugMsg(((("GSResult: received reply for fn=" + getFunctionRequest()) + "; seq=") + getStateSequence())); switch (getFunctionRequest()){ case "StartSession": GameServices.setupSession(this); break; }; _local1 = this._outparams.format_string; if (((((((!((_local1 == null))) && ((this._results.length > 0)))) && (!((_local1 == ""))))) && (!((_local1 == "d"))))){ _local2 = 0; while (_local2 < this._results.length) { this._results[_local2].score = GameServices.formatScore(_local1, this._results[_local2].score); _local2++; }; }; } public function getResults():Array{ return (this._results); } public function getFunctionRequest():String{ return (this._passthru[0].fn); } public function isError():Boolean{ return (!(this._success)); } public function getOutputParams():Object{ return (this._outparams); } } }//package gs3Section 250//GSSendToFriend (gs3.GSSendToFriend) package gs3 { import flash.events.*; import flash.xml.*; import flash.net.*; public final class GSSendToFriend { private var _callbackFn:Function;// = null private var _info:String;// = "" private var _gameId:Number;// = 0 private var _initialized:Boolean;// = false private var _stfLoader:URLLoader; private var _gameData:String;// = "" private var _siteId:Number;// = 0 private var _last_fn_request:String;// = "" private var _playbackId:String;// = "" private var _errorMsg:String;// = "" private var _processing:Boolean;// = false private var _submitToURL:String;// = "" public static var STF_SEND_FN:String = "stfSend"; public static var STF_ACTION_SEND:String = "send"; public static var STF_ACTION_LOAD:String = "load"; public static var STF_INIT_FN:String = "stfCheckData"; public function GSSendToFriend(_arg1:Function){ _submitToURL = ""; _gameId = 0; _siteId = 0; _playbackId = ""; _callbackFn = null; _initialized = false; _errorMsg = ""; _gameData = ""; _info = ""; _processing = false; _last_fn_request = ""; super(); if (_arg1 != null){ setCallback(_arg1); }; _init(); } private function onSTFRequestComplete(_arg1:Event):void{ var _local2:GSResult; _local2 = new GSResult(_stfLoader.data); if (_local2.isError()){ _errorMsg = ("error: " + _local2.getErrorMessage()); } else { _gameData = _local2.getResults()[0]; }; _processing = false; _stfLoader = null; _callbackFn(_local2, _last_fn_request); _last_fn_request = ""; } public function getGameData():String{ return (_gameData); } public function setCallback(_arg1:Function):void{ _callbackFn = _arg1; } public function getError():String{ return (_errorMsg); } private function getDataFromServer():Boolean{ var _local1:URLRequest; var _local2:URLVariables; if (_processing){ return (false); }; _local1 = new URLRequest(_submitToURL); _local2 = new URLVariables(); _local2.game_id = _gameId; _local2.site_id = _siteId; _local2.playbackid = _playbackId; _local2.action = STF_ACTION_LOAD; _stfLoader = new URLLoader(); _stfLoader.addEventListener(Event.COMPLETE, onSTFRequestComplete); _stfLoader.load(_local1); _processing = true; _last_fn_request = STF_ACTION_LOAD; return (true); } public function getGameId():Number{ return (_gameId); } public function sendToFriend(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String):Boolean{ var _local7:URLRequest; var _local8:URLVariables; if (_processing){ return (false); }; _local7 = new URLRequest(_submitToURL); _local8 = new URLVariables(); _local8.toname = _arg1; _local8.fromname = _arg3; _local8.toemail = _arg2; _local8.fromemail = _arg4; _local8.message = _arg5; _local8.data = _arg6; _local8.game_id = _gameId; _local8.site_id = _siteId; _local8.action = STF_ACTION_SEND; _stfLoader = new URLLoader(); _stfLoader.addEventListener(Event.COMPLETE, onSTFRequestComplete); _stfLoader.load(_local7); _processing = true; _last_fn_request = STF_ACTION_SEND; return (true); } public function _initFromGSResult(_arg1:GSResult):Boolean{ var _local2:int; if (_arg1.getResults().URL != null){ this._submitToURL = _arg1.getResults().URL; } else { this._submitToURL = (("http://" + GameServices.getHost()) + "/games/common/stf.php"); }; if (_arg1.getResults().playbackid != null){ this._playbackId = _arg1.getResults().playbackid; }; this._gameId = GameServices.getGameId(); this._siteId = GameServices.getSiteId(); _initialized = true; _local2 = int(this._playbackId); if (_local2 > 0){ getDataFromServer(); } else { this._callbackFn("nodata", ""); }; return (true); } public function getPlaybackId():String{ return (_playbackId); } private function _init():void{ var _local1:XML; var _local2:GSResult; _errorMsg = ""; _gameData = ""; _processing = false; _last_fn_request = ""; _submitToURL = GameServices.getSendToFriendURL(); _initialized = true; _playbackId = GameServices.getPlaybackId(); _gameId = GameServices.getGameId(); _siteId = GameServices.getSiteId(); if (_playbackId.length > 0){ getDataFromServer(); } else { _local1 = new XML((("<?xml version=\"1.0\"?>\n\n<results><status><success>0</success><message>NO_DATA</message><extended_info>no data available</extended_info></status><passthru><fn>" + STF_INIT_FN) + "</fn><state_seq>0</state_seq></passthru></results>")); _local2 = new GSResult(_local1); _callbackFn(_local2, STF_INIT_FN); }; } public function isError():Boolean{ return ((_errorMsg.length > 0)); } public function getSiteId():Number{ return (_siteId); } } }//package gs3Section 251//ScoreData (gs3.ScoreData) package gs3 { final class ScoreData { public var perturbedScores_:Array; public var rands_:Array; function ScoreData(){ rands_ = new Array(); perturbedScores_ = new Array(); } } }//package gs3Section 252//ScoreSubmitInternal (gs3.ScoreSubmitInternal) package gs3 { import gs3.*; import util.*; final class ScoreSubmitInternal { private var pressX_:Number;// = 0 private var diffs_:Object; private var pressY_:Number;// = 0 private var scores_:Array; private var disabled_:Boolean;// = false public static var context_:ScoreSubmitInternal = new (ScoreSubmitInternal); ; private static var useEncryption_:Boolean = true; private static var gameTimer_:Date; function ScoreSubmitInternal(){ pressX_ = 0; pressY_ = 0; disabled_ = false; super(); diffs_ = new Object(); scores_ = new Array(); gameTimer_ = new Date(); } public function getUserGameGroupExperiencePointsForUser(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((((((isNaN(_arg1)) || ((_arg1 < 1)))) || (isNaN(_arg2)))) || ((_arg2 < 1)))){ return (false); }; _local3 = GameServices.makeGSParamObject("GetUserGameGroupExperiencePoints"); _local3.user_id = _arg1; _local3.game_group_id = _arg2; GameServices.makeServiceRequest(_local3); return (true); } public function unauthSubmitScoreGetRank(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number, _arg7:Number):Boolean{ if (((((isNaN(_arg1)) || (isNaN(_arg2)))) || ((_arg5.length < 1)))){ return (false); }; return (_unauthSubmitScore(_arg1, _arg2, _arg3, _arg4, _arg5, "SetUserScoreGetRankUnauth", 0, 0)); } public function getUserGameRankForUser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; if (((((isNaN(_arg3)) || ((_arg3 < 0)))) || (isNaN(_arg4)))){ return (false); }; _local5 = GameServices.makeGSParamObject("GetUserGameRank"); if (((isNaN(_arg2)) || ((_arg2 < 1)))){ _arg2 = getGameId(); }; _local5.game_id = _arg2; if (_arg1 > 0){ _local5.user_id = _arg1; }; _local5.time_period_type = _arg3; _local5.time_period = _arg4; GameServices.makeServiceRequest(_local5); return (true); } public function getUserRatingForUser(_arg1:Number):Boolean{ var _local2:Object; _local2 = GameServices.makeGSParamObject("GetUserRating"); _local2.user_id = _arg1; GameServices.makeServiceRequest(_local2); return (true); } public function getGameIdFromTargetId(_arg1:Number):Number{ return (GameServices.getGameIdFromTargetId(_arg1)); } private function _submitScore(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number, _arg7:Number, _arg8:Number=0, _arg9:Number=0):Boolean{ var _local10:String; var _local11:String; var _local12:Object; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:ScoreData; var _local17:ScoreData; if (((((((((((((isNaN(_arg1)) || (isNaN(_arg2)))) || (isNaN(_arg6)))) || ((_arg6 < 0)))) || ((_arg6 > 10000)))) || (isNaN(_arg7)))) || ((_arg7 > 1000)))){ return (false); }; if (isNaN(_arg8)){ _arg8 = 0; }; if (isNaN(_arg9)){ _arg9 = 0; }; recordScore(_arg1, _arg2); if (scores_.length > 2){ _local13 = 0; while (_local13 < 2) { _local14 = 0; _local15 = 1; while (_local15 < scores_.length) { _local16 = scores_[_local15]; _local17 = scores_[(_local15 - 1)]; _local14 = (_local14 + ((_local16.perturbedScores_[_local13] - _local16.rands_[_local13]) - (_local17.perturbedScores_[_local13] - _local17.rands_[_local13]))); _local15++; }; _local14 = Math.abs((_local14 / (scores_.length - 1))); _local15 = 1; while (_local15 < scores_.length) { _local16 = scores_[_local15]; _local17 = scores_[(_local15 - 1)]; if ((4 * _local14) < Math.abs(((_local16.perturbedScores_[_local13] - _local16.rands_[_local13]) - (_local17.perturbedScores_[_local13] - _local17.rands_[_local13])))){ disabled_ = true; }; _local15++; }; _local13++; }; }; if (GSGameData.count() > 0){ _arg3 = GSGameData.toGSGameDataString(";"); GSGameData.clear(); }; _local10 = GameServices.getChallengeToken(); _local11 = ((((((((("score=" + _arg1) + "&score2=") + _arg2) + "&score_details=") + _arg3) + "&time_played=") + calcTimePlayed()) + "&game_id=") + getGameId()); if ((((_arg5 == "SetUserScoreGetRank")) || ((_arg5 == "SetUserScoreGetScores")))){ _local11 = (_local11 + ((("&time_period_type=" + _arg8) + "&time_period=") + _arg9)); }; if (_arg5 == "SetUserScoreGetScores"){ _local11 = (_local11 + ((("&first_rank=" + _arg6) + "&num_ranks=") + _arg7)); }; if (_local10 != ""){ _arg5 = (_arg5 + "ForChallenge"); }; _local12 = GameServices.makeGSParamObject(_arg5); if (_local10 != ""){ _local12.ct = _local10; }; _local12.data = encryptData(_local11); GameServices.makeServiceRequest(_local12); return (true); } public function getUserGameRank(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((((isNaN(_arg1)) || ((_arg1 < 0)))) || (isNaN(_arg2)))){ return (false); }; _local3 = GameServices.makeGSParamObject("GetUserGameRank"); _local3.game_id = getGameId(); _local3.time_period_type = _arg1; _local3.time_period = _arg2; GameServices.makeServiceRequest(_local3); return (true); } public function setGameTargetId(_arg1:Number):Boolean{ return (GameServices.setGameTargetId(_arg1)); } public function getGameId():Number{ return (GameServices.getGameId()); } public function getUserIntermediateScores(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (isNaN(_arg1)){ _arg1 = -1; }; if (isNaN(_arg2)){ _arg2 = 1; }; if (isNaN(_arg3)){ _arg3 = 31; }; _local4 = GameServices.makeGSParamObject("GetUserIntermediateScores"); _local4.game_id = getGameId(); _local4.time_period = _arg1; _local4.first_item = _arg2; _local4.num_items = _arg3; GameServices.makeServiceRequest(_local4); return (true); } public function getGameGroupUserRank(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (_arg1 < 1){ return (false); }; if (((((isNaN(_arg2)) || ((_arg2 < 0)))) || (isNaN(_arg3)))){ return (false); }; _local4 = GameServices.makeGSParamObject("GetGameGroupUserRank"); _local4.time_period_type = _arg2; _local4.time_period = _arg3; GameServices.makeServiceRequest(_local4); return (true); } public function setGameId(_arg1:Number):Boolean{ return (GameServices.setGameId(_arg1)); } public function clearGameData():void{ GSGameData.clear(); } public function getUserGameExperiencePointsForUser(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = GameServices.makeGSParamObject("GetUserGameExperiencePoints"); _local2.user_id = _arg1; GameServices.makeServiceRequest(_local2); return (true); } public function getUserSiteExperiencePoints():Boolean{ var _local1:Object; _local1 = GameServices.makeGSParamObject("GetUserSiteExperiencePoints"); GameServices.makeServiceRequest(_local1); return (true); } public function getUserRatingRanks(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((((((((isNaN(_arg1)) || ((_arg1 < 0)))) || (isNaN(_arg2)))) || ((_arg2 < 1)))) || ((_arg2 > 1000)))){ return (false); }; _local3 = GameServices.makeGSParamObject("GetUserRatingRanks"); _local3.game_id = getGameId(); _local3.prior_ranks = _arg1; _local3.num_ranks = _arg2; GameServices.makeServiceRequest(_local3); return (true); } public function setGameDataFromString(_arg1:String):Boolean{ return (GSGameData.fromGSGameDataString(_arg1)); } public function getUserGamePlayHistoryForGame(_arg1:Number):Boolean{ var _local2:Object; _local2 = GameServices.makeGSParamObject("getUserGamePlayHistory"); _local2.game_id = _arg1; GameServices.makeServiceRequest(_local2); return (true); } public function getUserRating():Boolean{ var _local1:Object; _local1 = GameServices.makeGSParamObject("GetUserRating"); GameServices.makeServiceRequest(_local1); return (true); } public function getUserSiteExperiencePointsForUser(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = GameServices.makeGSParamObject("GetUserSiteExperiencePoints"); _local2.user_id = _arg1; GameServices.makeServiceRequest(_local2); return (true); } public function recordScore(_arg1:Number, _arg2:Number):void{ var _local3:ScoreData; if (((!(isNaN(_arg1))) && (!(isNaN(_arg2))))){ _local3 = new ScoreData(); _local3.rands_[0] = (Math.random() * 1000000000); _local3.perturbedScores_[0] = (_arg1 + _local3.rands_[0]); _local3.rands_[1] = (Math.random() * 1000000000); _local3.perturbedScores_[1] = (_arg2 + _local3.rands_[1]); scores_.push(_local3); trace(("ScoreSubmitInternal RecordScore set " + _arg1)); }; } public function unauthSubmitScoreGetScores(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):Boolean{ if (((((((((((((((isNaN(_arg1)) || (isNaN(_arg2)))) || ((_arg5.length < 1)))) || (isNaN(_arg6)))) || ((_arg6 < 0)))) || ((_arg6 > 10000)))) || (isNaN(_arg7)))) || ((_arg7 > 1000)))){ return (false); }; return (_unauthSubmitScore(_arg1, _arg2, _arg3, _arg4, _arg5, "SetUserScoreGetScoresUnauth", _arg6, _arg7, _arg8, _arg9)); } public function getRatingRanksForGame(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if ((((((((_arg1 < 1)) || ((_arg2 < 0)))) || ((_arg3 < 1)))) || ((_arg3 > 1000)))){ return (false); }; _local4 = GameServices.makeGSParamObject("GetRatingRanks"); _local4.game_id = _arg1; _local4.first_rank = _arg2; _local4.num_ranks = _arg3; GameServices.makeServiceRequest(_local4); return (true); } private function onMouseUp():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Array; _local1 = 0; _local2 = 0; if (diffs_[_local1] == null){ diffs_[_local1] = new Object(); }; if (diffs_[_local1][_local2] == null){ diffs_[_local1][_local2] = new Array(); }; _local3 = 0; diffs_[_local1][_local2].push(_local3); _local4 = diffs_[_local1][_local2]; if ((_local3 - _local4[0]) > 30000){ _local4.shift(); }; if (_local4.length > 4){ disabled_ = true; }; } public function getScoreRanks(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Boolean{ var _local6:Object; if (((((((((((((((isNaN(_arg2)) || ((_arg2 < 0)))) || (isNaN(_arg3)))) || (isNaN(_arg4)))) || ((_arg4 < 0)))) || (isNaN(_arg5)))) || ((_arg5 < 1)))) || ((_arg5 > 1000)))){ return (false); }; _local6 = GameServices.makeGSParamObject("GetScoreRanks"); if (((isNaN(_arg1)) || ((_arg1 < 1)))){ _arg1 = getGameId(); }; _local6.game_id = _arg1; _local6.first_rank = _arg4; _local6.num_ranks = _arg5; _local6.time_period_type = _arg2; _local6.time_period = _arg3; GameServices.makeServiceRequest(_local6); return (true); } public function setUserIntermediateScore(_arg1:Number, _arg2:String):Boolean{ var _local3:Object; var _local4:String; if (isNaN(_arg1)){ return (false); }; if (GSGameData.count() > 0){ _arg2 = GSGameData.toGSGameDataString(";"); GSGameData.clear(); }; _local3 = GameServices.makeGSParamObject("SetUserIntermediateScore"); _local4 = ((((((("score=" + _arg1) + "&score_details=") + _arg2) + "&time_played=") + calcTimePlayed()) + "&game_id=") + getGameId()); _local3.data = encryptData(_local4); GameServices.makeServiceRequest(_local3); return (true); } private function onMouseDown():void{ pressX_ = 0; pressY_ = 0; } public function gameScoreAdd(_arg1:Number, _arg2:String):Boolean{ var _local3:String; var _local4:Object; if (!isNaN(_arg1)){ if (GSGameData.count() > 0){ _arg2 = GSGameData.toGSGameDataString(";"); GSGameData.clear(); }; _local3 = ((((((("amount=" + _arg1) + "&score_details=") + _arg2) + "&time_played=") + calcTimePlayed()) + "&game_id=") + getGameId()); _local4 = GameServices.makeGSParamObject("GameScoreAdd"); _local4.data = encryptData(_local3); GameServices.makeServiceRequest(_local4); return (true); //unresolved jump }; return (false); } public function getUserScore(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; if (((((isNaN(_arg3)) || ((_arg3 < 0)))) || (isNaN(_arg4)))){ return (false); }; _local5 = GameServices.makeGSParamObject("GetUserScore"); if (((isNaN(_arg2)) || ((_arg2 < 1)))){ _arg2 = getGameId(); }; _local5.game_id = _arg2; if (_arg1 > 0){ _local5.user_id = _arg1; }; _local5.time_period_type = _arg3; _local5.time_period = _arg4; GameServices.makeServiceRequest(_local5); return (true); } public function setGameDataValue(_arg1:String, _arg2:String):Boolean{ return (GSGameData.setValue(_arg1, _arg2)); } public function unauthSubmitScore(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number, _arg7:Number):Boolean{ if (((((isNaN(_arg1)) || (isNaN(_arg2)))) || ((_arg5.length < 1)))){ return (false); }; return (_unauthSubmitScore(_arg1, _arg2, _arg3, _arg4, _arg5, "SetUserScoreUnauth", 0, 0)); } public function submitScore(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String):Boolean{ if (((!(isNaN(_arg1))) && (!(isNaN(_arg2))))){ return (_submitScore(_arg1, _arg2, _arg3, _arg4, "SetUserScore", 0, 0)); }; return (false); } public function unauthLeaderBoard(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; if (((((((((isNaN(_arg1)) || ((_arg1 < 0)))) || (isNaN(_arg2)))) || ((_arg2 < 1)))) || ((_arg2 > 1000)))){ return (false); }; _local5 = GameServices.makeGSParamObject("GetScoreRanksUnauth"); _local5.game_id = getGameId(); _local5.first_rank = _arg1; _local5.num_ranks = _arg2; _local5.time_period_type = _arg3; _local5.time_period = _arg4; GameServices.makeServiceRequest(_local5); return (true); } public function submitScoreGetScores(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{ if (((((((((((((isNaN(_arg1)) || (isNaN(_arg2)))) || (isNaN(_arg5)))) || ((_arg5 < 0)))) || ((_arg5 > 10000)))) || (isNaN(_arg6)))) || ((_arg6 > 1000)))){ return (false); }; return (_submitScore(_arg1, _arg2, _arg3, _arg4, "SetUserScoreGetScores", _arg5, _arg6, _arg7, _arg8)); } public function getGameDataValue(_arg1:String):String{ return (GSGameData.getValue(_arg1)); } public function getUserGameExperiencePoints():Boolean{ var _local1:Object; _local1 = GameServices.makeGSParamObject("GetUserGameExperiencePoints"); _local1.game_id = getGameId(); GameServices.makeServiceRequest(_local1); return (true); } private function _unauthSubmitScore(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:String, _arg7:Number, _arg8:Number, _arg9:Number=0, _arg10:Number=0):Boolean{ var _local11:Object; var _local12:String; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:ScoreData; var _local17:ScoreData; if (isNaN(_arg9)){ _arg9 = 0; }; if (isNaN(_arg10)){ _arg10 = 0; }; recordScore(_arg1, _arg2); if (scores_.length > 2){ _local13 = 0; while (_local13 < 2) { _local15 = 0; _local14 = 1; while (_local14 < scores_.length) { _local16 = scores_[_local14]; _local17 = scores_[(_local14 - 1)]; _local15 = (_local15 + ((_local16.perturbedScores_[_local13] - _local16.rands_[_local13]) - (_local17.perturbedScores_[_local13] - _local17.rands_[_local13]))); _local14++; }; _local15 = Math.abs((_local15 / (scores_.length - 1))); _local14 = 1; while (_local14 < scores_.length) { _local16 = scores_[_local14]; _local17 = scores_[(_local14 - 1)]; if ((4 * _local15) < Math.abs(((_local16.perturbedScores_[_local13] - _local16.rands_[_local13]) - (_local17.perturbedScores_[_local13] - _local17.rands_[_local13])))){ disabled_ = true; }; _local14++; }; _local13++; }; }; if (GSGameData.count() > 0){ _arg3 = GSGameData.toGSGameDataString(";"); GSGameData.clear(); }; _local11 = GameServices.makeGSParamObject(_arg6); _local12 = ((((((((((((((("score=" + _arg1) + "&score2=") + _arg2) + "&user_name=") + _arg5) + "&score_details=") + _arg3) + "&time_played=") + calcTimePlayed()) + "&game_id=") + getGameId()) + "&time_period_type=") + _arg9) + "&time_period=") + _arg10); if ((((_arg6 == "SetUserScoreGetRankUnauth")) || ((_arg6 == "SetUserScoreGetScoresUnauth")))){ _local12 = (_local12 + ((("&time_period_type=" + _arg9) + "&time_period=") + _arg10)); }; if (_arg6 == "SetUserScoreGetScoresUnauth"){ _local12 = (_local12 + ((("&first_rank=" + _arg7) + "&num_ranks=") + _arg8)); }; _local11.data = encryptData(_local12); GameServices.makeServiceRequest(_local11); return (true); } public function getVersionString():String{ return (GameServices.getVersionString()); } public function leaderBoard(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((((((((isNaN(_arg1)) || ((_arg1 < 0)))) || (isNaN(_arg2)))) || ((_arg2 < 1)))) || ((_arg2 > 1000)))){ return (false); }; _local3 = GameServices.makeGSParamObject("GetScoreRanks"); _local3.game_id = getGameId(); _local3.first_rank = _arg1; _local3.num_ranks = _arg2; _local3.time_period_type = 0; _local3.time_period = 0; GameServices.makeServiceRequest(_local3); return (true); } public function submitScoreGetRank(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String):Boolean{ if (((!(isNaN(_arg1))) && (!(isNaN(_arg2))))){ return (_submitScore(_arg1, _arg2, _arg3, _arg4, "SetUserScoreGetRank", 0, 0)); }; return (false); } public function getUserRatingRanksForGameForUser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:Object; if (((((((((((((isNaN(_arg1)) || ((_arg1 < 1)))) || (isNaN(_arg3)))) || ((_arg3 < 0)))) || (isNaN(_arg4)))) || ((_arg4 < 1)))) || ((_arg4 > 1000)))){ return (false); }; _local5 = GameServices.makeGSParamObject("GetUserRatingRanks"); _local5.game_id = _arg1; _local5.user_id = _arg2; _local5.prior_ranks = _arg3; _local5.num_ranks = _arg4; GameServices.makeServiceRequest(_local5); return (true); } public function getUserRatingRanksForUser(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (((((((((isNaN(_arg2)) || ((_arg2 < 0)))) || (isNaN(_arg3)))) || ((_arg3 < 1)))) || ((_arg3 > 1000)))){ return (false); }; _local4 = GameServices.makeGSParamObject("GetUserRatingRanks"); _local4.game_id = getGameId(); _local4.user_id = _arg1; _local4.prior_ranks = _arg2; _local4.num_ranks = _arg3; GameServices.makeServiceRequest(_local4); return (true); } public function getUserRatingRanksForGame(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Object; if (((((((((((((isNaN(_arg1)) || ((_arg1 < 1)))) || (isNaN(_arg2)))) || ((_arg2 < 0)))) || (isNaN(_arg3)))) || ((_arg3 < 1)))) || ((_arg3 > 1000)))){ return (false); }; _local4 = GameServices.makeGSParamObject("GetUserRatingRanks"); _local4.game_id = _arg1; _local4.prior_ranks = _arg2; _local4.num_ranks = _arg3; GameServices.makeServiceRequest(_local4); return (true); } public function getSiteUserRank():Boolean{ var _local1:Object; _local1 = GameServices.makeGSParamObject("GetSiteUserRank"); _local1.time_period_type = 0; _local1.time_period = 0; GameServices.makeServiceRequest(_local1); return (true); } public function getUserScoreRanks(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((((((((isNaN(_arg1)) || ((_arg1 < 0)))) || (isNaN(_arg2)))) || ((_arg2 < 1)))) || ((_arg2 > 1000)))){ return (false); }; _local3 = GameServices.makeGSParamObject("GetUserScoreRanks"); _local3.game_id = getGameId(); _local3.prior_ranks = _arg1; _local3.num_ranks = _arg2; _local3.time_period_type = 0; _local3.time_period = 0; GameServices.makeServiceRequest(_local3); return (true); } public function getUserGameGroupExperiencePoints(_arg1:Number):Boolean{ var _local2:Object; if (((isNaN(_arg1)) || ((_arg1 < 1)))){ return (false); }; _local2 = GameServices.makeGSParamObject("GetUserGameGroupExperiencePoints"); _local2.game_group_id = _arg1; GameServices.makeServiceRequest(_local2); return (true); } public function getRatingRanks(_arg1:Number, _arg2:Number):Boolean{ var _local3:Object; if (((((((((isNaN(_arg1)) || ((_arg1 < 0)))) || (isNaN(_arg2)))) || ((_arg2 < 1)))) || ((_arg2 > 1000)))){ return (false); }; _local3 = GameServices.makeGSParamObject("GetRatingRanks"); _local3.game_id = getGameId(); _local3.first_rank = _arg1; _local3.num_ranks = _arg2; GameServices.makeServiceRequest(_local3); return (true); } public function getUserGamePlayHistory():Boolean{ var _local1:Object; _local1 = GameServices.makeGSParamObject("getUserGamePlayHistory"); _local1.game_id = getGameId(); GameServices.makeServiceRequest(_local1); return (true); } public function getGameDataCount():Number{ return (GSGameData.count()); } private static function calcTimePlayed():String{ var _local1:Date; var _local2:Number; _local1 = new Date(); _local2 = (_local1.getTime() - gameTimer_.getTime()); gameTimer_ = new Date(); return (((((twoDigits(Math.floor((_local2 / 360000))) + ":") + twoDigits(Math.floor((_local2 / 60000)))) + ":") + twoDigits(Math.floor((_local2 / 1000))))); } private static function twoDigits(_arg1:Number):String{ if (_arg1 < 0){ return ("00"); }; if (_arg1 < 10){ return (("0" + _arg1)); }; if (_arg1 > 59){ return ("59"); }; return (("" + _arg1)); } private static function encryptData(_arg1:String):String{ var _local2:Blowfish; if (useEncryption_){ _local2 = new Blowfish(); return (escape(String(_local2.encrypt(_arg1, GameServices.getSessionId(), null)))); }; return (_arg1); } } }//package gs3Section 253//TrackingSingleton (gs3.TrackingSingleton) package gs3 { import flash.events.*; import flash.display.*; import gs3.*; import flash.system.*; import metrics.*; import flash.xml.*; import flash.net.*; final class TrackingSingleton { private static var _init:Boolean = false; private static var _hitCounter:Number = 0; private static var _lastEventTime:Date = null; private static var _version:String = "2.4.4"; private static var _pageURL:String = "UNKNOWN"; private static var _flashVersion:Number = 0; public static var PLAY:String = "PLAY"; public static var GAMEOVER:String = "GAMEOVER"; private static var _gameId:Number = 0; private static var _debug:Boolean = false; private static var _firstEventTime:Date = null; private static var _omReportManager:OmniReportManager = null; private static var _siteId:Number = 0; public static var ZONECHANGE:String = "ZONECHG"; public static var LOAD:String = "LOAD"; private static var _h2:String = "UNKNOWN"; private static var _instance:TrackingSingleton = null; private static var _configXML:XML; private static var _isIntegrated:Boolean = false; private static var _configFile:String = "/games/omni_config.php"; public static var UNLOAD:String = "UNLOAD"; public function asString():String{ return (((("TrackingSingleton version " + getVersionString()) + " for ") + TrackingSingleton.getPageName())); } public function sendHit(_arg1:String, _arg2:String):Boolean{ var _local3:OmniRequest; var _local4:String; if (TrackingSingleton._debug){ trace((((("TrackingSingleton.sendHit: type=" + _arg1) + "; data='") + _arg2) + "'")); }; if (TrackingSingleton._flashVersion == 0){ TrackingSingleton._flashVersion = getFlashMajorVersion(); }; _hitCounter++; if (_firstEventTime == null){ _firstEventTime = new Date(); _lastEventTime = _firstEventTime; } else { _lastEventTime = new Date(); }; if (_arg1 == TrackingSingleton.UNLOAD){ onEndGame(); } else { _local3 = new OmniRequest(); _local4 = setRequestObject(_local3, _arg1, _arg2); TrackingSingleton._omReportManager.sendPage(_local4, _local3); if (TrackingSingleton._debug){ trace(((((((("In TrackingSingleton.sendHit: (FirstEventTime=" + _firstEventTime) + "; LastEventTime=") + _lastEventTime) + ") Sending Event=") + _arg1) + ", Data=") + _arg2)); }; }; return (true); } public static function getInstance(_arg1:DisplayObjectContainer, _arg2:String="", _arg3:Boolean=false):TrackingSingleton{ if (_arg3){ setDebug(true); }; _isIntegrated = GameServices.isIntegrated(); if (TrackingSingleton._instance == null){ TrackingSingleton._instance = new (TrackingSingleton); TrackingSingleton._omReportManager = new OmniReportManager(_arg1); TrackingSingleton._gameId = GameServices.getGameId(); TrackingSingleton._siteId = GameServices.getSiteId(); if (TrackingSingleton._omReportManager != null){ if (_arg2.length > 0){ if (TrackingSingleton._gameId > 0){ TrackingSingleton._configFile = ((((_arg2 + "?site_id=") + TrackingSingleton._siteId) + "&game_id=") + TrackingSingleton._gameId); } else { TrackingSingleton._configFile = _arg2; }; if (TrackingSingleton._debug){ trace(("Config file initalized to " + TrackingSingleton._configFile)); }; } else { if (!_isIntegrated){ TrackingSingleton._configFile = "omni_config.xml"; } else { TrackingSingleton._configFile = (TrackingSingleton._configFile + ((("?site_id=" + TrackingSingleton._siteId) + "&game_id=") + TrackingSingleton._gameId)); }; if (TrackingSingleton._debug){ trace(("Config file updated to " + TrackingSingleton._configFile)); }; }; setupOmniReportManager(); } else { if (TrackingSingleton._debug){ trace("Report manager NOT loaded"); }; }; } else { if (TrackingSingleton._debug){ trace("Tracking instance already exists."); }; }; return (TrackingSingleton._instance); } public static function onEndGame():Boolean{ var _local1:Number; var _local2:String; var _local3:String; var _local4:String; var _local5:OmniRequest; if (TrackingSingleton._debug){ trace("TrackingSingleton.onEndGame"); }; if (_firstEventTime == null){ _firstEventTime = new Date(); _lastEventTime = _firstEventTime; } else { _lastEventTime = new Date(); }; _local1 = (Number(_lastEventTime) - Number(_firstEventTime)); _local2 = ("" + _local1); _local3 = _local2; _local5 = new OmniRequest(); if (TrackingSingleton._debug){ trace(((((_local1 + ": ") + _lastEventTime) + " - ") + _firstEventTime)); }; _local4 = setRequestObject(_local5, UNLOAD, _local3); TrackingSingleton._omReportManager.sendPage(_local4, _local5); if (TrackingSingleton._debug){ trace(("In TrackingSingleton.onEndGame: Sending Event=Unload, Data=" + _local3)); }; return (true); } public static function setDebug(_arg1:Boolean):Boolean{ TrackingSingleton._debug = _arg1; TrackingSingleton._omReportManager.setDebugActive(_arg1); return (TrackingSingleton._debug); } public static function getPageName():String{ return (TrackingSingleton._pageURL); } public static function getFlashMajorVersion():Number{ var _local1:Number; var _local2:Array; _local1 = 0; _local2 = new Array(); _local2 = Capabilities.version.split(" "); if (_local2.length >= 2){ _local2 = _local2[1].split(","); _local1 = _local2[0]; }; return (_local1); } public static function setPageName(_arg1:String):Boolean{ var _local2:Boolean; var _local3:Number; var _local4:String; if (((!((_arg1 == null))) && (!((_arg1 == ""))))){ _local4 = new String(""); if (_arg1.substr(0, 7).toLowerCase() == "http://"){ _local4 = _arg1.substr(7); } else { _local4 = _arg1; }; _local3 = _local4.indexOf("/"); if (_local3 >= 0){ _local4 = _local4.substr(_local3); }; TrackingSingleton._pageURL = _local4; if (_local4.charAt(0) == "/"){ TrackingSingleton._h2 = _local4.substr(1); } else { TrackingSingleton._h2 = _local4; }; _local3 = _arg1.lastIndexOf("/"); if (_local3 > 0){ }; _local2 = true; if (TrackingSingleton._debug){ trace(("PageName set to " + TrackingSingleton._pageURL)); }; } else { _local2 = false; }; return (_local2); } private static function setupOmniReportManager():Boolean{ TrackingSingleton._omReportManager.setOnReady(configLoadComplete); TrackingSingleton._omReportManager.loadConfig(TrackingSingleton._configFile); return (true); } public static function isInitialized():Boolean{ return (TrackingSingleton._init); } public static function getVersionString():String{ return (_version); } public static function getConfigFile():String{ return (TrackingSingleton._configFile); } public static function setConfigFile(_arg1:String):Boolean{ TrackingSingleton._configFile = _arg1; setupOmniReportManager(); return (true); } private static function configLoadComplete(_arg1:Boolean):void{ TrackingSingleton._init = true; TrackingSingleton.setPageName(_omReportManager.getPageURL()); if (TrackingSingleton._debug){ trace(((("Tracking loaded from config file " + TrackingSingleton._configFile) + " . GamePage=") + TrackingSingleton.getPageName())); }; } private static function setRequestObject(_arg1:OmniRequest, _arg2:String, _arg3:String):String{ var _local4:String; _local4 = new String(((TrackingSingleton.getPageName() + "/") + _arg2)); if (_arg1 != null){ _arg1.prop39 = _arg2; _arg1.prop40 = escape(_arg3); _arg1.ch = "games"; _arg1.h2 = TrackingSingleton._h2; }; return (_local4); } } }//package gs3Section 254//OmniReportManager (metrics.OmniReportManager) package metrics { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.xml.*; import flash.net.*; public final class OmniReportManager { public var _cookie_lifetime:String; public var _test_support:Boolean; public var _charset:String; public var _referrer:String; public var _clickmap_page:String; public var _loaded:Boolean;// = false private var _on_ready:Function;// = null private var _metrics_mc:MovieClip; public var _clickmap_enabled:Boolean; public var _screenres:String; public var _pageurl:String; public var _channel:String; private var _parent:DisplayObjectContainer; public var _debug_active:Boolean; public var _namespace:String; private var _request_queue:Array; public var _movie_id:String; public var _currency_code:String; public var _account:String; public var _cname:String; private var _request_timeout:Number;// = -1 private var _varmap:Object; private var _metrics_swf_url:String; private var _loader_name:String; private var _nqueueitems:Number; private static var _configXML:XML; private static var MAIN_NODE:String = "omni_config"; private static var VAR_NODE:String = "var"; private static var VARMAP_NODE:String = "var_map"; public function OmniReportManager(_arg1:DisplayObjectContainer){ _loaded = false; _request_timeout = -1; _on_ready = null; super(); _parent = _arg1; _request_queue = new Array(); _debug_active = false; _request_timeout = -1; } public function setMetricsSwfUrl(_arg1:String):void{ _metrics_swf_url = _arg1; } public function getNameSpace():String{ return (_namespace); } public function setMovieID(_arg1:String):void{ _movie_id = _arg1; omniConfig(); } public function getReferrer():String{ return (_referrer); } public function setAccount(_arg1:String):void{ _account = _arg1; _metrics_mc.setAccount(_arg1); } public function getAccount():String{ return (_account); } public function getMetricsSwfUrl():String{ return (_metrics_swf_url); } public function _sendPage(_arg1:TimerEvent):void{ var _local2:QueuedOmniRequest; var _local3:OmniRequest; if (_loaded){ _local2 = QueuedOmniRequest(_request_queue.shift()); _local3 = _local2.request; _local3 = convertVars(_local3); _metrics_mc.sendPage(_local2.pageName, _local3); if (_debug_active){ trace(((("OmniReportManager: sending " + _local2.pageName) + "; request queue length = ") + _request_queue.length)); }; if (_request_queue.length == 0){ _request_timeout = -1; }; }; } public function setPageURL(_arg1:String):void{ _pageurl = _arg1; _metrics_mc.setURL(_arg1); } public function setCurrencyCode(_arg1:String):void{ _currency_code = _arg1; _metrics_mc.setCurrencyCode(_arg1); } private function configLoadComplete(_arg1:Event):void{ var i:Number; var loadEvent = _arg1; try { _configXML = new XML(loadEvent.target.data); if (_debug_active){ trace("reporting manager config object:"); trace(_configXML); trace(("... and the swf is located at " + _configXML.metrics_swf_url)); }; _metrics_swf_url = _configXML.metrics_swf_url.text(); _loader_name = _configXML.loader_name.text(); _account = _configXML.account.text(); _namespace = _configXML.namespace.text(); _cname = _configXML.cname.text(); _pageurl = _configXML.pageurl.text(); _channel = _configXML.channel.text(); _clickmap_page = _configXML.clickmap_page.text(); _movie_id = _configXML.movie_id.text(); _test_support = ((_configXML.test_support.text().toLowerCase().indexOf("true"))!=-1) ? true : false; _debug_active = ((_configXML.debugactive.text().toLowerCase().indexOf("true"))!=-1) ? true : false; _clickmap_enabled = ((_configXML.clickmap_enabled.text().toLowerCase().indexOf("true"))!=-1) ? true : false; _varmap = {}; i = 0; while (i < _configXML[VARMAP_NODE].length) { _varmap[_configXML[VARMAP_NODE][VAR_NODE][i].@value] = _configXML[VARMAP_NODE][VAR_NODE][i].@name; i = (i + 1); }; loadMetrics(); } catch(xmlError:Error) { trace(("Error parsing XML: " + xmlError.message)); }; } public function setCharSet(_arg1:String):void{ _charset = _arg1; _metrics_mc.setCharSet(_arg1); } public function setReferrer(_arg1:String):void{ _referrer = _arg1; _metrics_mc.setReferrer(_arg1); } public function getPageURL():String{ return (_pageurl); } public function indexMovie():void{ _metrics_mc.indexMovie(); } public function getMovieID():String{ return (_movie_id); } private function _sendLink(_arg1:TimerEvent):void{ var _local2:QueuedOmniRequest; var _local3:OmniRequest; if (_loaded){ _local2 = QueuedOmniRequest(_request_queue.shift()); _local3 = _local2.request; _local3 = convertVars(_local3); _metrics_mc.sendLink(_local2.pageName, _local3, _local3.linktype, _local3.exiturl); if (_debug_active){ trace(("request queue length = " + _request_queue.length)); }; if (_request_queue.length == 0){ _request_timeout = -1; }; }; } public function setDebugActive(_arg1:Boolean):void{ _debug_active = _arg1; _metrics_mc.setDebugActive(_arg1); } public function setAutoTrack(_arg1:Boolean):void{ _metrics_mc.setAutoTrack(_arg1); } public function setAutoTrackVar(_arg1:String):void{ _metrics_mc.setAutoTrackVar(_arg1); } public function sendPage(_arg1:String, _arg2:OmniRequest):void{ var _local3:Number; var _local4:Timer; if (_arg1.length < 1){ _arg1 = _pageurl; }; _nqueueitems = _request_queue.push(new QueuedOmniRequest(_arg1, _arg2)); if (_request_timeout < 1){ if (_loaded){ _local3 = 100; } else { _local3 = 500; }; _local4 = new Timer(_local3, 1); _local4.addEventListener(TimerEvent.TIMER_COMPLETE, _sendPage); _request_timeout = 1; _local4.start(); }; if (_debug_active){ trace(("OmniReportManager.sendPage: " + _request_timeout)); }; } public function setClickMapSupport(_arg1:Boolean):void{ _clickmap_enabled = _arg1; _metrics_mc.setClickMapSupport(_arg1); } public function omniConfig():void{ _metrics_mc.setAccount(_account); _metrics_mc.setNameSpace(_namespace); _metrics_mc.setCName(_cname); _metrics_mc.setURL(_pageurl); _metrics_mc.setChannel(_channel); _metrics_mc.setClickMapSupport(_clickmap_enabled); _metrics_mc.setMovieID(_movie_id); _metrics_mc.setClickMapPage(_clickmap_page); _metrics_mc.setTestSupport(_test_support); _metrics_mc.setDebugActive(_debug_active); _metrics_mc.sProto = "http"; } public function setTestSupport(_arg1:Boolean):void{ _test_support = _arg1; _metrics_mc.setTestSupport(_arg1); } public function setOnReady(_arg1:Function):void{ _on_ready = _arg1; } private function onMetricsLoadComplete(_arg1:Event):void{ omniConfig(); if (_clickmap_enabled){ _metrics_mc.indexMovie(); }; _loaded = true; if (_on_ready != null){ _on_ready(true); }; } public function setCName(_arg1:String):void{ _cname = _arg1; _metrics_mc.setCName(_arg1); } public function getChannel():String{ return (_channel); } public function loadConfig(_arg1:String):void{ var _local2:URLLoader; _local2 = new URLLoader(); _local2.addEventListener(Event.COMPLETE, configLoadComplete); _local2.load(new URLRequest(_arg1)); } public function setChannel(_arg1:String):void{ _channel = _arg1; _metrics_mc.setChannel(_arg1); } public function setCookieLifetime(_arg1:String):void{ _metrics_mc.setCookieLifetime(_arg1); } public function setMainMovie(_arg1:DisplayObjectContainer):void{ _metrics_mc.setMainMovie(_arg1); } public function getCName():String{ return (_cname); } public function setDefaultPageName(_arg1:String):void{ _metrics_mc.setDefaultPageName(_arg1); } public function sendLink(_arg1:String, _arg2:OmniRequest):void{ var _local3:Number; var _local4:Timer; if (_arg1.length < 1){ _arg1 = _pageurl; }; _nqueueitems = _request_queue.push(new QueuedOmniRequest(_arg1, _arg2)); if (_request_timeout < 1){ if (_loaded){ _local3 = 100; } else { _local3 = 500; }; _local4 = new Timer(_local3, 1); _local4.addEventListener(TimerEvent.TIMER_COMPLETE, _sendLink); _request_timeout = 1; _local4.start(); }; } public function setClickMapPage(_arg1:String):void{ _clickmap_page = _arg1; _metrics_mc.setClickMapPage(_arg1); } public function setDefaultLinkName(_arg1:String):void{ _metrics_mc.setDefaultLinkName(_arg1); } public function setNameSpace(_arg1:String):void{ _namespace = _arg1; _metrics_mc.setNameSpace(_arg1); } public function loadMetrics():void{ var _local1:Loader; var _local2:URLRequest; if (_metrics_swf_url.length < 1){ if (_debug_active){ trace("no metrics swf defined. Reporting functionality not enabled"); }; } else { _local1 = new Loader(); _local2 = new URLRequest(_metrics_swf_url); _local1.contentLoaderInfo.addEventListener(Event.COMPLETE, onMetricsLoadComplete); _local1.load(_local2); _parent.addChild(_local1); }; } private function convertVars(_arg1:OmniRequest):OmniRequest{ var _local2:String; for (_local2 in _varmap) { if (((!((_arg1[_local2] == undefined))) && (!((_arg1[_local2] == ""))))){ _arg1[_varmap[_local2]] = _arg1[_local2]; delete _arg1[_local2]; }; }; return (_arg1); } } }//package metricsSection 255//OmniRequest (metrics.OmniRequest) package metrics { public class OmniRequest { public var prop30:String; public var channel:String; public var prop39:String; public var campaign:String; public var prop40:String; public var prop1:String; public var prop2:String; public var prop3:String; public var prop4:String; public var prop5:String; public var prop6:String; public var prop7:String; public var prop8:String; public var prop9:String; public var linktype:String; public var ch:String; public var hier:String; public var hier3:String; public var hier5:String; public var hier2:String; public var hier4:String; public var exiturl:String; public var prop10:String; public var prop11:String; public var prop12:String; public var prop13:String; public var prop14:String; public var prop15:String; public var prop16:String; public var prop17:String; public var h2:String; public var prop19:String; public var varmap:Object; public var evar1:String; public var evar2:String; public var evar3:String; public var prop18:String; public var prop20:String; public var prop21:String; public var prop22:String; public var prop23:String; public var prop24:String; public var prop25:String; public var prop26:String; public var prop27:String; public var prop28:String; public var prop29:String; public var evar5:String; public var evar4:String; public function isDefined(_arg1:String):Boolean{ if (((((((("string" == "undefined")) || ((_arg1 == null)))) || ((_arg1 == "")))) || ((_arg1 == "undefined")))){ return (false); }; return (true); } } }//package metricsSection 256//QueuedOmniRequest (metrics.QueuedOmniRequest) package metrics { import metrics.*; class QueuedOmniRequest { public var pageName:String; public var request:OmniRequest; function QueuedOmniRequest(_arg1:String, _arg2:OmniRequest){ this.pageName = _arg1; this.request = _arg2; } } }//package metricsSection 257//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.0.0.0"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.coreSection 258//ButtonAsset (mx.core.ButtonAsset) package mx.core { public class ButtonAsset extends FlexSimpleButton implements IFlexAsset, IFlexDisplayObject { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function ButtonAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.coreSection 259//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.0.0.0"; 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.coreSection 260//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.coreSection 261//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.0.0.0"; public function FlexLoader(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.coreSection 262//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexMovieClip(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.coreSection 263//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.0.0.0"; public function FlexShape(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.coreSection 264//FlexSimpleButton (mx.core.FlexSimpleButton) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSimpleButton extends SimpleButton { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexSimpleButton(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.coreSection 265//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexSprite(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.coreSection 266//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.0.0.0"; 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.coreSection 267//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.coreSection 268//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.coreSection 269//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.coreSection 270//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.coreSection 271//IContainer (mx.core.IContainer) package mx.core { import flash.display.*; import flash.media.*; import flash.geom.*; 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.coreSection 272//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.coreSection 273//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.coreSection 274//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { public interface IFlexModuleFactory { function create(... _args):Object; function info():Object; } }//package mx.coreSection 275//IInvalidating (mx.core.IInvalidating) package mx.core { public interface IInvalidating { function validateNow():void; function invalidateSize():void; function invalidateDisplayList():void; function invalidateProperties():void; } }//package mx.coreSection 276//IProgrammaticSkin (mx.core.IProgrammaticSkin) package mx.core { public interface IProgrammaticSkin { function validateNow():void; function validateDisplayList():void; } }//package mx.coreSection 277//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.coreSection 278//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.coreSection 279//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.coreSection 280//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.coreSection 281//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function MovieClipAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.coreSection 282//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.coreSection 283//Singleton (mx.core.Singleton) package mx.core { public class Singleton { mx_internal static const VERSION:String = "3.0.0.0"; 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.coreSection 284//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.coreSection 285//SpriteAsset (mx.core.SpriteAsset) package mx.core { public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function SpriteAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.coreSection 286//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.coreSection 287//ModuleEvent (mx.events.ModuleEvent) package mx.events { import flash.events.*; import mx.modules.*; public class ModuleEvent extends ProgressEvent { public var errorText:String; private var _module:IModuleInfo; public static const READY:String = "ready"; public static const ERROR:String = "error"; public static const PROGRESS:String = "progress"; mx_internal static const VERSION:String = "3.0.0.0"; 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.eventsSection 288//ResourceEvent (mx.events.ResourceEvent) package mx.events { import flash.events.*; public class ResourceEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.0.0.0"; 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.eventsSection 289//StyleEvent (mx.events.StyleEvent) package mx.events { import flash.events.*; public class StyleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.0.0.0"; 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.eventsSection 290//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.0.0.0"; 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.graphicsSection 291//IFocusManager (mx.managers.IFocusManager) package mx.managers { 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 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.managersSection 292//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.managersSection 293//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.managersSection 294//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.managersSection 295//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.managersSection 296//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 get focusPane():Sprite; function get loaderInfo():LoaderInfo; function get toolTipChildren():IChildList; function set focusPane(_arg1:Sprite):void; function isTopLevel():Boolean; function get popUpChildren():IChildList; function get screen():Rectangle; function isFontFaceEmbedded(_arg1:TextFormat):Boolean; function get rawChildren():IChildList; function get topLevelSystemManager():ISystemManager; 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 removeFocusManager(_arg1:IFocusManagerContainer):void; function get document():Object; function get numModalWindows():int; function addFocusManager(_arg1:IFocusManagerContainer):void; function get stage():Stage; } }//package mx.managersSection 297//SystemManagerGlobals (mx.managers.SystemManagerGlobals) package mx.managers { public class SystemManagerGlobals { public static var topLevelSystemManagers:Array = []; public static var bootstrapLoaderInfoURL:String; } }//package mx.managersSection 298//IModuleInfo (mx.modules.IModuleInfo) package mx.modules { import flash.events.*; import mx.core.*; import flash.system.*; public interface IModuleInfo extends IEventDispatcher { function get ready():Boolean; function get loaded():Boolean; function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=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.modulesSection 299//ModuleManager (mx.modules.ModuleManager) package mx.modules { import mx.core.*; public class ModuleManager { mx_internal static const VERSION:String = "3.0.0.0"; 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.display.*; import flash.system.*; import flash.utils.*; import mx.events.*; import flash.net.*; 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):void{ var _local3: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){ _local3 = new ModuleEvent(ModuleEvent.PROGRESS); _local3.bytesLoaded = info.size; _local3.bytesTotal = info.size; dispatchEvent(_local3); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); }; }; } else { info.load(_arg1, _arg2); }; }; } 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); }; } 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); 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); } 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):void{ if (_loaded){ return; }; _loaded = true; limbo = null; if (_url.indexOf("published://") == 0){ return; }; var _local3:URLRequest = new URLRequest(_url); var _local4:LoaderContext = new LoaderContext(); _local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain); _local4.securityDomain = _arg2; if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){ _local4.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(_local3, _local4); } public function get url():String{ return (_url); } public function get applicationDomain():ApplicationDomain{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null); } public function readyHandler(_arg1:Event):void{ _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function get setup():Boolean{ return ((limbo) ? false : _setup); } public function unload():void{ clearLoader(); if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; limbo = null; factoryInfo = null; _loaded = false; _setup = false; _ready = false; _error = false; } } class FactoryInfo { public var bytesTotal:int;// = 0 public var factory:IFlexModuleFactory; public var applicationDomain:ApplicationDomain; private function FactoryInfo(){ } }Section 300//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; } }//package mx.modulesSection 301//IResourceBundle (mx.resources.IResourceBundle) package mx.resources { public interface IResourceBundle { function get content():Object; function get locale():String; function get bundleName():String; } }//package mx.resourcesSection 302//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 findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle; function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number; } }//package mx.resourcesSection 303//IResourceModule (mx.resources.IResourceModule) package mx.resources { public interface IResourceModule { function get resourceBundles():Array; } }//package mx.resourcesSection 304//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.0.0.0"; 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.resourcesSection 305//ResourceManager (mx.resources.ResourceManager) package mx.resources { import mx.core.*; public class ResourceManager { mx_internal static const VERSION:String = "3.0.0.0"; private static var implClassDependency:ResourceManagerImpl; private static var instance:IResourceManager; public static function getInstance():IResourceManager{ if (!instance){ instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager")); }; return (instance); } } }//package mx.resourcesSection 306//ResourceManagerImpl (mx.resources.ResourceManagerImpl) package mx.resources { import flash.events.*; import mx.core.*; import flash.system.*; import flash.utils.*; 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.0.0.0"; 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 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 addResourceBundle(_arg1:IResourceBundle):void{ var _local2:String = _arg1.locale; var _local3:String = _arg1.bundleName; if (!localeMap[_local2]){ localeMap[_local2] = {}; }; localeMap[_local2][_local3] = _arg1; } private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{ supportNonFrameworkApps(); return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _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 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 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 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 getBundleNamesForLocale(_arg1:String):Array{ var _local3:String; var _local2:Array = []; for (_local3 in localeMap[_arg1]) { _local2.push(_local3); }; return (_local2); } public function removeResourceBundle(_arg1:String, _arg2:String):void{ delete localeMap[_arg1][_arg2]; if (getBundleNamesForLocale(_arg1).length == 0){ delete localeMap[_arg1]; }; } 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 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)); } public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (false); }; var _local5:* = _local4.content[_arg2]; return ((String(_local5).toLowerCase() == "true")); } public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{ throw (new Error("unloadResourceModule() is not yet implemented.")); } public static function getInstance():IResourceManager{ if (!instance){ instance = new (ResourceManagerImpl); }; return (instance); } } }//package mx.resources import flash.events.*; import mx.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 307//HaloBorder (mx.skins.halo.HaloBorder) package mx.skins.halo { import mx.core.*; import flash.display.*; import mx.styles.*; 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.0.0.0"; private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2}; public function HaloBorder(){ BORDER_WIDTHS["default"] = 3; } override public function styleChanged(_arg1:String):void{ if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){ _borderMetrics = null; }; invalidateDisplayList(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ if (((isNaN(_arg1)) || (isNaN(_arg2)))){ return; }; super.updateDisplayList(_arg1, _arg2); backgroundColor = getBackgroundColor(); bRoundedCorners = false; backgroundAlphaName = "backgroundAlpha"; backgroundHole = null; radius = 0; radiusObj = null; drawBorder(_arg1, _arg2); drawBackground(_arg1, _arg2); } mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{ var _local5:Number; var _local6:uint; var _local7:uint; var _local8:String; var _local9:Number; var _local10:uint; var _local11:Boolean; var _local12:uint; var _local13:Array; var _local14:Array; var _local15:uint; var _local16:uint; var _local17:uint; var _local18:uint; var _local19:Boolean; var _local20:Object; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Object; var _local27:Number; var _local28:Number; var _local29:IContainer; var _local30:EdgeMetrics; var _local31:Boolean; var _local32:Number; var _local33:Array; var _local34:uint; var _local35:Boolean; var _local36:Number; var _local3:String = getStyle("borderStyle"); var _local4:Array = getStyle("highlightAlphas"); var _local21:Boolean; var _local26:Graphics = graphics; _local26.clear(); if (_local3){ switch (_local3){ case "none": break; case "inset": _local7 = getStyle("borderColor"); _local22 = ColorUtil.adjustBrightness2(_local7, -40); _local23 = ColorUtil.adjustBrightness2(_local7, 25); _local24 = ColorUtil.adjustBrightness2(_local7, 40); _local25 = backgroundColor; if ((((_local25 === null)) || ((_local25 === "")))){ _local25 = _local7; }; draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25)); break; case "outset": _local7 = getStyle("borderColor"); _local22 = ColorUtil.adjustBrightness2(_local7, -40); _local23 = ColorUtil.adjustBrightness2(_local7, -25); _local24 = ColorUtil.adjustBrightness2(_local7, 40); _local25 = backgroundColor; if ((((_local25 === null)) || ((_local25 === "")))){ _local25 = _local7; }; draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25)); break; case "alert": case "default": if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _local27 = getStyle("backgroundAlpha"); _local5 = getStyle("borderAlpha"); backgroundAlphaName = "borderAlpha"; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local28 = (bRoundedCorners) ? radius : 0; drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28); if (!bRoundedCorners){ radiusObj = {}; }; _local29 = (parent as IContainer); if (_local29){ _local30 = _local29.viewMetrics; backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0}; if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){ if (_local27 != _local5){ drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0); }; _local26.beginFill(Number(backgroundColor), _local27); _local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h); _local26.endFill(); }; }; backgroundColor = getStyle("borderColor"); }; break; case "dropdown": _local12 = getStyle("dropdownBorderColor"); drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); if (!isNaN(_local12)){ drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); }; backgroundColor = null; break; case "menuBorder": _local7 = getStyle("borderColor"); drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1); drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0); break; case "comboNonEdit": break; case "controlBar": if ((((_arg1 == 0)) || ((_arg2 == 0)))){ backgroundColor = null; break; }; _local14 = getStyle("footerColors"); _local31 = !((_local14 == null)); _local32 = getStyle("borderAlpha"); if (_local31){ _local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32); _local26.moveTo(0, 0); _local26.lineTo(_arg1, 0); _local26.lineStyle(0, 0, 0); if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){ radius = IStyleClient(parent.parent).getStyle("cornerRadius"); _local32 = IStyleClient(parent.parent).getStyle("borderAlpha"); }; if (isNaN(radius)){ radius = 0; }; if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){ radius = 0; }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2)); if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; }; backgroundColor = null; break; case "applicationControlBar": _local13 = getStyle("fillColors"); _local5 = getStyle("backgroundAlpha"); _local4 = getStyle("highlightAlphas"); _local33 = getStyle("fillAlphas"); _local11 = getStyle("docked"); _local34 = uint(backgroundColor); radius = getStyle("cornerRadius"); if (!radius){ radius = 0; }; drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius); if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1))); drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}}); backgroundColor = null; break; default: _local7 = getStyle("borderColor"); _local9 = getStyle("borderThickness"); _local8 = getStyle("borderSides"); _local35 = true; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local36 = Math.max((radius - _local9), 0); _local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36}; if (!bRoundedCorners){ radiusObj = {tl:radius, tr:radius, bl:0, br:0}; _local20.r = {tl:_local36, tr:_local36, bl:0, br:0}; }; if (_local8 != "left top right bottom"){ _local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0}; radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0}; _local8 = _local8.toLowerCase(); if (_local8.indexOf("left") == -1){ _local20.x = 0; _local20.w = (_local20.w + _local9); _local20.r.tl = 0; _local20.r.bl = 0; radiusObj.tl = 0; radiusObj.bl = 0; _local35 = false; }; if (_local8.indexOf("top") == -1){ _local20.y = 0; _local20.h = (_local20.h + _local9); _local20.r.tl = 0; _local20.r.tr = 0; radiusObj.tl = 0; radiusObj.tr = 0; _local35 = false; }; if (_local8.indexOf("right") == -1){ _local20.w = (_local20.w + _local9); _local20.r.tr = 0; _local20.r.br = 0; radiusObj.tr = 0; radiusObj.br = 0; _local35 = false; }; if (_local8.indexOf("bottom") == -1){ _local20.h = (_local20.h + _local9); _local20.r.bl = 0; _local20.r.br = 0; radiusObj.bl = 0; radiusObj.br = 0; _local35 = false; }; }; if ((((radius == 0)) && (_local35))){ drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0); _local26.beginFill(_local7); _local26.drawRect(0, 0, _arg1, _arg2); _local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9))); _local26.endFill(); } else { if (radiusObj){ drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl); drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20); radiusObj.tl = Math.max((radius - _local9), 0); radiusObj.tr = Math.max((radius - _local9), 0); radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0; radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0; } else { drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius); drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20); radius = Math.max((getStyle("cornerRadius") - _local9), 0); }; }; }; }; } mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{ var _local4:Number; var _local5:Number; var _local6:EdgeMetrics; var _local7:Graphics; var _local8:Number; var _local9:Number; var _local10:Array; var _local11:Number; if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){ _local4 = Number(backgroundColor); _local5 = 1; _local6 = getBackgroundColorMetrics(); _local7 = graphics; if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){ _local5 = 0; _local4 = 0xFFFFFF; } else { _local5 = getStyle(backgroundAlphaName); }; if (((!((radius == 0))) || (backgroundHole))){ _local8 = _local6.bottom; if (radiusObj){ _local9 = (bRoundedCorners) ? radius : 0; radiusObj = {tl:radius, tr:radius, bl:_local9, br:_local9}; drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole); } else { drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole); }; } else { _local7.beginFill(_local4, _local5); _local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top)); _local7.endFill(); }; }; var _local3:String = getStyle("borderStyle"); if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){ _local10 = getStyle("highlightAlphas"); _local11 = (_local10) ? _local10[0] : 0.3; drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local11, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}}); }; } mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ var _local11:Number; var _local12:Boolean; if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){ return; }; var _local9:Number = getStyle("shadowDistance"); var _local10:String = getStyle("shadowDirection"); if (getStyle("borderStyle") == "applicationControlBar"){ _local12 = getStyle("docked"); _local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10); _local9 = Math.abs(_local9); } else { _local11 = getDropShadowAngle(_local9, _local10); _local9 = (Math.abs(_local9) + 2); }; if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = _local9; dropShadow.angle = _local11; dropShadow.color = getStyle("dropShadowColor"); dropShadow.alpha = 0.4; dropShadow.tlRadius = _arg5; dropShadow.trRadius = _arg6; dropShadow.blRadius = _arg8; dropShadow.brRadius = _arg7; dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4); } mx_internal function getBackgroundColor():Object{ var _local2:Object; var _local1:IUIComponent = (parent as IUIComponent); if (((_local1) && (!(_local1.enabled)))){ _local2 = getStyle("backgroundDisabledColor"); if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){ return (_local2); }; }; return (getStyle("backgroundColor")); } mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Number = width; var _local8:Number = height; drawDropShadow(0, 0, width, height, 0, 0, 0, 0); var _local9:Graphics = graphics; _local9.beginFill(_arg1); _local9.drawRect(0, 0, _local7, _local8); _local9.drawRect(1, 0, (_local7 - 2), _local8); _local9.endFill(); _local9.beginFill(_arg2); _local9.drawRect(1, 0, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg3); _local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg4); _local9.drawRect(1, 1, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg5); _local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg6); _local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4)); _local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4)); _local9.endFill(); } mx_internal function getBackgroundColorMetrics():EdgeMetrics{ return (borderMetrics); } mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{ if (_arg2 == "left"){ return (((_arg1 >= 0)) ? 135 : 225); //unresolved jump }; if (_arg2 == "right"){ return (((_arg1 >= 0)) ? 45 : 315); //unresolved jump }; return (((_arg1 >= 0)) ? 90 : 270); } override public function get borderMetrics():EdgeMetrics{ var _local1:Number; var _local3:String; if (_borderMetrics){ return (_borderMetrics); }; var _local2:String = getStyle("borderStyle"); if ((((_local2 == "default")) || ((_local2 == "alert")))){ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _borderMetrics = new EdgeMetrics(0, 0, 0, 0); } else { return (EdgeMetrics.EMPTY); }; } else { if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){ _borderMetrics = new EdgeMetrics(1, 1, 1, 1); } else { if (_local2 == "solid"){ _local1 = getStyle("borderThickness"); if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); _local3 = getStyle("borderSides"); if (_local3 != "left top right bottom"){ if (_local3.indexOf("left") == -1){ _borderMetrics.left = 0; }; if (_local3.indexOf("top") == -1){ _borderMetrics.top = 0; }; if (_local3.indexOf("right") == -1){ _borderMetrics.right = 0; }; if (_local3.indexOf("bottom") == -1){ _borderMetrics.bottom = 0; }; }; } else { _local1 = BORDER_WIDTHS[_local2]; if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); }; }; }; return (_borderMetrics); } } }//package mx.skins.haloSection 308//HaloFocusRect (mx.skins.halo.HaloFocusRect) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.skins.*; import mx.utils.*; public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient { private var _focusColor:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function get inheritingStyles():Object{ return (styleName.inheritingStyles); } public function set inheritingStyles(_arg1:Object):void{ } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ } public function registerEffects(_arg1:Array):void{ } public function regenerateStyleCache(_arg1:Boolean):void{ } public function get styleDeclaration():CSSStyleDeclaration{ return (CSSStyleDeclaration(styleName)); } public function getClassStyleDeclarations():Array{ return ([]); } public function get className():String{ return ("HaloFocusRect"); } public function clearStyle(_arg1:String):void{ if (_arg1 == "focusColor"){ _focusColor = NaN; }; } public function setStyle(_arg1:String, _arg2):void{ if (_arg1 == "focusColor"){ _focusColor = _arg2; }; } public function set nonInheritingStyles(_arg1:Object):void{ } public function get nonInheritingStyles():Object{ return (styleName.nonInheritingStyles); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; super.updateDisplayList(_arg1, _arg2); var _local3:String = getStyle("focusBlendMode"); var _local4:Number = getStyle("focusAlpha"); var _local5:Number = getStyle("focusColor"); var _local6:Number = getStyle("cornerRadius"); var _local7:Number = getStyle("focusThickness"); var _local8:String = getStyle("focusRoundedCorners"); var _local9:Number = getStyle("themeColor"); var _local10:Number = _local5; if (isNaN(_local10)){ _local10 = _local9; }; var _local11:Graphics = graphics; _local11.clear(); blendMode = _local3; if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){ _local12 = 0; _local13 = 0; _local14 = 0; _local15 = 0; _local16 = (_local6 + _local7); if (_local8.indexOf("tl") >= 0){ _local12 = _local16; }; if (_local8.indexOf("tr") >= 0){ _local14 = _local16; }; if (_local8.indexOf("bl") >= 0){ _local13 = _local16; }; if (_local8.indexOf("br") >= 0){ _local15 = _local16; }; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); _local16 = (_local6 + (_local7 / 2)); _local12 = (_local12) ? _local16 : 0; _local14 = (_local14) ? _local16 : 0; _local13 = (_local13) ? _local16 : 0; _local15 = (_local15) ? _local16 : 0; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); } else { _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2); _local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2); _local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); }; } override public function getStyle(_arg1:String){ return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1)); } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ } } }//package mx.skins.haloSection 309//Border (mx.skins.Border) package mx.skins { import mx.core.*; public class Border extends ProgrammaticSkin implements IBorder { mx_internal static const VERSION:String = "3.0.0.0"; public function get borderMetrics():EdgeMetrics{ return (EdgeMetrics.EMPTY); } } }//package mx.skinsSection 310//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import mx.core.*; import flash.display.*; import mx.styles.*; 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.0.0.0"; private static var tempMatrix:Matrix = new Matrix(); public function ProgrammaticSkin(){ _width = measuredWidth; _height = measuredHeight; } public function getStyle(_arg1:String){ return (_styleName.getStyle(_arg1)); } 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.skinsSection 311//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import flash.events.*; import mx.core.*; import flash.display.*; import mx.styles.*; import flash.system.*; import flash.geom.*; import flash.utils.*; import mx.resources.*; import flash.net.*; 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.0.0.0"; public function RectangularBorder(){ resourceManager = ResourceManager.getInstance(); super(); addEventListener(Event.REMOVED, removedHandler); } public function layoutBackgroundImage():void{ var _local4:Number; var _local5:Number; var _local7:Number; var _local8:Number; var _local14:Number; var _local15:Graphics; var _local1:DisplayObject = parent; var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics; var _local3 = !((getStyle("backgroundAttachment") == "fixed")); if (_backgroundImageBounds){ _local4 = _backgroundImageBounds.width; _local5 = _backgroundImageBounds.height; } else { _local4 = ((width - _local2.left) - _local2.right); _local5 = ((height - _local2.top) - _local2.bottom); }; var _local6:Number = getBackgroundSize(); if (isNaN(_local6)){ _local7 = 1; _local8 = 1; } else { _local14 = (_local6 * 0.01); _local7 = ((_local14 * _local4) / backgroundImageWidth); _local8 = ((_local14 * _local5) / backgroundImageHeight); }; backgroundImage.scaleX = _local7; backgroundImage.scaleY = _local8; var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7)))); var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8)))); backgroundImage.x = _local2.left; backgroundImage.y = _local2.top; var _local11:Shape = Shape(backgroundImage.mask); _local11.x = _local2.left; _local11.y = _local2.top; if (((_local3) && ((_local1 is IContainer)))){ _local9 = (_local9 - IContainer(_local1).horizontalScrollPosition); _local10 = (_local10 - IContainer(_local1).verticalScrollPosition); }; backgroundImage.alpha = getStyle("backgroundAlpha"); backgroundImage.x = (backgroundImage.x + _local9); backgroundImage.y = (backgroundImage.y + _local10); var _local12:Number = ((width - _local2.left) - _local2.right); var _local13:Number = ((height - _local2.top) - _local2.bottom); if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){ _local15 = _local11.graphics; _local15.clear(); _local15.beginFill(0xFFFFFF); _local15.drawRect(0, 0, _local12, _local13); _local15.endFill(); }; } public function set backgroundImageBounds(_arg1:Rectangle):void{ _backgroundImageBounds = _arg1; invalidateDisplayList(); } private function getBackgroundSize():Number{ var _local3:int; var _local1:Number = NaN; var _local2:Object = getStyle("backgroundSize"); if (((_local2) && ((_local2 is String)))){ _local3 = _local2.indexOf("%"); if (_local3 != -1){ _local1 = Number(_local2.substr(0, _local3)); }; }; return (_local1); } private function removedHandler(_arg1:Event):void{ var _local2:IChildList; if (backgroundImage){ _local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); _local2.removeChild(backgroundImage.mask); _local2.removeChild(backgroundImage); backgroundImage = null; }; } private function initBackgroundImage(_arg1:DisplayObject):void{ backgroundImage = _arg1; if ((_arg1 is Loader)){ backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width; backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height; } else { backgroundImageWidth = backgroundImage.width; backgroundImageHeight = backgroundImage.height; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleName = styleName; }; }; var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); var _local3:Shape = new FlexShape(); _local3.name = "backgroundMask"; _local3.x = 0; _local3.y = 0; _local2.addChild(_local3); var _local4:int = _local2.getChildIndex(this); _local2.addChildAt(backgroundImage, (_local4 + 1)); backgroundImage.mask = _local3; } public function get backgroundImageBounds():Rectangle{ return (_backgroundImageBounds); } public function get hasBackgroundImage():Boolean{ return (!((backgroundImage == null))); } private function completeEventHandler(_arg1:Event):void{ if (!parent){ return; }; var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader); initBackgroundImage(_local2); layoutBackgroundImage(); dispatchEvent(_arg1.clone()); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var cls:Class; var newStyleObj:DisplayObject; var loader:Loader; var loaderContext:LoaderContext; var message:String; var unscaledWidth = _arg1; var unscaledHeight = _arg2; if (!parent){ return; }; var newStyle:Object = getStyle("backgroundImage"); if (newStyle != backgroundImageStyle){ removedHandler(null); backgroundImageStyle = newStyle; if (((newStyle) && ((newStyle as Class)))){ cls = Class(newStyle); initBackgroundImage(new (cls)); } else { if (((newStyle) && ((newStyle is String)))){ try { cls = Class(getDefinitionByName(String(newStyle))); } catch(e:Error) { }; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new FlexLoader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler); loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(newStyle)), loaderContext); }; } else { if (newStyle){ message = resourceManager.getString("skins", "notLoaded", [newStyle]); throw (new Error(message)); }; }; }; }; if (backgroundImage){ layoutBackgroundImage(); }; } private function errorEventHandler(_arg1:Event):void{ } } }//package mx.skinsSection 312//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import flash.events.*; import mx.core.*; import flash.display.*; import flash.utils.*; 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.0.0.0"; 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.stylesSection 313//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.stylesSection 314//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.stylesSection 315//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.stylesSection 316//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.stylesSection 317//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.stylesSection 318//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.0.0.0"; 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.stylesSection 319//StyleManagerImpl (mx.styles.StyleManagerImpl) package mx.styles { import flash.events.*; import mx.core.*; import flash.system.*; import flash.utils.*; 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.0.0.0"; 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); 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 320//ColorUtil (mx.utils.ColorUtil) package mx.utils { public class ColorUtil { mx_internal static const VERSION:String = "3.0.0.0"; 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.utilsSection 321//GraphicsUtil (mx.utils.GraphicsUtil) package mx.utils { import flash.display.*; public class GraphicsUtil { mx_internal static const VERSION:String = "3.0.0.0"; 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.utilsSection 322//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.0.0.0"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var _local2:String; var _local4:String; var _local5:Array; var _local3:DisplayObject = _arg1; while (_local3 != null) { if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){ break; }; _local4 = _local3.name; if ((_local3 is IRepeaterClient)){ _local5 = IRepeaterClient(_local3).instanceIndices; if (_local5){ _local4 = (_local4 + (("[" + _local5.join("][")) + "]")); }; }; _local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2); _local3 = _local3.parent; }; return (_local2); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utilsSection 323//StringUtil (mx.utils.StringUtil) package mx.utils { public class StringUtil { mx_internal static const VERSION:String = "3.0.0.0"; 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.utilsSection 324//Apartment (objects.Apartment) package objects { public class Apartment extends IndecisionObject { public static var Tile:Class = Apartment_Tile; public function Apartment(){ m_article = "an"; m_name = "Apartment Complex"; m_namePlural = "Apartments Complexes"; m_description = "Provides housing for 10 underpaid workers"; m_category = CATEGORY_WORKERS; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).totalWorkers = 10; (m_producesOnBuild as IndecisionResources).workers = 0; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 240; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 325//Apartment_Tile (objects.Apartment_Tile) package objects { import mx.core.*; public class Apartment_Tile extends BitmapAsset { } }//package objectsSection 326//Bank (objects.Bank) package objects { import actions.*; public class Bank extends IndecisionObject { public static const NAME:String = "Bank"; public static var Tile:Class = Bank_Tile; public function Bank(){ m_name = NAME; m_namePlural = (m_name + "s"); m_description = "Take out a loan and pay off debt"; m_category = CATEGORY_SERVICES; m_actions = new Array(); m_actions.push(new PayDebtAction()); m_actions.push(new PayDebtMoreAction()); m_actions.push(new TakeOutLoanAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 350; (m_resourceRequirements as IndecisionResources).metal = 5; (m_resourceRequirements as IndecisionResources).oil = 6; (m_resourceRequirements as IndecisionResources).workers = 1; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 327//Bank_Tile (objects.Bank_Tile) package objects { import mx.core.*; public class Bank_Tile extends BitmapAsset { } }//package objectsSection 328//BorderGate (objects.BorderGate) package objects { import actions.*; public class BorderGate extends IndecisionObject { public static var Tile1:Class = BorderGate_Tile1; public static var Tile2:Class = BorderGate_Tile2; public function BorderGate(){ m_name = "Border Fence"; m_namePlural = "Border Fence"; m_description = "Hire desperate illegal immigrant workers"; m_category = CATEGORY_GOVERNMENT; m_isRawMaterial = true; m_actions = new Array(); m_actions.push(new OpenBorderAction()); m_actions.push(new CloseBorderAction()); m_resourceRequirements = new IndecisionResources(); initializeDisplay(Tile1, Tile2); m_tileCols = 2; m_tileRows = 1; } } }//package objectsSection 329//BorderGate_Tile1 (objects.BorderGate_Tile1) package objects { import mx.core.*; public class BorderGate_Tile1 extends BitmapAsset { } }//package objectsSection 330//BorderGate_Tile2 (objects.BorderGate_Tile2) package objects { import mx.core.*; public class BorderGate_Tile2 extends BitmapAsset { } }//package objectsSection 331//Capitol (objects.Capitol) package objects { import actions.*; public class Capitol extends IndecisionObject { public static const NAME:String = "Capitol"; public static var Tile:Class = Capitol_Tile; public function Capitol(){ m_article = "the"; m_name = NAME; m_namePlural = (m_name + "s"); m_description = "Direct national policy and set up puppet representatives"; m_maximumAllowed = 1; m_category = CATEGORY_GOVERNMENT; m_actions = new Array(); m_actions.push(new RaiseTaxesAction()); m_actions.push(new LowerTaxesAction()); m_actions.push(new ImpeachPresidentAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 600; (m_resourceRequirements as IndecisionResources).metal = 5; (m_resourceRequirements as IndecisionResources).oil = 10; (m_resourceRequirements as IndecisionResources).workers = 10; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 332//Capitol_Tile (objects.Capitol_Tile) package objects { import mx.core.*; public class Capitol_Tile extends BitmapAsset { } }//package objectsSection 333//CarCorporation (objects.CarCorporation) package objects { import actions.*; public class CarCorporation extends IndecisionObject { public static var Tile1:Class = CarCorporation_Tile1; public function CarCorporation(){ m_name = "Large Scale Sales"; m_namePlural = "Large Scale Sales"; m_description = "Increase profits by selling cars in bulk."; m_category = CATEGORY_SERVICES; m_actions = new Array(); m_actions.push(new SellCarBulkAction()); m_actions.push(new SellSuvBulkAction()); m_actions.push(new SellHybridBulkAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 1100; (m_resourceRequirements as IndecisionResources).metal = 21; (m_resourceRequirements as IndecisionResources).oil = 11; (m_resourceRequirements as IndecisionResources).workers = 25; initializeDisplay(Tile1); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 334//CarCorporation_Tile1 (objects.CarCorporation_Tile1) package objects { import mx.core.*; public class CarCorporation_Tile1 extends BitmapAsset { } }//package objectsSection 335//CarDealership (objects.CarDealership) package objects { import actions.*; public class CarDealership extends IndecisionObject { public static const ARTICLE:String = "a"; public static const NAME:String = "Car Dealership"; public static var Tile1:Class = CarDealership_Tile1; public function CarDealership(){ m_name = NAME; m_namePlural = (NAME + "s"); m_description = "Make money off your workers by selling them the cars they made"; m_category = CATEGORY_SERVICES; m_actions = new Array(); m_actions.push(new SellCarAction()); m_actions.push(new SellSuvAction()); m_actions.push(new SellHybridAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 500; (m_resourceRequirements as IndecisionResources).metal = 10; (m_resourceRequirements as IndecisionResources).oil = 8; (m_resourceRequirements as IndecisionResources).workers = 10; initializeDisplay(Tile1); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 336//CarDealership_Tile1 (objects.CarDealership_Tile1) package objects { import mx.core.*; public class CarDealership_Tile1 extends BitmapAsset { } }//package objectsSection 337//CarFactory (objects.CarFactory) package objects { import actions.*; public class CarFactory extends IndecisionObject { public static const NAME:String = "Car Factory"; public static var Tile1:Class = CarFactory_Tile1; public static var Tile2:Class = CarFactory_Tile2; public static var Tile3:Class = CarFactory_Tile3; public static var Tile4:Class = CarFactory_Tile4; public static var carfactory:Class = CarFactory_carfactory; public function CarFactory(){ m_name = NAME; m_namePlural = "Car Factories"; m_description = "Manufacture expensive status symbols"; m_sfx = new carfactory(); m_category = CATEGORY_PRODUCTION; m_actions = new Array(); m_actions.push(new BuildCarAction()); m_actions.push(new UpgradeCarFactoryAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 400; (m_resourceRequirements as IndecisionResources).metal = 4; (m_resourceRequirements as IndecisionResources).oil = 6; (m_resourceRequirements as IndecisionResources).workers = 5; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).happiness = -10; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 338//CarFactory_carfactory (objects.CarFactory_carfactory) package objects { import mx.core.*; import flash.display.*; public class CarFactory_carfactory extends SoundAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package objectsSection 339//CarFactory_Tile1 (objects.CarFactory_Tile1) package objects { import mx.core.*; public class CarFactory_Tile1 extends BitmapAsset { } }//package objectsSection 340//CarFactory_Tile2 (objects.CarFactory_Tile2) package objects { import mx.core.*; public class CarFactory_Tile2 extends BitmapAsset { } }//package objectsSection 341//CarFactory_Tile3 (objects.CarFactory_Tile3) package objects { import mx.core.*; public class CarFactory_Tile3 extends BitmapAsset { } }//package objectsSection 342//CarFactory_Tile4 (objects.CarFactory_Tile4) package objects { import mx.core.*; public class CarFactory_Tile4 extends BitmapAsset { } }//package objectsSection 343//CondoHighrise (objects.CondoHighrise) package objects { public class CondoHighrise extends IndecisionObject { public static var Tile:Class = CondoHighrise_Tile; public function CondoHighrise(){ m_name = "High Rise Condo"; m_namePlural = (m_namePlural + "s"); m_description = "Provides housing for 50 underpaid workers"; m_category = CATEGORY_WORKERS; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).totalWorkers = 50; (m_producesOnBuild as IndecisionResources).workers = 0; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 1050; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 344//CondoHighrise_Tile (objects.CondoHighrise_Tile) package objects { import mx.core.*; public class CondoHighrise_Tile extends BitmapAsset { } }//package objectsSection 345//Condos (objects.Condos) package objects { public class Condos extends IndecisionObject { public static var Tile:Class = Condos_Tile; public function Condos(){ m_name = "Condo"; m_namePlural = "Condos"; m_description = "Provides housing for 25 underpaid workers"; m_category = CATEGORY_WORKERS; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).totalWorkers = 25; (m_producesOnBuild as IndecisionResources).workers = 0; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 550; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 346//Condos_Tile (objects.Condos_Tile) package objects { import mx.core.*; public class Condos_Tile extends BitmapAsset { } }//package objectsSection 347//FederalReserve (objects.FederalReserve) package objects { import actions.*; public class FederalReserve extends IndecisionObject { public static const NAME:String = "National Bank"; public static var Tile:Class = FederalReserve_Tile; public function FederalReserve(){ m_name = NAME; m_namePlural = (m_name + "s"); m_description = "Screw around with the financial market"; m_category = CATEGORY_GOVERNMENT; m_objectRequirements = [Bank]; m_actions = new Array(); m_actions.push(new LowerRatesAction()); m_actions.push(new RaiseRatesAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 590; (m_resourceRequirements as IndecisionResources).workers = 9; (m_resourceRequirements as IndecisionResources).metal = 9; (m_resourceRequirements as IndecisionResources).oil = 4; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 348//FederalReserve_Tile (objects.FederalReserve_Tile) package objects { import mx.core.*; public class FederalReserve_Tile extends BitmapAsset { } }//package objectsSection 349//FemaBuilding (objects.FemaBuilding) package objects { import actions.*; public class FemaBuilding extends IndecisionObject { public static const NAME:String = "National Disaster Management"; public static var Tile:Class = FemaBuilding_Tile; public function FemaBuilding(){ m_article = ""; m_name = NAME; m_namePlural = (m_name + " Buildings"); m_description = "Defend the homeland from insurgent natural and unnatural disasters"; m_category = CATEGORY_GOVERNMENT; m_actions = new Array(); m_actions.push(new RepairDamagedBuildingAction()); m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).happiness = 20; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 600; (m_resourceRequirements as IndecisionResources).metal = 5; (m_resourceRequirements as IndecisionResources).oil = 10; (m_resourceRequirements as IndecisionResources).workers = 15; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 350//FemaBuilding_Tile (objects.FemaBuilding_Tile) package objects { import mx.core.*; public class FemaBuilding_Tile extends BitmapAsset { } }//package objectsSection 351//GasStation (objects.GasStation) package objects { public class GasStation extends IndecisionObject { public static const NAME:String = "Gas Station"; public static var Tile:Class = GasStation_Tile; public function GasStation(){ m_name = NAME; m_namePlural = (m_name + "s"); m_description = "Provide fuel for your cars and mansions for foreign war lords"; m_category = CATEGORY_SERVICES; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 300; (m_resourceRequirements as IndecisionResources).oil = 5; (m_resourceRequirements as IndecisionResources).metal = 6; (m_resourceRequirements as IndecisionResources).workers = 1; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 352//GasStation_Tile (objects.GasStation_Tile) package objects { import mx.core.*; public class GasStation_Tile extends BitmapAsset { } }//package objectsSection 353//GovernmentHealthcare (objects.GovernmentHealthcare) package objects { import actions.*; public class GovernmentHealthcare extends IndecisionObject { public static var Tile:Class = GovernmentHealthcare_Tile; public function GovernmentHealthcare(){ m_name = "Government Healthcare"; m_namePlural = m_name; m_description = "Provide substandard beurocratic medical benefits for all"; m_category = CATEGORY_SERVICES; m_actions = []; m_actions.push(new OfferGovernmentCareAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 800; (m_resourceRequirements as IndecisionResources).workers = 25; (m_resourceRequirements as IndecisionResources).oil = 5; (m_resourceRequirements as IndecisionResources).metal = 18; m_objectRequirements = [Capitol]; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 354//GovernmentHealthcare_Tile (objects.GovernmentHealthcare_Tile) package objects { import mx.core.*; public class GovernmentHealthcare_Tile extends BitmapAsset { } }//package objectsSection 355//Hospital (objects.Hospital) package objects { import actions.*; public class Hospital extends IndecisionObject { public static var Tile:Class = Hospital_Tile; public function Hospital(){ m_name = "Hospital"; m_namePlural = (m_name + "s"); m_description = "Keep your workers healthy enough to work"; m_category = CATEGORY_SERVICES; m_actions = []; m_actions.push(new OfferCareAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 750; (m_resourceRequirements as IndecisionResources).workers = 15; (m_resourceRequirements as IndecisionResources).oil = 10; (m_resourceRequirements as IndecisionResources).metal = 20; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 356//Hospital_Tile (objects.Hospital_Tile) package objects { import mx.core.*; public class Hospital_Tile extends BitmapAsset { } }//package objectsSection 357//House (objects.House) package objects { public class House extends IndecisionObject { public static const ARTICLE:String = "a"; public static const NAME:String = "House"; public static var Tile:Class = House_Tile; public function House(){ m_article = ARTICLE; m_name = NAME; m_namePlural = (NAME + "s"); m_description = "Provides housing for five underpaid workers"; m_category = CATEGORY_WORKERS; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).totalWorkers = 5; (m_producesOnBuild as IndecisionResources).workers = 0; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 125; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 358//House_Tile (objects.House_Tile) package objects { import mx.core.*; public class House_Tile extends BitmapAsset { } }//package objectsSection 359//HybridFactory (objects.HybridFactory) package objects { import actions.*; public class HybridFactory extends SuvFactory { public static const NAME:String = "Hybrid Factory"; public static var Tile1:Class = HybridFactory_Tile1; public static var Tile2:Class = HybridFactory_Tile2; public static var Tile3:Class = HybridFactory_Tile3; public static var Tile4:Class = HybridFactory_Tile4; public function HybridFactory(){ m_name = NAME; m_namePlural = "Hybrid Factories"; m_description = "Gives the ability to create Hybrid cars."; m_sfx = new CarFactory.carfactory(); m_category = CATEGORY_PRODUCTION; m_actions = new Array(); m_actions.push(new BuildHybridAction()); (m_resourceRequirements as IndecisionResources).money = 800; (m_resourceRequirements as IndecisionResources).metal = 6; (m_resourceRequirements as IndecisionResources).oil = 0; (m_resourceRequirements as IndecisionResources).workers = ((m_resourceRequirements as IndecisionResources).workers + 5); m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).happiness = 30; m_isConstructable = false; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 360//HybridFactory_Tile1 (objects.HybridFactory_Tile1) package objects { import mx.core.*; public class HybridFactory_Tile1 extends BitmapAsset { } }//package objectsSection 361//HybridFactory_Tile2 (objects.HybridFactory_Tile2) package objects { import mx.core.*; public class HybridFactory_Tile2 extends BitmapAsset { } }//package objectsSection 362//HybridFactory_Tile3 (objects.HybridFactory_Tile3) package objects { import mx.core.*; public class HybridFactory_Tile3 extends BitmapAsset { } }//package objectsSection 363//HybridFactory_Tile4 (objects.HybridFactory_Tile4) package objects { import mx.core.*; public class HybridFactory_Tile4 extends BitmapAsset { } }//package objectsSection 364//Mall (objects.Mall) package objects { import actions.*; public class Mall extends IndecisionObject { public static var Tile:Class = Mall_Tile; public function Mall(){ m_name = "Shopping Mall"; m_namePlural = (m_name + "s"); m_description = "Give the people a chance to spend their money on a bunch of stupid crap"; m_category = CATEGORY_LUXURY; m_actions = []; m_actions.push(new MallShopAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 250; (m_resourceRequirements as IndecisionResources).workers = 5; (m_resourceRequirements as IndecisionResources).oil = 5; (m_resourceRequirements as IndecisionResources).metal = 9; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 365//Mall_Tile (objects.Mall_Tile) package objects { import mx.core.*; public class Mall_Tile extends BitmapAsset { } }//package objectsSection 366//MilitaryBase (objects.MilitaryBase) package objects { import actions.*; public class MilitaryBase extends IndecisionObject { public static var presidentialtune1_v1:Class = MilitaryBase_presidentialtune1_v1; public static var Tile:Class = MilitaryBase_Tile; public function MilitaryBase(){ m_name = "Military Base"; m_namePlural = (m_name + "s"); m_description = "Invade foreign countries, kill their leaders and convert them to Americanism"; m_sfx = new presidentialtune1_v1(); m_category = CATEGORY_GOVERNMENT; m_actions = new Array(); m_actions.push(new ColdWarAction()); m_actions.push(new ForeignRetreatAction()); m_actions.push(new ForeignWarAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 900; (m_resourceRequirements as IndecisionResources).metal = 20; (m_resourceRequirements as IndecisionResources).oil = 20; (m_resourceRequirements as IndecisionResources).workers = 10; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 367//MilitaryBase_presidentialtune1_v1 (objects.MilitaryBase_presidentialtune1_v1) package objects { import mx.core.*; import flash.display.*; public class MilitaryBase_presidentialtune1_v1 extends SoundAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package objectsSection 368//MilitaryBase_Tile (objects.MilitaryBase_Tile) package objects { import mx.core.*; public class MilitaryBase_Tile extends BitmapAsset { } }//package objectsSection 369//Minerals (objects.Minerals) package objects { public class Minerals extends IndecisionObject { public static var Tile1:Class = Minerals_Tile1; public function Minerals(){ m_name = "Minerals"; m_namePlural = "Minerals"; m_description = "Build a Mine here to collect metal"; m_isRawMaterial = true; m_tile = new Tile1(); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 370//Minerals_Tile1 (objects.Minerals_Tile1) package objects { import mx.core.*; public class Minerals_Tile1 extends BitmapAsset { } }//package objectsSection 371//MiningFacility (objects.MiningFacility) package objects { import actions.*; public class MiningFacility extends IndecisionObject { public static const NAME:String = "Mining Facility"; public static const ARTICLE:String = "a"; public static var Tile1:Class = MiningFacility_Tile1; public static var Tile2:Class = MiningFacility_Tile2; public static var Tile3:Class = MiningFacility_Tile3; public static var Tile4:Class = MiningFacility_Tile4; public static var minefactory:Class = MiningFacility_minefactory; public function MiningFacility(){ m_article = ARTICLE; m_name = NAME; m_namePlural = "Mining Facilities"; m_description = "Rip up the Earth to get to its precious metals"; m_sfx = new minefactory(); m_category = CATEGORY_PRODUCTION; m_actions = new Array(); m_actions.push(new UpgradeMiningFacilityAction()); m_producesOnWorkerArrival = new IndecisionResources(); (m_producesOnWorkerArrival as IndecisionResources).metal = 1; (m_producesOnWorkerArrival as IndecisionResources).money = 6; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 300; (m_resourceRequirements as IndecisionResources).oil = 4; (m_resourceRequirements as IndecisionResources).workers = 3; m_mustBeBuiltOn = Minerals; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).happiness = -10; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 372//MiningFacility_minefactory (objects.MiningFacility_minefactory) package objects { import mx.core.*; import flash.display.*; public class MiningFacility_minefactory extends SoundAsset { public var dt_text:DisplayObject; } }//package objectsSection 373//MiningFacility_Tile1 (objects.MiningFacility_Tile1) package objects { import mx.core.*; public class MiningFacility_Tile1 extends BitmapAsset { } }//package objectsSection 374//MiningFacility_Tile2 (objects.MiningFacility_Tile2) package objects { import mx.core.*; public class MiningFacility_Tile2 extends BitmapAsset { } }//package objectsSection 375//MiningFacility_Tile3 (objects.MiningFacility_Tile3) package objects { import mx.core.*; public class MiningFacility_Tile3 extends BitmapAsset { } }//package objectsSection 376//MiningFacility_Tile4 (objects.MiningFacility_Tile4) package objects { import mx.core.*; public class MiningFacility_Tile4 extends BitmapAsset { } }//package objectsSection 377//MiningFacilityLevel2 (objects.MiningFacilityLevel2) package objects { import actions.*; public class MiningFacilityLevel2 extends MiningFacility { public static const NAME:String = "Level 2 Mining Facility"; public function MiningFacilityLevel2(){ m_name = NAME; m_namePlural = "Level 2 Mining Facilities"; m_actions = new Array(); m_actions.push(new UpgradeMiningFacilityLevel2Action()); m_isConstructable = false; (m_resourceRequirements as IndecisionResources).money = 300; (m_resourceRequirements as IndecisionResources).oil = 0; (m_resourceRequirements as IndecisionResources).workers = ((m_resourceRequirements as IndecisionResources).workers + 2); m_producesOnBuild = new IndecisionResources(); } } }//package objectsSection 378//MiningFacilityLevel3 (objects.MiningFacilityLevel3) package objects { public class MiningFacilityLevel3 extends MiningFacilityLevel2 { public static const NAME:String = "Level 3 Mining Facility"; public function MiningFacilityLevel3(){ m_name = NAME; m_namePlural = "Level 3 Mining Facilities"; m_actions = new Array(); m_isConstructable = false; (m_resourceRequirements as IndecisionResources).money = 600; (m_resourceRequirements as IndecisionResources).oil = 0; (m_resourceRequirements as IndecisionResources).workers = ((m_resourceRequirements as IndecisionResources).workers + 2); m_producesOnBuild = new IndecisionResources(); } } }//package objectsSection 379//MovieTheater (objects.MovieTheater) package objects { import actions.*; public class MovieTheater extends IndecisionObject { public static var Tile:Class = MovieTheater_Tile; public function MovieTheater(){ m_name = "Movie Theater"; m_namePlural = (m_name + "s"); m_description = "Distract people with the hottest remakes of sequels of remakes"; m_category = CATEGORY_LUXURY; m_actions = []; m_actions.push(new WatchMovieAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 500; (m_resourceRequirements as IndecisionResources).workers = 7; (m_resourceRequirements as IndecisionResources).oil = 11; (m_resourceRequirements as IndecisionResources).metal = 7; m_tile = new Tile(); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 380//MovieTheater_Tile (objects.MovieTheater_Tile) package objects { import mx.core.*; public class MovieTheater_Tile extends BitmapAsset { } }//package objectsSection 381//NuclearPlant (objects.NuclearPlant) package objects { public class NuclearPlant extends IndecisionObject { public static const NAME:String = "Nucular Power Plant"; public static const ARTICLE:String = "a"; public static var Tile1:Class = NuclearPlant_Tile1; public static var Tile2:Class = NuclearPlant_Tile2; public static var Tile3:Class = NuclearPlant_Tile3; public static var Tile4:Class = NuclearPlant_Tile4; public function NuclearPlant(){ m_article = ARTICLE; m_name = NAME; m_namePlural = (m_name + "s"); m_description = "Support more than 100 radiation-poisoned workers"; m_category = CATEGORY_SERVICES; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 990; (m_resourceRequirements as IndecisionResources).metal = 18; (m_resourceRequirements as IndecisionResources).oil = 12; (m_resourceRequirements as IndecisionResources).workers = 7; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).happiness = -15; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 2; m_tileRows = 2; } } }//package objectsSection 382//NuclearPlant_Tile1 (objects.NuclearPlant_Tile1) package objects { import mx.core.*; public class NuclearPlant_Tile1 extends BitmapAsset { } }//package objectsSection 383//NuclearPlant_Tile2 (objects.NuclearPlant_Tile2) package objects { import mx.core.*; public class NuclearPlant_Tile2 extends BitmapAsset { } }//package objectsSection 384//NuclearPlant_Tile3 (objects.NuclearPlant_Tile3) package objects { import mx.core.*; public class NuclearPlant_Tile3 extends BitmapAsset { } }//package objectsSection 385//NuclearPlant_Tile4 (objects.NuclearPlant_Tile4) package objects { import mx.core.*; public class NuclearPlant_Tile4 extends BitmapAsset { } }//package objectsSection 386//Oil (objects.Oil) package objects { public class Oil extends IndecisionObject { public static const NAME:String = "Oil"; public static var Tile1:Class = Oil_Tile1; public static var Tile2:Class = Oil_Tile2; public static var Tile3:Class = Oil_Tile3; public static var Tile4:Class = Oil_Tile4; public function Oil(){ m_name = NAME; m_namePlural = NAME; m_description = "Build an Oil Refinery here to collect oil"; m_isRawMaterial = true; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 387//Oil_Tile1 (objects.Oil_Tile1) package objects { import mx.core.*; public class Oil_Tile1 extends BitmapAsset { } }//package objectsSection 388//Oil_Tile2 (objects.Oil_Tile2) package objects { import mx.core.*; public class Oil_Tile2 extends BitmapAsset { } }//package objectsSection 389//Oil_Tile3 (objects.Oil_Tile3) package objects { import mx.core.*; public class Oil_Tile3 extends BitmapAsset { } }//package objectsSection 390//Oil_Tile4 (objects.Oil_Tile4) package objects { import mx.core.*; public class Oil_Tile4 extends BitmapAsset { } }//package objectsSection 391//OilRefinery (objects.OilRefinery) package objects { import actions.*; public class OilRefinery extends IndecisionObject { public static const NAME:String = "Oil Refinery"; public static const ARTICLE:String = "an"; public static var Tile1:Class = OilRefinery_Tile1; public static var Tile2:Class = OilRefinery_Tile2; public static var Tile3:Class = OilRefinery_Tile3; public static var Tile4:Class = OilRefinery_Tile4; public static var oilfactory:Class = OilRefinery_oilfactory; public function OilRefinery(){ m_article = ARTICLE; m_name = NAME; m_namePlural = "Oil Refineries"; m_description = "Start drilling for black gold"; m_sfx = new oilfactory(); m_category = CATEGORY_PRODUCTION; m_actions = new Array(); m_actions.push(new UpgradeOilRefineryAction()); m_producesOnWorkerArrival = new IndecisionResources(); (m_producesOnWorkerArrival as IndecisionResources).oil = 2; (m_producesOnWorkerArrival as IndecisionResources).money = 4; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 200; (m_resourceRequirements as IndecisionResources).workers = 2; m_mustBeBuiltOn = Oil; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).happiness = -10; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 392//OilRefinery_oilfactory (objects.OilRefinery_oilfactory) package objects { import mx.core.*; import flash.display.*; public class OilRefinery_oilfactory extends SoundAsset { public var dt_text:DisplayObject; } }//package objectsSection 393//OilRefinery_Tile1 (objects.OilRefinery_Tile1) package objects { import mx.core.*; public class OilRefinery_Tile1 extends BitmapAsset { } }//package objectsSection 394//OilRefinery_Tile2 (objects.OilRefinery_Tile2) package objects { import mx.core.*; public class OilRefinery_Tile2 extends BitmapAsset { } }//package objectsSection 395//OilRefinery_Tile3 (objects.OilRefinery_Tile3) package objects { import mx.core.*; public class OilRefinery_Tile3 extends BitmapAsset { } }//package objectsSection 396//OilRefinery_Tile4 (objects.OilRefinery_Tile4) package objects { import mx.core.*; public class OilRefinery_Tile4 extends BitmapAsset { } }//package objectsSection 397//OilRefineryLevel2 (objects.OilRefineryLevel2) package objects { import actions.*; public class OilRefineryLevel2 extends OilRefinery { public static const NAME:String = "Level 2 Oil Refinery"; public static const ARTICLE:String = "a"; public function OilRefineryLevel2(){ m_article = ARTICLE; m_name = NAME; m_namePlural = "Level 2 Oil Refineries"; m_actions = new Array(); m_actions.push(new UpgradeOilRefineryLevel2Action()); (m_resourceRequirements as IndecisionResources).money = 300; (m_resourceRequirements as IndecisionResources).workers = ((m_resourceRequirements as IndecisionResources).workers + 2); m_producesOnBuild = new IndecisionResources(); m_isConstructable = false; } } }//package objectsSection 398//OilRefineryLevel3 (objects.OilRefineryLevel3) package objects { public class OilRefineryLevel3 extends OilRefineryLevel2 { public static const NAME:String = "Level 3 Oil Refinery"; public function OilRefineryLevel3(){ m_article = "a"; m_name = NAME; m_namePlural = "Level 3 Oil Refineries"; m_actions = new Array(); (m_resourceRequirements as IndecisionResources).money = 600; (m_resourceRequirements as IndecisionResources).workers = ((m_resourceRequirements as IndecisionResources).workers + 2); m_producesOnBuild = new IndecisionResources(); m_isConstructable = false; } } }//package objectsSection 399//OutsourceCars (objects.OutsourceCars) package objects { import actions.*; public class OutsourceCars extends IndecisionObject { public static var Tile1:Class = OutsourceCars_Tile1; public function OutsourceCars(){ m_name = "Outsource Car Production"; m_namePlural = m_name; m_description = "Build cars overseas and give American jobs to foreignors"; m_category = CATEGORY_GLOBAL; m_actions = new Array(); m_actions.push(new OutsourceCreateCarAction()); m_actions.push(new OutsourceCreateSuvAction()); m_actions.push(new OutsourceCreateHybridAction()); m_objectRequirements = [[CarFactory, SuvFactory, HybridFactory]]; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 200; (m_resourceRequirements as IndecisionResources).metal = 5; (m_resourceRequirements as IndecisionResources).workers = 6; initializeDisplay(Tile1); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 400//OutsourceCars_Tile1 (objects.OutsourceCars_Tile1) package objects { import mx.core.*; public class OutsourceCars_Tile1 extends BitmapAsset { } }//package objectsSection 401//OutsourcingLarge (objects.OutsourcingLarge) package objects { import actions.*; public class OutsourcingLarge extends IndecisionObject { public static var Tile1:Class = OutsourcingLarge_Tile1; public function OutsourcingLarge(){ m_name = "Large Scale Outsourcing"; m_namePlural = "Large Scale Outsourcing"; m_description = "Increase profits by selling cars in bulk in wealthy shieks"; m_category = CATEGORY_GLOBAL; m_actions = new Array(); m_actions.push(new BuyCarBulkAction()); m_actions.push(new BuySuvBulkAction()); m_actions.push(new BuyHybridBulkAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 900; (m_resourceRequirements as IndecisionResources).metal = 29; (m_resourceRequirements as IndecisionResources).oil = 19; (m_resourceRequirements as IndecisionResources).workers = 20; initializeDisplay(Tile1); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 402//OutsourcingLarge_Tile1 (objects.OutsourcingLarge_Tile1) package objects { import mx.core.*; public class OutsourcingLarge_Tile1 extends BitmapAsset { } }//package objectsSection 403//Park (objects.Park) package objects { import actions.*; public class Park extends IndecisionObject { public static var Tile1:Class = Park_Tile1; public static var Tile2:Class = Park_Tile2; public static var Tile3:Class = Park_Tile3; public static var Tile4:Class = Park_Tile4; public function Park(){ m_name = "Park"; m_namePlural = "Parks"; m_description = "A pleasant place for hobos to scream and fathers to get handjobs in the bushes"; m_category = CATEGORY_LUXURY; m_actions = []; m_actions.push(new VisitParkAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 750; (m_resourceRequirements as IndecisionResources).workers = 3; (m_resourceRequirements as IndecisionResources).oil = 15; (m_resourceRequirements as IndecisionResources).metal = 3; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 2; m_tileRows = 4; } } }//package objectsSection 404//Park_Tile1 (objects.Park_Tile1) package objects { import mx.core.*; public class Park_Tile1 extends BitmapAsset { } }//package objectsSection 405//Park_Tile2 (objects.Park_Tile2) package objects { import mx.core.*; public class Park_Tile2 extends BitmapAsset { } }//package objectsSection 406//Park_Tile3 (objects.Park_Tile3) package objects { import mx.core.*; public class Park_Tile3 extends BitmapAsset { } }//package objectsSection 407//Park_Tile4 (objects.Park_Tile4) package objects { import mx.core.*; public class Park_Tile4 extends BitmapAsset { } }//package objectsSection 408//PortExport (objects.PortExport) package objects { import actions.*; public class PortExport extends IndecisionObject { public static var Tile1:Class = PortExport_Tile1; public static var Tile2:Class = PortExport_Tile2; public static var Tile3:Class = PortExport_Tile3; public static var Tile4:Class = PortExport_Tile4; public function PortExport(){ m_name = "Port (Exports)"; m_namePlural = "Ports (Exports)"; m_description = "Sell cars to stuck-up ungrateful foreigners"; m_category = CATEGORY_GOVERNMENT; m_actions = new Array(); m_actions.push(new ExportCarAction()); m_actions.push(new ExportSuvAction()); m_actions.push(new ExportHybridAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 250; (m_resourceRequirements as IndecisionResources).metal = 5; (m_resourceRequirements as IndecisionResources).workers = 5; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 2; m_tileRows = 2; } } }//package objectsSection 409//PortExport_Tile1 (objects.PortExport_Tile1) package objects { import mx.core.*; public class PortExport_Tile1 extends BitmapAsset { } }//package objectsSection 410//PortExport_Tile2 (objects.PortExport_Tile2) package objects { import mx.core.*; public class PortExport_Tile2 extends BitmapAsset { } }//package objectsSection 411//PortExport_Tile3 (objects.PortExport_Tile3) package objects { import mx.core.*; public class PortExport_Tile3 extends BitmapAsset { } }//package objectsSection 412//PortExport_Tile4 (objects.PortExport_Tile4) package objects { import mx.core.*; public class PortExport_Tile4 extends BitmapAsset { } }//package objectsSection 413//PortImport (objects.PortImport) package objects { import actions.*; public class PortImport extends IndecisionObject { public static var Tile1:Class = PortImport_Tile1; public static var Tile2:Class = PortImport_Tile2; public static var Tile3:Class = PortImport_Tile3; public static var Tile4:Class = PortImport_Tile4; public function PortImport(){ m_name = "Port (Imports)"; m_namePlural = "Ports (Imports)"; m_description = "Buy foreign cars and bleed money from American economy"; m_category = CATEGORY_GOVERNMENT; m_actions = new Array(); m_actions.push(new ImportCarAction()); m_actions.push(new ImportSuvAction()); m_actions.push(new ImportHybridAction()); m_objectRequirements = [GasStation]; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 200; (m_resourceRequirements as IndecisionResources).metal = 5; (m_resourceRequirements as IndecisionResources).workers = 4; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 2; m_tileRows = 2; } } }//package objectsSection 414//PortImport_Tile1 (objects.PortImport_Tile1) package objects { import mx.core.*; public class PortImport_Tile1 extends BitmapAsset { } }//package objectsSection 415//PortImport_Tile2 (objects.PortImport_Tile2) package objects { import mx.core.*; public class PortImport_Tile2 extends BitmapAsset { } }//package objectsSection 416//PortImport_Tile3 (objects.PortImport_Tile3) package objects { import mx.core.*; public class PortImport_Tile3 extends BitmapAsset { } }//package objectsSection 417//PortImport_Tile4 (objects.PortImport_Tile4) package objects { import mx.core.*; public class PortImport_Tile4 extends BitmapAsset { } }//package objectsSection 418//ResearchFacility (objects.ResearchFacility) package objects { import actions.*; public class ResearchFacility extends IndecisionObject { public static const NAME:String = "Research Laboratory"; public static var Tile1:Class = ResearchFacility_Tile1; public function ResearchFacility(){ m_name = NAME; m_namePlural = "Research Laboratories"; m_description = "Allows you to research new technologies"; m_category = CATEGORY_PRODUCTION; m_actions = new Array(); m_actions.push(new UnlockSuvAction()); m_actions.push(new UnlockHybridAction()); m_actions.push(new UnlockMining2Action()); m_actions.push(new UnlockMining3Action()); m_actions.push(new UnlockOilRefinery3Action()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 150; (m_resourceRequirements as IndecisionResources).metal = 6; (m_resourceRequirements as IndecisionResources).oil = 6; (m_resourceRequirements as IndecisionResources).workers = 5; initializeDisplay(Tile1); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 419//ResearchFacility_Tile1 (objects.ResearchFacility_Tile1) package objects { import mx.core.*; public class ResearchFacility_Tile1 extends BitmapAsset { } }//package objectsSection 420//Stadium (objects.Stadium) package objects { import actions.*; public class Stadium extends IndecisionObject { public static var Tile1:Class = Stadium_Tile1; public function Stadium(){ m_name = "Stadium"; m_namePlural = (m_name + "s"); m_description = "Keep the people happy with violence, tribalism and xenophobia"; m_category = CATEGORY_LUXURY; m_actions = []; m_actions.push(new GotoStadiumAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 1100; (m_resourceRequirements as IndecisionResources).workers = 11; (m_resourceRequirements as IndecisionResources).oil = 7; (m_resourceRequirements as IndecisionResources).metal = 17; m_tile = new Tile1(); m_tileCols = 2; m_tileRows = 2; } } }//package objectsSection 421//Stadium_Tile1 (objects.Stadium_Tile1) package objects { import mx.core.*; public class Stadium_Tile1 extends BitmapAsset { } }//package objectsSection 422//StockMarket (objects.StockMarket) package objects { import actions.*; public class StockMarket extends IndecisionObject { public static var Tile1:Class = StockMarket_Tile1; public static var Tile2:Class = StockMarket_Tile2; public static var Tile3:Class = StockMarket_Tile3; public static var Tile4:Class = StockMarket_Tile4; public function StockMarket(){ m_name = "Stock Market"; m_namePlural = (m_name + "s"); m_description = "Spin the economic wheel of fortune"; m_category = CATEGORY_SERVICES; m_actions = new Array(); m_actions.push(new InvestBlueChipAction()); m_actions.push(new InvestIPOAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 1150; (m_resourceRequirements as IndecisionResources).workers = 16; (m_resourceRequirements as IndecisionResources).metal = 6; (m_resourceRequirements as IndecisionResources).oil = 5; m_objectRequirements = [Bank, FederalReserve]; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 1; m_tileRows = 1; } } }//package objectsSection 423//StockMarket_Tile1 (objects.StockMarket_Tile1) package objects { import mx.core.*; public class StockMarket_Tile1 extends BitmapAsset { } }//package objectsSection 424//StockMarket_Tile2 (objects.StockMarket_Tile2) package objects { import mx.core.*; public class StockMarket_Tile2 extends BitmapAsset { } }//package objectsSection 425//StockMarket_Tile3 (objects.StockMarket_Tile3) package objects { import mx.core.*; public class StockMarket_Tile3 extends BitmapAsset { } }//package objectsSection 426//StockMarket_Tile4 (objects.StockMarket_Tile4) package objects { import mx.core.*; public class StockMarket_Tile4 extends BitmapAsset { } }//package objectsSection 427//SuvFactory (objects.SuvFactory) package objects { import actions.*; public class SuvFactory extends CarFactory { public static const NAME:String = "SUV Factory"; public static var Tile1:Class = SuvFactory_Tile1; public static var Tile2:Class = SuvFactory_Tile2; public static var Tile3:Class = SuvFactory_Tile3; public static var Tile4:Class = SuvFactory_Tile4; public function SuvFactory(){ m_name = NAME; m_namePlural = "SUV Factories"; m_description = "Gives the ability to create SUV cars."; m_sfx = new CarFactory.carfactory(); m_category = CATEGORY_PRODUCTION; m_actions = new Array(); m_actions.push(new BuildSuvAction()); m_actions.push(new UpgradeSuvFactoryAction()); (m_resourceRequirements as IndecisionResources).money = 600; (m_resourceRequirements as IndecisionResources).metal = 8; (m_resourceRequirements as IndecisionResources).oil = 12; m_producesOnBuild = new IndecisionResources(); m_isConstructable = false; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 428//SuvFactory_Tile1 (objects.SuvFactory_Tile1) package objects { import mx.core.*; public class SuvFactory_Tile1 extends BitmapAsset { } }//package objectsSection 429//SuvFactory_Tile2 (objects.SuvFactory_Tile2) package objects { import mx.core.*; public class SuvFactory_Tile2 extends BitmapAsset { } }//package objectsSection 430//SuvFactory_Tile3 (objects.SuvFactory_Tile3) package objects { import mx.core.*; public class SuvFactory_Tile3 extends BitmapAsset { } }//package objectsSection 431//SuvFactory_Tile4 (objects.SuvFactory_Tile4) package objects { import mx.core.*; public class SuvFactory_Tile4 extends BitmapAsset { } }//package objectsSection 432//UnitedNations (objects.UnitedNations) package objects { import actions.*; public class UnitedNations extends IndecisionObject { public static var Tile1:Class = UnitedNations_Tile1; public function UnitedNations(){ m_article = "the"; m_name = "Confederated Nations"; m_namePlural = m_name; m_description = "Bring peace to the world one dirty Third World child at a time"; m_category = CATEGORY_GLOBAL; m_actions = new Array(); m_actions.push(new EmissionsTreatyAction()); m_actions.push(new FreeTradeAction()); m_actions.push(new CureWorldHungerAction()); m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).global = 5; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 1500; (m_resourceRequirements as IndecisionResources).metal = 10; (m_resourceRequirements as IndecisionResources).oil = 20; (m_resourceRequirements as IndecisionResources).workers = 10; m_objectRequirements = [WhiteHouse, Capitol]; initializeDisplay(Tile1); m_tileCols = 1; m_tileRows = 2; } } }//package objectsSection 433//UnitedNations_Tile1 (objects.UnitedNations_Tile1) package objects { import mx.core.*; public class UnitedNations_Tile1 extends BitmapAsset { } }//package objectsSection 434//WaterTreatment (objects.WaterTreatment) package objects { public class WaterTreatment extends IndecisionObject { public static var Tile1:Class = WaterTreatment_Tile1; public static var Tile2:Class = WaterTreatment_Tile2; public static var Tile3:Class = WaterTreatment_Tile3; public static var Tile4:Class = WaterTreatment_Tile4; public function WaterTreatment(){ m_name = "Sewage Plant"; m_namePlural = (m_name + "s"); m_description = "Make the crap flow away from the nicer parts of town"; m_category = CATEGORY_SERVICES; m_producesOnBuild = new IndecisionResources(); (m_producesOnBuild as IndecisionResources).happiness = 10; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 950; (m_resourceRequirements as IndecisionResources).metal = 12; (m_resourceRequirements as IndecisionResources).oil = 16; (m_resourceRequirements as IndecisionResources).workers = 3; initializeDisplay(Tile1, Tile2, Tile3, Tile4); m_tileCols = 2; m_tileRows = 2; } } }//package objectsSection 435//WaterTreatment_Tile1 (objects.WaterTreatment_Tile1) package objects { import mx.core.*; public class WaterTreatment_Tile1 extends BitmapAsset { } }//package objectsSection 436//WaterTreatment_Tile2 (objects.WaterTreatment_Tile2) package objects { import mx.core.*; public class WaterTreatment_Tile2 extends BitmapAsset { } }//package objectsSection 437//WaterTreatment_Tile3 (objects.WaterTreatment_Tile3) package objects { import mx.core.*; public class WaterTreatment_Tile3 extends BitmapAsset { } }//package objectsSection 438//WaterTreatment_Tile4 (objects.WaterTreatment_Tile4) package objects { import mx.core.*; public class WaterTreatment_Tile4 extends BitmapAsset { } }//package objectsSection 439//WhiteHouse (objects.WhiteHouse) package objects { import actions.*; public class WhiteHouse extends IndecisionObject { public static const NAME:String = "White House"; public static var Tile:Class = WhiteHouse_Tile; public static var hailtothechief_v1:Class = WhiteHouse_hailtothechief_v1; public function WhiteHouse(){ m_article = "the"; m_name = NAME; m_namePlural = (m_name + "s"); m_description = "Choose who is elected president"; m_sfx = new hailtothechief_v1(); m_category = CATEGORY_GOVERNMENT; m_maximumAllowed = 1; m_actions = new Array(); m_actions.push(new ElectLaborerAction()); m_actions.push(new ElectEconomistAction()); m_actions.push(new ElectGlobalistAction()); m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).money = 900; (m_resourceRequirements as IndecisionResources).metal = 9; (m_resourceRequirements as IndecisionResources).oil = 3; (m_resourceRequirements as IndecisionResources).workers = 1; m_objectRequirements = [Capitol]; m_tile = new Tile(); m_tileCols = 2; m_tileRows = 2; } } }//package objectsSection 440//WhiteHouse_hailtothechief_v1 (objects.WhiteHouse_hailtothechief_v1) package objects { import mx.core.*; import flash.display.*; public class WhiteHouse_hailtothechief_v1 extends SoundAsset { public var dt_text:DisplayObject; } }//package objectsSection 441//WhiteHouse_Tile (objects.WhiteHouse_Tile) package objects { import mx.core.*; public class WhiteHouse_Tile extends BitmapAsset { } }//package objectsSection 442//WhiteHouseEconomist (objects.WhiteHouseEconomist) package objects { import actions.*; public class WhiteHouseEconomist extends WhiteHouse { public static const NAME:String = "Elected Economist President"; public function WhiteHouseEconomist(){ m_description = "An Economically minded President sits in office."; m_actions = new Array(); m_actions.push(new EconomistPositiveAction()); m_actions.push(new EconomistNeutralAction()); m_actions.push(new EconomistNegativeAction()); m_isConstructable = false; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).workers = 1; } } }//package objectsSection 443//WhiteHouseGlobalist (objects.WhiteHouseGlobalist) package objects { import actions.*; public class WhiteHouseGlobalist extends WhiteHouse { public static const NAME:String = "Elected Globalist President"; public function WhiteHouseGlobalist(){ m_description = "An Globalist President sits in office."; m_actions = new Array(); m_actions.push(new GlobalistPositiveAction()); m_actions.push(new GlobalistNeutralAction()); m_actions.push(new GlobalistNegativeAction()); m_isConstructable = false; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).workers = 1; } } }//package objectsSection 444//WhiteHouseLaborer (objects.WhiteHouseLaborer) package objects { import actions.*; public class WhiteHouseLaborer extends WhiteHouse { public static const NAME:String = "Elected Laborer President"; public function WhiteHouseLaborer(){ m_description = "A President of the people sits in office."; m_actions = new Array(); m_actions.push(new LaborerPositiveAction()); m_actions.push(new LaborerNeutralAction()); m_actions.push(new LaborerNegativeAction()); m_isConstructable = false; m_resourceRequirements = new IndecisionResources(); (m_resourceRequirements as IndecisionResources).workers = 1; } } }//package objectsSection 445//ActionButton (ui.ActionButton) package ui { import flash.display.*; import flash.geom.*; public class ActionButton extends SimpleButton { private var m_mask:Sprite; public function ActionButton(_arg1:Bitmap){ var _local2:Sprite = new Sprite(); _local2.addChild(_arg1); this.upState = _local2; var _local3:Sprite = new Sprite(); _local3.addChild(new Bitmap(_arg1.bitmapData)); _local3.transform.colorTransform = new ColorTransform(0.9, 0.9, 0.9); this.overState = _local3; var _local4:Sprite = new Sprite(); _local4.addChild(new Bitmap(_arg1.bitmapData)); _local4.transform.colorTransform = new ColorTransform(0.8, 0.8, 0.8); this.downState = _local4; m_mask = new Sprite(); m_mask.cacheAsBitmap = true; m_mask.blendMode = BlendMode.ALPHA; this.cacheAsBitmap = true; this.blendMode = BlendMode.LAYER; this.useHandCursor = true; this.hitTestState = _local2; } private function doPieFill(_arg1:Number):void{ var _local2:int = ((this.width + this.height) * 2); var _local3:Number = (_local2 * _arg1); var _local4:Graphics = m_mask.graphics; _local4.moveTo((this.width / 2), (this.height / 2)); _local4.lineTo((this.width / 2), 0); var _local5:Number = (this.width / 2); if (_local3 > _local5){ _local4.lineTo(this.width, 0); } else { _local4.lineTo(((this.width / 2) + _local3), 0); endPieFill(); return; }; _local5 = (_local5 + this.height); if (_local3 > _local5){ _local4.lineTo(this.width, this.height); } else { _local4.lineTo(this.width, (_local3 - (_local5 - this.height))); endPieFill(); return; }; _local5 = (_local5 + this.width); if (_local3 > _local5){ _local4.lineTo(0, this.height); } else { _local4.lineTo((this.width - (_local3 - (_local5 - this.width))), this.height); endPieFill(); return; }; _local5 = (_local5 + this.height); if (_local3 > _local5){ _local4.lineTo(0, 0); } else { _local4.lineTo(0, (this.height - (_local3 - (_local5 - this.height)))); endPieFill(); return; }; _local5 = (_local5 + (this.width / 2)); if (_local3 > _local5){ _local4.lineTo((this.width / 2), 0); } else { _local4.lineTo((_local3 - (_local5 - (this.width / 2))), 0); }; endPieFill(); } private function endPieFill():void{ var _local1:Graphics = m_mask.graphics; m_mask.graphics.lineTo((this.width / 2), (this.height / 2)); } public function disable():void{ this.enabled = false; this.alpha = 0.3; } public function enable():void{ this.enabled = true; this.alpha = 1; } public function set rechargePercent(_arg1:Number):void{ if (this.parent == null){ return; }; if (this.parent != m_mask.parent){ this.parent.addChild(m_mask); m_mask.x = this.x; m_mask.y = this.y; this.mask = m_mask; }; if (_arg1 < 1){ this.enabled = false; }; var _local2:Graphics = m_mask.graphics; _local2.clear(); _local2.beginFill(0xFF0000, 0.2); _local2.drawRect(0, 0, this.width, this.height); _local2.endFill(); _local2.beginFill(0xFF0000); doPieFill(_arg1); _local2.endFill(); } } }//package uiSection 446//HelpBalloonThing (ui.HelpBalloonThing) package ui { import flash.display.*; import flash.filters.*; public class HelpBalloonThing extends Sprite { private var m_text:Label; public static var Background:Class = HelpBalloonThing_Background; public function HelpBalloonThing(_arg1:String, _arg2:Boolean=false){ var _local3:DisplayObject = new Background(); _local3.filters = [new DropShadowFilter(4, 45, 0, 1, 10, 10, 1)]; this.addChild(_local3); m_text = new Label(12); m_text.fontColor = 0; m_text.text = _arg1; m_text.wordWrap = true; m_text.width = _local3.width; m_text.alignCenter(); this.addChild(m_text); _local3.height = (m_text.height + 25); this.alpha = 0.9; if (_arg2){ _local3.rotation = 180; _local3.x = (_local3.x + _local3.width); _local3.y = (_local3.y + (_local3.height - 20)); }; this.mouseEnabled = false; this.mouseChildren = false; } public function set text(_arg1:String):void{ m_text.text = _arg1; } public function remove():void{ if (this.parent != null){ this.parent.removeChild(this); }; } public function get text():String{ return (m_text.text); } } }//package uiSection 447//HelpBalloonThing_Background (ui.HelpBalloonThing_Background) package ui { import mx.core.*; public class HelpBalloonThing_Background extends SpriteAsset { } }//package uiSection 448//HighScoresOverlay (ui.HighScoresOverlay) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.ui.*; import gs3.*; import flash.utils.*; public class HighScoresOverlay extends Overlay { private var m_panel:Sprite;// = null private var m_scorePanel:Sprite;// = null public static var ScoresPanel:Class = HighScoresOverlay_ScoresPanel; public function HighScoresOverlay(){ super(new UrbansquallPanel(new ScoresPanel())); m_panel = new Sprite(); var _local1:VerticalScrollPane = new VerticalScrollPane(m_panel); _local1.x = 58; _local1.y = 100; this.addChild(_local1); var _local2:DisplayObject = new Overlay.CloseButtonClass(); _local2.x = 183; _local2.y = 313; _local2.addEventListener(MouseEvent.CLICK, onCloseClick, false, 0, true); _local2.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); _local2.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); this.addChild(_local2); } public function update():void{ var _local2:Array; var _local3:int; var _local4:Object; var _local1:Boolean; if (_local1){ GameServices.unauthLeaderBoard(1, 15, 0, 0); } else { _local2 = new Array(); _local3 = 0; while (_local3 < 15) { _local4 = new Object(); _local4.user_name = ("Person" + (_local3 + 1)); _local4.score = (Math.floor((Math.random() * 100000)) + ((15 - _local3) * 200000)); _local4.rank = (_local3 + 1); _local2.push(_local4); _local3++; }; parse(_local2); }; } public function parse(_arg1:Array):void{ var _local4:Object; var _local5:InfoBar; if (m_scorePanel != null){ removeChild(m_scorePanel); }; var _local2:Sprite = new Sprite(); _local2.graphics.beginFill(0xFF00FF, 0); _local2.graphics.drawRect(0, 0, 275, 205); _local2.graphics.endFill(); m_scorePanel = _local2; m_panel.addChild(m_scorePanel); var _local3:int; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; _local5 = new InfoBar(_local4.rank, _local4.user_name); _local5.x = 0; _local5.y = (30 * _local3); _local5.addRightColumn(_local4.score); m_scorePanel.addChild(_local5); _local3++; }; } } }//package uiSection 449//HighScoresOverlay_ScoresPanel (ui.HighScoresOverlay_ScoresPanel) package ui { import mx.core.*; public class HighScoresOverlay_ScoresPanel extends BitmapAsset { } }//package uiSection 450//InfoBar (ui.InfoBar) package ui { import flash.display.*; public class InfoBar extends Sprite { private var m_redLabel:Label; private var m_blueLabel:Label; public static var MissionInfoBar:Class = InfoBar_MissionInfoBar; public function InfoBar(_arg1:String="", _arg2:String=""){ this.addChild(new MissionInfoBar()); this.buttonMode = true; this.mouseChildren = false; m_redLabel = new Label(); m_redLabel.y = 1; this.redText = _arg1; this.addChild(m_redLabel); m_blueLabel = new Label(); m_blueLabel.y = 1; m_blueLabel.x = 35; m_blueLabel.text = _arg2; this.addChild(m_blueLabel); } public function addRightColumn(_arg1:String):void{ var _local2:Label = new Label(); _local2.text = _arg1; _local2.x = (this.width - 80); _local2.y = 1; this.addChild(_local2); } public function get blueText():String{ return (m_blueLabel.text); } public function set redText(_arg1:String):void{ m_redLabel.text = _arg1; m_redLabel.x = (15 - (m_redLabel.width / 2)); } public function set blueText(_arg1:String):void{ m_blueLabel.text = _arg1; } public function get redText():String{ return (m_redLabel.text); } } }//package uiSection 451//InfoBar_MissionInfoBar (ui.InfoBar_MissionInfoBar) package ui { import mx.core.*; public class InfoBar_MissionInfoBar extends BitmapAsset { } }//package uiSection 452//InstructionsOverlay (ui.InstructionsOverlay) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.ui.*; import flash.text.*; public class InstructionsOverlay extends Overlay { private var m_page:TextField; private var m_pageNum:int; private var m_instructions:MovieClip; private static var popup_how_to_play:Class = InstructionsOverlay_popup_how_to_play; private static var howtoplay:Class = InstructionsOverlay_howtoplay; public function InstructionsOverlay(){ var _local1:Sprite = new Sprite(); _local1.addChild(new popup_how_to_play()); m_instructions = new howtoplay(); m_instructions.stop(); _local1.addChild(m_instructions); super(new UrbansquallPanel(_local1)); m_page = SerpentineMedium.createTextField("1 of 6"); m_page.autoSize = TextFieldAutoSize.RIGHT; m_page.x = ((m_instructions.width - m_page.width) / 2); m_page.y = ((m_instructions.height - m_page.height) - 20); this.addChild(m_page); var _local2:Sprite = new Sprite(); _local2.addChild(new Slider.ScrollLeft()); _local2.x = ((m_page.x - _local2.width) - 20); _local2.y = m_page.y; _local2.addEventListener(MouseEvent.CLICK, onLeftClick, false, 0, true); _local2.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); _local2.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); this.addChild(_local2); var _local3:Sprite = new Sprite(); _local3.addChild(new Slider.ScrollRight()); _local3.x = ((m_page.x + m_page.width) + 20); _local3.y = _local2.y; _local3.addEventListener(MouseEvent.CLICK, onRightClick, false, 0, true); _local3.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); _local3.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); this.addChild(_local3); var _local4:DisplayObject = new Overlay.CloseButtonClass(); _local4.x = ((m_instructions.width - _local4.width) - 20); _local4.y = (_local3.y + (_local3.height - _local4.height)); _local4.addEventListener(MouseEvent.CLICK, onCloseClick, false, 0, true); _local4.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); _local4.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); this.addChild(_local4); m_pageNum = 1; gotoPageNum(); } private function gotoPageNum():void{ m_instructions.gotoAndStop(m_pageNum); m_page.text = (m_pageNum.toString() + " of 6"); } private function onLeftClick(_arg1:MouseEvent):void{ if (m_pageNum == 1){ m_pageNum = 6; } else { m_pageNum = (m_pageNum - 1); }; gotoPageNum(); } private function onRightClick(_arg1:MouseEvent):void{ if (m_pageNum == 6){ m_pageNum = 1; } else { m_pageNum = (m_pageNum + 1); }; gotoPageNum(); } } }//package uiSection 453//InstructionsOverlay_howtoplay (ui.InstructionsOverlay_howtoplay) package ui { import mx.core.*; import flash.display.*; public class InstructionsOverlay_howtoplay extends MovieClipAsset { public var dt_text:DisplayObject; } }//package uiSection 454//InstructionsOverlay_popup_how_to_play (ui.InstructionsOverlay_popup_how_to_play) package ui { import mx.core.*; public class InstructionsOverlay_popup_how_to_play extends BitmapAsset { } }//package uiSection 455//Label (ui.Label) package ui { import flash.display.*; import com.urbansquall.ui.*; import flash.text.*; public class Label extends UrbansquallLabel { public static var LabelBackground:Class = Label_LabelBackground; private static var FontBold:Class = Label_FontBold; private static var FontNormal:Class = Label_FontNormal; public function Label(_arg1:int=12, _arg2:Boolean=false){ var _local3:DisplayObject; if (_arg2){ _local3 = new LabelBackground(); }; var _local4:TextFormat = new TextFormat(); _local4.font = "Arial"; _local4.color = 0xFFFFFF; _local4.size = _arg1; super(_local3, _local4); m_text.antiAliasType = AntiAliasType.NORMAL; } } }//package uiSection 456//Label_FontBold (ui.Label_FontBold) package ui { import mx.core.*; public class Label_FontBold extends FontAsset { } }//package uiSection 457//Label_FontNormal (ui.Label_FontNormal) package ui { import mx.core.*; public class Label_FontNormal extends FontAsset { } }//package uiSection 458//Label_LabelBackground (ui.Label_LabelBackground) package ui { import mx.core.*; public class Label_LabelBackground extends SpriteAsset { } }//package uiSection 459//Lightning (ui.Lightning) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.skew.*; import com.urbansquall.audio.*; import flash.utils.*; public class Lightning { private var m_tile:Bitmap; private var m_animation:BlittedAnimation; public static const NUM_FRAMES:int = 16; public static var li0003:Class = Lightning_li0003; public static var li0004:Class = Lightning_li0004; public static var li0006:Class = Lightning_li0006; public static var li0008:Class = Lightning_li0008; public static var li0005:Class = Lightning_li0005; public static var li0007:Class = Lightning_li0007; public static var li0009:Class = Lightning_li0009; public static var li0001:Class = Lightning_li0001; public static var li0010:Class = Lightning_li0010; public static var li0011:Class = Lightning_li0011; public static var li0012:Class = Lightning_li0012; public static var li0013:Class = Lightning_li0013; public static var li0015:Class = Lightning_li0015; public static var lightningfromthegods_v1:Class = Lightning_lightningfromthegods_v1; public static var li0014:Class = Lightning_li0014; public static var li0016:Class = Lightning_li0016; public static var li0002:Class = Lightning_li0002; public function Lightning(){ m_tile = getFrame(1); var _local1:Array = []; var _local2 = 1; while (_local2 <= NUM_FRAMES) { _local1.push(getFrame(_local2).bitmapData); _local2++; }; m_animation = BlittedAnimation.createFromBitmapArray(m_tile.bitmapData, _local1); } private function onBuildingSurvivedLightning(_arg1:Event):void{ SoundSystem.instance.playSound(new TutorialBase.successful()); } public function get tileAnimation():BlittedAnimation{ return (m_animation); } public function playSound(_arg1:Boolean=false):void{ var _local2:Function = onLightningKilledBuilding; if (_arg1){ _local2 = onBuildingSurvivedLightning; }; SoundSystem.instance.playSound(new lightningfromthegods_v1(), 1, _local2); } private function onLightningKilledBuilding(_arg1:Event):void{ SoundSystem.instance.playSound(new Ufo.questionablesound()); } public function get tile():Bitmap{ return (m_tile); } private function getFrame(_arg1:int):Bitmap{ var _local2:String = _arg1.toString(); if (_arg1 < 10){ _local2 = ("0" + _local2); }; var _local3:Class = (getDefinitionByName(("ui::Lightning_li00" + _local2)) as Class); return (new (_local3)); } } }//package uiSection 460//Lightning_li0001 (ui.Lightning_li0001) package ui { import mx.core.*; public class Lightning_li0001 extends BitmapAsset { } }//package uiSection 461//Lightning_li0002 (ui.Lightning_li0002) package ui { import mx.core.*; public class Lightning_li0002 extends BitmapAsset { } }//package uiSection 462//Lightning_li0003 (ui.Lightning_li0003) package ui { import mx.core.*; public class Lightning_li0003 extends BitmapAsset { } }//package uiSection 463//Lightning_li0004 (ui.Lightning_li0004) package ui { import mx.core.*; public class Lightning_li0004 extends BitmapAsset { } }//package uiSection 464//Lightning_li0005 (ui.Lightning_li0005) package ui { import mx.core.*; public class Lightning_li0005 extends BitmapAsset { } }//package uiSection 465//Lightning_li0006 (ui.Lightning_li0006) package ui { import mx.core.*; public class Lightning_li0006 extends BitmapAsset { } }//package uiSection 466//Lightning_li0007 (ui.Lightning_li0007) package ui { import mx.core.*; public class Lightning_li0007 extends BitmapAsset { } }//package uiSection 467//Lightning_li0008 (ui.Lightning_li0008) package ui { import mx.core.*; public class Lightning_li0008 extends BitmapAsset { } }//package uiSection 468//Lightning_li0009 (ui.Lightning_li0009) package ui { import mx.core.*; public class Lightning_li0009 extends BitmapAsset { } }//package uiSection 469//Lightning_li0010 (ui.Lightning_li0010) package ui { import mx.core.*; public class Lightning_li0010 extends BitmapAsset { } }//package uiSection 470//Lightning_li0011 (ui.Lightning_li0011) package ui { import mx.core.*; public class Lightning_li0011 extends BitmapAsset { } }//package uiSection 471//Lightning_li0012 (ui.Lightning_li0012) package ui { import mx.core.*; public class Lightning_li0012 extends BitmapAsset { } }//package uiSection 472//Lightning_li0013 (ui.Lightning_li0013) package ui { import mx.core.*; public class Lightning_li0013 extends BitmapAsset { } }//package uiSection 473//Lightning_li0014 (ui.Lightning_li0014) package ui { import mx.core.*; public class Lightning_li0014 extends BitmapAsset { } }//package uiSection 474//Lightning_li0015 (ui.Lightning_li0015) package ui { import mx.core.*; public class Lightning_li0015 extends BitmapAsset { } }//package uiSection 475//Lightning_li0016 (ui.Lightning_li0016) package ui { import mx.core.*; public class Lightning_li0016 extends BitmapAsset { } }//package uiSection 476//Lightning_lightningfromthegods_v1 (ui.Lightning_lightningfromthegods_v1) package ui { import mx.core.*; public class Lightning_lightningfromthegods_v1 extends SoundAsset { } }//package uiSection 477//MissionOverlay (ui.MissionOverlay) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.wrighton.events.*; import com.urbansquall.ui.*; import com.urbansquall.audio.*; import flash.text.*; import flash.utils.*; public class MissionOverlay extends Overlay { private var m_descriptionLabel:Label; private var m_titleLabel:Label; private var m_goal1Sprite:Sprite; private var m_goal2Sprite:Sprite; private var m_goal3Sprite:Sprite; public static var CheckBoxOn:Class = MissionOverlay_CheckBoxOn; private static var Mission1:Class = MissionOverlay_Mission1; private static var Mission2:Class = MissionOverlay_Mission2; private static var Mission3:Class = MissionOverlay_Mission3; private static var Mission4:Class = MissionOverlay_Mission4; private static var Mission5:Class = MissionOverlay_Mission5; private static var Mission7:Class = MissionOverlay_Mission7; private static var Mission9:Class = MissionOverlay_Mission9; private static var Mission14:Class = MissionOverlay_Mission14; private static var MissionBg:Class = MissionOverlay_MissionBg; private static var SerpentineText:Class = MissionOverlay_SerpentineText; private static var Mission8:Class = MissionOverlay_Mission8; private static var Mission13:Class = MissionOverlay_Mission13; private static var Mission15:Class = MissionOverlay_Mission15; private static var Mission6:Class = MissionOverlay_Mission6; private static var Mission11:Class = MissionOverlay_Mission11; private static var Mission12:Class = MissionOverlay_Mission12; private static var Mission10:Class = MissionOverlay_Mission10; public static var CheckBoxOff:Class = MissionOverlay_CheckBoxOff; private static var Mission16:Class = MissionOverlay_Mission16; public static var play_bu:Class = MissionOverlay_play_bu; public function MissionOverlay(_arg1:int, _arg2:String, _arg3:String, _arg4:Array){ var _local10:Sprite; var _local11:Label; var _local12:Number; var _local13:SimpleButton; var _local14:SimpleButton; var _local5:Sprite = new Sprite(); _local5.addChild(new MissionBg()); var _local6:Sprite = new SerpentineText(); var _local7:TextField = (_local6.getChildAt(0) as TextField); _local7.autoSize = TextFieldAutoSize.LEFT; _local7.text = convertNumberToWord(_arg1); _local6.y = 27; _local6.x = ((_local5.width - _local6.width) / 2); _local5.addChild(_local6); var _local8:Class = (getDefinitionByName(("ui::MissionOverlay_Mission" + _arg1)) as Class); var _local9:Bitmap = new (_local8); _local9.x = 22; _local9.y = 89; _local5.addChild(_local9); super(new UrbansquallPanel(_local5)); m_titleLabel = new Label(11); m_titleLabel.bold = true; m_titleLabel.text = _arg2.toUpperCase(); m_titleLabel.x = ((_arg4)!=null) ? (((this.width / 2) - m_titleLabel.width) / 2) : ((this.width - m_titleLabel.width) / 2); m_titleLabel.y = 325; this.addChild(m_titleLabel); m_descriptionLabel = new Label(11); m_descriptionLabel.wordWrap = true; m_descriptionLabel.text = _arg3; m_descriptionLabel.x = 20; m_descriptionLabel.y = 340; m_descriptionLabel.width = ((_arg4)!=null) ? ((this.width / 2) - 20) : (this.width - 40); this.addChild(m_descriptionLabel); if (((!((_arg4 == null))) && ((_arg4.length > 0)))){ _local10 = new Sprite(); _local10.graphics.lineStyle(1, 0x666666); _local10.graphics.lineTo(0, 73); _local10.x = ((this.width / 2) + 5); _local10.y = 335; this.addChild(_local10); _local11 = new Label(11); _local11.bold = true; _local11.text = "GOALS"; _local11.x = ((this.width / 2) + (((this.width / 2) - _local11.width) / 2)); _local11.y = 325; this.addChild(_local11); _local12 = 337; if (_arg4[0] != null){ m_goal1Sprite = initGoal((_arg4[0] + "")); m_goal1Sprite.x = ((this.width / 2) + 15); m_goal1Sprite.y = _local12; _local12 = (_local12 + (m_goal1Sprite.height - 5)); this.addChild(m_goal1Sprite); }; if (_arg4[1] != null){ m_goal2Sprite = initGoal((_arg4[1] + "")); m_goal2Sprite.x = ((this.width / 2) + 15); m_goal2Sprite.y = _local12; _local12 = (_local12 + (m_goal2Sprite.height - 5)); this.addChild(m_goal2Sprite); }; if (_arg4[2] != null){ m_goal3Sprite = initGoal((_arg4[2] + "")); m_goal3Sprite.x = ((this.width / 2) + 15); m_goal3Sprite.y = _local12; _local12 = (_local12 + 20); this.addChild(m_goal3Sprite); }; _local13 = new play_bu(); _local13.x = ((this.width / 2) + (((this.width / 2) - _local13.width) / 2)); _local13.y = ((this.height - _local13.height) - 18); _local13.addEventListener(MouseEvent.CLICK, playButtonClick, false, 0, true); this.addChild(_local13); } else { _local14 = new Overlay.CloseButtonClass(); _local14.x = ((this.width - _local14.width) / 2); _local14.y = ((this.height - _local14.height) - 18); _local14.addEventListener(MouseEvent.CLICK, playButtonClick, false, 0, true); this.addChild(_local14); }; } private function convertNumberToWord(_arg1:int):String{ var _local2 = "MISSION "; switch (_arg1){ case 1: _local2 = (_local2 + "ONE"); break; case 2: _local2 = (_local2 + "TWO"); break; case 3: _local2 = (_local2 + "THREE"); break; case 4: _local2 = (_local2 + "FOUR"); break; case 5: _local2 = (_local2 + "FIVE"); break; case 6: _local2 = (_local2 + "SIX"); break; case 7: _local2 = (_local2 + "SEVEN"); break; case 8: _local2 = (_local2 + "EIGHT"); break; case 9: _local2 = (_local2 + "NINE"); break; case 10: _local2 = (_local2 + "TEN"); break; case 11: _local2 = (_local2 + "ELEVEN"); break; case 12: _local2 = (_local2 + "TWELVE"); break; case 13: _local2 = (_local2 + "THIRTEEN"); break; case 14: _local2 = (_local2 + "FOURTEEN"); break; case 15: _local2 = (_local2 + "FIFTEEN"); break; case 16: _local2 = "CONGRATULATIONS"; break; default: _local2 = ""; break; }; return (_local2); } public function initGoal(_arg1:String, _arg2:Boolean=false):Sprite{ var _local7:MovieClip; var _local8:int; var _local9:String; var _local10:String; var _local3:Sprite = new Sprite(); var _local4:DisplayObject; if (_arg2){ _local4 = new CheckBoxOn(); } else { _local4 = new CheckBoxOff(); }; _local4.y = -4; _local3.addChild(_local4); var _local5:Label = new Label(11); _local5.text = fixDescriptionTextHack(_arg1); _local5.x = 18; _local5.y = 0; _local3.addChild(_local5); var _local6:Array = _local5.text.match(/(\d{0,3})\s(worker|global)\shappiness/); if (((!((_local6 == null))) && ((_local6.length > 0)))){ _local7 = new Game.UIResourceIconFace(); if (_local6[2] == "global"){ _local7 = new Game.UIResourceIconGlobe(); }; if (_local6[1] >= 90){ _local7.gotoAndStop(1); } else { _local7.gotoAndStop(2); }; _local8 = _local5.text.indexOf(_local6[1]); _local9 = _local5.text.substring(0, _local8); _local10 = _local5.text.substring((_local8 + _local6[1].length), (_local5.text.length - 1)); _local5.text = _local9; _local7.x = (_local5.width + _local5.x); _local5.text = (_local5.text + (" " + _local10)); _local3.addChild(_local7); }; _local5.wordWrap = true; _local5.width = 200; return (_local3); } public function playButtonClick(_arg1:Event):void{ var _local2:SimpleButton = new Overlay.CloseButtonClass(); _local2.x = ((this.width / 2) + (((this.width / 2) - _local2.width) / 2)); _local2.y = ((this.height - _local2.height) - 18); _local2.addEventListener(MouseEvent.CLICK, hideOverlay, false, 0, true); this.addChild(_local2); (_arg1.target as SimpleButton).parent.removeChild((_arg1.target as DisplayObject)); hideOverlay(_arg1); dispatchEvent(new GameEvent("START_GAME")); } public function get description():String{ return (m_descriptionLabel.text); } private function fixDescriptionTextHack(_arg1:String):String{ var _local2:String = _arg1; var _local3:Array = _local2.match(/(Sell|Export)\s+([a-zA-Z ]+)\s+x?(\d{1,2}(?:\/\d{1,2})?)/); var _local4:Array = _local2.match(/Rebuild a destroyed building\s+x?(\d{1,2}(?:\/\d{1,2})?)/i); if (/^pay down debt/i.test(_local2)){ _local2 = "Pay down debt to 0"; } else { if (((!((_local3 == null))) && ((_local3.length > 0)))){ _local2 = (((((_local3[1] + " ") + _local3[3]) + " ") + _local3[2]) + "s"); } else { if (((!((_local4 == null))) && ((_local4.length > 0)))){ _local2 = (("Rebuild " + _local4[1]) + " Destroyed Buildings"); }; }; }; return (_local2); } private function getGoalSprite(_arg1:int):Sprite{ switch (_arg1){ case 0: return (m_goal1Sprite); case 1: return (m_goal2Sprite); case 2: return (m_goal3Sprite); default: return (null); }; } public function set description(_arg1:String):void{ m_descriptionLabel.text = _arg1; } public function changeGoalDescription(_arg1:int, _arg2:String):void{ var _local4:Label; var _local3:Sprite = getGoalSprite(_arg1); if (_local3 != null){ _local4 = (_local3.getChildAt(1) as Label); if (_local4 != null){ _local4.text = fixDescriptionTextHack(_arg2); }; }; } public function hideOverlay(_arg1:Event):void{ this.visible = false; } public function changeGoalCompletion(_arg1:int, _arg2:Boolean):void{ var _local3:Sprite = getGoalSprite(_arg1); if (_local3 != null){ if (((_arg2) && ((_local3.getChildAt(0) is CheckBoxOff)))){ _local3.removeChildAt(0); _local3.addChildAt(new CheckBoxOn(), 0); SoundSystem.instance.playSound(new TutorialBase.successful()); } else { if (((!(_arg2)) && ((_local3.getChildAt(0) is CheckBoxOn)))){ _local3.removeChildAt(0); _local3.addChildAt(new CheckBoxOff(), 0); }; }; }; } } }//package uiSection 478//MissionOverlay_CheckBoxOff (ui.MissionOverlay_CheckBoxOff) package ui { import mx.core.*; public class MissionOverlay_CheckBoxOff extends BitmapAsset { } }//package uiSection 479//MissionOverlay_CheckBoxOn (ui.MissionOverlay_CheckBoxOn) package ui { import mx.core.*; public class MissionOverlay_CheckBoxOn extends BitmapAsset { } }//package uiSection 480//MissionOverlay_Mission1 (ui.MissionOverlay_Mission1) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission1 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 481//MissionOverlay_Mission10 (ui.MissionOverlay_Mission10) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission10 extends BitmapAsset { public var dt_text:DisplayObject; } }//package uiSection 482//MissionOverlay_Mission11 (ui.MissionOverlay_Mission11) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission11 extends BitmapAsset { public var dt_text:DisplayObject; } }//package uiSection 483//MissionOverlay_Mission12 (ui.MissionOverlay_Mission12) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission12 extends BitmapAsset { public var dt_text:DisplayObject; } }//package uiSection 484//MissionOverlay_Mission13 (ui.MissionOverlay_Mission13) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission13 extends BitmapAsset { public var dt_text:DisplayObject; } }//package uiSection 485//MissionOverlay_Mission14 (ui.MissionOverlay_Mission14) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission14 extends BitmapAsset { public var dt_text:DisplayObject; } }//package uiSection 486//MissionOverlay_Mission15 (ui.MissionOverlay_Mission15) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission15 extends BitmapAsset { public var dt_text:DisplayObject; } }//package uiSection 487//MissionOverlay_Mission16 (ui.MissionOverlay_Mission16) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission16 extends BitmapAsset { public var dt_text:DisplayObject; } }//package uiSection 488//MissionOverlay_Mission2 (ui.MissionOverlay_Mission2) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission2 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 489//MissionOverlay_Mission3 (ui.MissionOverlay_Mission3) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission3 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 490//MissionOverlay_Mission4 (ui.MissionOverlay_Mission4) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission4 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 491//MissionOverlay_Mission5 (ui.MissionOverlay_Mission5) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission5 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 492//MissionOverlay_Mission6 (ui.MissionOverlay_Mission6) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission6 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 493//MissionOverlay_Mission7 (ui.MissionOverlay_Mission7) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission7 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 494//MissionOverlay_Mission8 (ui.MissionOverlay_Mission8) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission8 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 495//MissionOverlay_Mission9 (ui.MissionOverlay_Mission9) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_Mission9 extends BitmapAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 496//MissionOverlay_MissionBg (ui.MissionOverlay_MissionBg) package ui { import mx.core.*; public class MissionOverlay_MissionBg extends BitmapAsset { } }//package uiSection 497//MissionOverlay_play_bu (ui.MissionOverlay_play_bu) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_play_bu extends ButtonAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 498//MissionOverlay_SerpentineText (ui.MissionOverlay_SerpentineText) package ui { import mx.core.*; import flash.display.*; public class MissionOverlay_SerpentineText extends SpriteAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 499//Overlay (ui.Overlay) package ui { import com.urbansquall.ui.*; public class Overlay extends UrbansquallOverlayPanel { public static var CloseButtonClass:Class = Overlay_CloseButtonClass; public function Overlay(_arg1:UrbansquallPanel, _arg2:int=-1, _arg3:int=-1){ var _local4:int = ((_arg2 == -1)) ? _arg1.width : _arg2; var _local5:int = ((_arg3 == -1)) ? _arg1.height : _arg3; super(550, 440, _arg1, _local4, _local5); } } }//package uiSection 500//Overlay_CloseButtonClass (ui.Overlay_CloseButtonClass) package ui { import mx.core.*; import flash.display.*; public class Overlay_CloseButtonClass extends ButtonAsset { public var dt_text:DisplayObject; } }//package uiSection 501//PauseOverlay (ui.PauseOverlay) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.ui.*; public class PauseOverlay extends Overlay { private var m_button:SimpleButton; private var m_callback:Function; public static var popup_pause:Class = PauseOverlay_popup_pause; public function PauseOverlay(_arg1:Function){ super(new UrbansquallPanel(new popup_pause())); m_callback = _arg1; m_button = new MissionOverlay.play_bu(); m_button.x = ((this.width - m_button.width) / 2); m_button.y = ((this.height - m_button.height) - 150); m_button.addEventListener(MouseEvent.CLICK, onClick); this.addChild(m_button); } private function onClick(_arg1:MouseEvent):void{ m_callback(); } } }//package uiSection 502//PauseOverlay_popup_pause (ui.PauseOverlay_popup_pause) package ui { import mx.core.*; public class PauseOverlay_popup_pause extends BitmapAsset { } }//package uiSection 503//QuitOverlay (ui.QuitOverlay) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.ui.*; public class QuitOverlay extends Overlay { private var m_quitCallBack:Function; public static var ConfirmQuitButton:Class = QuitOverlay_ConfirmQuitButton; public static var QuitPanel:Class = QuitOverlay_QuitPanel; public function QuitOverlay(_arg1:String, _arg2:Function){ super(new UrbansquallPanel(new QuitPanel())); m_quitCallBack = _arg2; var _local3:Label = new Label(14); _local3.fontColor = 0xFFFFFF; _local3.wordWrap = true; _local3.alignCenter(); _local3.text = _arg1; _local3.x = 15; _local3.y = 71; _local3.width = 283; _local3.height = 167; this.addChild(_local3); var _local4:DisplayObject = new Overlay.CloseButtonClass(); _local4.x = 85; _local4.y = 235; _local4.addEventListener(MouseEvent.CLICK, onCloseClick, false, 0, true); this.addChild(_local4); var _local5:DisplayObject = new ConfirmQuitButton(); _local5.x = 165; _local5.y = 235; _local5.addEventListener(MouseEvent.CLICK, onQuitClick, false, 0, true); this.addChild(_local5); } public function onQuitClick(_arg1:Event):void{ m_quitCallBack(); onCloseClick(_arg1); } override public function onCloseClick(_arg1:Event):void{ super.onCloseClick(_arg1); } } }//package uiSection 504//QuitOverlay_ConfirmQuitButton (ui.QuitOverlay_ConfirmQuitButton) package ui { import mx.core.*; import flash.display.*; public class QuitOverlay_ConfirmQuitButton extends ButtonAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//package uiSection 505//QuitOverlay_QuitPanel (ui.QuitOverlay_QuitPanel) package ui { import mx.core.*; public class QuitOverlay_QuitPanel extends BitmapAsset { } }//package uiSection 506//ResultsOverlay (ui.ResultsOverlay) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.ui.*; import com.urbansquall.audio.*; import flash.text.*; import flash.filters.*; public class ResultsOverlay extends Overlay { private var m_rightColumn:Label; private var m_continueCallback:Function; private var m_leftColumn:Label; private static const k_WIN_COMMENT:String = "Congratulations you win! Let's total up your score and see how you did!"; private static const k_LOSE_COMMENT:String = "You failed to achieve your objectives!"; public static var WinPanel:Class = ResultsOverlay_WinPanel; private static var continue_lose_bu:Class = ResultsOverlay_continue_lose_bu; public static var continue_win_bu:Class = ResultsOverlay_continue_win_bu; public static var LosePanel:Class = ResultsOverlay_LosePanel; public static var youlose:Class = ResultsOverlay_youlose; public static var youwin:Class = ResultsOverlay_youwin; public function ResultsOverlay(_arg1:Boolean, _arg2:Function){ var _local3:DisplayObject = (_arg1) ? new WinPanel() : new LosePanel(); super(new UrbansquallPanel(_local3)); m_continueCallback = _arg2; var _local4:Label = new Label(12); _local4.fontColor = 0xFFFFFF; _local4.wordWrap = true; _local4.alignCenter(); _local4.text = (_arg1) ? k_WIN_COMMENT : k_LOSE_COMMENT; _local4.x = 15; _local4.y = 71; _local4.width = 283; _local4.height = 167; _local4.filters = [new DropShadowFilter()]; this.addChild(_local4); m_leftColumn = new Label(14); m_leftColumn.fontColor = 0xFFFFFF; m_leftColumn.wordWrap = true; m_leftColumn.x = 30; m_leftColumn.y = 110; m_leftColumn.width = 150; m_leftColumn.getTextField().autoSize = TextFieldAutoSize.RIGHT; m_leftColumn.height = 167; m_leftColumn.alignRight(); m_leftColumn.multiline = true; m_leftColumn.filters = [new DropShadowFilter()]; this.addChild(m_leftColumn); m_rightColumn = new Label(14); m_rightColumn.fontColor = 0xFFFFFF; m_rightColumn.wordWrap = true; m_rightColumn.x = 180; m_rightColumn.y = m_leftColumn.y; m_rightColumn.width = 283; m_rightColumn.height = 167; m_rightColumn.multiline = true; m_rightColumn.filters = [new DropShadowFilter()]; this.addChild(m_rightColumn); var _local5:SimpleButton = (_arg1) ? new continue_win_bu() : new continue_lose_bu(); _local5.x = 125; _local5.y = 235; _local5.addEventListener(MouseEvent.CLICK, onCloseClick); this.addChild(_local5); Main.comedyCentralLogo.visible = true; SoundSystem.instance.playSound((_arg1) ? new youwin() : new youlose()); } override public function onCloseClick(_arg1:Event):void{ m_continueCallback(_arg1); super.onCloseClick(_arg1); } public function addRow(_arg1:String, _arg2:String):void{ m_leftColumn.htmlText = (m_leftColumn.htmlText + (_arg1 + "<br>")); m_rightColumn.htmlText = (m_rightColumn.htmlText + (_arg2 + "<br>")); } } }//package uiSection 507//ResultsOverlay_continue_lose_bu (ui.ResultsOverlay_continue_lose_bu) package ui { import mx.core.*; import flash.display.*; public class ResultsOverlay_continue_lose_bu extends ButtonAsset { public var dt_text:DisplayObject; } }//package uiSection 508//ResultsOverlay_continue_win_bu (ui.ResultsOverlay_continue_win_bu) package ui { import mx.core.*; import flash.display.*; public class ResultsOverlay_continue_win_bu extends ButtonAsset { public var dt_text:DisplayObject; } }//package uiSection 509//ResultsOverlay_LosePanel (ui.ResultsOverlay_LosePanel) package ui { import mx.core.*; public class ResultsOverlay_LosePanel extends BitmapAsset { } }//package uiSection 510//ResultsOverlay_WinPanel (ui.ResultsOverlay_WinPanel) package ui { import mx.core.*; public class ResultsOverlay_WinPanel extends BitmapAsset { } }//package uiSection 511//ResultsOverlay_youlose (ui.ResultsOverlay_youlose) package ui { import mx.core.*; import flash.display.*; public class ResultsOverlay_youlose extends SoundAsset { public var dt_text:DisplayObject; } }//package uiSection 512//ResultsOverlay_youwin (ui.ResultsOverlay_youwin) package ui { import mx.core.*; import flash.display.*; public class ResultsOverlay_youwin extends SoundAsset { public var dt_text:DisplayObject; } }//package uiSection 513//SerpentineMedium (ui.SerpentineMedium) package ui { import flash.display.*; import flash.text.*; public class SerpentineMedium { public static var serpentine_medium:Class = SerpentineMedium_serpentine_medium; public static function createTextField(_arg1:String=""):TextField{ var _local2:Sprite = new serpentine_medium(); var _local3:TextField = (_local2.getChildAt(0) as TextField); _local3.autoSize = TextFieldAutoSize.LEFT; _local3.text = _arg1; _local3.textColor = 0xFFFFFF; return (_local3); } } }//package uiSection 514//SerpentineMedium_serpentine_medium (ui.SerpentineMedium_serpentine_medium) package ui { import mx.core.*; import flash.display.*; public class SerpentineMedium_serpentine_medium extends SpriteAsset { public var dt_text:DisplayObject; } }//package uiSection 515//Slider (ui.Slider) package ui { import flash.display.*; import com.urbansquall.ui.*; public class Slider extends UrbansquallSlider { public static var ScrollLeft:Class = Slider_ScrollLeft; public static var ScrollThumb:Class = Slider_ScrollThumb; public static var ScrollRight:Class = Slider_ScrollRight; public function Slider(_arg1:Function){ var _local2:DisplayObject = new ScrollLeft(); var _local3:DisplayObject = new ScrollRight(); var _local4:Sprite = new Sprite(); var _local5:DisplayObject = new ScrollThumb(); new ScrollThumb().x = -((_local5.width / 2)); _local4.addChild(_local5); var _local6:Sprite = new Sprite(); _local6.graphics.beginFill(0xFF00FF, 0); _local6.graphics.drawRect(0, 0, 20, 10); _local6.graphics.endFill(); super(_local2, _local6, _local3, _local4, _arg1); this.width = 200; } } }//package uiSection 516//Slider_ScrollLeft (ui.Slider_ScrollLeft) package ui { import mx.core.*; import flash.display.*; public class Slider_ScrollLeft extends ButtonAsset { public var dt_text:DisplayObject; } }//package uiSection 517//Slider_ScrollRight (ui.Slider_ScrollRight) package ui { import mx.core.*; import flash.display.*; public class Slider_ScrollRight extends ButtonAsset { public var dt_text:DisplayObject; } }//package uiSection 518//Slider_ScrollThumb (ui.Slider_ScrollThumb) package ui { import mx.core.*; import flash.display.*; public class Slider_ScrollThumb extends SpriteAsset { public var dt_text:DisplayObject; } }//package uiSection 519//Tooltip (ui.Tooltip) package ui { import com.urbansquall.ui.*; import flash.filters.*; public class Tooltip extends UrbansquallToolTip { private var m_text:Label; public function Tooltip(_arg1:String=null){ MOUSE_X_OFFSET = 5; MOUSE_Y_OFFSET = 15; m_text = new Label(10, true); m_text.fontColor = 0xEEEEEE; m_text.alpha = 0.8; if (_arg1 != null){ this.text = _arg1; }; this.addChild(m_text); this.filters = [new DropShadowFilter(2, 45, 0, 1, 10, 10, 0.8)]; } public function set text(_arg1:String):void{ m_text.text = _arg1; } public function get text():String{ return (m_text.text); } } }//package uiSection 520//Ufo (ui.Ufo) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.skew.*; import com.urbansquall.audio.*; import flash.utils.*; public class Ufo { private var m_tile:Bitmap; private var m_hasAttacked:Boolean; private var m_animation:BlittedAnimation; public static const NUM_FRAMES:int = 16; public static var ufoex0008:Class = Ufo_ufoex0008; private static var ufoexplodes_v1:Class = Ufo_ufoexplodes_v1; private static var ufoArt:Class = Ufo_ufoArt; public static var questionablesound:Class = Ufo_questionablesound; public static var ufoex0010:Class = Ufo_ufoex0010; public static var ufoex0011:Class = Ufo_ufoex0011; public static var ufoex0012:Class = Ufo_ufoex0012; public static var ufoex0013:Class = Ufo_ufoex0013; public static var ufoex0014:Class = Ufo_ufoex0014; public static var ufoex0015:Class = Ufo_ufoex0015; public static var ufoex0016:Class = Ufo_ufoex0016; public static var ufoex0002:Class = Ufo_ufoex0002; public static var ufoex0003:Class = Ufo_ufoex0003; public static var ufoex0004:Class = Ufo_ufoex0004; public static var ufoex0005:Class = Ufo_ufoex0005; public static var ufoex0006:Class = Ufo_ufoex0006; public static var ufoex0007:Class = Ufo_ufoex0007; public static var ufoex0001:Class = Ufo_ufoex0001; public static var ufoex0009:Class = Ufo_ufoex0009; private static var ufohovering_v1:Class = Ufo_ufohovering_v1; public function Ufo(){ m_hasAttacked = false; m_tile = getFrame(1); var _local1:Array = []; var _local2 = 1; while (_local2 <= NUM_FRAMES) { _local1.push(getFrame(_local2).bitmapData); _local2++; }; m_animation = BlittedAnimation.createFromBitmapArray(m_tile.bitmapData, _local1); } public function get explosionTileAnimation():BlittedAnimation{ return (m_animation); } public function set hasAttacked(_arg1:Boolean):void{ m_hasAttacked = _arg1; } public function get explosionTile():Bitmap{ return (m_tile); } public function attack():void{ m_hasAttacked = true; SoundSystem.instance.playSound(new questionablesound()); } private function onUfoDoneBlowingUp(_arg1:Event):void{ SoundSystem.instance.playSound(new TutorialBase.successful()); } public function blowUp():void{ SoundSystem.instance.playSound(new ufoexplodes_v1(), 1, onUfoDoneBlowingUp); } public function get hasAttacked():Boolean{ return (m_hasAttacked); } private function getFrame(_arg1:int):Bitmap{ var _local2:String = _arg1.toString(); if (_arg1 < 10){ _local2 = ("0" + _local2); }; var _local3:Class = (getDefinitionByName(("ui::Ufo_ufoex00" + _local2)) as Class); return (new (_local3)); } } }//package uiSection 521//Ufo_questionablesound (ui.Ufo_questionablesound) package ui { import mx.core.*; public class Ufo_questionablesound extends SoundAsset { } }//package uiSection 522//Ufo_ufoArt (ui.Ufo_ufoArt) package ui { import mx.core.*; public class Ufo_ufoArt extends BitmapAsset { } }//package uiSection 523//Ufo_ufoex0001 (ui.Ufo_ufoex0001) package ui { import mx.core.*; public class Ufo_ufoex0001 extends BitmapAsset { } }//package uiSection 524//Ufo_ufoex0002 (ui.Ufo_ufoex0002) package ui { import mx.core.*; public class Ufo_ufoex0002 extends BitmapAsset { } }//package uiSection 525//Ufo_ufoex0003 (ui.Ufo_ufoex0003) package ui { import mx.core.*; public class Ufo_ufoex0003 extends BitmapAsset { } }//package uiSection 526//Ufo_ufoex0004 (ui.Ufo_ufoex0004) package ui { import mx.core.*; public class Ufo_ufoex0004 extends BitmapAsset { } }//package uiSection 527//Ufo_ufoex0005 (ui.Ufo_ufoex0005) package ui { import mx.core.*; public class Ufo_ufoex0005 extends BitmapAsset { } }//package uiSection 528//Ufo_ufoex0006 (ui.Ufo_ufoex0006) package ui { import mx.core.*; public class Ufo_ufoex0006 extends BitmapAsset { } }//package uiSection 529//Ufo_ufoex0007 (ui.Ufo_ufoex0007) package ui { import mx.core.*; public class Ufo_ufoex0007 extends BitmapAsset { } }//package uiSection 530//Ufo_ufoex0008 (ui.Ufo_ufoex0008) package ui { import mx.core.*; public class Ufo_ufoex0008 extends BitmapAsset { } }//package uiSection 531//Ufo_ufoex0009 (ui.Ufo_ufoex0009) package ui { import mx.core.*; public class Ufo_ufoex0009 extends BitmapAsset { } }//package uiSection 532//Ufo_ufoex0010 (ui.Ufo_ufoex0010) package ui { import mx.core.*; public class Ufo_ufoex0010 extends BitmapAsset { } }//package uiSection 533//Ufo_ufoex0011 (ui.Ufo_ufoex0011) package ui { import mx.core.*; public class Ufo_ufoex0011 extends BitmapAsset { } }//package uiSection 534//Ufo_ufoex0012 (ui.Ufo_ufoex0012) package ui { import mx.core.*; public class Ufo_ufoex0012 extends BitmapAsset { } }//package uiSection 535//Ufo_ufoex0013 (ui.Ufo_ufoex0013) package ui { import mx.core.*; public class Ufo_ufoex0013 extends BitmapAsset { } }//package uiSection 536//Ufo_ufoex0014 (ui.Ufo_ufoex0014) package ui { import mx.core.*; public class Ufo_ufoex0014 extends BitmapAsset { } }//package uiSection 537//Ufo_ufoex0015 (ui.Ufo_ufoex0015) package ui { import mx.core.*; public class Ufo_ufoex0015 extends BitmapAsset { } }//package uiSection 538//Ufo_ufoex0016 (ui.Ufo_ufoex0016) package ui { import mx.core.*; public class Ufo_ufoex0016 extends BitmapAsset { } }//package uiSection 539//Ufo_ufoexplodes_v1 (ui.Ufo_ufoexplodes_v1) package ui { import mx.core.*; public class Ufo_ufoexplodes_v1 extends SoundAsset { } }//package uiSection 540//Ufo_ufohovering_v1 (ui.Ufo_ufohovering_v1) package ui { import mx.core.*; public class Ufo_ufohovering_v1 extends SoundAsset { } }//package uiSection 541//UILabel (ui.UILabel) package ui { import com.urbansquall.ui.*; import flash.text.*; public class UILabel extends UrbansquallLabel { private static var FontBold:Class = UILabel_FontBold; private static var FontNormal:Class = UILabel_FontNormal; public function UILabel(_arg1:int=10){ var _local2:TextFormat = new TextFormat(); _local2.font = "FFF Toronto"; _local2.color = 0xFFFFFF; _local2.size = _arg1; super(null, _local2); m_text.embedFonts = true; m_text.antiAliasType = AntiAliasType.NORMAL; } } }//package uiSection 542//UILabel_FontBold (ui.UILabel_FontBold) package ui { import mx.core.*; public class UILabel_FontBold extends FontAsset { } }//package uiSection 543//UILabel_FontNormal (ui.UILabel_FontNormal) package ui { import mx.core.*; public class UILabel_FontNormal extends FontAsset { } }//package uiSection 544//VerticalScrollPane (ui.VerticalScrollPane) package ui { import flash.display.*; import com.urbansquall.ui.*; public class VerticalScrollPane extends UrbansquallVerticalScrollPane { public function VerticalScrollPane(_arg1:DisplayObject){ super(_arg1, Slider); } } }//package uiSection 545//VolumeButton (ui.VolumeButton) package ui { import flash.events.*; import flash.display.*; import com.urbansquall.audio.*; public class VolumeButton extends Sprite { private var m_onButton:SimpleButton; private var m_offButton:SimpleButton; public static var UIVolumeButton:Class = VolumeButton_UIVolumeButton; public static var UIVolumeOffButton:Class = VolumeButton_UIVolumeOffButton; public function VolumeButton(){ m_onButton = new UIVolumeButton(); m_onButton.addEventListener(MouseEvent.CLICK, volumeClickHandler, false, 0, true); this.addChild(m_onButton); m_offButton = new UIVolumeOffButton(); m_offButton.addEventListener(MouseEvent.CLICK, volumeClickHandler, false, 0, true); this.addChild(m_offButton); SoundSystem.instance.addMuteCallback(updateButtons); updateButtons(); } public function set enabled(_arg1:Boolean):void{ m_onButton.enabled = _arg1; m_onButton.tabEnabled = _arg1; m_offButton.enabled = _arg1; m_offButton.tabEnabled = _arg1; } private function updateButtons():void{ m_onButton.visible = !(SoundSystem.instance.isMuted()); m_offButton.visible = SoundSystem.instance.isMuted(); } private function volumeClickHandler(_arg1:MouseEvent):void{ toggleMute(); } public function toggleMute():void{ SoundSystem.instance.toggleMute(); updateButtons(); } } }//package uiSection 546//VolumeButton_UIVolumeButton (ui.VolumeButton_UIVolumeButton) package ui { import mx.core.*; public class VolumeButton_UIVolumeButton extends ButtonAsset { } }//package uiSection 547//VolumeButton_UIVolumeOffButton (ui.VolumeButton_UIVolumeOffButton) package ui { import mx.core.*; public class VolumeButton_UIVolumeOffButton extends ButtonAsset { } }//package uiSection 548//Base64 (util.Base64) package util { public final class Base64 { private var _base64Str:String; private var _base64Count:Number; private static var _CharsReverseLookup:Array; private static var _Digits:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"); private static var _CharsReverseLookupInited:Boolean = InitReverseChars(); private static var _EndOfInput:Number = -1; private static var _Chars:Array = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"); private function setBase64Str(_arg1:String):void{ _base64Str = _arg1; _base64Count = 0; } private function readBase64():Number{ var _local1:Number; if (!_base64Str){ return (_EndOfInput); }; if (_base64Count >= _base64Str.length){ return (_EndOfInput); }; _local1 = (_base64Str.charCodeAt(_base64Count) & 0xFF); _base64Count++; return (_local1); } private function ntos(_arg1:Number):String{ var _local2:String; _local2 = _arg1.toString(16); if (_local2.length == 1){ _local2 = ("0" + _local2); }; _local2 = ("%" + _local2); return (unescape(_local2)); } private function pad(_arg1:String, _arg2:Number, _arg3:String):String{ var _local4:String; var _local5:Number; _local4 = _arg1; _local5 = _arg1.length; while (_local5 < _arg2) { _local4 = (_arg3 + _local4); _local5++; }; return (_local4); } private function encodeBase64(_arg1:String):String{ var _local2:String; var _local3:Array; var _local4:Number; var _local5:Boolean; setBase64Str(_arg1); _local2 = ""; _local3 = new Array(3); _local4 = 0; _local5 = false; while (((!(_local5)) && (!(((_local3[0] = readBase64()) == _EndOfInput))))) { _local3[1] = readBase64(); _local3[2] = readBase64(); _local2 = (_local2 + _Chars[(_local3[0] >> 2)]); if (_local3[1] != _EndOfInput){ _local2 = (_local2 + _Chars[(((_local3[0] << 4) & 48) | (_local3[1] >> 4))]); if (_local3[2] != _EndOfInput){ _local2 = (_local2 + _Chars[(((_local3[1] << 2) & 60) | (_local3[2] >> 6))]); _local2 = (_local2 + _Chars[(_local3[2] & 63)]); } else { _local2 = (_local2 + _Chars[((_local3[1] << 2) & 60)]); _local2 = (_local2 + "="); _local5 = true; }; } else { _local2 = (_local2 + _Chars[((_local3[0] << 4) & 48)]); _local2 = (_local2 + "="); _local2 = (_local2 + "="); _local5 = true; }; _local4 = (_local4 + 4); if (_local4 >= 76){ _local2 = (_local2 + "\n"); _local4 = 0; }; }; return (_local2); } private function decodeHex(_arg1:String):String{ var _local2:String; var _local3:String; var _local4:Number; _local2 = ""; _local3 = ""; _local4 = 0; while (_local4 < _arg1.length) { _local3 = (_local3 + _arg1.charAt(_local4)); if (_local3.length == 2){ _local2 = (_local2 + ntos(parseInt(("0x" + _local3)))); _local3 = ""; }; _local4++; }; return (_local2); } private function encodeHex(_arg1:String):String{ var _local2:String; var _local3:Number; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + pad(toHex((_arg1.charCodeAt(_local3) & 0xFF)), 2, "0")); _local3++; }; return (_local2); } private function toHex(_arg1:Number):String{ var _local2:String; var _local3:Boolean; var _local4:Number; var _local5:Number; _local2 = ""; _local3 = true; _local4 = 32; while (_local4 > 0) { _local4 = (_local4 - 4); _local5 = ((_arg1 >> _local4) & 15); if (((!(_local3)) || (!((_local5 == 0))))){ _local3 = false; _local2 = (_local2 + _Digits[_local5]); }; }; return (((_local2 == "")) ? "0" : _local2); } private function readReverseBase64():Number{ var _local1:String; if (!_base64Str){ return (_EndOfInput); }; while (true) { if (_base64Count >= _base64Str.length){ return (_EndOfInput); }; _local1 = _base64Str.charAt(_base64Count); _base64Count++; if (_CharsReverseLookup[_local1]){ return (_CharsReverseLookup[_local1]); }; if (_local1 == "A"){ return (0); }; }; return (_EndOfInput); } private function decodeBase64(_arg1:String):String{ var _local2:String; var _local3:Array; var _local4:Boolean; setBase64Str(_arg1); _local2 = ""; _local3 = new Array(4); _local4 = false; while (((((!(_local4)) && (!(((_local3[0] = readReverseBase64()) == _EndOfInput))))) && (!(((_local3[1] = readReverseBase64()) == _EndOfInput))))) { _local3[2] = readReverseBase64(); _local3[3] = readReverseBase64(); _local2 = (_local2 + ntos((((_local3[0] << 2) & 0xFF) | (_local3[1] >> 4)))); if (_local3[2] != _EndOfInput){ _local2 = (_local2 + ntos((((_local3[1] << 4) & 0xFF) | (_local3[2] >> 2)))); if (_local3[3] != _EndOfInput){ _local2 = (_local2 + ntos((((_local3[2] << 6) & 0xFF) | _local3[3]))); } else { _local4 = true; }; } else { _local4 = true; }; }; return (_local2); } public static function StringReplaceAll(_arg1:String, _arg2:String, _arg3:String):String{ return (_arg1.split(_arg2).join(_arg3)); } private static function InitReverseChars():Boolean{ var _local1:Array; var _local2:Number; _local1 = new Array(); _local2 = 0; while (_local2 < _Chars.length) { _local1[_Chars[_local2]] = _local2; _local2++; }; return (true); } private static function UrlEncode(_arg1:String):String{ _arg1 = escape(_arg1); _arg1 = StringReplaceAll(_arg1, "+", "%2B"); _arg1 = StringReplaceAll(_arg1, "%20", "+"); return (_arg1); } public static function Decode(_arg1:String):String{ var _local2:Base64; _local2 = new (Base64); return (_local2.decodeBase64(_arg1)); } public static function Encode(_arg1:String):String{ var _local2:Base64; _local2 = new (Base64); return (_local2.encodeBase64(_arg1)); } private static function UrlDecode(_arg1:String):String{ _arg1 = StringReplaceAll(_arg1, "+", " "); _arg1 = unescape(_arg1); return (_arg1); } } }//package utilSection 549//Blowfish (util.Blowfish) package util { public final class Blowfish { private var POW8:Number;// = 0x0100 private var POW24:Number;// = 16777216 private var POW3:Number;// = 8 private var POW2:Number;// = 4 private var POW16:Number;// = 65536 private var iv:Array;// = null private var boxes:Object; private var POW4:Number;// = 16 public static var cipherModes:Object = {ECB:0, CBC:1, PCBC:2, CFB:3, OFB:4, CTR:5}; public static var outputTypes:Object = {Base64:0, Hex:1, String:2, Raw:3}; public function Blowfish(){ POW2 = 4; POW3 = 8; POW4 = 16; POW8 = 0x0100; POW16 = 65536; POW24 = 16777216; iv = null; boxes = {p:[608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731], s0:[3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946], s1:[1266315497, 3048417604, 3681880366, 3289982499, 2909710000, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055], s2:[3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504], s3:[976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409000, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462]}; super(); setIV("0000000000000000", outputTypes.Hex); } public function getIV(_arg1:Number):Object{ var _local2:Number; var _local3:Array; var _local4:Number; _local2 = ((_arg1) || (outputTypes.Base64)); switch (_local2){ case outputTypes.Hex: _local3 = []; _local4 = 0; while (_local4 < iv.length) { _local3.push(iv[_local4].toString(16)); _local4++; }; return (_local3.join("")); case outputTypes.String: return (iv.join("")); case outputTypes.Raw: return (iv); default: return (toBase64(iv)); }; } public function padString(_arg1:String):String{ var _local2:Number; var _local3:Number; _local2 = (8 - (_arg1.length % 8)); _local3 = 0; while (_local3 < _local2) { _arg1 = (_arg1 + String.fromCharCode(_local2)); _local3++; }; return (_arg1); } public function testKey(_arg1:Object):String{ var _local2:Array; var _local3:Number; _local2 = []; if (typeof(_arg1) == "string"){ _local3 = 0; while (_local3 < _arg1.length) { _local2.push((_arg1.charCodeAt(_local3) & 0xFF)); _local3++; }; return (bin2hex(_local2)); }; return (""); } public function padArray(_arg1:Array):Array{ var _local2:Number; var _local3:Number; _local2 = (8 - (_arg1.length % 8)); _local3 = 0; while (_local3 < _local2) { _arg1.push(String.fromCharCode(_local2)); _local3++; }; return (_arg1); } public function decrypt(_arg1:Object, _arg2:Object, _arg3:Object):String{ var _local4:Number; var _local5:Number; var _local6:Object; var _local7:Array; var _local8:Object; var _local9:Number; var _local10:Number; var _local11:Object; var _local12:Boolean; var _local13:Object; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local4 = outputTypes.Base64; _local5 = cipherModes.EBC; if (_arg3){ if (_arg3.outputType){ _local4 = _arg3.outputType; }; if (_arg3.cipherMode){ _local5 = _arg3.cipherMode; }; }; _local6 = init(_arg2); _local7 = []; _local8 = null; switch (_local4){ case outputTypes.Hex: _local8 = []; _local16 = 0; while ((_local16 + 1) < _arg1.length) { _local8.push(parseInt(_arg1.substr(_local16, 2), 16)); _local16 = (_local16 + 2); }; break; case outputTypes.String: _local8 = []; _local16 = 0; while (_local16 < _arg1.length) { _local8.push(_arg1.charCodeAt(_local16)); _local16++; }; break; case outputTypes.Raw: _local8 = _arg1; break; default: _local8 = fromBase64(String(_arg1)); break; }; _local9 = (_local8.length >> 3); _local10 = 0; _local11 = {}; _local12 = (_local5 == cipherModes.CBC); _local13 = {left:((iv.left) || (null)), right:((iv.right) || (null))}; _local16 = 0; while (_local16 < _local9) { _local11.left = ((((_local8[_local10] * POW24) | (_local8[(_local10 + 1)] * POW16)) | (_local8[(_local10 + 2)] * POW8)) | _local8[(_local10 + 3)]); _local11.right = ((((_local8[(_local10 + 4)] * POW24) | (_local8[(_local10 + 5)] * POW16)) | (_local8[(_local10 + 6)] * POW8)) | _local8[(_local10 + 7)]); if (_local12){ _local14 = _local11.left; _local15 = _local11.right; }; db(_local11, _local6); if (_local12){ _local11.left = (_local11.left ^ _local13.left); _local11.right = (_local11.right ^ _local13.right); _local13.left = _local14; _local13.right = _local15; }; _local7.push(((_local11.left >> 24) & 0xFF)); _local7.push(((_local11.left >> 16) & 0xFF)); _local7.push(((_local11.left >> 8) & 0xFF)); _local7.push((_local11.left & 0xFF)); _local7.push(((_local11.right >> 24) & 0xFF)); _local7.push(((_local11.right >> 16) & 0xFF)); _local7.push(((_local11.right >> 8) & 0xFF)); _local7.push((_local11.right & 0xFF)); _local10 = (_local10 + 8); _local16++; }; if ((((_local7[(_local7.length - 1)] == _local7[(_local7.length - 2)])) || ((_local7[(_local7.length - 1)] == 1)))){ _local17 = _local7[(_local7.length - 1)]; _local7.splice((_local7.length - _local17), _local17); }; _local16 = 0; while (_local16 < _local7.length) { _local7[_local16] = String.fromCharCode(_local7[_local16]); _local16++; }; return (_local7.join("")); } private function init(_arg1:Object):Object{ var _local2:Object; var _local3:Number; var _local4:Object; var _local5:Number; var _local6:Number; var _local7:Object; var _local8:Array; var _local9:Number; _local2 = _arg1; _local3 = 0; if (typeof(_arg1) == "string"){ _local8 = []; _local3 = 0; while (_local3 < _arg1.length) { _local8.push(parseInt(_arg1.substr(_local3, 2), 16)); _local3 = (_local3 + 2); }; _local2 = _local8; }; _local4 = {p:[], s0:[], s1:[], s2:[], s3:[]}; _local3 = 0; while (_local3 < boxes.p.length) { _local4.p.push(boxes.p[_local3]); _local3++; }; _local3 = 0; while (_local3 < boxes.s0.length) { _local4.s0.push(boxes.s0[_local3]); _local3++; }; _local3 = 0; while (_local3 < boxes.s1.length) { _local4.s1.push(boxes.s1[_local3]); _local3++; }; _local3 = 0; while (_local3 < boxes.s2.length) { _local4.s2.push(boxes.s2[_local3]); _local3++; }; _local3 = 0; while (_local3 < boxes.s3.length) { _local4.s3.push(boxes.s3[_local3]); _local3++; }; _local5 = 0; _local6 = 0; _local3 = 0; while (_local3 < _local4.p.length) { _local9 = 0; while (_local9 < 4) { _local6 = ((_local6 * POW8) | _local2[_local5]); ++_local5; if (_local5 == _local2.length){ _local5 = 0; }; _local9++; }; _local4.p[_local3] = (_local4.p[_local3] ^ _local6); _local3++; }; _local7 = {left:0, right:0}; _local3 = 0; while (_local3 < _local4.p.length) { eb(_local7, _local4); var _temp1 = _local3; _local3 = (_local3 + 1); var _local10 = _temp1; _local4.p[_local10] = _local7.left; var _temp2 = _local3; _local3 = (_local3 + 1); var _local11 = _temp2; _local4.p[_local11] = _local7.right; }; _local3 = 0; while (_local3 < 4) { _local9 = 0; while (_local9 < _local4[("s" + _local3)].length) { eb(_local7, _local4); var _temp3 = _local9; _local9 = (_local9 + 1); _local10 = _temp3; _local4[("s" + _local3)][_local10] = _local7.left; var _temp4 = _local9; _local9 = (_local9 + 1); _local11 = _temp4; _local4[("s" + _local3)][_local11] = _local7.right; }; _local3++; }; return (_local4); } public function setIV(_arg1:Object, _arg2:Number):void{ var _local3:Boolean; var _local4:Array; var _local5:Number; _local3 = ((_arg2) || (outputTypes.Base64)); _local4 = null; _local5 = 0; switch (_local3){ case outputTypes.String: _local4 = []; _local5 = 0; while (_local5 < _arg1.length) { _local4.push(_arg1.charCodeAt(_local5)); _local5++; }; break; case outputTypes.Hex: _local4 = []; _local5 = 0; while ((_local5 + 1) < _arg1.length) { _local4.push(parseInt(_arg1.substr(_local5, 2), 16)); _local5 = (_local5 + 2); }; break; case outputTypes.Raw: _local4 = new Array(_arg1); break; default: _local4 = fromBase64(String(_arg1)); break; }; iv = new Array(); iv.left = ((((_local4[0] * POW24) | (_local4[1] * POW16)) | (_local4[2] * POW8)) | _local4[3]); iv.right = ((((_local4[4] * POW24) | (_local4[5] * POW16)) | (_local4[6] * POW8)) | _local4[7]); } public function fromBase64(_arg1:String):Array{ var _local2:Array; var _local3:String; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local2 = _arg1.split(""); _local3 = "="; _local4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; _local5 = []; _local6 = _local2.length; _local7 = 0; _local8 = 0; while (_local2[(_local6 - 1)] == _local3) { _local6--; _local8++; }; _local9 = 0; while (_local9 < _local6) { _local10 = (_local6 - _local9); if (_local10 > 3){ var _temp1 = _local9; _local9 = (_local9 + 1); var _temp2 = _local9; _local9 = (_local9 + 1); var _temp3 = _local9; _local9 = (_local9 + 1); var _temp4 = _local9; _local9 = (_local9 + 1); _local7 = ((((_local4.indexOf(_local2[_temp1]) << 18) | (_local4.indexOf(_local2[_temp2]) << 12)) | (_local4.indexOf(_local2[_temp3]) << 6)) | _local4.indexOf(_local2[_temp4])); _local5.push(((_local7 >>> 16) & 0xFF)); _local5.push(((_local7 >>> 8) & 0xFF)); _local5.push((_local7 & 0xFF)); } else { if (_local10 > 2){ var _temp5 = _local9; _local9 = (_local9 + 1); var _temp6 = _local9; _local9 = (_local9 + 1); var _temp7 = _local9; _local9 = (_local9 + 1); _local7 = (((_local4.indexOf(_local2[_temp5]) << 18) | (_local4.indexOf(_local2[_temp6]) << 12)) | (_local4.indexOf(_local2[_temp7]) << 6)); _local5.push(((_local7 >>> 16) & 0xFF)); _local5.push(((_local7 >>> 8) & 0xFF)); _local5.push((_local7 & 0xFF)); } else { if (_local10 > 1){ var _temp8 = _local9; _local9 = (_local9 + 1); var _temp9 = _local9; _local9 = (_local9 + 1); _local7 = ((_local4.indexOf(_local2[_temp8]) << 18) | (_local4.indexOf(_local2[_temp9]) << 12)); _local5.push(((_local7 >>> 16) & 0xFF)); _local5.push(((_local7 >>> 8) & 0xFF)); } else { var _temp10 = _local9; _local9 = (_local9 + 1); _local7 = _local4.indexOf(_local2[_temp10]); _local5.push((_local7 & 0xFF)); }; }; }; }; return (_local5); } private function eb(_arg1:Object, _arg2:Object):void{ var _local3:Number; var _local4:Number; _local3 = _arg1.left; _local4 = _arg1.right; _local3 = (_local3 ^ _arg2.p[0]); _local4 = (_local4 ^ (_arg2.p[1] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[2] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[3] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[4] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[5] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[6] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[7] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[8] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[9] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[10] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[11] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[12] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[13] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[14] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[15] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[16] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _arg1.right = _local3; _arg1.left = (_local4 ^ _arg2.p[17]); } private function split(_arg1:Number):Array{ var _local2:Number; _local2 = (_arg1 & 4294967295); if (_local2 < 0){ _local2 = -(_local2); return ([(((_local2 & 0xFFFF) ^ 0xFFFF) + 1), ((_local2 >> 16) ^ 0xFFFF)]); }; return ([(_local2 & 0xFFFF), (_local2 >> 16)]); } public function encrypt(_arg1:String, _arg2:Object, _arg3:Object):Object{ var _local4:Number; var _local5:Number; var _local6:Object; var _local7:Number; var _local8:Number; var _local9:Array; var _local10:Number; var _local11:Number; var _local12:Object; var _local13:Boolean; var _local14:Object; var _local15:Array; _local4 = outputTypes.Base64; _local5 = cipherModes.EBC; if (_arg3){ if (_arg3.outputType){ _local4 = _arg3.outputType; }; if (_arg3.cipherMode){ _local5 = _arg3.cipherMode; }; }; _local6 = init(_arg2); _local7 = (8 - (_arg1.length % 8)); _local8 = 0; while (_local8 < _local7) { _arg1 = (_arg1 + String.fromCharCode(_local7)); _local8++; }; _local9 = []; _local10 = (_arg1.length >> 3); _local11 = 0; _local12 = {}; _local13 = (_local5 == cipherModes.CBC); _local14 = {left:((iv.left) || (null)), right:((iv.right) || (null))}; _local8 = 0; while (_local8 < _local10) { _local12.left = ((((_arg1.charCodeAt(_local11) * POW24) | (_arg1.charCodeAt((_local11 + 1)) * POW16)) | (_arg1.charCodeAt((_local11 + 2)) * POW8)) | _arg1.charCodeAt((_local11 + 3))); _local12.right = ((((_arg1.charCodeAt((_local11 + 4)) * POW24) | (_arg1.charCodeAt((_local11 + 5)) * POW16)) | (_arg1.charCodeAt((_local11 + 6)) * POW8)) | _arg1.charCodeAt((_local11 + 7))); if (_local13){ _local12.left = (_local12.left ^ _local14.left); _local12.right = (_local12.right ^ _local14.right); }; eb(_local12, _local6); if (_local13){ _local14.left = _local12.left; _local14.right = _local12.right; }; _local9.push(((_local12.left >> 24) & 0xFF)); _local9.push(((_local12.left >> 16) & 0xFF)); _local9.push(((_local12.left >> 8) & 0xFF)); _local9.push((_local12.left & 0xFF)); _local9.push(((_local12.right >> 24) & 0xFF)); _local9.push(((_local12.right >> 16) & 0xFF)); _local9.push(((_local12.right >> 8) & 0xFF)); _local9.push((_local12.right & 0xFF)); _local11 = (_local11 + 8); _local8++; }; switch (_local4){ case outputTypes.Hex: _local15 = []; _local8 = 0; while (_local8 < _local9.length) { _local15.push(_local9[_local8].toString(16)); _local8++; }; return (_local15.join("")); case outputTypes.String: return (_local9.join("")); case outputTypes.Raw: return (_local9); default: return (toBase64(_local9)); }; } public function toBase64(_arg1:Array):String{ var _local2:String; var _local3:String; var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; _local2 = "="; _local3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; _local4 = []; _local5 = 0; _local6 = _arg1.length; _local7 = 0; _local5 = 0; while (_local5 < _local6) { _local8 = (_local6 - _local5); _local9 = 0; if (_local8 > 2){ var _temp1 = _local5; _local5 = (_local5 + 1); var _temp2 = _local5; _local5 = (_local5 + 1); var _temp3 = _local5; _local5 = (_local5 + 1); _local9 = (((_arg1[_temp1] << 16) | (_arg1[_temp2] << 8)) | _arg1[_temp3]); _local4.push(_local3.charAt(((_local9 >>> 18) & 63))); _local4.push(_local3.charAt(((_local9 >>> 12) & 63))); _local4.push(_local3.charAt(((_local9 >>> 6) & 63))); _local4.push(_local3.charAt((_local9 & 63))); } else { if (_local8 > 1){ var _temp4 = _local5; _local5 = (_local5 + 1); var _temp5 = _local5; _local5 = (_local5 + 1); _local9 = ((_arg1[_temp4] << 16) | (_arg1[_temp5] << 8)); _local4.push(_local3.charAt(((_local9 >>> 18) & 63))); _local4.push(_local3.charAt(((_local9 >>> 12) & 63))); _local4.push(_local3.charAt(((_local9 >>> 6) & 63))); _local4.push(_local2); _local7 = 1; } else { var _temp6 = _local5; _local5 = (_local5 + 1); _local9 = (_arg1[_temp6] << 16); _local4.push(_local3.charAt(((_local9 >>> 18) & 63))); _local4.push(_local3.charAt(((_local9 >>> 12) & 63))); _local4.push(_local2); _local4.push(_local2); _local7 = 2; }; }; }; return (_local4.join("")); } public function hex2bin(_arg1:String):Array{ var _local2:Array; var _local3:Number; var _local4:Number; _local2 = []; _local4 = 0; while (_local4 < _arg1.length) { _local3 = parseInt(_arg1.substr(_local4, 2), 16); _local2.push(_local3); _local4 = (_local4 + 2); }; return (_local2); } private function db(_arg1:Object, _arg2:Object):void{ var _local3:Number; var _local4:Number; _local3 = _arg1.left; _local4 = _arg1.right; _local3 = (_local3 ^ _arg2.p[17]); _local4 = (_local4 ^ (_arg2.p[16] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[15] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[14] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[13] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[12] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[11] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[10] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[9] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[8] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[7] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[6] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[5] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[4] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[3] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _local4 = (_local4 ^ (_arg2.p[2] ^ ((((_arg2.s0[(_local3 >>> 24)] + _arg2.s1[((_local3 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local3 >>> 8) & 0xFF)]) + _arg2.s3[(_local3 & 0xFF)]) & 4294967295))); _local3 = (_local3 ^ (_arg2.p[1] ^ ((((_arg2.s0[(_local4 >>> 24)] + _arg2.s1[((_local4 >>> 16) & 0xFF)]) ^ _arg2.s2[((_local4 >>> 8) & 0xFF)]) + _arg2.s3[(_local4 & 0xFF)]) & 4294967295))); _arg1.right = _local3; _arg1.left = (_local4 ^ _arg2.p[0]); } public static function bin2hex(_arg1:Array):String{ var _local2:String; var _local3:String; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = "0123456789abcdef"; _local3 = ""; _local4 = _arg1.length; _local5 = 0; while (_local5 < _local4) { _local6 = _arg1[_local5]; _local3 = (_local3 + (_local2.charAt(((_local6 >> 4) & 15)) + _local2.charAt((_local6 & 15)))); _local5++; }; return (_local3); } public static function unpadString(_arg1:String):String{ var _local2:Number; var _local3:Number; _local2 = _arg1.length; if (_local2 > 0){ _local3 = _arg1.charCodeAt((_local2 - 1)); if ((((_local3 > 0)) && ((_local3 <= 8)))){ return (_arg1.substr(0, (_local2 - _local3))); }; return (_arg1); }; return (""); } public static function unpadArray(_arg1:Array):Array{ var _local2:Number; var _local3:Number; var _local4:Number; _local2 = _arg1.length; if (_local2 > 0){ _local3 = _arg1[(_local2 - 1)]; if ((((_local3 > 0)) && ((_local3 <= 8)))){ _local4 = 0; while (_local4 < _local3) { _arg1.pop(); _local4++; }; }; }; return (_arg1); } } }//package utilSection 550//Delegate (util.Delegate) package util { public dynamic final class Delegate { public static function create(_arg1:Object, _arg2:Function, _arg3:Array):Function{ var f:Function; var obj = _arg1; var func = _arg2; var args = _arg3; f = function ():Object{ var _local2:Object; var _local3:Function; var _local4:Array; _local2 = arguments.callee.target; _local3 = arguments.callee.func; _local4 = arguments.concat(arguments.callee.args); return (_local3.apply(_local2, _local4)); }; if (!(args is Array)){ args = [args]; }; f["target"] = obj; f["func"] = func; f["args"] = args; return (f); } } }//package utilSection 551//DoubleClickAd (util.DoubleClickAd) package util { public class DoubleClickAd { private var size:String; private var ssl:Boolean;// = false private var reservedKeyValues:Object; private var id:String; private var position:String; private var sections:String; private var tile:Number; private var mediaType:String;// = "standard" private var server:String;// = "ad.doubleclick.net" private var partner:String; private var positionThreshold:Number; private var contentType:String;// = "adj" private var keyValues:String;// = "" private var exclusions:Array; private var dartSite:String; private var ord:Number; private var additionalKeyValues:Array; public function DoubleClickAd(){ ssl = false; server = "ad.doubleclick.net"; contentType = "adj"; mediaType = "standard"; keyValues = ""; additionalKeyValues = []; exclusions = []; reservedKeyValues = {}; super(); } public function setPositionThreshold(_arg1:Number):void{ positionThreshold = _arg1; } public function setSize(_arg1:String):void{ size = _arg1; } public function setPartner(_arg1:String):void{ partner = _arg1; } private function getProtocol():String{ return ((ssl) ? "https://" : "http://"); } public function setContentType(_arg1:String):void{ contentType = _arg1; } private function getContentTypeAbbreviation():String{ var _local1:String; _local1 = ""; if (contentType == "pfadx"){ _local1 = "p"; }; if (contentType == "adj"){ _local1 = "j"; }; if (contentType == "adi"){ _local1 = "i"; }; if (contentType == "adx"){ _local1 = "x"; }; if (contentType == "ad"){ _local1 = "a"; }; return (_local1); } private function rtrim(_arg1:String):String{ if (_arg1.length > 0){ return (_arg1.substr(0, (_arg1.length - 1))); }; return (_arg1); } private function ltrim(_arg1:String):String{ if (_arg1.length > 0){ return (_arg1.substr(1, _arg1.length)); }; return (_arg1); } public function setId(_arg1:String):void{ id = _arg1; } public function setKeyValues(_arg1:String):void{ keyValues = stripLeadingTrailingSemiColons(_arg1); if (keyValues.indexOf("mtype=") > -1){ setMediaType(getKeyValue("mtype=")); }; if (keyValues.indexOf("pos=") > -1){ setPosition(getKeyValue("pos=")); } else { if (keyValues.indexOf("threshold=") > -1){ setPositionThreshold(Number(getKeyValue("threshold="))); }; }; } private function formatUValues(_arg1:String):String{ _arg1 = replace(_arg1, ";", "|"); _arg1 = replace(_arg1, "=", "-"); return (_arg1); } private function getSections():String{ return (sections); } private function getValues():Object{ var _local1:String; var _local2:String; var _local3:String; _local1 = formatZone(); _local2 = formatKeyValues(); _local3 = formatSectionValues(); return ({id:id, protocol:getProtocol(), server:server, dartSite:dartSite, contentType:contentType, mediaType:mediaType, zone:_local1, sections:_local3, keyValues:_local2, uValues:("u=" + formatUValues(_local2)), ord:ord}); } private function formatKeyValues():String{ var _local1:String; _local1 = getAdditionalKeyValues(); if (isDefined(_local1)){ keyValues = (keyValues + (";" + _local1)); }; if (keyValues.indexOf("pos=") == -1){ keyValues = (keyValues + (";pos=" + getPosition())); }; if (keyValues.indexOf("tag=") == -1){ keyValues = (keyValues + (";tag=" + contentType)); }; if (keyValues.indexOf("mtype=") == -1){ keyValues = (keyValues + (";mtype=" + mediaType)); }; keyValues = formatReserved(); if (isDefined(size)){ keyValues = (keyValues + (";sz=" + size)); }; if (((isDefined(String(tile))) && ((tile >= 0)))){ keyValues = (keyValues + (";tile=" + tile)); }; if (isDefined(reservedKeyValues.dcmt)){ keyValues = (keyValues + (";dcmt=" + reservedKeyValues.dcmt)); }; if (isDefined(reservedKeyValues.dcopt)){ keyValues = (keyValues + (";dcopt=" + reservedKeyValues.dcopt)); }; if (exclusions.length > 0){ keyValues = (keyValues + (";" + getExclusions())); }; if (isDefined(reservedKeyValues.dcove)){ keyValues = (keyValues + (";dcove=" + reservedKeyValues.dcove)); }; keyValues = stripLeadingTrailingSemiColons(keyValues); return (keyValues); } public function setPosition(_arg1:String):void{ position = _arg1; } private function stripLeadingTrailingSemiColons(_arg1:String):String{ _arg1 = (startsWith(_arg1, ";")) ? ltrim(_arg1) : _arg1; _arg1 = (endsWith(_arg1, ";")) ? rtrim(_arg1) : _arg1; return (_arg1); } public function setSections(_arg1:String):void{ sections = (startsWith(_arg1, "/")) ? ltrim(_arg1) : _arg1; sections = (endsWith(sections, "/")) ? rtrim(sections) : sections; if (sections.indexOf(".") > -1){ sections = sections.split(".")[0]; }; } private function replace(_arg1:String, _arg2:String, _arg3:String):String{ var _local4:Array; _local4 = _arg1.split(_arg2); return (_local4.join(_arg3)); } public function setOrd(_arg1:Number):void{ ord = _arg1; } public function getUrl():String{ return (formatUrl(getValues())); } public function setTile(_arg1:Number):void{ tile = _arg1; } public function addKeyValues(_arg1:String):void{ if (((isDefined(_arg1)) && ((_arg1.indexOf("=") > -1)))){ _arg1 = stripLeadingTrailingSemiColons(_arg1); additionalKeyValues.push(_arg1); }; } private function getPosition():String{ var _local1:String; _local1 = "unk"; if (isDefined(position)){ if (position.indexOf("atf") > -1){ _local1 = "atf"; } else { if (position.indexOf("btf") > -1){ _local1 = "btf"; }; }; } else { if (positionThreshold > 0){ _local1 = ((tile)<=positionThreshold) ? "atf" : "btf"; }; }; return (_local1); } private function getAdditionalKeyValues():String{ return (additionalKeyValues.join(";")); } public function setServer(_arg1:String):void{ server = _arg1; } private function formatReserved():String{ var _local1:String; var _local2:Array; var _local3:Number; var _local4:String; var _local5:Array; var _local6:Number; _local1 = keyValues; _local2 = ["dcmt", "dcopt", "dcove"]; _local3 = 0; while (_local3 < _local2.length) { if (_local1.indexOf((_local2[_local3] + "=")) > -1){ _local4 = this.getKeyValue((_local2[_local3] + "=")); _local5 = _local1.split(((_local2[_local3] + "=") + _local4)); _local6 = 0; while (_local6 < _local5.length) { _local5[_local6] = stripLeadingTrailingSemiColons(_local5[_local6]); _local6++; }; reservedKeyValues[_local2[_local3]] = _local4; _local1 = _local5.join(";"); }; _local3++; }; return (_local1); } public function addExclusionCategory(_arg1:String):void{ _arg1 = stripLeadingTrailingSemiColons(_arg1); exclusions.push(("!category=" + _arg1)); } private function getKeyValue(_arg1:String):String{ var _local2:String; var _local3:Array; if (keyValues.indexOf(_arg1) > -1){ _local3 = keyValues.split(_arg1); if (_local3.length > 0){ if (_local3[1].indexOf(";") > -1){ _local2 = _local3[1].substring(0, _local3[1].indexOf(";")); } else { _local2 = _local3[1]; }; }; }; return (_local2); } public function setSsl():void{ ssl = true; } private function startsWith(_arg1:String, _arg2:String):Boolean{ if (_arg1.charAt(0) == _arg2){ return (true); }; return (false); } private function getExclusions():String{ return (exclusions.join(";")); } private function formatSectionValues():String{ var _local1:Array; var _local2:Number; var _local3:Array; var _local4:Number; _local1 = getSections().split("/"); _local2 = 0; _local3 = []; _local4 = 0; while (_local4 < _local1.length) { if (isDefined(_local1[_local4])){ _local3.push(((("sec" + _local2) + "=") + _local1[_local4])); _local2++; }; _local4++; }; return (_local3.join(";")); } public function getJson():String{ var _local1:Array; var _local2:Object; var _local3:String; _local1 = []; _local2 = getValues(); _local2["url"] = formatUrl(_local2); for (_local3 in _local2) { _local1.push((((_local3 + ":\"") + _local2[_local3]) + "\"")); }; return ((("{" + _local1.join(",")) + "}")); } private function endsWith(_arg1:String, _arg2:String):Boolean{ if (_arg1.indexOf(_arg2, (_arg1.length - 1)) == -1){ return (false); }; return (true); } public function setDartSite(_arg1:String):void{ dartSite = _arg1; } private function formatZone():String{ var _local1:String; var _local2:String; var _local3:String; var _local4:String; var _local5:String; var _local6:String; _local1 = ((((getPosition() + "_") + getContentTypeAbbreviation()) + "_") + mediaType.substr(0, 1)); _local2 = (_local1 + "/"); _local3 = getSections(); if (isDefined(keyValues)){ if (keyValues.indexOf("partner=") > -1){ _local4 = getKeyValue("partner="); if (isDefined(_local4)){ _local2 = (_local2 + (_local4 + "/")); addExclusionCategory(_local4); addExclusionCategory("partner"); } else { addKeyValues("partner=null"); }; }; if (keyValues.indexOf("vertical=") > -1){ _local5 = getKeyValue("vertical="); if (isDefined(_local5)){ _local3 = ((("vert/" + _local5) + "/") + _local3); setSections(_local3); }; }; if (keyValues.indexOf("synd=") > -1){ _local6 = getKeyValue("synd="); if (isDefined(_local6)){ addExclusionCategory(_local6); }; }; }; return ((_local2 + _local3)); } private function formatUrl(_arg1:Object):String{ var _local2:Array; var _local3:String; var _local4:Array; _local2 = [(_arg1.protocol + _arg1.server), _arg1.contentType, _arg1.dartSite, _arg1.zone]; _local3 = _local2.join("/"); _local4 = [_local3, _arg1.sections]; if (isDefined(_arg1.keyValues)){ _local4.push(_arg1.keyValues); }; if (isDefined(_arg1.uValues)){ _local4.push(_arg1.uValues); }; if (_arg1.ord > 0){ _local4.push((("ord=" + _arg1.ord) + "?")); }; return (_local4.join(";")); } public function getXml():String{ var _local1:Array; var _local2:Object; var _local3:String; _local1 = []; _local2 = getValues(); _local2["url"] = formatUrl(_local2); for (_local3 in _local2) { _local1.push(((((("<" + _local3) + ">") + "</") + _local2[_local3]) + ">")); }; return ((("<doubleClickAd>" + _local1.join("")) + "</doubleClickAd>")); } public function setMediaType(_arg1:String):void{ mediaType = _arg1; } private function isDefined(_arg1:String):Boolean{ if (((((((("string" === "undefined")) || ((_arg1 === null)))) || ((_arg1 === "undefined")))) || ((_arg1.length == 0)))){ return (false); }; return (true); } } }//package utilSection 552//GenericDebugger (util.GenericDebugger) package util { import flash.xml.*; import flash.net.*; public final class GenericDebugger { private static var _traceURL:String = "http://gs.mtv.com/admin/http_trace.php"; private static var _isActive:Boolean = false; private static var _isRuntime:Boolean = true; public function GenericDebugger(_arg1:String=""){ _isActive = true; _isRuntime = true; setURL(_arg1); } public static function traceObject(_arg1:Object, _arg2:int, _arg3:int):void{ var _local4:String; var _local5:String; var _local6:Number; var _local7:Object; var _local8:String; if (_arg2 < 0){ _arg2 = 0; }; if (_arg3 < 0){ _arg3 = 0; }; for (_local4 in _arg1) { _local5 = ""; _local6 = 0; while (_local6 < _arg3) { _local5 = (_local5 + " "); _local6++; }; _local7 = _arg1[_local4]; _local8 = _local7.toString(); if ((_local7 is Array)){ _local8 = "[Array]"; }; traceMsg((((_local5 + _local4) + ": ") + _local8)); if (_arg2 > 0){ traceObject(_arg1[_local4], (_arg2 - 1), (_arg3 + 1)); }; }; } public static function setActive(_arg1:Boolean):void{ _isActive = _arg1; } public static function setURL(_arg1:String):void{ if (_arg1.length > 0){ _traceURL = _arg1; }; } private static function http_trace(_arg1:String):void{ var _local2:URLRequest; var _local3:URLVariables; var _local4:URLLoader; _local2 = new URLRequest(_traceURL); _local3 = new URLVariables(); _local2.method = URLRequestMethod.GET; _local2.contentType = "text/plain"; _local2.data = _local3; _local4 = new URLLoader(); _local4.load(_local2); } public static function traceMsg(_arg1:String):void{ if (_isActive){ if (_isRuntime){ http_trace(_arg1); } else { trace(_arg1); }; }; } public static function setRuntime(_arg1:Boolean):void{ _isRuntime = _arg1; } } }//package utilSection 553//MD5 (util.MD5) package util { public final class MD5 { public static var hexcase:Number = 1; public static var chrsz:Number = 8; public static var b64pad:String = ""; private static function md5_gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } private static function md5_cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{ return (safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3)); } public static function binl2str(_arg1:Array):String{ var _local2:String; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = ""; _local3 = ((1 << chrsz) - 1); _local4 = (_arg1.length * 32); _local5 = 0; while (_local5 < _local4) { _local2 = (_local2 + String.fromCharCode(((_arg1[(_local5 >> 5)] >>> (_local5 & 31)) & _local3))); _local5 = (_local5 + chrsz); }; return (_local2); } public static function core_hmac_md5(_arg1:String, _arg2:String):Array{ var _local3:Array; var _local4:Array; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = str2binl(_arg1); if (_local3.length > 16){ _local3 = core_md5(_local3, (_arg1.length * chrsz)); }; _local4 = new Array(16); _local5 = new Array(16); _local6 = 0; while (_local6 < 16) { _local4[_local6] = (_local3[_local6] ^ 909522486); _local5[_local6] = (_local3[_local6] ^ 1549556828); _local6++; }; _local7 = core_md5(_local4.concat(str2binl(_arg2)), (0x0200 + (_arg2.length * chrsz))); return (core_md5(_local5.concat(_local7), (0x0200 + 128))); } private static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function hex_hmac_md5(_arg1:String, _arg2:String):String{ return (binl2hex(core_hmac_md5(_arg1, _arg2))); } public static function array_md5(_arg1:String):Array{ return (core_md5(str2binl(_arg1), (_arg1.length * chrsz))); } public static function md5_vm_test():Boolean{ return ((hex_md5("abc") == "900150983CD24FB0D6963F7D28E17F72")); } public static function hex_md5(_arg1:String):String{ return (binl2hex(core_md5(str2binl(_arg1), (_arg1.length * chrsz)))); } public static function bit_rol(_arg1:Number, _arg2:Number):Number{ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } public static function core_md5(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Array; _arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 & 31))); _arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2; _local7 = 1732584193; _local8 = -271733879; _local9 = -1732584194; _local10 = 271733878; _local11 = _arg1.length; _local12 = 0; while (_local12 < _local11) { _local3 = _local7; _local4 = _local8; _local5 = _local9; _local6 = _local10; _local7 = md5_ff(_local7, _local8, _local9, _local10, _arg1[(_local12 + 0)], 7, -680876936); _local10 = md5_ff(_local10, _local7, _local8, _local9, _arg1[(_local12 + 1)], 12, -389564586); _local9 = md5_ff(_local9, _local10, _local7, _local8, _arg1[(_local12 + 2)], 17, 606105819); _local8 = md5_ff(_local8, _local9, _local10, _local7, _arg1[(_local12 + 3)], 22, -1044525330); _local7 = md5_ff(_local7, _local8, _local9, _local10, _arg1[(_local12 + 4)], 7, -176418897); _local10 = md5_ff(_local10, _local7, _local8, _local9, _arg1[(_local12 + 5)], 12, 1200080426); _local9 = md5_ff(_local9, _local10, _local7, _local8, _arg1[(_local12 + 6)], 17, -1473231341); _local8 = md5_ff(_local8, _local9, _local10, _local7, _arg1[(_local12 + 7)], 22, -45705983); _local7 = md5_ff(_local7, _local8, _local9, _local10, _arg1[(_local12 + 8)], 7, 1770035416); _local10 = md5_ff(_local10, _local7, _local8, _local9, _arg1[(_local12 + 9)], 12, -1958414417); _local9 = md5_ff(_local9, _local10, _local7, _local8, _arg1[(_local12 + 10)], 17, -42063); _local8 = md5_ff(_local8, _local9, _local10, _local7, _arg1[(_local12 + 11)], 22, -1990404162); _local7 = md5_ff(_local7, _local8, _local9, _local10, _arg1[(_local12 + 12)], 7, 1804603682); _local10 = md5_ff(_local10, _local7, _local8, _local9, _arg1[(_local12 + 13)], 12, -40341101); _local9 = md5_ff(_local9, _local10, _local7, _local8, _arg1[(_local12 + 14)], 17, -1502002290); _local8 = md5_ff(_local8, _local9, _local10, _local7, _arg1[(_local12 + 15)], 22, 1236535329); _local7 = md5_gg(_local7, _local8, _local9, _local10, _arg1[(_local12 + 1)], 5, -165796510); _local10 = md5_gg(_local10, _local7, _local8, _local9, _arg1[(_local12 + 6)], 9, -1069501632); _local9 = md5_gg(_local9, _local10, _local7, _local8, _arg1[(_local12 + 11)], 14, 643717713); _local8 = md5_gg(_local8, _local9, _local10, _local7, _arg1[(_local12 + 0)], 20, -373897302); _local7 = md5_gg(_local7, _local8, _local9, _local10, _arg1[(_local12 + 5)], 5, -701558691); _local10 = md5_gg(_local10, _local7, _local8, _local9, _arg1[(_local12 + 10)], 9, 38016083); _local9 = md5_gg(_local9, _local10, _local7, _local8, _arg1[(_local12 + 15)], 14, -660478335); _local8 = md5_gg(_local8, _local9, _local10, _local7, _arg1[(_local12 + 4)], 20, -405537848); _local7 = md5_gg(_local7, _local8, _local9, _local10, _arg1[(_local12 + 9)], 5, 568446438); _local10 = md5_gg(_local10, _local7, _local8, _local9, _arg1[(_local12 + 14)], 9, -1019803690); _local9 = md5_gg(_local9, _local10, _local7, _local8, _arg1[(_local12 + 3)], 14, -187363961); _local8 = md5_gg(_local8, _local9, _local10, _local7, _arg1[(_local12 + 8)], 20, 1163531501); _local7 = md5_gg(_local7, _local8, _local9, _local10, _arg1[(_local12 + 13)], 5, -1444681467); _local10 = md5_gg(_local10, _local7, _local8, _local9, _arg1[(_local12 + 2)], 9, -51403784); _local9 = md5_gg(_local9, _local10, _local7, _local8, _arg1[(_local12 + 7)], 14, 1735328473); _local8 = md5_gg(_local8, _local9, _local10, _local7, _arg1[(_local12 + 12)], 20, -1926607734); _local7 = md5_hh(_local7, _local8, _local9, _local10, _arg1[(_local12 + 5)], 4, -378558); _local10 = md5_hh(_local10, _local7, _local8, _local9, _arg1[(_local12 + 8)], 11, -2022574463); _local9 = md5_hh(_local9, _local10, _local7, _local8, _arg1[(_local12 + 11)], 16, 1839030562); _local8 = md5_hh(_local8, _local9, _local10, _local7, _arg1[(_local12 + 14)], 23, -35309556); _local7 = md5_hh(_local7, _local8, _local9, _local10, _arg1[(_local12 + 1)], 4, -1530992060); _local10 = md5_hh(_local10, _local7, _local8, _local9, _arg1[(_local12 + 4)], 11, 1272893353); _local9 = md5_hh(_local9, _local10, _local7, _local8, _arg1[(_local12 + 7)], 16, -155497632); _local8 = md5_hh(_local8, _local9, _local10, _local7, _arg1[(_local12 + 10)], 23, -1094730640); _local7 = md5_hh(_local7, _local8, _local9, _local10, _arg1[(_local12 + 13)], 4, 681279174); _local10 = md5_hh(_local10, _local7, _local8, _local9, _arg1[(_local12 + 0)], 11, -358537222); _local9 = md5_hh(_local9, _local10, _local7, _local8, _arg1[(_local12 + 3)], 16, -722521979); _local8 = md5_hh(_local8, _local9, _local10, _local7, _arg1[(_local12 + 6)], 23, 76029189); _local7 = md5_hh(_local7, _local8, _local9, _local10, _arg1[(_local12 + 9)], 4, -640364487); _local10 = md5_hh(_local10, _local7, _local8, _local9, _arg1[(_local12 + 12)], 11, -421815835); _local9 = md5_hh(_local9, _local10, _local7, _local8, _arg1[(_local12 + 15)], 16, 530742520); _local8 = md5_hh(_local8, _local9, _local10, _local7, _arg1[(_local12 + 2)], 23, -995338651); _local7 = md5_ii(_local7, _local8, _local9, _local10, _arg1[(_local12 + 0)], 6, -198630844); _local10 = md5_ii(_local10, _local7, _local8, _local9, _arg1[(_local12 + 7)], 10, 1126891415); _local9 = md5_ii(_local9, _local10, _local7, _local8, _arg1[(_local12 + 14)], 15, -1416354905); _local8 = md5_ii(_local8, _local9, _local10, _local7, _arg1[(_local12 + 5)], 21, -57434055); _local7 = md5_ii(_local7, _local8, _local9, _local10, _arg1[(_local12 + 12)], 6, 1700485571); _local10 = md5_ii(_local10, _local7, _local8, _local9, _arg1[(_local12 + 3)], 10, -1894986606); _local9 = md5_ii(_local9, _local10, _local7, _local8, _arg1[(_local12 + 10)], 15, -1051523); _local8 = md5_ii(_local8, _local9, _local10, _local7, _arg1[(_local12 + 1)], 21, -2054922799); _local7 = md5_ii(_local7, _local8, _local9, _local10, _arg1[(_local12 + 8)], 6, 1873313359); _local10 = md5_ii(_local10, _local7, _local8, _local9, _arg1[(_local12 + 15)], 10, -30611744); _local9 = md5_ii(_local9, _local10, _local7, _local8, _arg1[(_local12 + 6)], 15, -1560198380); _local8 = md5_ii(_local8, _local9, _local10, _local7, _arg1[(_local12 + 13)], 21, 1309151649); _local7 = md5_ii(_local7, _local8, _local9, _local10, _arg1[(_local12 + 4)], 6, -145523070); _local10 = md5_ii(_local10, _local7, _local8, _local9, _arg1[(_local12 + 11)], 10, -1120210379); _local9 = md5_ii(_local9, _local10, _local7, _local8, _arg1[(_local12 + 2)], 15, 718787259); _local8 = md5_ii(_local8, _local9, _local10, _local7, _arg1[(_local12 + 9)], 21, -343485551); _local7 = safe_add(_local7, _local3); _local8 = safe_add(_local8, _local4); _local9 = safe_add(_local9, _local5); _local10 = safe_add(_local10, _local6); _local12 = (_local12 + 16); }; _local13 = new Array(_local7, _local8, _local9, _local10); return (_local13); } public static function b64_md5(_arg1:String):String{ return (binl2b64(core_md5(str2binl(_arg1), (_arg1.length * chrsz)))); } private static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function b64_hmac_md5(_arg1:String, _arg2:String):String{ return (binl2b64(core_hmac_md5(_arg1, _arg2))); } private static function md5_hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function str2binl(_arg1:String):Array{ var _local2:Array; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = new Array(); _local3 = ((1 << chrsz) - 1); _local4 = (_arg1.length * chrsz); _local5 = 0; while (_local5 < _local4) { _local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / chrsz)) & _local3) << (_local5 & 31))); _local5 = (_local5 + chrsz); }; return (_local2); } public static function binl2hex(_arg1:Array):String{ var _local2:String; var _local3:String; var _local4:Number; var _local5:Number; _local2 = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef"; _local3 = ""; _local4 = (_arg1.length * 4); _local5 = 0; while (_local5 < _local4) { _local3 = (_local3 + (_local2.charAt(((_arg1[(_local5 >> 2)] >> (((_local5 & 3) * 8) + 4)) & 15)) + _local2.charAt(((_arg1[(_local5 >> 2)] >> ((_local5 & 3) * 8)) & 15)))); _local5++; }; return (_local3); } public static function str_md5(_arg1:String):String{ return (binl2str(core_md5(str2binl(_arg1), (_arg1.length * chrsz)))); } public static function str_hmac_md5(_arg1:String, _arg2:String):String{ return (binl2str(core_hmac_md5(_arg1, _arg2))); } public static function safe_add(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; _local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF)); _local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16)); return (((_local4 << 16) | (_local3 & 0xFFFF))); } public static function binl2b64(_arg1:Array):String{ var _local2:String; var _local3:String; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; _local3 = ""; _local4 = (_arg1.length * 4); _local5 = (4 * _local4); _local6 = 0; while (_local6 < _local4) { _local7 = (((((_arg1[(_local6 >> 2)] >> (8 * (_local6 & 3))) & 0xFF) << 16) | (((_arg1[((_local6 + 1) >> 2)] >> (8 * ((_local6 + 1) & 3))) & 0xFF) << 8)) | ((_arg1[((_local6 + 2) >> 2)] >> (8 * ((_local6 + 2) & 3))) & 0xFF)); _local8 = 0; while (_local8 < 4) { if (((_local6 * 8) + (_local8 * 6)) > _local5){ _local3 = (_local3 + b64pad); } else { _local3 = (_local3 + _local2.charAt(((_local7 >> (6 * (3 - _local8))) & 63))); }; _local8++; }; _local6 = (_local6 + 3); }; return (_local3); } } }//package utilSection 554//XML2Object (util.XML2Object) package util { import flash.xml.*; public final class XML2Object { private var lock:Boolean;// = false public function XML2Object(_arg1:XMLNode){ lock = false; super(); if (_arg1){ this.parseXML(_arg1); }; } private function concatObjs(_arg1:Object, _arg2:Object):void{ var _local3:String; for (_local3 in _arg1) { _arg2[_local3] = _arg1[_local3]; }; } private function parseXML(_arg1:XMLNode):void{ this.concatObjs(_arg1.attributes, this); this[_arg1.nodeName] = this.parseNode(_arg1); } private function parseNode(_arg1:XMLNode):Object{ var _local2:Object; var _local3:Number; var _local4:String; var _local5:XMLNode; var _local6:Object; _local2 = new Object(); if (_arg1.firstChild.nodeType == 3){ _local2 = _arg1.firstChild.nodeValue; } else { this.concatObjs(_arg1.attributes, _local2); _local3 = 0; while (_local3 < _arg1.childNodes.length) { _local5 = _arg1.childNodes[_local3]; _local4 = _local5.nodeName; if ((((_local5.firstChild.nodeType == 3)) && ((_local2[_local4] == undefined)))){ _local2[_local4] = this.parseNode(_local5); } else { if (!(_local2[_local4] is Array)){ if (_local2[_local4] != undefined){ _local2[_local4] = new Array(_local2[_local4]); } else { _local2[_local4] = new Array(); }; _local2[_local4].__resolve = Delegate.create(null, propRedirect, [_local2[_local4]]); }; _local6 = this.parseNode(_local5); _local2[_local4].push(_local6); }; _local3++; }; }; return (_local2); } private function propRedirect(_arg1:String, _arg2:Array):Object{ var _local3:Object; if (lock){ return (_arg2); }; lock = true; _local3 = _arg2[0][_arg1]; lock = false; return (_local3); } public static function parse(_arg1:XMLNode):Object{ return (new XML2Object(_arg1.firstChild)); } } }//package utilSection 555//_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{ }; }; } } }//packageSection 556//_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"; }; }; } } }//packageSection 557//_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; }; }; } } }//packageSection 558//_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.shadowDirection = "center"; this.fontWeight = "normal"; this.dropShadowEnabled = true; this.leading = 0; this.backgroundColor = 0xFFFFFF; this.shadowDistance = 1; this.cornerRadius = 0; this.borderThickness = 0; this.paddingLeft = 5; this.paddingRight = 5; }; }; } } }//packageSection 559//_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"; }; }; } } }//packageSection 560//_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.backgroundColor = 0xFFFFFF; this.borderThickness = 0; }; }; } } }//packageSection 561//_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.fontWeight = "bold"; this.borderStyle = "errorTipRight"; this.paddingTop = 4; this.borderColor = 13510953; this.color = 0xFFFFFF; this.fontSize = 9; this.shadowColor = 0; this.paddingLeft = 4; this.paddingBottom = 4; this.paddingRight = 4; }; }; } } }//packageSection 562//_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.fillColor = 0xFFFFFF; this.kerning = false; this.iconColor = 0x111111; this.textRollOverColor = 2831164; this.horizontalAlign = "left"; this.shadowCapColor = 14015965; this.backgroundAlpha = 1; this.filled = true; this.textDecoration = "none"; this.roundedBottomCorners = true; this.fontThickness = 0; this.focusBlendMode = "normal"; this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]; this.horizontalGap = 8; this.borderCapColor = 9542041; this.buttonColor = 7305079; this.indentation = 17; this.selectionDisabledColor = 0xDDDDDD; this.closeDuration = 250; this.embedFonts = false; this.paddingTop = 0; this.letterSpacing = 0; this.focusAlpha = 0.4; this.bevel = true; this.fontSize = 10; this.shadowColor = 0xEEEEEE; this.borderAlpha = 1; this.paddingLeft = 0; this.fontWeight = "normal"; this.indicatorGap = 14; this.focusSkin = HaloFocusRect; this.dropShadowEnabled = false; this.leading = 2; this.borderSkin = HaloBorder; this.fontSharpness = 0; this.modalTransparencyDuration = 100; this.borderThickness = 1; this.backgroundSize = "auto"; this.borderStyle = "inset"; this.borderColor = 12040892; this.fontAntiAliasType = "advanced"; this.errorColor = 0xFF0000; this.shadowDistance = 2; this.horizontalGridLineColor = 0xF7F7F7; this.stroked = false; this.modalTransparencyColor = 0xDDDDDD; this.cornerRadius = 0; this.verticalAlign = "top"; this.textIndent = 0; this.fillAlphas = [0.6, 0.4, 0.75, 0.65]; this.verticalGridLineColor = 14015965; this.themeColor = 40447; this.version = "3.0.0"; this.shadowDirection = "center"; this.modalTransparency = 0.5; this.repeatInterval = 35; this.openDuration = 250; this.textAlign = "left"; this.fontFamily = "Verdana"; this.textSelectedColor = 2831164; this.paddingBottom = 0; this.strokeWidth = 1; this.fontGridFitType = "pixel"; this.horizontalGridLines = false; this.useRollOver = true; this.verticalGridLines = true; this.repeatDelay = 500; this.fontStyle = "normal"; this.dropShadowColor = 0; this.focusThickness = 2; this.verticalGap = 6; this.disabledColor = 11187123; this.paddingRight = 0; this.focusRoundedCorners = "tl tr bl br"; this.borderSides = "left top right bottom"; this.disabledIconColor = 0x999999; this.modalTransparencyBlur = 3; this.color = 734012; this.selectionDuration = 250; this.highlightAlphas = [0.3, 0]; }; }; } } }//packageSection 563//_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.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//packageSection 564//_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"; }; }; } } }//packageSection 565//_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.paddingBottom = 2; this.paddingRight = 2; }; }; } } }//packageSection 566//_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.borderColor = 0xFFFFFF; this.backgroundColor = 0xFFFFFF; this.headerColors = [0xE7E7E7, 0xD9D9D9]; this.footerColors = [0xE7E7E7, 0xC7C7C7]; this.borderAlpha = 1; }; }; } } }//packageSection 567//_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.backgroundColor = 0xFFFFFF; this.backgroundImage = ""; this.horizontalAlign = "left"; this.paddingLeft = 0; this.paddingBottom = 0; this.paddingRight = 0; }; }; } } }//packageSection 568//_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.fontWeight = "normal"; this.textAlign = "left"; }; }; } } }//packageSection 569//_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{ }; }; } } }//packageSection 570//_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.borderStyle = "inset"; this.borderColor = 14015965; this.highlightColor = 12897484; this.backgroundColor = 0xFFFFFF; this.shadowCapColor = 14015965; this.shadowColor = 14015965; this.paddingLeft = 5; this.buttonColor = 7305079; this.borderCapColor = 9542041; this.paddingRight = 5; }; }; } } }//packageSection 571//_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{ }; }; } } }//packageSection 572//_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{ }; }; } } }//packageSection 573//_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.color = 0xFFFFFF; this.textAlign = "center"; }; }; } } }//packageSection 574//_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.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//packageSection 575//_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; }; }; } } }//packageSection 576//_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"; }; }; } } }//packageSection 577//Cursor (Cursor) package { import flash.display.*; public class Cursor extends Sprite { private var m_centerGraphic:Boolean; private var m_graphic:Bitmap; public function Cursor(){ this.mouseEnabled = false; this.cacheAsBitmap = true; } public function set graphic(_arg1:Bitmap):void{ m_graphic = _arg1; while (this.numChildren > 0) { this.removeChildAt(0); }; if (m_graphic != null){ if (m_centerGraphic){ m_graphic.x = -((m_graphic.width / 2)); m_graphic.y = -((m_graphic.height / 2)); }; m_graphic.cacheAsBitmap = true; this.addChild(m_graphic); this.visible = true; }; } public function get graphic():Bitmap{ return (m_graphic); } public function get centerGraphic():Boolean{ return (m_centerGraphic); } public function set centerGraphic(_arg1:Boolean):void{ m_centerGraphic = _arg1; } } }//packageSection 578//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); } } }//packageSection 579//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); } } }//packageSection 580//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); } } }//packageSection 581//Game (Game) package { import flash.events.*; import com.urbansquall.wrighton.*; import ui.*; import com.urbansquall.metronome.*; import flash.display.*; import com.urbansquall.skew.*; import com.urbansquall.wrighton.events.*; import com.urbansquall.ui.*; import com.urbansquall.audio.*; import flash.geom.*; import flash.text.*; import flash.utils.*; import com.urbansquall.display.*; import com.urbansquall.utils.*; import actions.*; import objects.*; import com.urbansquall.math.*; import automata.*; import flash.net.*; import flash.filters.*; import flash.ui.*; public class Game extends InitializingSprite implements IDisposable { private const VALID_BUILD:ColorTransform; private const NUM_COLS:int = 8; private const ISO_HEIGHT:int = 32; private const DAMAGED_BUILDING:ColorTransform; private const SELECTED_AUTOMATA_FILTERS:Array; private const NUM_ROWS:int = 8; private const ISO_WIDTH:int = 64; private const SELECTED_CONSTRUCTION_FILTERS:Array; private const SELECTED_BUILDING:ColorTransform; private const INVALID_BUILD:ColorTransform; private var m_buildingPanelTabs:Array; private var m_lightningLikelihood:Number;// = 1 private var m_pauseOverlay:PauseOverlay; private var m_scoreWorkersEmployedCount:int;// = 0 private var m_borderGameTile:GameTile; private var m_carSalesModifier:Number;// = 0 private var m_scene:SKScene; private var m_inactiveAutomata:Array; private var m_highlightEffectFront:SKEntity; private var m_activeAutomata:Array; private var m_reloadTimeForActionsHack:Dictionary; public var m_moneyCollectedModifier:Number;// = 0 private var m_buildingsThatNeedAutomataHack:Dictionary; private var m_ufoAutomata:Automata; private var m_availableBuildings:Array; private var m_resistDamageModifier:Number;// = 0 private var m_ufoExplosionEntity:SKEntity; private var m_isMuted:Boolean; private var m_constructionCursor:Cursor; private var m_unlockedOilRefinery3:Boolean;// = false private var m_infoPanel:UrbansquallPanel; public var m_resourcesCollectedModifier:Number;// = 0 private var m_interestRateModifier:Number;// = 0 private var m_unlockedSuvs:Boolean;// = false private var m_gameObjectToConstruct:GameObject; private var m_constructedBuildings:Dictionary; private var m_exportModifier:Number;// = 0 private var m_hybridCarSalesModifier:Number;// = 0 private var m_hasDebtRequirement:Boolean;// = false private var m_scoreBuildingUpgradesCount:int;// = 0 private var m_ufoShotDownByMilitary:Boolean; private var m_actionsPerformed:Dictionary; private var m_toBuild:Array; private var m_resourcesPanel:Sprite; private var m_tutorial:TutorialBase; private var m_workerCountForCurrentlySelectedTile:Number; private var m_buildingPanelPages:Array; private var m_stockMarketModifier:Number;// = 0 private var m_highlightEffectBack:SKEntity; private var m_actionIsEnabledHack:Dictionary; private var m_constructionEntity:SKEntity; private var m_ufo:Ufo; private var m_constructionBitmapDataOriginal:BitmapData; private var m_missionOverlay:MissionOverlay; private var m_goalButton:SimpleButton; private var m_constructionBitmapData:BitmapData; private var m_scoreCompletionBonus:int;// = 0 private var m_statusLabel:TextField; private var m_buildingPanel:UrbansquallPanel; private var m_visibleResources:IndecisionResources; private var m_quitButton:DisplayObject; private var m_lightning:Lightning; private var m_lightningEntity:SKEntity; private var m_currentlySelectedTile:GameTile; private var m_volumeButton:VolumeButton; private var m_workerTaxRate:Number; private var m_actionsPanel:UrbansquallPanel; private var m_missionNumber:int; private var m_unlockedMining2:Boolean;// = false private var m_unlockedMining3:Boolean;// = false private var m_importModifier:Number;// = 0 private var m_damagedBuildingsHack:Array; private var m_unlockedHybrids:Boolean;// = false private var m_mainLayer:SKLayer; private var m_gameEngine:GameEngine; private var m_pauseButton:DisplayObject; private var m_scoreBuildingsConstructedCount:int;// = 0 private var m_availableRawMaterials:Array; private var m_freeTradeModifier:Number;// = 0 private static const SCORE_PER_WORKER:int = 2; private static const WORKER_LIMIT_BEFORE_NEEDING_POWER_PLANT:int = 100; private static const REMOVE_ICON:Bitmap = new action_remove(); private static const SCORE_PER_UPGRADE:int = 10; private static const SCORE_PER_BUILD_ACTION:int = 5; public static var UIResourceIconCar:Class = Game_UIResourceIconCar; public static var UIHelpButton:Class = Game_UIHelpButton; public static var HighlightedTileBack:Class = Game_HighlightedTileBack; public static var HighlightedTile:Class = Game_HighlightedTile; public static var UIPauseButton:Class = Game_UIPauseButton; public static var UIQuitButton:Class = Game_UIQuitButton; public static var gameloop:Class = Game_gameloop; public static var UIResourceIconDebt:Class = Game_UIResourceIconDebt; public static var UIResourceIconMoney:Class = Game_UIResourceIconMoney; public static var HighlightedTileFront:Class = Game_HighlightedTileFront; public static var action_remove:Class = Game_action_remove; private static var UIGameNavBottom:Class = Game_UIGameNavBottom; public static var BackgroundGraphic:Class = Game_BackgroundGraphic; public static var UIActionsPanel:Class = Game_UIActionsPanel; private static var UITabBars:Class = Game_UITabBars; public static var UIInfoPanel:Class = Game_UIInfoPanel; public static var UIResourceIconHybrid:Class = Game_UIResourceIconHybrid; public static var UIResourceIconGlobe:Class = Game_UIResourceIconGlobe; public static var UIResourceIconFace:Class = Game_UIResourceIconFace; public static var UIGoalButton:Class = Game_UIGoalButton; public static var FenceTile:Class = Game_FenceTile; public static var UIResourcePanel:Class = Game_UIResourcePanel; public static var GrassTile:Class = Game_GrassTile; public static var UIResourceIconMetal:Class = Game_UIResourceIconMetal; private static var UITabMask:Class = Game_UITabMask; public static var accumulatedScore:int = 0; public static var IsoMask:Class = Game_IsoMask; public static var UIResourceIconOil:Class = Game_UIResourceIconOil; public static var UIResourceIconSuv:Class = Game_UIResourceIconSuv; public function Game(_arg1:int=1){ var _local2:WinConditionResources; var _local3:House; var _local4:WinConditionResources; var _local5:WinConditionResources; var _local6:House; var _local7:Apartment; var _local8:Capitol; var _local9:House; var _local10:MiningFacility; var _local11:OilRefinery; var _local12:WinConditionResources; var _local13:Apartment; var _local14:Capitol; var _local15:House; var _local16:MiningFacility; var _local17:OilRefinery; var _local18:WhiteHouse; var _local19:WinConditionResources; var _local20:Apartment; var _local21:Capitol; var _local22:House; var _local23:MiningFacility; var _local24:OilRefinery; var _local25:WhiteHouse; var _local26:WinConditionResources; var _local27:WinConditionResources; var _local28:WinConditionResources; var _local29:WinConditionResources; var _local30:WinConditionResources; var _local31:WinConditionResources; var _local32:WinConditionResources; var _local33:Apartment; var _local34:House; var _local35:MiningFacility; var _local36:OilRefinery; var _local37:WinConditionResources; var _local38:WinConditionResources; var _local39:Apartment; var _local40:House; var _local41:MiningFacility; var _local42:OilRefinery; var _local43:WinConditionResources; var _local44:WinConditionResources; var _local45:WinConditionResources; var _local46:WinConditionResources; var _local47:WinConditionResources; var _local48:WinConditionResources; var _local49:WinConditionResources; var _local50:WinConditionResources; var _local51:WinConditionResources; var _local52:WinConditionResources; INVALID_BUILD = new ColorTransform(1, 1, 1, 0, 0xFF, 0, 0, 200); VALID_BUILD = new ColorTransform(1, 1, 1, 0, 200, 0, 200, 200); SELECTED_BUILDING = new ColorTransform(1, 1, 1, 0, 0, 50, 0xFF, 0xFF); DAMAGED_BUILDING = new ColorTransform(0.5, 0.5, 0.5); SELECTED_AUTOMATA_FILTERS = [new GlowFilter(6724095, 1, 12, 12, 4, 1), new GlowFilter(6724095, 1, 4, 4, 4, 1, true)]; SELECTED_CONSTRUCTION_FILTERS = [new GlowFilter(16777045, 1, 12, 12, 2, 1)]; super(); m_missionNumber = _arg1; m_gameEngine = new GameEngine(10, IndecisionResources); m_workerTaxRate = 0.3; m_constructionCursor = new Cursor(); m_constructionCursor.centerGraphic = false; m_availableBuildings = new Array(); m_availableRawMaterials = new Array(); m_constructedBuildings = new Dictionary(); m_actionsPerformed = new Dictionary(); m_actionIsEnabledHack = new Dictionary(); m_reloadTimeForActionsHack = new Dictionary(); m_buildingsThatNeedAutomataHack = new Dictionary(true); m_damagedBuildingsHack = new Array(); m_isMuted = false; m_toBuild = []; m_visibleResources = new IndecisionResources(); switch (m_missionNumber){ case 1: m_visibleResources.oil = 1; m_visibleResources.workers = 1; m_visibleResources.money = 1; (m_gameEngine.resources as IndecisionResources).money = (700 + 20); m_availableRawMaterials.push([new Oil(), 1]); m_availableBuildings.push(new House()); m_availableBuildings.push(new OilRefinery()); m_availableBuildings.push(new OilRefineryLevel2()); _local2 = new WinConditionResources(new IndecisionResources()); (_local2.resources as IndecisionResources).oil = 40; m_gameEngine.winConditions.push(_local2); m_gameEngine.winConditions.push(new WinConditionObjects([House])); m_gameEngine.winConditions.push(new WinConditionObjects([OilRefineryLevel2], "Upgrade to")); m_scoreCompletionBonus = 500; m_tutorial = new TutorialLevel1(this); break; case 2: m_visibleResources.oil = 1; m_visibleResources.metal = 1; m_visibleResources.workers = 1; m_visibleResources.money = 1; (m_gameEngine.resources as IndecisionResources).money = 1000; (m_gameEngine.resources as IndecisionResources).oil = 4; m_availableRawMaterials.push([new BorderGate(), 1]); m_availableRawMaterials.push([new Minerals(), 1]); m_availableRawMaterials.push([new Oil(), 1]); _local3 = new House(); m_availableBuildings.push(_local3); m_availableBuildings.push(new MiningFacility()); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(new OilRefinery()); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new ResearchFacility()); m_toBuild.push([_local3, new SKTilePosition(2, 2)]); _local4 = new WinConditionResources(new IndecisionResources()); (_local4.resources as IndecisionResources).metal = 30; m_gameEngine.winConditions.push(_local4); m_gameEngine.winConditions.push(new WinConditionObjects([[MiningFacility, MiningFacilityLevel2, MiningFacilityLevel3]])); m_gameEngine.winConditions.push(new WinConditionActions([[OpenBorderAction, 1]])); m_scoreCompletionBonus = 600; m_tutorial = new TutorialLevel2(this); break; case 3: m_visibleResources.oil = 1; m_visibleResources.metal = 1; m_visibleResources.carsBasic = 1; m_visibleResources.workers = 1; m_visibleResources.money = 1; (m_gameEngine.resources as IndecisionResources).money = 1500; (m_gameEngine.resources as IndecisionResources).metal = 4; (m_gameEngine.resources as IndecisionResources).oil = 10; m_availableRawMaterials.push([new Minerals(), 1]); m_availableRawMaterials.push([new Oil(), 1]); m_availableRawMaterials.push([new BorderGate(), 1]); m_availableBuildings.push(new Apartment()); m_availableBuildings.push(new CarFactory()); m_availableBuildings.push(new House()); m_availableBuildings.push(new MiningFacility()); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(new OilRefinery()); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new OutsourceCars()); m_availableBuildings.push(new ResearchFacility()); _local5 = new WinConditionResources(new IndecisionResources(), "Build"); (_local5.resources as IndecisionResources).carsBasic = 5; m_gameEngine.winConditions.push(_local5); m_scoreCompletionBonus = 700; m_tutorial = new TutorialLevel3(this); break; case 4: m_visibleResources.oil = 1; m_visibleResources.metal = 1; m_visibleResources.carsBasic = 1; m_visibleResources.carsSuv = 1; m_visibleResources.carsHybrid = 1; m_visibleResources.workers = 1; m_visibleResources.money = 1; (m_gameEngine.resources as IndecisionResources).money = 2000; m_availableRawMaterials.push([new Minerals(), 1]); m_availableRawMaterials.push([new Oil(), 1]); m_availableRawMaterials.push([new BorderGate(), 1]); _local6 = new House(); m_availableBuildings.push(new Apartment()); m_availableBuildings.push(new Capitol()); m_availableBuildings.push(new CarDealership()); m_availableBuildings.push(new CarFactory()); m_availableBuildings.push(new GasStation()); m_availableBuildings.push(_local6); m_availableBuildings.push(new HybridFactory()); m_availableBuildings.push(new MiningFacility()); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(new OilRefinery()); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new OutsourceCars()); m_availableBuildings.push(new ResearchFacility()); m_availableBuildings.push(new SuvFactory()); m_toBuild.push([_local6, new SKTilePosition(2, 4)]); m_gameEngine.winConditions.push(new WinConditionActions([[LowerTaxesAction, 1]])); m_gameEngine.winConditions.push(new WinConditionActions([[SellCarAction, 10]])); m_gameEngine.winConditions.push(new WinConditionObjects([CarDealership])); m_scoreCompletionBonus = 800; m_tutorial = new TutorialLevel4(this); break; case 5: m_visibleResources.oil = 1; m_visibleResources.metal = 1; m_visibleResources.carsBasic = 1; m_visibleResources.carsSuv = 1; m_visibleResources.carsHybrid = 1; m_visibleResources.workers = 1; m_visibleResources.money = 1; (m_gameEngine.resources as IndecisionResources).money = 2500; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); _local7 = new Apartment(); _local8 = new Capitol(); _local9 = new House(); _local10 = new MiningFacility(); _local11 = new OilRefinery(); m_availableBuildings.push(_local7); m_availableBuildings.push(_local8); m_availableBuildings.push(new CarFactory()); m_availableBuildings.push(new Condos()); m_availableBuildings.push(new GasStation()); m_availableBuildings.push(_local9); m_availableBuildings.push(new HybridFactory()); m_availableBuildings.push(_local10); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(_local11); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new OutsourceCars()); m_availableBuildings.push(new PortExport()); m_availableBuildings.push(new ResearchFacility()); m_availableBuildings.push(new SuvFactory()); m_availableBuildings.push(new WhiteHouse()); m_availableBuildings.push(new WhiteHouseEconomist()); m_availableBuildings.push(new WhiteHouseGlobalist()); m_availableBuildings.push(new WhiteHouseLaborer()); m_toBuild.push([_local9, new SKTilePosition(3, 4)], [_local7, new SKTilePosition(2, 4)], [_local11, new SKTilePosition(4, 3)], [_local10, new SKTilePosition(4, 6)], [_local8, new SKTilePosition(6, 6)]); _local12 = new WinConditionResources(new IndecisionResources(), "Save"); (_local12.resources as IndecisionResources).money = 5000; m_gameEngine.winConditions.push(_local12); m_gameEngine.winConditions.push(new WinConditionActions([[[ElectEconomistAction, ElectGlobalistAction, ElectLaborerAction], 1]])); m_gameEngine.winConditions.push(new WinConditionActions([[ExportHybridAction, 10]])); m_scoreCompletionBonus = 900; m_tutorial = new TutorialLevel5(this); break; case 6: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).money = 2000; (m_gameEngine.resources as IndecisionResources).happiness = 70; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); _local13 = new Apartment(); _local14 = new Capitol(); _local15 = new House(); _local16 = new MiningFacility(); _local17 = new OilRefinery(); _local18 = new WhiteHouse(); m_availableBuildings.push(_local13); m_availableBuildings.push(_local14); m_availableBuildings.push(new CarFactory()); m_availableBuildings.push(new Condos()); m_availableBuildings.push(new GasStation()); m_availableBuildings.push(_local15); m_availableBuildings.push(new HybridFactory()); m_availableBuildings.push(new Mall()); m_availableBuildings.push(_local16); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(new MovieTheater()); m_availableBuildings.push(_local17); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new OutsourceCars()); m_availableBuildings.push(new Park()); m_availableBuildings.push(new PortExport()); m_availableBuildings.push(new ResearchFacility()); m_availableBuildings.push(new Stadium()); m_availableBuildings.push(new SuvFactory()); m_availableBuildings.push(new WaterTreatment()); m_availableBuildings.push(_local18); m_availableBuildings.push(new WhiteHouseEconomist()); m_availableBuildings.push(new WhiteHouseGlobalist()); m_availableBuildings.push(new WhiteHouseLaborer()); m_toBuild.push([_local15, new SKTilePosition(4, 2)], [_local15, new SKTilePosition(3, 4)], [_local13, new SKTilePosition(1, 0)], [_local17, new SKTilePosition(3, 3)], [_local16, new SKTilePosition(0, 2)], [_local14, new SKTilePosition(0, 6)], [_local18, new SKTilePosition(0, 4)]); _local19 = new WinConditionResources(new IndecisionResources(), "Reach"); (_local19.resources as IndecisionResources).happiness = 90; m_gameEngine.winConditions.push(_local19); m_gameEngine.winConditions.push(new WinConditionActions([[WatchMovieAction, 1]])); m_gameEngine.winConditions.push(new WinConditionActions([[GotoStadiumAction, 1]])); m_scoreCompletionBonus = 1000; m_tutorial = new TutorialLevel6(this); break; case 7: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).debt = -2500; (m_gameEngine.resources as IndecisionResources).money = 2000; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); _local20 = new Apartment(); _local21 = new Capitol(); _local22 = new House(); _local23 = new MiningFacility(); _local24 = new OilRefinery(); _local25 = new WhiteHouse(); m_availableBuildings.push(_local20); m_availableBuildings.push(new Bank()); m_availableBuildings.push(_local21); m_availableBuildings.push(new CarCorporation()); m_availableBuildings.push(new CarDealership()); m_availableBuildings.push(new CarFactory()); m_availableBuildings.push(new CondoHighrise()); m_availableBuildings.push(new Condos()); m_availableBuildings.push(new FederalReserve()); m_availableBuildings.push(new FemaBuilding()); m_availableBuildings.push(new GasStation()); m_availableBuildings.push(new GovernmentHealthcare()); m_availableBuildings.push(new Hospital()); m_availableBuildings.push(_local22); m_availableBuildings.push(new HybridFactory()); m_availableBuildings.push(new Mall()); m_availableBuildings.push(new MilitaryBase()); m_availableBuildings.push(_local23); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(new MovieTheater()); m_availableBuildings.push(new NuclearPlant()); m_availableBuildings.push(_local24); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new OutsourceCars()); m_availableBuildings.push(new OutsourcingLarge()); m_availableBuildings.push(new Park()); m_availableBuildings.push(new PortExport()); m_availableBuildings.push(new PortImport()); m_availableBuildings.push(new ResearchFacility()); m_availableBuildings.push(new Stadium()); m_availableBuildings.push(new StockMarket()); m_availableBuildings.push(new SuvFactory()); m_availableBuildings.push(new UnitedNations()); m_availableBuildings.push(new WaterTreatment()); m_availableBuildings.push(_local25); m_availableBuildings.push(new WhiteHouseEconomist()); m_availableBuildings.push(new WhiteHouseGlobalist()); m_availableBuildings.push(new WhiteHouseLaborer()); m_toBuild.push([_local22, new SKTilePosition(0, 0)], [_local22, new SKTilePosition(0, 6)], [_local20, new SKTilePosition(3, 2)], [_local24, new SKTilePosition(4, 3)], [_local23, new SKTilePosition(3, 4)], [_local21, new SKTilePosition(1, 6)], [_local25, new SKTilePosition(0, 4)]); m_gameEngine.winConditions.push(new WinConditionActions([[[InvestIPOAction, InvestBlueChipAction], 1]])); _local26 = new WinConditionResources(new IndecisionResources(), "Pay down debt to"); (_local26.resources as IndecisionResources).debt = 0; m_gameEngine.winConditions.push(_local26); _local27 = new WinConditionResources(new IndecisionResources(), "Save"); (_local27.resources as IndecisionResources).money = 10000; m_gameEngine.winConditions.push(_local27); m_hasDebtRequirement = true; m_scoreCompletionBonus = 2000; m_tutorial = new TutorialLevel7(this); break; case 8: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).happiness = -90; (m_gameEngine.resources as IndecisionResources).money = 3000; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); pushAllBuildings(); _local28 = new WinConditionResources(new IndecisionResources(), "Build"); (_local28.resources as IndecisionResources).carsBasic = 5; m_gameEngine.winConditions.push(_local28); _local29 = new WinConditionResources(new IndecisionResources(), "Build"); (_local29.resources as IndecisionResources).carsSuv = 10; m_gameEngine.winConditions.push(_local29); _local30 = new WinConditionResources(new IndecisionResources(), "Build"); (_local30.resources as IndecisionResources).carsHybrid = 15; m_gameEngine.winConditions.push(_local30); m_scoreCompletionBonus = 3000; break; case 9: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).money = 3000; (m_gameEngine.resources as IndecisionResources).global = 70; (m_gameEngine.resources as IndecisionResources).happiness = 70; m_availableRawMaterials.push([new Minerals(), 1]); m_availableRawMaterials.push([new Oil(), 1]); m_availableRawMaterials.push([new BorderGate(), 1]); pushAllBuildings(); _local31 = new WinConditionResources(new IndecisionResources(), "Reach"); (_local31.resources as IndecisionResources).global = 90; m_gameEngine.winConditions.push(_local31); _local32 = new WinConditionResources(new IndecisionResources(), "Save"); (_local32.resources as IndecisionResources).money = 15000; m_gameEngine.winConditions.push(_local32); m_gameEngine.winConditions.push(new WinConditionActions([[FreeTradeAction, 1]])); m_scoreCompletionBonus = 4000; m_tutorial = new TutorialLevel9(this); break; case 10: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).debt = -5000; (m_gameEngine.resources as IndecisionResources).money = 2000; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); _local33 = new Apartment(); _local34 = new House(); _local35 = new MiningFacility(); _local36 = new OilRefinery(); m_availableBuildings.push(_local33); m_availableBuildings.push(new Bank()); m_availableBuildings.push(new Capitol()); m_availableBuildings.push(new CarCorporation()); m_availableBuildings.push(new CarDealership()); m_availableBuildings.push(new CarFactory()); m_availableBuildings.push(new CondoHighrise()); m_availableBuildings.push(new Condos()); m_availableBuildings.push(new FederalReserve()); m_availableBuildings.push(new FemaBuilding()); m_availableBuildings.push(new GasStation()); m_availableBuildings.push(new GovernmentHealthcare()); m_availableBuildings.push(new Hospital()); m_availableBuildings.push(_local34); m_availableBuildings.push(new HybridFactory()); m_availableBuildings.push(new Mall()); m_availableBuildings.push(new MilitaryBase()); m_availableBuildings.push(_local35); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(new MovieTheater()); m_availableBuildings.push(new NuclearPlant()); m_availableBuildings.push(_local36); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new OutsourceCars()); m_availableBuildings.push(new OutsourcingLarge()); m_availableBuildings.push(new Park()); m_availableBuildings.push(new PortExport()); m_availableBuildings.push(new PortImport()); m_availableBuildings.push(new ResearchFacility()); m_availableBuildings.push(new Stadium()); m_availableBuildings.push(new StockMarket()); m_availableBuildings.push(new SuvFactory()); m_availableBuildings.push(new UnitedNations()); m_availableBuildings.push(new WaterTreatment()); m_availableBuildings.push(new WhiteHouse()); m_availableBuildings.push(new WhiteHouseEconomist()); m_availableBuildings.push(new WhiteHouseGlobalist()); m_availableBuildings.push(new WhiteHouseLaborer()); m_toBuild.push([_local34, new SKTilePosition(2, 7)], [_local33, new SKTilePosition(4, 2)], [_local36, new SKTilePosition(5, 3)], [_local35, new SKTilePosition(4, 0)]); _local37 = new WinConditionResources(new IndecisionResources(), "Save"); (_local37.resources as IndecisionResources).money = 25000; m_gameEngine.winConditions.push(_local37); _local38 = new WinConditionResources(new IndecisionResources(), "Pay down to"); (_local38.resources as IndecisionResources).debt = 0; m_gameEngine.winConditions.push(_local38); m_hasDebtRequirement = true; m_gameEngine.winConditions.push(new WinConditionActions([[ColdWarAction, 1]])); m_scoreCompletionBonus = 5000; m_tutorial = new TutorialLevel10(this); break; case 11: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).money = 2000; (m_gameEngine.resources as IndecisionResources).happiness = 50; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); _local39 = new Apartment(); _local40 = new House(); _local41 = new MiningFacility(); _local42 = new OilRefinery(); m_availableBuildings.push(_local39); m_availableBuildings.push(new Bank()); m_availableBuildings.push(new Capitol()); m_availableBuildings.push(new CarCorporation()); m_availableBuildings.push(new CarDealership()); m_availableBuildings.push(new CarFactory()); m_availableBuildings.push(new CondoHighrise()); m_availableBuildings.push(new Condos()); m_availableBuildings.push(new FederalReserve()); m_availableBuildings.push(new FemaBuilding()); m_availableBuildings.push(new GasStation()); m_availableBuildings.push(new GovernmentHealthcare()); m_availableBuildings.push(new Hospital()); m_availableBuildings.push(_local40); m_availableBuildings.push(new HybridFactory()); m_availableBuildings.push(new Mall()); m_availableBuildings.push(new MilitaryBase()); m_availableBuildings.push(_local41); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(new MovieTheater()); m_availableBuildings.push(new NuclearPlant()); m_availableBuildings.push(_local42); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new OutsourceCars()); m_availableBuildings.push(new OutsourcingLarge()); m_availableBuildings.push(new Park()); m_availableBuildings.push(new PortExport()); m_availableBuildings.push(new PortImport()); m_availableBuildings.push(new ResearchFacility()); m_availableBuildings.push(new Stadium()); m_availableBuildings.push(new StockMarket()); m_availableBuildings.push(new SuvFactory()); m_availableBuildings.push(new UnitedNations()); m_availableBuildings.push(new WaterTreatment()); m_availableBuildings.push(new WhiteHouse()); m_availableBuildings.push(new WhiteHouseEconomist()); m_availableBuildings.push(new WhiteHouseGlobalist()); m_availableBuildings.push(new WhiteHouseLaborer()); m_toBuild.push([_local40, new SKTilePosition(3, 7)], [_local39, new SKTilePosition(1, 0)], [_local42, new SKTilePosition(1, 2)], [_local41, new SKTilePosition(2, 0)]); m_gameEngine.addEffectListener("LightningDestroysJoo", lightningStrike, 30000); _local43 = new WinConditionResources(new IndecisionResources(), "Reach"); (_local43.resources as IndecisionResources).happiness = 90; m_gameEngine.winConditions.push(_local43); m_gameEngine.winConditions.push(new WinConditionActions([[RepairDamagedBuildingAction, 5]])); m_scoreCompletionBonus = 6000; m_tutorial = new TutorialLevel11(this); break; case 12: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).money = 3500; (m_gameEngine.resources as IndecisionResources).happiness = 50; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); pushAllBuildings(); _local44 = new WinConditionResources(new IndecisionResources(), "Reach"); (_local44.resources as IndecisionResources).happiness = 90; m_gameEngine.winConditions.push(_local44); _local45 = new WinConditionResources(new IndecisionResources(), "Save"); (_local45.resources as IndecisionResources).money = 35000; m_gameEngine.winConditions.push(_local45); m_gameEngine.winConditions.push(new WinConditionActions([[ForeignWarAction, 1]])); m_scoreCompletionBonus = 7000; break; case 13: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).money = 4000; (m_gameEngine.resources as IndecisionResources).global = -90; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); pushAllBuildings(); _local46 = new WinConditionResources(new IndecisionResources(), "Reach"); (_local46.resources as IndecisionResources).global = 90; m_gameEngine.winConditions.push(_local46); _local47 = new WinConditionResources(new IndecisionResources(), "Build"); (_local47.resources as IndecisionResources).carsHybrid = 50; m_gameEngine.winConditions.push(_local47); _local48 = new WinConditionResources(new IndecisionResources(), "Save"); (_local48.resources as IndecisionResources).money = 40000; m_gameEngine.winConditions.push(_local48); m_scoreCompletionBonus = 8000; break; case 14: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).money = 4500; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); pushAllBuildings(); m_gameEngine.addEffectListener("ufoAttack", ufoAttack, 30000); _local49 = new WinConditionResources(new IndecisionResources(), "Save"); (_local49.resources as IndecisionResources).money = 50000; m_gameEngine.winConditions.push(_local49); m_scoreCompletionBonus = 9000; m_tutorial = new TutorialLevel14(this); break; case 15: m_visibleResources.increaseAllBy(1); (m_gameEngine.resources as IndecisionResources).money = 5000; (m_gameEngine.resources as IndecisionResources).debt = -50000; (m_gameEngine.resources as IndecisionResources).happiness = -90; (m_gameEngine.resources as IndecisionResources).global = -90; m_availableRawMaterials.push([new Minerals(), 2]); m_availableRawMaterials.push([new Oil(), 2]); m_availableRawMaterials.push([new BorderGate(), 1]); pushAllBuildings(); m_lightningLikelihood = 0.5; m_gameEngine.addEffectListener("LightningDestroysJoo", lightningStrike, 40000); m_gameEngine.addEffectListener("ufoAttack", ufoAttack, 60000); _local50 = new WinConditionResources(new IndecisionResources(), "Reach"); (_local50.resources as IndecisionResources).global = 90; m_gameEngine.winConditions.push(_local50); _local51 = new WinConditionResources(new IndecisionResources(), "Reach"); (_local51.resources as IndecisionResources).happiness = 90; m_gameEngine.winConditions.push(_local51); _local52 = new WinConditionResources(new IndecisionResources(), "Pay down debt to"); (_local52.resources as IndecisionResources).debt = 0; m_gameEngine.winConditions.push(_local52); m_hasDebtRequirement = true; m_scoreCompletionBonus = 10000; break; }; m_availableBuildings.sort(IndecisionObject.compareObjectsByMoneyResourceRequirement, Array.DESCENDING); m_activeAutomata = new Array(); m_inactiveAutomata = new Array(); } private function decreaseTaxRateTenPercent(_arg1:TickEvent=null):void{ m_workerTaxRate = (m_workerTaxRate - 0.1); m_workerTaxRate = Math.max(m_workerTaxRate, 0); } public function pause():void{ if (isPaused){ return; }; leaveConstructionMode(); m_isMuted = SoundSystem.instance.isMuted(); SoundSystem.instance.mute(); m_volumeButton.enabled = false; m_pauseOverlay.parent.setChildIndex(m_pauseOverlay, (m_pauseOverlay.parent.numChildren - 1)); m_pauseOverlay.visible = true; m_gameEngine.pauseGame(); } private function onActionTimerFinish(_arg1:TickEvent, _arg2:GameTile):void{ m_gameEngine.removeListener((_arg2.tileKey + "ActionDisableTick")); m_reloadTimeForActionsHack[_arg2.tileKey] = 1; _arg2.actionsEnabled = true; if (_arg2 == m_currentlySelectedTile){ updateActionsPanel(); }; } public function unhighlightBuildingToConstruct(_arg1:MouseEvent, _arg2:GameObject=null):void{ (_arg1.target as Sprite).filters = []; if (_arg2 != null){ updateInfoPanel(null); }; } private function constructBuildingWithoutAnimationDelegate(_arg1:Event, _arg2:GameObject, _arg3:SKTilePosition):GameTile{ m_gameEngine.removeListener(("animate construction " + _arg3.key)); removeConstructedBuildingCount(_arg2); var _local4:IndecisionResources = new IndecisionResources(); _local4.workers = (_arg2.resourceRequirements as IndecisionResources).workers; m_gameEngine.resources.increaseBy(_local4); return (constructBuildingWithoutAnimation(_arg2, _arg3, true)); } private function showMissionPopup(_arg1:MouseEvent):void{ leaveConstructionMode(); this.parent.addChild(m_missionOverlay); m_missionOverlay.visible = true; } public function dispose():void{ var _local2:Automata; m_buildingPanel.removeEventListener(MouseEvent.CLICK, buildingPanelClick); m_buildingPanel.removeChildren(); if (m_buildingPanel.parent != null){ m_buildingPanel.parent.removeChild(m_buildingPanel); }; m_buildingPanel = null; m_scene.removeEventListener(MouseEvent.MOUSE_MOVE, sceneMousemoveHandler); m_scene.removeEventListener(MouseEvent.CLICK, sceneClickHandler); m_scene.removeEventListener(MouseEvent.ROLL_OUT, sceneMouseoutHandler); if (m_scene.parent != null){ m_scene.parent.removeChild(m_scene); }; m_scene = null; m_mainLayer = null; m_pauseButton.removeEventListener(MouseEvent.CLICK, pauseGameClickHandler); m_quitButton.removeEventListener(MouseEvent.CLICK, quitGameClickHandler); this.stage.removeEventListener(KeyboardEvent.KEY_UP, stageKeyUpHandler); var _local1:Array = m_activeAutomata.concat(m_inactiveAutomata); for each (_local2 in _local1) { _local2.dispose(); }; _local1 = null; m_activeAutomata = null; m_inactiveAutomata = null; m_constructedBuildings = null; m_gameEngine.dispose(); if (this.parent != null){ this.parent.removeChild(this); }; } private function updateStatus(_arg1:String):void{ m_statusLabel.text = _arg1; m_gameEngine.resetListenerAccruedTime("clearStatus"); } private function quitGameClickHandler(_arg1:MouseEvent):void{ this.parent.addChild(new QuitOverlay("Are you sure you want to quit? You will lose all your progress.", quitGame)); } private function completeWarAction(_arg1:Object, _arg2:Number):void{ m_carSalesModifier = (m_carSalesModifier + _arg2); } private function moveAutomata(_arg1:TickEvent):void{ var _local2:Automata; var _local3:int; _local3 = 0; while (_local3 < m_activeAutomata.length) { _local2 = m_activeAutomata[_local3]; _local2.moveAutomataEvent(((_arg1.frequency + _arg1.deltaTime) / _arg1.frequency)); _local3++; }; _local3 = 0; while (_local3 < m_inactiveAutomata.length) { _local2 = m_inactiveAutomata[_local3]; _local2.moveAutomataEvent(((_arg1.frequency + _arg1.deltaTime) / _arg1.frequency)); _local3++; }; m_mainLayer.sortDepths(); } private function removeBuildingClickHandler(_arg1:MouseEvent):void{ if (m_currentlySelectedTile != null){ removeBuilding(m_currentlySelectedTile); }; } private function completeFreeTradeAction(_arg1:Object, _arg2:Number):void{ m_freeTradeModifier = (m_freeTradeModifier + _arg2); } private function startGameClickHandler(_arg1:GameEvent):void{ m_gameEngine.startGame(); } private function animateUfoExplosion(_arg1:TickEvent):void{ m_ufo.explosionTileAnimation.incrementFrame(); if (_arg1.executionsLeft == 0){ m_ufoExplosionEntity.layer.removeEntity(m_ufoExplosionEntity); m_ufoExplosionEntity = null; m_ufo.hasAttacked = false; }; } private function meetRequirementsToBuild(_arg1:GameObject, _arg2:Boolean=true):Boolean{ var _local9:Array; var _local3:IndecisionResources = (_arg1.resourceRequirements.clone() as IndecisionResources); var _local4:Boolean = m_gameEngine.resources.meetsOrExceeds(_local3, false, ["happiness", "global", "debt"]); var _local5:Boolean = haveObjectPrerequisites(_arg1.objectPrerequisiteRequirements); var _local6 = (getConstructedBuildingCount(Reflection.getClassOfInstance(_arg1)) >= _arg1.maximumAllowed); var _local7:int = ((_arg1.producesOnBuild == null)) ? 0 : (_arg1.producesOnBuild as IndecisionResources).totalWorkers; if (_local7 > 0){ _local7 = (_local7 + (m_gameEngine.resources as IndecisionResources).totalWorkers); }; var _local8:Boolean = (((_local7 > WORKER_LIMIT_BEFORE_NEEDING_POWER_PLANT)) && ((getConstructedBuildingCount(NuclearPlant) < 1))); if (((((((!(_local4)) || (!(_local5)))) || (_local6))) || (_local8))){ _local9 = new Array(); _local9.push(("Cannot build " + _arg1.toStringSingular())); if (_local6){ _local9.push(((("You can only have " + _arg1.maximumAllowed) + " ") + ((_arg1.maximumAllowed > 1)) ? _arg1.namePlural : _arg1.name)); } else { if (_local8){ _local9.push((((((("Build " + NuclearPlant.ARTICLE) + " ") + NuclearPlant.NAME) + " to support more than ") + WORKER_LIMIT_BEFORE_NEEDING_POWER_PLANT) + " workers.")); } else { if (!_local4){ _local9.push(("Short by " + m_gameEngine.resources.getAmountShortBy(_local3, false, ["happiness", "global"]).toString(false, "V R", ", "))); }; if (!_local5){ _local9.push(("Requires " + getObjectPrerequisitesString(_arg1.objectPrerequisiteRequirements))); }; }; }; if (_arg2){ updateStatus(_local9.join("\n")); }; }; return (((((((_local4) && (_local5))) && (!(_local6)))) && (!(_local8)))); } public function get engine():GameEngine{ return (m_gameEngine); } private function removeConstructedBuildingCount(_arg1:GameObject):void{ var _local2:Class = Reflection.getClassOfInstance(_arg1); var _local3 = m_constructedBuildings; var _local4 = _local2; var _local5 = (_local3[_local4] - 1); _local3[_local4] = _local5; } private function sceneMouseoutHandler(_arg1:MouseEvent):void{ Mouse.show(); m_highlightEffectFront.px = -1000; m_highlightEffectBack.px = -1000; if (m_constructionEntity != null){ m_constructionEntity.px = -1000; m_constructionEntity.py = -1000; m_constructionCursor.visible = true; m_constructionBitmapData.copyPixels(m_constructionBitmapDataOriginal, m_constructionBitmapDataOriginal.rect, new Point(0, 0)); m_constructionBitmapData.colorTransform(m_constructionBitmapData.rect, INVALID_BUILD); }; } private function changeAutomataType(_arg1:Class, _arg2:Class):void{ var _local4:Automata; var _local3:int; while (_local3 < m_activeAutomata.length) { _local4 = m_activeAutomata[_local3]; if ((_local4.type is _arg1)){ _local4.changeType((new (_arg2) as AutomataType)); break; }; _local3++; }; } private function completeExportChange(_arg1:Object, _arg2:Number):void{ m_exportModifier = (m_exportModifier + _arg2); } private function updateActionsPanel():void{ var _local7:ActionButton; var _local8:Tooltip; var _local9:GameAction; var _local10:GameObject; var _local11:Boolean; var _local12:Boolean; var _local13:Boolean; var _local14:ActionButton; var _local15:Tooltip; var _local16:GameObject; var _local17:GameObject; var _local18:IndecisionResources; var _local19:String; m_actionsPanel.removeChildren(); if (m_currentlySelectedTile == null){ m_workerCountForCurrentlySelectedTile = NaN; return; }; if (isNaN(m_workerCountForCurrentlySelectedTile)){ m_workerCountForCurrentlySelectedTile = getActiveAutomataCountForTile(m_currentlySelectedTile); }; var _local1:GameObject = m_currentlySelectedTile.gameObject; var _local2:int; var _local3 = !(m_currentlySelectedTile.actionsEnabled); var _local4 = (m_currentlySelectedTile.hitpoints < 100); var _local5:Boolean; if (!_local1.isRawMaterial){ _local5 = (m_workerCountForCurrentlySelectedTile >= (_local1.resourceRequirements as IndecisionResources).workers); _local7 = new ActionButton(REMOVE_ICON); ++_local2; _local7.x = (m_actionsPanel.width - ((_local7.width + 5) * _local2)); _local7.y = 30; _local7.enable(); m_actionsPanel.addChild(_local7); if (((((!(_local3)) && (!(_local4)))) && (_local5))){ _local7.addEventListener(MouseEvent.CLICK, removeBuildingClickHandler, false, 0, true); _local7.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); _local7.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); }; if (_local3){ _local7.rechargePercent = m_reloadTimeForActionsHack[m_currentlySelectedTile.tileKey]; } else { if (((_local4) || (!(_local5)))){ _local7.disable(); _local8 = new Tooltip(); if (_local4){ _local8.text = "Building has been damaged.\nUse FEMA to repair it quickly!"; } else { _local8.text = "Building does not have enough workers to fully operate."; }; _local8.listenForMouseEvents(_local7, true); }; }; }; var _local6:int; for (;_local6 < _local1.actions.length;_local6++) { _local9 = _local1.actions[_local6]; if ((_local9 is UnlockOilRefinery3Action)){ //unresolved if } else { if ((_local9 is UnlockMining2Action)){ //unresolved if } else { if ((_local9 is UnlockMining3Action)){ if (!m_unlockedMining2){ continue; }; //unresolved if } else { if ((((((_local9 is UnlockSuvAction)) || ((_local9 is UnlockHybridAction)))) && ((m_missionNumber < 4)))){ } else { if ((_local9 is UnlockSuvAction)){ //unresolved if } else { if ((_local9 is UnlockHybridAction)){ if (!m_unlockedSuvs){ continue; }; //unresolved if } else { _local10 = null; _local11 = (_local9 is UpgradeAction); _local12 = haveObjectPrerequisites(_local9.objectPrerequisiteRequirements); _local13 = actionIsEnabled(_local9, _local1); _local2++; if (_local12){ //unresolved if _local12 = false; if ((_local9 is UpgradeOilRefineryLevel2Action)){ _local12 = m_unlockedOilRefinery3; } else { if ((_local9 is UpgradeMiningFacilityAction)){ _local12 = m_unlockedMining2; } else { if ((_local9 is UpgradeMiningFacilityLevel2Action)){ _local12 = m_unlockedMining3; } else { if ((_local9 is UpgradeCarFactoryAction)){ _local12 = m_unlockedSuvs; } else { if ((_local9 is UpgradeSuvFactoryAction)){ _local12 = m_unlockedHybrids; } else { for each (_local16 in m_availableBuildings) { if ((_local16 is (_local9 as UpgradeAction).upgradesTo)){ _local12 = true; _local10 = _local16; break; }; }; }; }; }; }; }; if (_local10 == null){ for each (_local17 in m_availableBuildings) { if ((_local17 is (_local9 as UpgradeAction).upgradesTo)){ _local10 = _local17; break; }; }; }; //unresolved if } else { _local14 = new ActionButton(_local9.icon); _local14.x = (m_actionsPanel.width - ((_local14.width + 5) * _local2)); _local14.y = 30; _local14.enable(); m_actionsPanel.addChild(_local14); _local15 = new Tooltip(); _local15.text = _local9.description; if (((((((((_local12) && (_local13))) && (!(_local3)))) && (!(_local4)))) && (_local5))){ _local14.addEventListener(MouseEvent.CLICK, Delegate.create(this, buildingActionClickHandler, _local9, _local1)); _local14.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound, false, 0, true); _local14.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound, false, 0, true); if (((_local11) && ((((_local9.description == null)) || ((_local9.description == "")))))){ _local15.text = ("Upgrade to " + _local10.name); }; if (((_local11) || (!((_local9.resources == null))))){ if (_local11){ if (_local10 != null){ _local18 = (_local10.resourceRequirements.clone() as IndecisionResources); (_local10.resourceRequirements.clone() as IndecisionResources).workers = (_local18.workers - (_local1.resourceRequirements as IndecisionResources).workers); _local15.text = (_local15.text + ((_local18.toString(false) == "")) ? "" : ("\nCosts: " + _local18.toString(false, "V R", ", "))); }; } else { _local15.text = (_local15.text + ("\n" + _local9.resources.toString(false, "V R", ", ", true))); }; }; _local15.listenForMouseEvents(_local14, true); } else { if (((((((_local13) && (!(_local3)))) && (!(_local4)))) && (_local5))){ _local19 = getObjectPrerequisitesString(_local9.objectPrerequisiteRequirements); if ((((_local19 == ResearchFacility.NAME)) && (_local1.isUpgradable))){ _local19 = (_local19 + (("\nand " + _local1.upgradesTo.NAME) + " upgrade research")); }; _local15.text = ("Requires " + _local19); _local15.listenForMouseEvents(_local14, true); _local14.disable(); } else { _local14.disable(); }; }; if (_local3){ _local14.rechargePercent = m_reloadTimeForActionsHack[m_currentlySelectedTile.tileKey]; } else { if (((_local4) || (!(_local5)))){ _local15.text = (_local4) ? "Building has been damaged.\nUse FEMA to repair it quickly!" : "Building does not have enough workers to fully operate."; _local15.listenForMouseEvents(_local14, true); }; }; }; }; }; }; }; }; }; }; } private function getObjectPrerequisitesString(_arg1:Array):String{ var _local4:*; var _local5:Array; var _local6:int; var _local7:String; var _local8:Class; var _local2:Array = new Array(); var _local3:int; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; if ((_local4 is Class)){ _local2.push(((_local4.ARTICLE) ? (_local4.ARTICLE + " ") : "" + _local4.NAME)); } else { if ((_local4 is Array)){ _local5 = new Array(); _local6 = 0; while (_local6 < (_local4 as Array).length) { _local8 = (_local4 as Array)[_local6]; _local5.push(_local8.NAME); _local6++; }; _local7 = _local5.join("/"); if (_local7 == ((((MiningFacility.NAME + "/") + MiningFacilityLevel2.NAME) + "/") + MiningFacilityLevel3.NAME)){ _local7 = "Mining Facility"; }; _local2.push(_local7); }; }; _local3++; }; return (_local2.join(", ")); } private function performedRequiredActions(_arg1:Array):Boolean{ var _local3:Array; var _local4:int; var _local5:Array; var _local6:int; var _local7:Class; var _local2:int; while (_local2 < _arg1.length) { _local3 = _arg1[_local2]; _local4 = 0; if ((_local3[0] is Class)){ _local4 = ((m_actionsPerformed[_local3[0]]) || (0)); if (_local4 < _local3[1]){ return (false); }; } else { if ((_local3[0] is Array)){ _local5 = _local3[0]; _local4 = 0; _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6]; _local4 = (_local4 + ((m_actionsPerformed[_local7]) || (0))); _local6++; }; if (_local4 < _local3[1]){ return (false); }; }; }; _local2++; }; return (true); } private function decrementNeededAutomataForTile(_arg1:GameTile):void{ var _local2 = m_buildingsThatNeedAutomataHack; var _local3 = _arg1; var _local4 = (_local2[_local3] - 1); _local2[_local3] = _local4; } private function fixActionDescriptionsHack(_arg1:Class):String{ var _local2:String = (new (_arg1) as GameAction).description; if (_arg1 == LowerTaxesAction){ _local2 = "Cut Taxes with the Capitol"; }; return (_local2); } private function moveUfo(_arg1:TickEvent):void{ var _local2:SKTilePosition; var _local3:GameTile; var _local4:Boolean; var _local5:Boolean; var _local6:Point; var _local7:Boolean; m_ufoAutomata.moveAutomataEvent(((_arg1.frequency + _arg1.deltaTime) / _arg1.frequency)); if ((((m_ufoAutomata.px == m_ufoAutomata.sourceTile.px)) && ((m_ufoAutomata.py == m_ufoAutomata.sourceTile.py)))){ _local2 = m_mainLayer.getPositionFromCoordinates(m_ufoAutomata.sourceTile.px, m_ufoAutomata.sourceTile.py); _local3 = (m_mainLayer.getTile(_local2.column, _local2.row) as GameTile); if (((((!((_local3 == null))) && (!(_local3.gameObject.isRawMaterial)))) && (!((_local3.gameObject is FemaBuilding))))){ _local4 = (Math.random() < m_resistDamageModifier); _local5 = tileIsProtectedByMilitaryBase(_local3); if (_local5){ updateStatus("The Military has shot down a UFO!"); m_gameEngine.removeListener("moveUfo"); _local6 = new Point(m_ufoAutomata.px, m_ufoAutomata.py); m_ufoExplosionEntity = m_mainLayer.createEntity(m_ufo.explosionTile, _local6.x, _local6.y); m_mainLayer.sortDepths(); m_ufo.blowUp(); m_gameEngine.addEffectListener("animateufoexplosion", animateUfoExplosion, 60, Ufo.NUM_FRAMES); m_ufoShotDownByMilitary = true; m_ufoAutomata.dispose(); m_ufoAutomata = null; } else { if (_local4){ updateStatus((("FEMA protected " + _local3.gameObject.toStringSingular()) + " from an alien attack!")); } else { _local7 = damageBuilding(_local3); m_ufo.attack(); updateStatus((("A UFO has attacked " + _local3.gameObject.toStringSingular()) + "!")); }; }; }; m_ufo.hasAttacked = true; } else { if (((((m_ufo.hasAttacked) && ((m_ufoAutomata.px <= -200)))) && ((m_ufoAutomata.py <= -200)))){ trace("ufo has attacked and has left the screen"); m_ufoAutomata.dispose(); m_ufoAutomata = null; m_gameEngine.removeListener("moveUfo"); m_ufo.hasAttacked = false; }; }; } private function showInstructionsPopup(_arg1:MouseEvent):void{ leaveConstructionMode(); (this.parent as Main).showInstructionsPopup(); } private function buildingRemovedEventHandler(_arg1:GameObjectEvent):void{ updateStatus((_arg1.gameObject.name + " removed!")); } private function completeDamageResistance(_arg1:Object, _arg2:Number):void{ m_resistDamageModifier = (m_resistDamageModifier + _arg2); } private function getActiveAutomataCountForTile(_arg1:GameTile):int{ var _local3:Automata; var _local2:int; if (((!((_arg1 == null))) && (!(_arg1.gameObject.isRawMaterial)))){ for each (_local3 in m_activeAutomata) { if (_local3.tileDestinations.indexOf(_arg1) != -1){ _local2++; }; }; }; return (_local2); } private function clearStatus(_arg1=null):void{ m_statusLabel.text = ""; } private function removeAutomataForTile(_arg1:GameTile):void{ var _local4:GameTile; var _local2:int; var _local3:Automata; changeAutomataHighlighting(_arg1, false); _local2 = 0; while (_local2 < m_activeAutomata.length) { _local3 = m_activeAutomata[_local2]; if (_arg1 == _local3.sourceTile){ for each (_local4 in _local3.tileDestinations) { if (_local4 != _local3.sourceTile){ incrementNeededAutomataForTile(_local4); }; }; m_activeAutomata.splice(_local2, 1); _local3.dispose(); _local2--; } else { if (_local3.removeTileDestination(_arg1) == 1){ m_activeAutomata.splice(_local2, 1); _local2--; m_inactiveAutomata.push(_local3); }; }; _local2++; }; _local2 = 0; while (_local2 < m_inactiveAutomata.length) { _local3 = m_inactiveAutomata[_local2]; if (_arg1 == _local3.sourceTile){ m_inactiveAutomata.splice(_local2, 1); _local3.dispose(); _local2--; }; _local2++; }; delete m_buildingsThatNeedAutomataHack[_arg1]; fixAutomataNeeds(); } private function winGameIn2Seconds(_arg1:TickEvent):void{ winLevel(); } private function stageKeyUpHandler(_arg1:KeyboardEvent):void{ if (_arg1.charCode == Keyboard.ESCAPE){ leaveConstructionMode(); } else { if (_arg1.charCode == Keyboard.SPACE){ m_pauseButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } else { if ((((_arg1.charCode == Keyboard.DELETE)) && (!((m_currentlySelectedTile == null))))){ } else { if ((((((String.fromCharCode(_arg1.charCode).toLowerCase() == "c")) && (_arg1.ctrlKey))) && (_arg1.shiftKey))){ } else { if ((((((String.fromCharCode(_arg1.charCode).toLowerCase() == "d")) && (_arg1.ctrlKey))) && (_arg1.shiftKey))){ } else { if ((((((String.fromCharCode(_arg1.charCode).toLowerCase() == "h")) && (_arg1.ctrlKey))) && (_arg1.shiftKey))){ } else { if ((((((String.fromCharCode(_arg1.charCode).toLowerCase() == "w")) && (_arg1.ctrlKey))) && (_arg1.shiftKey))){ } else { if (String.fromCharCode(_arg1.charCode).toLowerCase() == "d"){ } else { if (String.fromCharCode(_arg1.charCode).toLowerCase() == "f"){ } else { if (String.fromCharCode(_arg1.charCode).toLowerCase() == "a"){ } else { if (String.fromCharCode(_arg1.charCode).toLowerCase() == "t"){ } else { if (String.fromCharCode(_arg1.charCode).toLowerCase() == "l"){ } else { if (String.fromCharCode(_arg1.charCode).toLowerCase() == "u"){ }; }; }; }; }; }; }; }; }; }; }; }; }; } public function get scoreCompletionBonus():int{ return (m_scoreCompletionBonus); } public function incrementBlittedAnimationFrame(_arg1, _arg2:BlittedAnimation):void{ _arg2.incrementFrame(); } private function initInfoPanel():void{ m_infoPanel = new UrbansquallPanel(new UIInfoPanel()); m_infoPanel.mouseEnabled = false; m_infoPanel.mouseChildren = false; m_infoPanel.buttonMode = false; m_infoPanel.x = 0; m_infoPanel.y = ((stage.stageHeight - m_buildingPanel.height) - m_infoPanel.height); this.addChild(m_infoPanel); var _local1:TextField = SerpentineMedium.createTextField("INFO"); _local1.x = 5; _local1.y = 1; m_infoPanel.addChild(_local1); var _local2:Label = new Label(11); _local2.name = "nameLabel"; _local2.bold = true; _local2.x = 2; _local2.y = 18; m_infoPanel.addChild(_local2); var _local3:Label = new Label(11); _local3.name = "descriptionLabel"; _local3.x = 2; _local3.width = (m_infoPanel.width - 11); _local3.wordWrap = true; _local3.y = (_local2.y + 12); m_infoPanel.addChild(_local3); var _local4:Sprite = new Sprite(); _local4.name = "costSection"; _local4.visible = false; var _local5:Label = new Label(11); _local5.x = 2; _local5.text = "Cost:"; _local5.bold = true; _local4.addChild(_local5); var _local6:DisplayObject = new UIResourceIconMoney(); _local6.x = (_local5.x + _local5.width); _local4.addChild(_local6); var _local7:UILabel = new UILabel(8); _local7.name = "money"; _local7.y = 5; _local7.x = ((_local6.x + _local6.width) - 3); _local4.addChild(_local7); var _local8:DisplayObject = new UIResourceIconOil(); _local8.x = (_local7.x + 30); _local4.addChild(_local8); var _local9:UILabel = new UILabel(8); _local9.name = "oil"; _local9.y = _local7.y; _local9.x = ((_local8.x + _local8.width) - 3); _local4.addChild(_local9); var _local10:DisplayObject = new UIResourceIconMetal(); _local10.x = (_local9.x + 20); _local4.addChild(_local10); var _local11:UILabel = new UILabel(8); _local11.name = "metal"; _local11.y = _local7.y; _local11.x = ((_local10.x + _local10.width) - 3); _local4.addChild(_local11); var _local12:MovieClip = new UIResourceIconFace(); _local12.gotoAndStop(0); _local12.x = (_local11.x + 20); _local4.addChild(_local12); var _local13:UILabel = new UILabel(8); _local13.name = "workers"; _local13.y = _local7.y; _local13.x = ((_local12.x + _local12.width) - 3); _local4.addChild(_local13); _local4.y = ((m_infoPanel.height - _local4.height) - 1); m_infoPanel.addChild(_local4); var _local14:Sprite = new Sprite(); _local14.name = "houseSection"; _local14.visible = false; _local14.y = _local4.y; m_infoPanel.addChild(_local14); var _local15:Label = new Label(11); _local15.x = 2; _local15.text = "Workers Employed:"; _local15.bold = true; _local14.addChild(_local15); var _local16:MovieClip = new UIResourceIconFace(); _local16.gotoAndStop(1); _local16.x = (_local15.x + _local15.width); _local14.addChild(_local16); var _local17:UILabel = new UILabel(8); _local17.name = "employedLabel"; _local17.y = 5; _local17.x = ((_local16.x + _local16.width) - 3); _local14.addChild(_local17); var _local18:Sprite = new Sprite(); _local18.name = "workSection"; _local18.visible = false; _local18.y = _local4.y; m_infoPanel.addChild(_local18); var _local19:Label = new Label(11); _local19.x = 2; _local19.text = "Requires:"; _local19.bold = true; _local18.addChild(_local19); var _local20:MovieClip = new UIResourceIconFace(); _local20.gotoAndStop(1); _local20.x = (_local19.x + _local19.width); _local18.addChild(_local20); var _local21:UILabel = new UILabel(8); _local21.name = "reqEmployeeLabel"; _local21.y = 5; _local21.x = ((_local20.x + _local20.width) - 3); _local18.addChild(_local21); var _local22:Label = new Label(11); _local22.x = (_local21.x + 30); _local22.text = "Has:"; _local22.bold = true; _local18.addChild(_local22); var _local23:MovieClip = new UIResourceIconFace(); _local23.gotoAndStop(1); _local23.name = "employeeIcon"; _local23.x = (_local22.x + _local22.width); _local18.addChild(_local23); var _local24:UILabel = new UILabel(8); _local24.name = "hasEmployeeLabel"; _local24.y = 5; _local24.x = ((_local23.x + _local23.width) - 3); _local18.addChild(_local24); } private function removeBuildingAnimationTick(_arg1:Event, _arg2:Bitmap):void{ var _local3:Rectangle = _arg2.scrollRect; if (_local3.height >= 0){ _arg2.y = (_arg2.y + 1); _local3.y = (_local3.y + 1); _local3.height = (_local3.height - 1); _arg2.scrollRect = _local3; }; } private function highlightSelectedTile():void{ if (m_currentlySelectedTile != null){ if (m_currentlySelectedTile.visible){ updateInfoPanel(m_currentlySelectedTile.gameObject); changeAutomataHighlighting(m_currentlySelectedTile, false); m_currentlySelectedTile.bitmapPiecesRef.forEach(function (_arg1:Bitmap, _arg2:int, _arg3:Array):void{ _arg1.transform.colorTransform = SELECTED_BUILDING; }); if ((m_currentlySelectedTile.gameObject as IndecisionObject).soundEffect != null){ SoundSystem.instance.playSound((m_currentlySelectedTile.gameObject as IndecisionObject).soundEffect); }; } else { m_workerCountForCurrentlySelectedTile = NaN; m_currentlySelectedTile = null; }; }; } private function increaseTaxRateTenPercent(_arg1:TickEvent=null):void{ m_workerTaxRate = (m_workerTaxRate + 0.1); } private function initPauseScreen():void{ m_pauseOverlay = new PauseOverlay(unpause); this.addChild(m_pauseOverlay); m_pauseOverlay.visible = false; } private function quitGame(_arg1:Event=null):void{ m_missionOverlay.removeEventListener("START_GAME", startGameClickHandler); m_missionOverlay.dispose(); m_missionOverlay = null; SoundSystem.instance.destroyLoop("game"); m_gameEngine.stopGame(); dispatchEvent(new Event(Event.COMPLETE)); } private function animateLightning(_arg1:TickEvent):void{ m_lightning.tileAnimation.incrementFrame(); if (_arg1.executionsLeft == 0){ m_lightningEntity.layer.removeEntity(m_lightningEntity); m_lightningEntity = null; }; } private function leaveConstructionMode():void{ m_gameEngine.removeListener("constructionMode"); this.buttonMode = false; if (((!((m_constructionCursor == null))) && (!((m_constructionCursor.parent == null))))){ m_constructionCursor.parent.removeChild(m_constructionCursor); }; if (m_constructionEntity != null){ m_mainLayer.removeEntity(m_constructionEntity); }; m_constructionEntity = null; m_constructionCursor.graphic = null; m_constructionBitmapData = null; m_gameObjectToConstruct = null; } private function completeEmissionsTreatyAction(_arg1:Object, _arg2:Number):void{ m_hybridCarSalesModifier = (m_hybridCarSalesModifier + _arg2); } private function getFrameFromHappinessValue(_arg1:int):int{ if (_arg1 >= 90){ return (1); }; if (_arg1 >= 50){ return (2); }; if (_arg1 >= -49){ return (3); }; if (_arg1 >= -89){ return (4); }; return (5); } public function highlightBuildingToConstruct(_arg1:MouseEvent, _arg2:GameObject=null):void{ (_arg1.target as Sprite).filters = SELECTED_CONSTRUCTION_FILTERS; if (_arg2 != null){ unhighlightSelectedTile(); updateInfoPanel(_arg2, false); }; } private function taxThePeople(_arg1:TickEvent):void{ var _local2:int = m_activeAutomata.length; var _local3:IndecisionResources = new IndecisionResources(); _local3.money = ((_local2 * 20) * m_workerTaxRate); m_gameEngine.resources.increaseBy(_local3); trace((((_local2 + " employed citizens taxed at ") + Math.floor((m_workerTaxRate * 100))) + "%")); trace((("Gained " + _local3.money) + " from taxes")); updateStatus((((_local2 + " employed citizens taxed at ") + Math.floor((m_workerTaxRate * 100))) + "%")); } public function get isPaused():Boolean{ return (((!((m_pauseOverlay == null))) && (m_pauseOverlay.visible))); } private function winLevel():void{ m_gameEngine.stopGame(); var _local1:SharedObject = SharedObject.getLocal("missions"); var _local2:Array = ((_local1.data.missions) || (new Array())); _local2[m_missionNumber] = true; _local1.data.missions = _local2; _local1.flush(); SoundSystem.instance.stopLoop("game"); m_scoreWorkersEmployedCount = m_activeAutomata.length; if (m_missionNumber == 15){ m_missionOverlay = new MissionOverlay(16, "CONGRATULATIONS GALACTIC OVERLORD", ((("Sold! One planet " + "and all its inhabitants body parts in exchange for a spaceship, a mansion overlooking the ") + "scenic Grurgltlic gorge and more Phlypluxxian credits than you've ever seen in your life. ") + "Congratulations, Mr. Bostwick! You are living the American dream!"), null); m_missionOverlay.addEventListener("START_GAME", showResultsOverlay, false, 0, true); this.parent.addChild(m_missionOverlay); } else { showResultsOverlay(); }; } private function enterConstructionMode(_arg1:GameObject):void{ leaveConstructionMode(); this.buttonMode = true; m_gameObjectToConstruct = _arg1; m_constructionBitmapData = _arg1.tileClone.bitmapData; m_constructionBitmapDataOriginal = _arg1.tileClone.bitmapData; m_constructionBitmapData.colorTransform(m_constructionBitmapData.rect, INVALID_BUILD); m_constructionCursor.graphic = new Bitmap(m_constructionBitmapData); m_constructionEntity = m_mainLayer.createEntity(new Bitmap(m_constructionBitmapData), 1, 1); m_constructionEntity.px = -1000; m_constructionEntity.py = -1000; m_gameEngine.addUIListener("constructionMode", constructionCursorListener); addChild(m_constructionCursor); } private function getActionRequirementsString(_arg1:Array, _arg2:Boolean=false):String{ var _local5:Array; var _local6:String; var _local7:Array; var _local8:int; var _local9:String; var _local10:Class; var _local11:String; var _local3:Array = new Array(); var _local4:int; while (_local4 < _arg1.length) { _local5 = _arg1[_local4]; if ((_local5[0] is Class)){ _local6 = fixActionDescriptionsHack(_local5[0]); if (_local5[1] > 1){ if (_arg2){ _local6 = (_local6 + (((" " + ((m_actionsPerformed[_local5[0]]) || (0))) + "/") + _local5[1])); } else { _local6 = (_local6 + (" x" + _local5[1])); }; }; _local3.push(_local6); } else { if ((_local5[0] is Array)){ _local7 = new Array(); _local8 = 0; while (_local8 < (_local5[0] as Array).length) { _local10 = (_local5[0] as Array)[_local8]; _local11 = fixActionDescriptionsHack(_local10); if (_local5[1] > 1){ _local11 = (_local11 + (" x" + _local5[1])); }; _local7.push(_local11); _local8++; }; _local9 = _local7.join(" or "); if (_local9 == ((((ElectEconomistAction.DESC + " or ") + ElectGlobalistAction.DESC) + " or ") + ElectLaborerAction.DESC)){ _local9 = "Elect a president"; } else { if (_local9 == ((InvestIPOAction.DESC + " or ") + InvestBlueChipAction.DESC)){ _local9 = "Play the Stock Market"; }; }; _local3.push(_local9); }; }; _local4++; }; return (_local3.join(", ")); } private function onActionTimerTick(_arg1:TickEvent, _arg2:GameTile, _arg3:Number):void{ m_reloadTimeForActionsHack[_arg2.tileKey] = (m_reloadTimeForActionsHack[_arg2.tileKey] + _arg3); if (_arg2 == m_currentlySelectedTile){ updateActionsPanel(); }; } public function unpause():void{ if (!isPaused){ return; }; if (!m_isMuted){ SoundSystem.instance.unmute(); }; m_volumeButton.enabled = true; m_pauseOverlay.visible = false; m_gameEngine.resumeGame(); } private function getConstructedBuildingCount(_arg1:Class):int{ var _local3:*; var _local2:int; for (_local3 in m_constructedBuildings) { if (((!((_local3 == null))) && ((((_arg1 == _local3)) || (Reflection.classDerivesFromClass(_local3, _arg1)))))){ _local2 = (_local2 + m_constructedBuildings[_local3]); }; }; return (_local2); } private function lightningStrike(_arg1:TickEvent):void{ var _local6:Point; var _local7:Number; var _local8:Boolean; var _local9:Boolean; var _local2:int = Math.floor((Math.random() * NUM_COLS)); var _local3:int = Math.floor((Math.random() * NUM_ROWS)); var _local4:GameTile = (m_mainLayer.getTile(_local2, _local3) as GameTile); var _local5:Number = Math.random(); if (m_lightning == null){ m_lightning = new Lightning(); }; if (((((((!((_local4 == null))) && (!(_local4.gameObject.isRawMaterial)))) && (!((_local4.gameObject is FemaBuilding))))) && ((_local5 < m_lightningLikelihood)))){ _local6 = new Point(_local4.px, _local4.py); _local7 = (((ISO_WIDTH / 2) * (_local4.gameObject.tileRowCount - _local4.gameObject.tileColumnCount)) / 2); _local6.x = (_local6.x + (ISO_WIDTH / 2)); _local6.x = (_local6.x - _local7); m_lightningEntity = m_mainLayer.createEntity(m_lightning.tile, _local6.x, _local6.y); m_mainLayer.sortDepths(); m_gameEngine.addEffectListener("animatelightning", animateLightning, 30, Lightning.NUM_FRAMES); _local8 = (Math.random() < m_resistDamageModifier); if (_local8){ updateStatus((("FEMA protected " + _local4.gameObject.toStringSingular()) + " from a lightning strike!")); } else { _local9 = damageBuilding(_local4); m_lightning.playSound(!(_local9)); updateStatus((("Lightning has struck " + _local4.gameObject.toStringSingular()) + "!")); }; } else { if (_local5 < m_lightningLikelihood){ trace(("lightning cannot strike: " + _local4)); } else { trace(((("lightning failed likelihood of " + m_lightningLikelihood) + " and will not strike: ") + _local4)); }; }; } private function sceneMousemoveHandler(_arg1:MouseEvent):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local2:SKTile = m_scene.pickTile("floor", m_scene.mouseX, m_scene.mouseY); if (_local2 != null){ if (m_gameObjectToConstruct == null){ m_highlightEffectFront.snapToGrid(_local2.column, _local2.row); m_highlightEffectBack.snapToGrid(_local2.column, _local2.row); m_highlightEffectBack.px--; m_highlightEffectBack.py--; } else { if (!canBuildAtCoordinate(m_scene.mouseX, m_scene.mouseY, m_gameObjectToConstruct)){ m_constructionBitmapData.copyPixels(m_constructionBitmapDataOriginal, m_constructionBitmapDataOriginal.rect, new Point(0, 0)); m_constructionBitmapData.colorTransform(m_constructionBitmapData.rect, INVALID_BUILD); m_constructionCursor.visible = true; m_constructionEntity.px = -1000; m_constructionEntity.py = -1000; } else { m_constructionBitmapData.copyPixels(m_constructionBitmapDataOriginal, m_constructionBitmapDataOriginal.rect, new Point(0, 0)); m_constructionBitmapData.colorTransform(m_constructionBitmapData.rect, VALID_BUILD); m_constructionCursor.visible = false; m_constructionEntity.snapToGrid(_local2.column, _local2.row); _local3 = ((ISO_WIDTH / 2) * m_gameObjectToConstruct.tileRowCount); _local4 = (m_constructionCursor.height - ((ISO_HEIGHT / 2) * ((m_gameObjectToConstruct.tileRowCount + m_gameObjectToConstruct.tileColumnCount) - 1))); _local5 = (m_constructionEntity.bitmapRef.width / 2); _local6 = (m_constructionEntity.bitmapRef.height - (ISO_HEIGHT / 2)); m_constructionEntity.px = (m_constructionEntity.px + (_local5 - _local3)); m_constructionEntity.py = (m_constructionEntity.py + (_local6 - _local4)); }; }; m_mainLayer.sortDepths(); } else { sceneMouseoutHandler(_arg1); }; } public function actionIsEnabled(_arg1:GameAction, _arg2:GameObject):Boolean{ return (!((m_actionIsEnabledHack[(_arg2.name + _arg1.description)] === false))); } private function haveObjectPrerequisites(_arg1:Array):Boolean{ var _local4:*; var _local5:int; var _local6:Class; var _local2:Boolean; var _local3:int; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; if ((_local4 is Class)){ if (getConstructedBuildingCount(_local4) > 0){ } else { _local2 = false; break; }; } else { if ((_local4 is Array)){ _local2 = false; _local5 = 0; while (_local5 < (_local4 as Array).length) { _local6 = (_local4 as Array)[_local5]; if (getConstructedBuildingCount(_local6) > 0){ _local2 = true; break; }; _local5++; }; if (_local2 == false){ break; }; }; }; _local3++; }; return (_local2); } override protected function init():void{ var _local2:WinConditionAbstract; var _local12:Array; var _local13:WinConditionResources; var _local14:Boolean; var _local15:WinConditionObjects; var _local16:WinConditionActions; var _local17:GameObject; var _local18:int; var _local19:Number; var _local20:int; var _local21:Number; var _local22:Number; var _local23:int; var _local24:int; var _local1:Array = new Array(); for each (_local2 in m_gameEngine.winConditions) { if ((_local2 is WinConditionResources)){ _local13 = (_local2 as WinConditionResources); _local14 = (_local13.resources.toString(false) == ""); _local1.push(((_local13.prefaceString + " ") + _local13.resources.toString(false, "V R", ", ", false, ((_local14) && (m_hasDebtRequirement))))); } else { if ((_local2 is WinConditionObjects)){ _local15 = (_local2 as WinConditionObjects); _local1.push(((_local15.prefaceString + " ") + getObjectPrerequisitesString(_local15.objects))); } else { if ((_local2 is WinConditionActions)){ _local16 = (_local2 as WinConditionActions); _local1.push(getActionRequirementsString(_local16.actions)); }; }; }; }; if (m_missionNumber == 14){ _local1.push("Defend your citizens from UFOs with a military base. Destroy a UFO."); }; m_missionOverlay = new MissionOverlay(m_missionNumber, Main.MISSION_DESCRIPTIONS[m_missionNumber][0], Main.MISSION_DESCRIPTIONS[m_missionNumber][1], _local1); m_missionOverlay.addEventListener("START_GAME", startGameClickHandler, false, 0, true); this.parent.addChild(m_missionOverlay); m_buildingPanel = new UrbansquallPanel(new UIGameNavBottom()); m_buildingPanel.y = (stage.stageHeight - m_buildingPanel.height); m_buildingPanel.addEventListener(MouseEvent.CLICK, buildingPanelClick); var _local3:Sprite = new Sprite(); _local3.graphics.beginFill(12508415, 0); _local3.graphics.drawRect(0, 0, this.stage.stageWidth, ((this.stage.stageHeight - m_buildingPanel.height) - 20)); _local3.graphics.endFill(); _local3.y = 30; _local3.x = 0; this.addChild(_local3); var _local4:Bitmap = new BackgroundGraphic(); _local3.addChild(_local4); this.addChild(m_buildingPanel); var _local5:Sprite = new Sprite(); _local5.addChild(new UIActionsPanel()); var _local6:TextField = SerpentineMedium.createTextField("ACTIONS"); _local6.x = ((_local5.width - _local6.width) - 5); _local6.y = 1; _local5.addChild(_local6); m_actionsPanel = new UrbansquallPanel(_local5); m_actionsPanel.mouseEnabled = false; m_actionsPanel.mouseChildren = true; m_actionsPanel.x = (stage.stageWidth - m_actionsPanel.width); m_actionsPanel.y = ((stage.stageHeight - m_buildingPanel.height) - m_actionsPanel.height); this.addChild(m_actionsPanel); initInfoPanel(); m_resourcesPanel = new Sprite(); m_resourcesPanel.addChild(new UIResourcePanel()); m_resourcesPanel.x = 0; m_resourcesPanel.y = -4; this.addChild(m_resourcesPanel); m_scene = new SKScene(); m_scene.buttonMode = true; m_scene.x = (_local3.width / 2); m_scene.addEventListener(MouseEvent.MOUSE_MOVE, sceneMousemoveHandler, false, 0, true); m_scene.addEventListener(MouseEvent.CLICK, sceneClickHandler, false, 0, true); m_scene.addEventListener(MouseEvent.ROLL_OUT, sceneMouseoutHandler, false, 0, true); _local3.addChild(m_scene); var _local7:SKLayer = new SKLayer("floor", ISO_WIDTH, ISO_HEIGHT, new IsoMask()); m_scene.addLayer(_local7); _local7.tile(new GrassTile(), NUM_COLS, NUM_ROWS); m_scene.y = ((_local3.height - m_scene.height) / 2); _local4.x = ((_local3.width - _local4.width) / 2); _local4.y = m_scene.y; m_mainLayer = new SKLayer("stuff", ISO_WIDTH, ISO_HEIGHT, new IsoMask()); m_scene.addLayer(m_mainLayer); var _local8:SKLayer = new SKLayer("sky", ISO_WIDTH, ISO_HEIGHT, new IsoMask()); m_scene.addLayer(_local8); var _local9:SeededRandom = new SeededRandom(m_missionNumber); var _local10:Dictionary = new Dictionary(); var _local11:int; while (_local11 < m_availableRawMaterials.length) { _local17 = m_availableRawMaterials[_local11][0]; if ((_local17 is BorderGate)){ m_borderGameTile = new GameTile(_local17, m_mainLayer); m_mainLayer.addTile(m_borderGameTile, 3, -1); _local7.createTile(new GrassTile(), 1, 1, 3, -1); _local7.createTile(new GrassTile(), 1, 1, 4, -1); _local19 = 0.5; _local20 = 0; while (_local20 < NUM_COLS) { _local21 = ((ISO_WIDTH * _local19) + 2); _local22 = ((ISO_HEIGHT * (_local20 - _local19)) + 2); if ((((_local20 < 3)) || ((_local20 > 4)))){ m_mainLayer.createEntity(new FenceTile(), _local21, _local22); }; _local19 = (_local19 + 0.5); _local20++; }; customActionDisable(_local17.actions[1], _local17); } else { _local18 = m_availableRawMaterials[_local11][1]; while (_local18 > 0) { _local23 = _local9.randomInteger((NUM_COLS - 1), 0); _local24 = _local9.randomInteger((NUM_ROWS - 1), 0); while (_local10[((_local23 + ",") + _local24)] != null) { _local23 = _local9.randomInteger((NUM_COLS - 1), 0); _local24 = _local9.randomInteger((NUM_ROWS - 1), 0); }; m_mainLayer.addTile(new GameTile(_local17, m_mainLayer), _local23, _local24); _local10[((_local23 + ",") + _local24)] = true; _local18--; }; if (_local17.tileAnimation != null){ m_gameEngine.addEffectListener(("animate" + _local17.name), Delegate.create(this, incrementBlittedAnimationFrame, _local17.tileAnimation), 200); }; }; _local11++; }; m_highlightEffectFront = m_mainLayer.createEntity(new HighlightedTileFront(), -1000, -1000); m_highlightEffectBack = m_mainLayer.createEntity(new HighlightedTileBack(), -1000, -1000); m_statusLabel = SerpentineMedium.createTextField(""); m_statusLabel.filters = [new GlowFilter(0, 1, 4, 4, 4), new DropShadowFilter(3, 45, 39423, 1, 5, 5, 1)]; m_statusLabel.x = 2; m_statusLabel.width = (stage.stageWidth - 6); m_statusLabel.y = (m_resourcesPanel.height - 20); m_statusLabel.mouseEnabled = false; m_statusLabel.mouseWheelEnabled = false; this.addChild(m_statusLabel); initResourcePanel(); initBuildPanel(); initPauseScreen(); m_gameEngine.addUIListener("checkWinConditions", checkWinConditions, 3000); m_gameEngine.addUIListener("updateResourcesPanelDisplay", updateResourcesPanelDisplay, 100); m_gameEngine.addUIListener("clearStatus", clearStatus, 5000); m_gameEngine.addEffectListener("moveAutomata", moveAutomata, 30); this.stage.addEventListener(KeyboardEvent.KEY_UP, stageKeyUpHandler, false, 0, true); this.addEventListener(GameObjectEvent.CONSTRUCTED, buildingConstructedEventHandler, false, 0, true); this.addEventListener(GameObjectEvent.REMOVED, buildingRemovedEventHandler, false, 0, true); this.addEventListener(GameActionEvent.FIRED, actionFiredHandler, false, 0, true); SoundSystem.instance.createLoop("game", new gameloop()); if (m_tutorial != null){ m_tutorial.start(); }; for each (_local12 in m_toBuild) { constructBuildingWithoutAnimation(_local12[0], _local12[1], true); }; updateStatus(""); fixAutomataNeeds(); } private function incrementNeededAutomataForTile(_arg1:GameTile, _arg2:int=1):void{ if (m_buildingsThatNeedAutomataHack[_arg1] == null){ m_buildingsThatNeedAutomataHack[_arg1] = 0; }; m_buildingsThatNeedAutomataHack[_arg1] = (m_buildingsThatNeedAutomataHack[_arg1] + _arg2); } private function tileIsProtectedByMilitaryBase(_arg1:GameTile):Boolean{ var _local2:int; var _local3:int; var _local4:GameTile; if ((_arg1.gameObject is MilitaryBase)){ return (true); }; _local2 = -2; while (_local2 < (_arg1.gameObject.tileColumnCount + 2)) { _local3 = -2; while (_local3 < (_arg1.gameObject.tileRowCount + 2)) { _local4 = (m_mainLayer.getTile((_arg1.column + _local2), (_arg1.row + _local3)) as GameTile); if (((!((_local4 == null))) && ((_local4.gameObject is MilitaryBase)))){ return (true); }; _local3++; }; _local2++; }; return (false); } private function updateInfoPanel(_arg1:GameObject, _arg2:Boolean=true):void{ var _local16:int; var _local17:Automata; var _local18:int; var _local3:Label = (m_infoPanel.getChildByName("descriptionLabel") as Label); var _local4:Label = (m_infoPanel.getChildByName("nameLabel") as Label); var _local5:Sprite = (m_infoPanel.getChildByName("costSection") as Sprite); var _local6:UILabel = (_local5.getChildByName("money") as UILabel); var _local7:UILabel = (_local5.getChildByName("oil") as UILabel); var _local8:UILabel = (_local5.getChildByName("metal") as UILabel); var _local9:UILabel = (_local5.getChildByName("workers") as UILabel); var _local10:Sprite = (m_infoPanel.getChildByName("houseSection") as Sprite); var _local11:UILabel = (_local10.getChildByName("employedLabel") as UILabel); var _local12:Sprite = (m_infoPanel.getChildByName("workSection") as Sprite); var _local13:UILabel = (_local12.getChildByName("reqEmployeeLabel") as UILabel); var _local14:UILabel = (_local12.getChildByName("hasEmployeeLabel") as UILabel); var _local15:MovieClip = (_local12.getChildByName("employeeIcon") as MovieClip); _local5.visible = false; _local10.visible = false; _local12.visible = false; _local3.text = ""; _local4.text = ""; _local6.text = "$0"; _local7.text = "0"; _local8.text = "0"; _local9.text = "0"; _local11.text = "0"; _local13.text = "0"; _local14.text = "0"; _local15.gotoAndStop(1); updateActionsPanel(); if (_arg1 != null){ _local4.text = _arg1.name; _local3.text = _arg1.description; if (!_arg1.isRawMaterial){ _local5.visible = true; _local6.text = ("$" + (_arg1.resourceRequirements as IndecisionResources).money); _local7.text = ("" + (_arg1.resourceRequirements as IndecisionResources).oil); _local8.text = ("" + (_arg1.resourceRequirements as IndecisionResources).metal); _local9.text = ("" + (_arg1.resourceRequirements as IndecisionResources).workers); if (_arg2){ _local5.visible = false; if (((!((_arg1.producesOnBuild == null))) && (((_arg1.producesOnBuild as IndecisionResources).totalWorkers > 0)))){ _local10.visible = true; _local16 = 0; for each (_local17 in m_activeAutomata) { if (_local17.sourceTile == m_currentlySelectedTile){ _local16++; }; }; _local11.text = _local16.toString(); } else { _local12.visible = true; _local18 = ((m_workerCountForCurrentlySelectedTile) || (0)); _local14.text = _local18.toString(); _local13.text = (_arg1.resourceRequirements as IndecisionResources).workers.toString(); if (_local18 < (_arg1.resourceRequirements as IndecisionResources).workers){ _local15.gotoAndStop(5); }; }; }; }; }; } private function fixAutomataNeeds():void{ var _local1:*; var _local2:int; var _local3:int; var _local4:Automata; for (_local1 in m_buildingsThatNeedAutomataHack) { _local2 = m_buildingsThatNeedAutomataHack[_local1]; _local3 = 0; while (_local3 < _local2) { _local4 = (m_inactiveAutomata.pop() as Automata); if (_local4 != null){ decrementNeededAutomataForTile((_local1 as GameTile)); _local4.addTileDestinationToEnd((_local1 as GameTile)); m_activeAutomata.push(_local4); }; _local3++; }; }; } private function buildBuilding(_arg1:Event, _arg2:Bitmap):void{ var _local3:Rectangle = _arg2.scrollRect; if (_local3.y >= 0){ _arg2.y = (_arg2.y - 1); _local3.y = (_local3.y - 1); _arg2.scrollRect = _local3; }; } private function toPercent(_arg1:Number):String{ var _local2:int = (_arg1 * 100); return ((_local2.toString() + "%")); } private function sceneClickHandler(_arg1:MouseEvent):void{ var _local2:GameTile; if (m_gameObjectToConstruct == null){ unhighlightSelectedTile(); _local2 = (m_scene.pickTile(m_mainLayer.name, m_scene.mouseX, m_scene.mouseY) as GameTile); if (_local2 != m_currentlySelectedTile){ m_currentlySelectedTile = _local2; m_workerCountForCurrentlySelectedTile = NaN; highlightSelectedTile(); }; } else { if (canBuildAtCoordinate(m_scene.mouseX, m_scene.mouseY, m_gameObjectToConstruct)){ if (meetRequirementsToBuild(m_gameObjectToConstruct)){ constructBuilding(m_gameObjectToConstruct, m_mainLayer.getPositionFromCoordinates(m_scene.mouseX, m_scene.mouseY)); if (!_arg1.shiftKey){ leaveConstructionMode(); }; }; } else { updateStatus("Cannot construct here!"); }; }; } private function damageBuilding(_arg1:GameTile):Boolean{ var a_tile = _arg1; var result:Boolean; a_tile.hitpoints = (a_tile.hitpoints - 50); if (a_tile.hitpoints <= 0){ a_tile.hitpoints = 50; } else { m_damagedBuildingsHack.push(a_tile); a_tile.bitmapPiecesRef.forEach(function (_arg1:Bitmap, _arg2:int, _arg3:Array):void{ _arg1.transform.colorTransform = DAMAGED_BUILDING; }); }; updateActionsPanel(); return (result); } private function adjustAutomataNumbersForNewConstruction(_arg1:GameTile, _arg2:IndecisionResources, _arg3:IndecisionResources):void{ var _local4:int; if (((!((_arg3 == null))) && ((_arg3.workers > 0)))){ incrementNeededAutomataForTile(_arg1, _arg3.workers); }; if (((!((_arg2 == null))) && ((_arg2.totalWorkers > 0)))){ _local4 = 0; while (_local4 < _arg2.totalWorkers) { m_inactiveAutomata.push(new Automata(this, new PersonAutomataType(), _arg1, (m_gameEngine.resources as IndecisionResources))); _local4++; }; }; fixAutomataNeeds(); } private function removeBuildingCompletion(_arg1:Event, _arg2:GameTile):void{ var _local4:int; var _local5:GameObject; m_gameEngine.removeListener(("animate destruction " + _arg2.tileKey)); var _local3:String = _arg2.gameObject.name; m_mainLayer.removeTile(_arg2); if (_arg2.gameObject.hasTileRequirement){ _local4 = 0; while (_local4 < m_availableRawMaterials.length) { _local5 = m_availableRawMaterials[_local4][0]; if (_arg2.gameObject.requires(_local5)){ m_mainLayer.addTile(new GameTile(_local5, m_mainLayer), _arg2.column, _arg2.row); break; }; _local4++; }; }; if (m_currentlySelectedTile != null){ updateInfoPanel(m_currentlySelectedTile.gameObject); }; this.dispatchEvent(new GameObjectEvent(GameObjectEvent.REMOVED, _arg2.gameObject, _arg2.column, _arg2.row)); } private function constructionCursorListener(_arg1:TickEvent):void{ var _local2:int = ((ISO_WIDTH / 2) * m_gameObjectToConstruct.tileRowCount); var _local3:int = (m_constructionCursor.height - ((ISO_HEIGHT / 2) * ((m_gameObjectToConstruct.tileRowCount + m_gameObjectToConstruct.tileColumnCount) - 1))); m_constructionCursor.x = (mouseX - _local2); m_constructionCursor.y = (mouseY - _local3); } private function removeBuilding(_arg1:GameTile):void{ var _local7:int; var _local8:GameObject; if (_arg1.hitpoints < 100){ trace("cannot remove a damaged building", _arg1); return; }; _arg1.visible = false; unhighlightSelectedTile(); updateInfoPanel(null); m_gameEngine.removeListener(("tile" + _arg1.tileKey)); m_gameEngine.removeListener((_arg1.tileKey + "ActionDisableTick")); m_gameEngine.removeListener((_arg1.tileKey + "ActionDisableFinish")); m_gameEngine.resources.reduceBy(_arg1.gameObject.producesOnBuild); m_gameEngine.resources.increaseBy(_arg1.gameObject.resourceRequirements); if (((((!((_arg1.gameObject.producesOnBuild == null))) && (((_arg1.gameObject.producesOnBuild as IndecisionResources).totalWorkers > 0)))) || (((_arg1.gameObject.resourceRequirements as IndecisionResources).workers > 0)))){ removeAutomataForTile(_arg1); }; removeConstructedBuildingCount(_arg1.gameObject); var _local2:Bitmap = new Bitmap(); if (_arg1.gameObject.hasTileRequirement){ _local7 = 0; while (_local7 < m_availableRawMaterials.length) { _local8 = m_availableRawMaterials[_local7][0]; if (_arg1.gameObject.requires(_local8)){ _local2 = _local8.tileClone; }; _local7++; }; }; var _local3:Bitmap = _arg1.gameObject.tileClone; var _local4:Bitmap = _arg1.bitmapPiecesRef[0]; _local3.x = _local4.x; _local3.y = _local4.y; _local3.alpha = 0.7; _local3.x = (_local3.x - ((ISO_WIDTH / 2) * (_arg1.gameObject.tileRowCount - 1))); var _local5:int = _local3.height; _local3.scrollRect = new Rectangle(0, 0, _local3.width, _local5); _local2.x = _local3.x; _local2.y = ((_local3.y + _local5) - _local2.height); _local4.parent.addChild(_local2); _local4.parent.addChild(_local3); var _local6 = 10000; m_gameEngine.addEffectListener(("animate destruction " + _arg1.tileKey), Delegate.create(this, removeBuildingAnimationTick, _local3), (_local6 / _local5), _local5); m_gameEngine.addGameListener(("remove building " + _arg1.tileKey), Delegate.create(this, removeBuildingCompletion, _arg1), _local6, 1); } private function constructBuildingWithoutAnimation(_arg1:GameObject, _arg2:SKTilePosition, _arg3:Boolean=false):GameTile{ var _local5:GameTile; var _local6:IndecisionResources; var _local7:IndecisionResources; var _local4:GameTile; if (((_arg3) || (meetRequirementsToBuild(_arg1)))){ _local4 = new GameTile(_arg1, m_mainLayer); _local5 = (m_mainLayer.getTile(_arg2.column, _arg2.row) as GameTile); m_mainLayer.removeTileByCoordinateSafe(_arg2.column, _arg2.row); m_mainLayer.addTile(_local4, _arg2.column, _arg2.row); if (((!((_local5 == null))) && (!(_local5.gameObject.isRawMaterial)))){ m_gameEngine.removeListener((_local5.tileKey + "ActionDisableTick")); m_gameEngine.removeListener((_local5.tileKey + "ActionDisableFinish")); removeConstructedBuildingCount(_local5.gameObject); if ((_local5.gameObject.resourceRequirements as IndecisionResources).workers > 0){ _local6 = new IndecisionResources(); _local6.workers = (_local5.gameObject.resourceRequirements as IndecisionResources).workers; m_gameEngine.resources.increaseBy(_local6); removeAutomataForTile(_local5); }; }; addConstructedBuildingCount(_arg1); if (!_arg3){ m_gameEngine.resources.reduceBy(_local4.gameObject.resourceRequirements); } else { _local7 = new IndecisionResources(); _local7.workers = (_local4.gameObject.resourceRequirements as IndecisionResources).workers; m_gameEngine.resources.reduceBy(_local7); }; m_gameEngine.resources.increaseBy(_local4.gameObject.producesOnBuild); if (_local4.gameObject.producesAtInterval != null){ m_gameEngine.addResourceIncreaseEvent(("tile" + _local4.tileKey), _local4.gameObject.producesAtInterval, _local4.gameObject.frequency); }; adjustAutomataNumbersForNewConstruction(_local4, (_local4.gameObject.producesOnBuild as IndecisionResources), (_local4.gameObject.resourceRequirements as IndecisionResources)); if (m_currentlySelectedTile != null){ updateInfoPanel(m_currentlySelectedTile.gameObject); }; this.dispatchEvent(new GameObjectEvent(GameObjectEvent.CONSTRUCTED, _arg1, _arg2.column, _arg2.row)); }; return (_local4); } public function customActionEnable(_arg1:GameAction, _arg2:GameObject):void{ m_actionIsEnabledHack[(_arg2.name + _arg1.description)] = true; } private function initBuildPanel():void{ var _local5:IndecisionObject; var _local6:int; var _local7:Sprite; var _local8:DisplayObject; var _local9:TextField; var _local10:Bitmap; var _local11:int; var _local12:Sprite; var _local13:int; var _local1:Sprite = new Sprite(); _local1.addChild(new UITabBars()); _local1.x = (1 + ((m_buildingPanel.width - _local1.width) / 2)); _local1.y = 2; m_buildingPanel.addChild(_local1); var _local2:Array = [IndecisionObject.CATEGORY_WORKERS, IndecisionObject.CATEGORY_PRODUCTION, IndecisionObject.CATEGORY_SERVICES, IndecisionObject.CATEGORY_GLOBAL, IndecisionObject.CATEGORY_GOVERNMENT, IndecisionObject.CATEGORY_LUXURY]; m_buildingPanelTabs = new Array(); var _local3:int; while (_local3 < _local2.length) { _local7 = new Sprite(); _local7.mouseChildren = false; _local7.mouseEnabled = true; _local7.buttonMode = true; _local7.useHandCursor = true; _local7.addEventListener(MouseEvent.CLICK, buildPanelTabClickHandler, false, 0, true); _local8 = new UITabMask(); _local8.y = 2; _local7.addChild(_local8); _local9 = SerpentineMedium.createTextField(_local2[_local3]); _local9.x = ((_local7.width - _local9.width) / 2); _local7.addChildAt(_local9, 0); m_buildingPanelTabs.push(_local7); _local3++; }; m_buildingPanelPages = new Array(m_buildingPanelTabs.length); var _local4:int; while (_local4 < m_buildingPanelTabs.length) { m_buildingPanelTabs[_local4].x = (m_buildingPanelTabs[_local4].width * _local4); m_buildingPanel.addChild(m_buildingPanelTabs[_local4]); m_buildingPanelPages[_local4] = new Sprite(); m_buildingPanelPages[_local4].visible = false; m_buildingPanelPages[_local4].x = 4; m_buildingPanelPages[_local4].y = 21; m_buildingPanel.addChild(m_buildingPanelPages[_local4]); _local4++; }; changeSelectedBuildPage(0); for each (_local5 in m_availableBuildings) { if (_local5.isConstructable){ _local10 = _local5.tileClone; _local11 = ((_local5.tileRowCount * 20) + (_local5.tileColumnCount * 10)); scaleIsoGraphicToWidth(_local10, _local11); _local12 = new Sprite(); _local12.scrollRect = new Rectangle(0, 0, _local10.width, 50); _local12.graphics.beginFill(0xFF00FF, 0); _local12.graphics.drawRect(0, 0, _local10.width, 50); _local12.graphics.endFill(); _local12.buttonMode = true; _local12.mouseChildren = false; _local12.addEventListener(MouseEvent.CLICK, Delegate.create(m_buildingPanel, constructBuildingClickHandler, _local5)); _local12.addEventListener(MouseEvent.MOUSE_OVER, Delegate.create(m_buildingPanel, highlightBuildingToConstruct, _local5)); _local12.addEventListener(MouseEvent.MOUSE_OUT, Delegate.create(m_buildingPanel, unhighlightBuildingToConstruct, _local5)); _local10.y = (_local12.height - _local10.height); _local12.addChild(_local10); _local13 = 0; switch (_local5.category){ case IndecisionObject.CATEGORY_PRODUCTION: _local13 = 1; break; case IndecisionObject.CATEGORY_SERVICES: _local13 = 2; break; case IndecisionObject.CATEGORY_GLOBAL: _local13 = 3; break; case IndecisionObject.CATEGORY_GOVERNMENT: _local13 = 4; break; case IndecisionObject.CATEGORY_LUXURY: _local13 = 5; break; }; if (m_buildingPanelPages[_local13].numChildren < 2){ _local12.x = (m_buildingPanelPages[_local13].width + (m_buildingPanelPages[_local13].numChildren * 4)); } else { _local12.x = (m_buildingPanelPages[_local13].width + 4); }; m_buildingPanelPages[_local13].addChild(_local12); }; if (_local5.tileAnimation != null){ m_gameEngine.addEffectListener(("animate" + _local5.name), Delegate.create(m_buildingPanel, incrementBlittedAnimationFrame, _local5.tileAnimation), 200); }; }; _local6 = 0; while (_local6 < m_buildingPanelTabs.length) { m_buildingPanelTabs[_local6].getChildAt(0).visible = !((m_buildingPanelPages[_local6].numChildren == 0)); m_buildingPanelTabs[_local6].mouseEnabled = !((m_buildingPanelPages[_local6].numChildren == 0)); _local6++; }; } private function repairBuilding():void{ var tile:GameTile; tile = m_damagedBuildingsHack.pop(); if (tile != null){ tile.hitpoints = 100; tile.bitmapPiecesRef.forEach(function (_arg1:Bitmap, _arg2:int, _arg3:Array):void{ _arg1.transform.colorTransform = tile.bitmapRef.transform.colorTransform; }); updateStatus((("Thanks to your excellent work, " + tile.gameObject.toStringSingular()) + " has been repaired.")); }; } private function initResourcePanel():void{ var _local13:int; var _local14:DisplayObject; var _local15:Tooltip; var _local16:TextField; var _local17:UILabel; var _local1:MovieClip = (new UIResourceIconFace() as MovieClip); _local1.gotoAndStop(1); var _local2:MovieClip = (new UIResourceIconGlobe() as MovieClip); _local2.gotoAndStop(1); var _local3:Sprite = new Sprite(); _local3.addChild(new UIResourceIconOil()); var _local4:Sprite = new Sprite(); _local4.addChild(new UIResourceIconMetal()); var _local5:Sprite = new Sprite(); _local5.addChild(new UIResourceIconCar()); var _local6:Sprite = new Sprite(); _local6.addChild(new UIResourceIconSuv()); var _local7:Sprite = new Sprite(); _local7.addChild(new UIResourceIconHybrid()); var _local8:Sprite = new Sprite(); _local8.addChild(new UIResourceIconDebt()); var _local9:Sprite = new Sprite(); _local9.addChild(new UIResourceIconMoney()); var _local10:Array = [[_local3, "oil", 3, "oil", "This is the amount of Oil you have collected"], [_local4, "metal", 61, "metal", "This is the amount of Metal you have collected"], [_local5, "carsBasic", 118, "cars", "This is the amount of Cars you have built"], [_local6, "carsSuv", 165, "", "This is the amount of SUVs you have built"], [_local7, "carsHybrid", 210, "", "This is the amount of Hybrids you have built"], [_local1, "workers", 260, "workers", "This states how many workers are unemployed out of the total workforce\nThe icon shows how the workers feel about your rule"], [_local2, "global", 334, "global", "This icon shows how the global nations feel about your nation"], [_local8, "debt", 393, "debt", "This is the amount of Money you owe"], [_local9, "money", 475, "money", "This is the amount of Money you have collected"]]; var _local11:int; while (_local11 < _local10.length) { _local13 = -1; _local13 = m_visibleResources[_local10[_local11][1]]; _local14 = _local10[_local11][0]; _local14.visible = (_local13 > 0); _local14.x = _local10[_local11][2]; _local14.y = 7; _local14.name = (_local10[_local11][1] + "Icon"); m_resourcesPanel.addChild(_local14); _local15 = new Tooltip(_local10[_local11][4]); _local15.listenForMouseEvents(_local14, true); _local16 = SerpentineMedium.createTextField((_local10[_local11][3] as String).toUpperCase()); _local16.x = (_local14.x - 2); _local16.y = 28; if (_local16.text != ""){ m_resourcesPanel.addChild(_local16); }; _local17 = new UILabel(8); _local17.x = (_local14.x + _local14.width); _local17.y = 10; _local17.name = _local10[_local11][1]; m_resourcesPanel.addChild(_local17); if (_local16.text == "GLOBAL"){ _local16.setTextFormat(new TextFormat(null, 11)); _local16.x = (_local16.x + 1); _local16.y = (_local16.y + 1); m_resourcesPanel.removeChild(_local17); _local14.x = (_local14.x + 14); }; _local14.visible = (_local13 > 0); _local16.visible = (_local13 > 0); _local17.visible = (_local13 > 0); _local11++; }; var _local12:DisplayObject = new UIHelpButton(); _local12.x = (m_resourcesPanel.width - 130); _local12.y = ((m_resourcesPanel.height - (_local12.height / 2)) - 3); _local12.addEventListener(MouseEvent.CLICK, showInstructionsPopup, false, 0, true); _local12.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); _local12.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); m_resourcesPanel.addChild(_local12); m_pauseButton = new UIPauseButton(); m_pauseButton.x = (m_resourcesPanel.width - 102); m_pauseButton.y = ((m_resourcesPanel.height - (m_pauseButton.height / 2)) - 3); m_pauseButton.addEventListener(MouseEvent.CLICK, pauseGameClickHandler, false, 0, true); m_pauseButton.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); m_pauseButton.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); m_resourcesPanel.addChild(m_pauseButton); m_volumeButton = new VolumeButton(); m_volumeButton.x = (m_resourcesPanel.width - 70); m_volumeButton.y = ((m_resourcesPanel.height - (m_volumeButton.height / 2)) - 3); m_volumeButton.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); m_volumeButton.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); m_resourcesPanel.addChild(m_volumeButton); m_quitButton = new UIQuitButton(); m_quitButton.x = ((m_resourcesPanel.width - m_quitButton.width) - 5); m_quitButton.y = ((m_resourcesPanel.height - (m_quitButton.height / 2)) - 4); m_quitButton.addEventListener(MouseEvent.CLICK, quitGameClickHandler, false, 0, true); m_quitButton.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); m_quitButton.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); m_resourcesPanel.addChild(m_quitButton); m_goalButton = new UIGoalButton(); m_goalButton.x = ((_local12.x - m_goalButton.width) - 5); m_goalButton.y = ((m_resourcesPanel.height - (m_quitButton.height / 2)) - 3); m_goalButton.addEventListener(MouseEvent.CLICK, showMissionPopup, false, 0, true); m_goalButton.addEventListener(MouseEvent.CLICK, Main.playMouseClickSound); m_goalButton.addEventListener(MouseEvent.MOUSE_OVER, Main.playMouseOverSound); m_resourcesPanel.addChild(m_goalButton); } private function completeImportChange(_arg1:Object, _arg2:Number):void{ m_importModifier = (m_importModifier + _arg2); } private function upgradeBuildingAtPosition(_arg1:GameObject, _arg2:SKTilePosition, _arg3:Boolean=false):GameTile{ var _local4:GameTile = (m_mainLayer.getTile(_arg2.column, _arg2.row) as GameTile); var _local5:IndecisionResources = new IndecisionResources(); if (_local4 != null){ removeConstructedBuildingCount(_local4.gameObject); _local5.workers = (_local4.gameObject.resourceRequirements as IndecisionResources).workers; m_gameEngine.resources.increaseBy(_local5); }; var _local6:GameTile = constructBuildingWithoutAnimation(_arg1, _arg2, _arg3); if (_local4 != null){ addConstructedBuildingCount(_local4.gameObject); m_gameEngine.resources.reduceBy(_local5); }; return (_local6); } public function createBalloon(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false):HelpBalloonThing{ var _local5:HelpBalloonThing = new HelpBalloonThing(_arg1, _arg4); _local5.x = _arg2; _local5.y = _arg3; this.addChild(_local5); return (_local5); } private function checkWinConditions(_arg1:TickEvent=null):void{ var _local4:Boolean; var _local5:WinConditionAbstract; var _local6:WinConditionResources; var _local7:WinConditionObjects; var _local8:WinConditionActions; var _local9:Boolean; var _local10:Boolean; var _local2:Boolean; var _local3:int; while (_local3 < m_gameEngine.winConditions.length) { _local4 = false; _local5 = m_gameEngine.winConditions[_local3]; _local6 = (_local5 as WinConditionResources); _local7 = (_local5 as WinConditionObjects); _local8 = (_local5 as WinConditionActions); if ((_local5 is WinConditionResources)){ _local9 = false; _local10 = (_local6.resources.toString(false) == ""); if (((((_local10) && (m_hasDebtRequirement))) && (((m_gameEngine.resources as IndecisionResources).debt >= (_local6.resources as IndecisionResources).debt)))){ _local9 = true; }; if (((((_local6.resources as IndecisionResources).happiness <= 0)) && (((_local6.resources as IndecisionResources).global <= 0)))){ m_missionOverlay.changeGoalDescription(_local3, ((_local6.prefaceString + " ") + _local6.resources.toStringCompare(m_gameEngine.resources, false, "V R", ", ", false, ((_local10) && (m_hasDebtRequirement))))); }; _local5.achieved = ((((!(_local10)) && (m_gameEngine.resources.meetsOrExceeds(_local6.resources)))) || (((_local10) && (_local9)))); } else { if ((_local5 is WinConditionObjects)){ _local5.achieved = haveObjectPrerequisites(_local7.objects); } else { if ((_local5 is WinConditionActions)){ _local5.achieved = performedRequiredActions(_local8.actions); m_missionOverlay.changeGoalDescription(_local3, getActionRequirementsString(_local8.actions, true)); }; }; }; _local2 = ((_local2) && (_local5.achieved)); m_missionOverlay.changeGoalCompletion(_local3, _local5.achieved); _local3++; }; if ((((m_missionNumber == 14)) && (m_ufoShotDownByMilitary))){ _local2 = ((_local2) && (true)); m_missionOverlay.changeGoalCompletion(_local3, true); }; if (_local2){ m_gameEngine.removeListener("checkWinConditions"); m_gameEngine.addGameListener("winGameIn2Seconds", winGameIn2Seconds, 2000, 1); }; } private function addConstructedBuildingCount(_arg1:GameObject):void{ var _local2:Class = Reflection.getClassOfInstance(_arg1); if (m_constructedBuildings[_local2] == null){ m_constructedBuildings[_local2] = 0; }; var _local3 = m_constructedBuildings; var _local4 = _local2; var _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; m_scoreBuildingsConstructedCount++; } private function updateResourcesPanelDisplay(_arg1=null):void{ var _local6:UILabel; var _local2:IndecisionResources = (m_gameEngine.resources as IndecisionResources); var _local3:int; while (_local3 < m_resourcesPanel.numChildren) { _local6 = (m_resourcesPanel.getChildAt(_local3) as UILabel); if (((!((_local6 == null))) && (!((_local6.name == null))))){ _local6.text = _local2[_local6.name].toString(); if ((((_local6.name == "money")) || ((_local6.name == "debt")))){ _local6.text = ("$" + _local6.text); } else { if (_local6.name == "workers"){ _local6.text = ((_local2.workers + "/") + _local2.totalWorkers); }; }; }; _local3++; }; var _local4:MovieClip = (m_resourcesPanel.getChildByName("workersIcon") as MovieClip); _local4.gotoAndStop(getFrameFromHappinessValue(_local2.happiness)); var _local5:MovieClip = (m_resourcesPanel.getChildByName("globalIcon") as MovieClip); _local5.gotoAndStop(getFrameFromHappinessValue(_local2.global)); } private function canBuildAtCoordinate(_arg1:int, _arg2:int, _arg3:GameObject):Boolean{ var _local8:int; var _local9:int; var _local10:int; var _local11:SKTile; var _local4:SKTilePosition = m_mainLayer.getPositionFromCoordinates(_arg1, _arg2); var _local5:int = _arg3.tileColumnCount; var _local6:int = _arg3.tileRowCount; var _local7:int; while (_local7 < _local5) { _local8 = 0; while (_local8 < _local6) { _local9 = (_local4.column + _local7); _local10 = (_local4.row + _local8); if ((((_local9 >= NUM_COLS)) || ((_local10 >= NUM_ROWS)))){ return (false); }; _local11 = m_mainLayer.getTile(_local9, _local10); if (((((((!((_local11 == null))) && (!((_local11 is GameTile))))) || ((((_local11 == null)) && (_arg3.hasTileRequirement))))) || (((!((_local11 == null))) && (!(_arg3.requires((_local11 as GameTile).gameObject))))))){ return (false); }; _local8++; }; _local7++; }; return (true); } private function constructBuilding(_arg1:GameObject, _arg2:SKTilePosition):void{ var old:GameTile; var fadeTile:SKTile; var animation:Bitmap; var bitmap:Bitmap; var height:int; var a_object = _arg1; var a_pos = _arg2; if (meetRequirementsToBuild(a_object)){ unhighlightSelectedTile(); m_gameEngine.resources.reduceBy(a_object.resourceRequirements); old = (m_mainLayer.getTile(a_pos.column, a_pos.row) as GameTile); if (((!((old == null))) && (!(old.gameObject.isRawMaterial)))){ m_gameEngine.removeListener((old.tileKey + "ActionDisableTick")); m_gameEngine.removeListener((old.tileKey + "ActionDisableFinish")); removeConstructedBuildingCount(old.gameObject); }; m_mainLayer.removeTileByCoordinateSafe(a_pos.column, a_pos.row); addConstructedBuildingCount(a_object); fadeTile = new SKTile(a_object.tileClone, a_object.tileColumnCount, a_object.tileRowCount, m_mainLayer); fadeTile.bitmapPiecesRef.forEach(function (_arg1:Bitmap, _arg2:int, _arg3:Array):void{ _arg1.transform.colorTransform = new ColorTransform(1, 1, 1, 0.4); }); m_mainLayer.addTile(fadeTile, a_pos.column, a_pos.row); animation = a_object.tileClone; bitmap = fadeTile.bitmapPiecesRef[0]; animation.transform = bitmap.transform; animation.x = (animation.x - ((ISO_WIDTH / 2) * (a_object.tileRowCount - 1))); animation.alpha = 1; height = animation.height; animation.y = (animation.y + height); animation.scrollRect = new Rectangle(0, height, animation.width, height); bitmap.parent.addChild(animation); m_gameEngine.addEffectListener(("animate construction " + a_pos.key), Delegate.create(this, buildBuilding, animation), (5000 / height), height); m_gameEngine.addGameListener(("construct building " + a_pos.key), Delegate.create(this, constructBuildingWithoutAnimationDelegate, a_object, a_pos), 5000, 1); }; } private function doStockMarketInvestment(_arg1:Object, _arg2:Number):void{ var _local3:IndecisionResources = new IndecisionResources(); if (_arg2 > 0){ _local3.money = (_local3.money + _arg2); updateStatus(("Your stock market investment paid off to the tune of $" + _arg2)); } else { _local3.debt = (_local3.debt + _arg2); updateStatus(("Your stock market investment flopped, you owe $" + _arg2)); }; m_gameEngine.resources.increaseBy(_local3); } private function buildingPanelClick(_arg1:MouseEvent):void{ leaveConstructionMode(); } private function scaleIsoGraphicToWidth(_arg1:Bitmap, _arg2:int):void{ if (_arg1.width <= _arg2){ return; }; var _local3:Number = (_arg2 / _arg1.width); _arg1.smoothing = true; _arg1.scaleX = _local3; _arg1.scaleY = _local3; } private function buildPanelTabClickHandler(_arg1:MouseEvent):void{ if (m_pauseOverlay.visible){ return; }; changeSelectedBuildPage((_arg1.target.x / _arg1.target.width)); } private function unhighlightSelectedTile():void{ if (m_currentlySelectedTile != null){ changeAutomataHighlighting(m_currentlySelectedTile, false); m_currentlySelectedTile.bitmapPiecesRef.forEach(function (_arg1:Bitmap, _arg2:int, _arg3:Array):void{ _arg1.transform.colorTransform = ((m_currentlySelectedTile.hitpoints < 100)) ? DAMAGED_BUILDING : m_currentlySelectedTile.bitmapRef.transform.colorTransform; }); m_currentlySelectedTile = null; m_workerCountForCurrentlySelectedTile = NaN; updateInfoPanel(null); }; } private function pauseGameClickHandler(_arg1:MouseEvent):void{ pause(); } private function changeAutomataHighlighting(_arg1:GameTile, _arg2:Boolean):void{ var i:int; var a:Automata; var j:int; var t:SKTile; var a_tile = _arg1; var a_on = _arg2; if (((((!((a_tile.gameObject.resourceRequirements == null))) && (((a_tile.gameObject.resourceRequirements as IndecisionResources).workers > 0)))) || (((!((a_tile.gameObject.producesOnBuild == null))) && (((a_tile.gameObject.producesOnBuild as IndecisionResources).totalWorkers > 0)))))){ i = 0; while (i < m_activeAutomata.length) { a = m_activeAutomata[i]; j = 0; while (j < a.tileDestinations.length) { t = a.tileDestinations[j]; if (t == a_tile){ if (a_on){ a.bitmapPiecesRef.forEach(function (_arg1:Bitmap, ... _args):void{ _arg1.filters = SELECTED_AUTOMATA_FILTERS; }); } else { a.bitmapPiecesRef.forEach(function (_arg1:Bitmap, ... _args):void{ _arg1.filters = []; }); }; }; j = (j + 1); }; i = (i + 1); }; }; } private function actionFiredHandler(_arg1:GameActionEvent):void{ var _local2:Class = Reflection.getClassOfInstance(_arg1.action); if (((!((_local2 in m_actionsPerformed))) || ((m_actionsPerformed[_local2] == null)))){ m_actionsPerformed[_local2] = 0; }; var _local3 = m_actionsPerformed; var _local4 = _local2; var _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; trace(_arg1.action, m_actionsPerformed[_local2], (("\"" + _arg1.action.description) + "\"")); } private function showResultsOverlay(_arg1=null):void{ var _local2:ResultsOverlay = new ResultsOverlay(true, quitGame); _local2.addRow("Completed Bonus = ", StringUtils.convertToCurrency(m_scoreCompletionBonus)); var _local3:int = (((m_scoreBuildingsConstructedCount * SCORE_PER_BUILD_ACTION) + (m_scoreBuildingUpgradesCount * SCORE_PER_UPGRADE)) + (m_scoreWorkersEmployedCount * SCORE_PER_WORKER)); _local2.addRow("Actions Bonus = ", StringUtils.convertToCurrency(_local3)); var _local4:int = (_local3 + m_scoreCompletionBonus); _local2.addRow("Mission Score = ", StringUtils.convertToCurrency(_local4)); _local2.addRow("", ""); _local2.addRow("Previous Score = ", StringUtils.convertToCurrency(accumulatedScore)); accumulatedScore = (accumulatedScore + _local4); _local2.addRow("<b><font color='#00FF00'>Total Score = </font></b>", (("<b><font color='#00FF00'>" + StringUtils.convertToCurrency(accumulatedScore)) + "</font></b>")); addChild(_local2); this.parent.addChild(_local2); } private function pushAllBuildings():void{ m_availableBuildings.push(new Apartment()); m_availableBuildings.push(new Bank()); m_availableBuildings.push(new Capitol()); m_availableBuildings.push(new CarCorporation()); m_availableBuildings.push(new CarDealership()); m_availableBuildings.push(new CarFactory()); m_availableBuildings.push(new CondoHighrise()); m_availableBuildings.push(new Condos()); m_availableBuildings.push(new FederalReserve()); m_availableBuildings.push(new FemaBuilding()); m_availableBuildings.push(new GasStation()); m_availableBuildings.push(new GovernmentHealthcare()); m_availableBuildings.push(new Hospital()); m_availableBuildings.push(new House()); m_availableBuildings.push(new HybridFactory()); m_availableBuildings.push(new Mall()); m_availableBuildings.push(new MilitaryBase()); m_availableBuildings.push(new MiningFacility()); m_availableBuildings.push(new MiningFacilityLevel2()); m_availableBuildings.push(new MiningFacilityLevel3()); m_availableBuildings.push(new MovieTheater()); m_availableBuildings.push(new NuclearPlant()); m_availableBuildings.push(new OilRefinery()); m_availableBuildings.push(new OilRefineryLevel2()); m_availableBuildings.push(new OilRefineryLevel3()); m_availableBuildings.push(new OutsourceCars()); m_availableBuildings.push(new OutsourcingLarge()); m_availableBuildings.push(new Park()); m_availableBuildings.push(new PortExport()); m_availableBuildings.push(new PortImport()); m_availableBuildings.push(new ResearchFacility()); m_availableBuildings.push(new Stadium()); m_availableBuildings.push(new StockMarket()); m_availableBuildings.push(new SuvFactory()); m_availableBuildings.push(new UnitedNations()); m_availableBuildings.push(new WaterTreatment()); m_availableBuildings.push(new WhiteHouse()); m_availableBuildings.push(new WhiteHouseEconomist()); m_availableBuildings.push(new WhiteHouseGlobalist()); m_availableBuildings.push(new WhiteHouseLaborer()); } private function buildingConstructedEventHandler(_arg1:GameObjectEvent):void{ if (Reflection.classDerivesFromClass(Reflection.getClassOfInstance(_arg1.gameObject), WhiteHouse)){ updateStatus("A new President has been elected!"); } else { updateStatus((_arg1.gameObject.name + " constructed!")); }; } private function buildingActionClickHandler(_arg1:MouseEvent, _arg2:GameAction, _arg3:GameObject):void{ var _local6:IndecisionResources; var _local7:int; var _local8:GameObject; var _local9:GameTile; var _local10:int; var _local11:int; var _local12:int; var _local13:Number; var _local14:GameObject; var _local15:GameObject; var _local16:Array; var _local17:GameTile; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:String; var _local24:String; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:IndecisionResources; var _local30:Number; var _local31:String; var _local32:Number; var _local33:String; var _local34:Number; var _local35:String; var _local36:Number; var _local37:String; var _local38:String; var _local39:Number; var _local40:String; var _local41:Number; var _local42:String; var _local43:Number; var _local44:Number; var _local45:Number; var _local46:Number; var _local47:Number; if ((((m_currentlySelectedTile == null)) || (!((m_currentlySelectedTile.gameObject == _arg3))))){ trace("Tried to perform action on unselected Tile"); return; }; var _local4:Boolean; var _local5:Boolean = ((_arg2.resources == null)) ? true : m_gameEngine.resources.meetsOrExceeds(_arg2.resources, true, ["happiness", "global", "debt"]); if (_local5){ m_gameEngine.resources.increaseBy(_arg2.resources); } else { updateStatus(((("Not enough resources to " + _arg2.description) + "\nShort by ") + m_gameEngine.resources.getAmountShortBy(_arg2.resources, true, ["happiness", "global", "debt"]).toString(false, "V R", ", "))); return; }; if ((_arg2 is UpgradeAction)){ _local4 = false; if (m_currentlySelectedTile.gameObject.isUpgradable){ for each (_local8 in m_availableBuildings) { if ((_local8 is (_arg2 as UpgradeAction).upgradesTo)){ m_scoreBuildingUpgradesCount++; _local9 = upgradeBuildingAtPosition(_local8, new SKTilePosition(m_currentlySelectedTile.column, m_currentlySelectedTile.row)); if (_local9 != null){ unhighlightSelectedTile(); m_currentlySelectedTile = _local9; m_workerCountForCurrentlySelectedTile = NaN; _local4 = true; }; break; }; }; }; } else { if ((((((((((((((((((_arg2 is ImportCarAction)) || ((_arg2 is ImportHybridAction)))) || ((_arg2 is ImportSuvAction)))) || ((_arg2 is SellCarAction)))) || ((_arg2 is SellHybridAction)))) || ((_arg2 is SellSuvAction)))) || ((_arg2 is SellCarBulkAction)))) || ((_arg2 is SellHybridBulkAction)))) || ((_arg2 is SellSuvBulkAction)))){ _local10 = Math.abs((((_arg2.resources as IndecisionResources).carsBasic + (_arg2.resources as IndecisionResources).carsHybrid) + (_arg2.resources as IndecisionResources).carsSuv)); _local10 = Math.max(_local10, 1); while (_local10 > 0) { _local10--; if (/Hybrid/i.test(_arg2.description)){ changeAutomataType(PersonAutomataType, HybridAutomataType); } else { if (/SUV/i.test(_arg2.description)){ changeAutomataType(PersonAutomataType, SuvAutomataType); } else { changeAutomataType(PersonAutomataType, CarAutomataType); }; }; }; _local11 = (_arg2.resources as IndecisionResources).money; if (m_carSalesModifier != 0){ _local12 = (_local11 * m_carSalesModifier); _local6 = new IndecisionResources(); new IndecisionResources().money = (_local6.money + _local12); m_gameEngine.resources.increaseBy(_local6); }; if (((!((m_hybridCarSalesModifier == 0))) && (/Hybrid/i.test(_arg2.description)))){ _local12 = (_local11 * m_hybridCarSalesModifier); _local6 = new IndecisionResources(); new IndecisionResources().money = (_local6.money + _local12); m_gameEngine.resources.increaseBy(_local6); }; } else { if ((_arg3 is BorderGate)){ customActionEnable(_arg3.actions[0], _arg3); customActionEnable(_arg3.actions[1], _arg3); customActionDisable(_arg2, _arg3); if ((_arg2 is OpenBorderAction)){ adjustAutomataNumbersForNewConstruction(m_borderGameTile, (_arg2.resources as IndecisionResources), null); } else { removeAutomataForTile(m_borderGameTile); }; fixAutomataNeeds(); _arg3.tileAnimation.incrementFrame(); } else { if ((_arg2 is RepairDamagedBuildingAction)){ if (m_damagedBuildingsHack.length > 0){ repairBuilding(); } else { updateStatus("No buildings are damaged. Repair not needed."); _local4 = false; }; } else { if ((((_arg2 is ForeignRetreatAction)) || ((_arg2 is ForeignWarAction)))){ _local13 = -0.1; if ((_arg2 is ForeignWarAction)){ _local13 = 0.1; }; m_carSalesModifier = (m_carSalesModifier + _local13); m_gameEngine.addGameListener(("end war" + Math.random()), Delegate.create(this, completeWarAction, (-1 * _local13)), (60 * 1000), 1); } else { if ((_arg2 is ImpeachPresidentAction)){ _local14 = null; for each (_local15 in m_availableBuildings) { if ((((_local15 is WhiteHouse)) && (!(Reflection.classDerivesFromClass(Reflection.getClassOfInstance(_local15), WhiteHouse))))){ _local14 = _local15; break; }; }; trace(_local14); _local16 = m_mainLayer.allTiles; _local4 = false; for each (_local17 in _local16) { if ((_local17.gameObject is WhiteHouse)){ upgradeBuildingAtPosition(_local14, new SKTilePosition(_local17.column, _local17.row), true); _local4 = true; updateStatus("The President has been impeached, convicted, and removed from office!"); break; }; }; } else { if ((((_arg2 is InvestIPOAction)) || ((_arg2 is InvestBlueChipAction)))){ _local18 = ((_arg2 is InvestIPOAction)) ? 0.05 : 0.25; _local19 = ((_arg2 is InvestIPOAction)) ? 600 : 300; _local18 = (_local18 + (m_stockMarketModifier * _local18)); updateStatus((((("$" + _local19) + " invested with a ") + (_local18 * 100)) + "% chance of return")); _local20 = Math.random(); if (_local18 < _local20){ _local19 = (_local19 * -1); }; trace(_local20, _local18, _local19); m_gameEngine.addGameListener(("investment " + Math.random()), Delegate.create(this, doStockMarketInvestment, _local19), _arg2.reloadTime, 1); } else { if ((((_arg2 is RaiseRatesAction)) || ((_arg2 is LowerRatesAction)))){ _local21 = -0.15; _local22 = -0.04; if ((_arg2 is RaiseRatesAction)){ _local21 = 0.3; _local22 = 0.25; }; m_stockMarketModifier = (m_stockMarketModifier + _local22); m_interestRateModifier = (m_interestRateModifier + _local21); _local23 = ((((m_stockMarketModifier > 0)) ? "+" : "" + Math.round((m_stockMarketModifier * 100))) + "%"); _local24 = ((((m_interestRateModifier > 0)) ? "+" : "" + Math.round((m_interestRateModifier * 100))) + "%"); updateStatus((((("Stock Market Changed By " + _local23) + "\n") + "Interest Rate Changed By ") + _local24)); } else { if ((_arg2 is TakeOutLoanAction)){ _local6 = new IndecisionResources(); _local25 = 500; _local26 = 0.2; _local27 = (0.2 + (_local26 * m_interestRateModifier)); _local28 = ((-1 * _local25) - (_local25 * _local27)); _local6.money = (_local6.money + _local25); _local6.debt = (_local6.debt + _local28); m_gameEngine.resources.increaseBy(_local6); } else { if ((((((_arg2 is PayDebtAction)) || ((_arg2 is PayDebtMoreAction)))) || ((_arg2 is StockMarketPayDebt)))){ m_gameEngine.resources.reduceBy(_arg2.resources); if ((m_gameEngine.resources as IndecisionResources).debt >= 0){ updateStatus("You have no debt to pay off, congratulations!"); _local4 = false; } else { _local29 = (_arg2.resources.clone() as IndecisionResources); if (_local29.debt > -((m_gameEngine.resources as IndecisionResources).debt)){ _local29.debt = -((m_gameEngine.resources as IndecisionResources).debt); }; _local29.money = -(_local29.debt); trace(_local29.toString(false)); m_gameEngine.resources.increaseBy(_local29); }; } else { if ((_arg2 is EmissionsTreatyAction)){ _local30 = 0.1; m_hybridCarSalesModifier = (m_hybridCarSalesModifier + _local30); _local31 = ((((m_hybridCarSalesModifier > 0)) ? "+" : "" + Math.round((m_hybridCarSalesModifier * 100))) + "%"); updateStatus(("Hybrid Car sales changed by " + _local31)); } else { if ((_arg2 is FreeTradeAction)){ _local32 = 0.1; m_freeTradeModifier = (m_freeTradeModifier + _local32); _local33 = ((((m_freeTradeModifier > 0)) ? "+" : "" + Math.round((m_freeTradeModifier * 100))) + "%"); updateStatus(("Imports and exports are changed by " + _local33)); } else { if ((_arg2 is GlobalistPositiveAction)){ _local34 = 0.25; m_exportModifier = (m_exportModifier + _local34); _local35 = ((((m_exportModifier > 0)) ? "+" : "" + Math.round((m_exportModifier * 100))) + "%"); updateStatus(("Exports are changed by " + _local35)); } else { if ((_arg2 is GlobalistNegativeAction)){ _local36 = 0.25; m_importModifier = (m_importModifier + _local36); _local37 = ((((m_importModifier > 0)) ? "+" : "" + Math.round((m_importModifier * 100))) + "%"); updateStatus(("Imports are changed by " + _local37)); } else { if ((_arg2 is GlobalistNeutralAction)){ _local34 = 0.1; m_exportModifier = (m_exportModifier + _local34); _local38 = ((((m_exportModifier > 0)) ? "+" : "" + Math.round((m_exportModifier * 100))) + "%"); updateStatus(("Exports are changed by " + _local38)); } else { if ((_arg2 is UnlockOilRefinery3Action)){ m_unlockedOilRefinery3 = true; updateActionsPanel(); } else { if ((_arg2 is UnlockMining2Action)){ m_unlockedMining2 = true; updateActionsPanel(); } else { if ((_arg2 is UnlockMining3Action)){ m_unlockedMining3 = true; updateActionsPanel(); } else { if ((_arg2 is UnlockSuvAction)){ m_unlockedSuvs = true; updateActionsPanel(); } else { if ((_arg2 is UnlockHybridAction)){ m_unlockedHybrids = true; updateActionsPanel(); } else { if ((_arg2 is PrepareProtectionAction)){ _local39 = 0.25; m_resistDamageModifier = (m_resistDamageModifier + _local39); _local40 = ((((m_resistDamageModifier > 0)) ? "+" : "" + Math.round((m_resistDamageModifier * 100))) + "%"); updateStatus(("Damage Resistance Boosted By " + _local40)); m_gameEngine.addGameListener(("end PrepareProtection" + Math.random()), Delegate.create(this, completeDamageResistance, (-1 * _local39)), (30 * 1000), 1); } else { if ((_arg2 is AssistProtectionAction)){ _local41 = 0.5; m_resistDamageModifier = (m_resistDamageModifier + _local41); _local42 = ((((m_resistDamageModifier > 0)) ? "+" : "" + Math.round((m_resistDamageModifier * 100))) + "%"); updateStatus(("Damage Resistance Boosted By " + _local42)); m_gameEngine.addGameListener(("end AssistProtectionAction" + Math.random()), Delegate.create(this, completeDamageResistance, (-1 * _local41)), (2 * 1000), 1); } else { if ((((_arg2 is EconomistNegativeAction)) || ((_arg2 is LowerTaxesAction)))){ _local43 = ((_arg2 is EconomistNegativeAction)) ? -0.25 : -0.1; if (m_moneyCollectedModifier <= -1){ m_moneyCollectedModifier = -1; _local4 = false; updateStatus("Taxes can't be lowered any more."); } else { m_moneyCollectedModifier = (m_moneyCollectedModifier + _local43); m_moneyCollectedModifier = Math.max(m_moneyCollectedModifier, -1); updateStatus((("Taxes decreased by " + Math.round((Math.abs(_local43) * 100))) + "%")); }; } else { if ((((((_arg2 is EconomistNeutralAction)) || ((_arg2 is RaiseTaxesAction)))) || ((_arg2 is EconomistPositiveAction)))){ _local44 = ((_arg2 is EconomistPositiveAction)) ? 0.25 : 0.1; m_moneyCollectedModifier = (m_moneyCollectedModifier + _local44); updateStatus((("Taxes increased by " + Math.round((_local44 * 100))) + "%")); } else { if ((((((_arg2 is LaborerNegativeAction)) || ((_arg2 is LaborerPositiveAction)))) || ((_arg2 is LaborerNeutralAction)))){ _local45 = ((_arg2 is LaborerPositiveAction)) ? 0.25 : ((_arg2 is LaborerNegativeAction)) ? -0.25 : 0.1; if ((((_local45 < 0)) && ((m_resourcesCollectedModifier <= 0)))){ m_resourcesCollectedModifier = 0; _local4 = false; updateStatus("Workers are collecting the base amount of resources and cannot collect less."); } else { m_resourcesCollectedModifier = (m_resourcesCollectedModifier + _local45); m_resourcesCollectedModifier = Math.max(m_resourcesCollectedModifier, 0); updateStatus(((((("Workers are now collecting " + Math.round((m_resourcesCollectedModifier * 100))) + "% more oil\n") + "Workers are now collecting ") + Math.round((m_resourcesCollectedModifier * 100))) + "% more metal")); }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; if ((((((((((((_arg2 is ImportCarAction)) || ((_arg2 is ImportHybridAction)))) || ((_arg2 is ImportSuvAction)))) || ((_arg2 is ExportCarAction)))) || ((_arg2 is ExportHybridAction)))) || ((_arg2 is ExportSuvAction)))){ if (m_freeTradeModifier != 0){ _local7 = (_arg2.resources as IndecisionResources).money; _local12 = (_local7 * m_freeTradeModifier); _local6 = new IndecisionResources(); new IndecisionResources().money = (_local6.money + _local12); m_gameEngine.resources.increaseBy(_local6); }; }; if ((((((_arg2 is ExportCarAction)) || ((_arg2 is ExportHybridAction)))) || ((_arg2 is ExportSuvAction)))){ if (m_exportModifier != 0){ _local7 = (_arg2.resources as IndecisionResources).money; _local12 = (_local7 * m_exportModifier); _local6 = new IndecisionResources(); new IndecisionResources().money = (_local6.money + _local12); m_gameEngine.resources.increaseBy(_local6); }; }; if ((((((_arg2 is ImportCarAction)) || ((_arg2 is ImportHybridAction)))) || ((_arg2 is ImportSuvAction)))){ if (m_importModifier != 0){ _local7 = (_arg2.resources as IndecisionResources).money; _local12 = (_local7 * m_importModifier); _local6 = new IndecisionResources(); new IndecisionResources().money = (_local6.money + _local12); m_gameEngine.resources.increaseBy(_local6); }; }; if (_local4){ m_currentlySelectedTile.actionsEnabled = false; m_reloadTimeForActionsHack[m_currentlySelectedTile.tileKey] = 0; _local46 = (_arg2.reloadTime / 100); _local47 = 0.01; if (_local46 < 100){ _local47 = (_local47 * (100 / _local46)); _local46 = 100; }; m_gameEngine.addEffectListener((m_currentlySelectedTile.tileKey + "ActionDisableTick"), Delegate.create(this, onActionTimerTick, m_currentlySelectedTile, _local47), _local46, 100); m_gameEngine.addGameListener((m_currentlySelectedTile.tileKey + "ActionDisableFinish"), Delegate.create(this, onActionTimerFinish, m_currentlySelectedTile), _arg2.reloadTime, 1); highlightSelectedTile(); dispatchEvent(new GameActionEvent(GameActionEvent.FIRED, _arg2)); }; } public function customActionDisable(_arg1:GameAction, _arg2:GameObject):void{ m_actionIsEnabledHack[(_arg2.name + _arg1.description)] = false; } public function constructBuildingClickHandler(_arg1:MouseEvent, _arg2:GameObject):void{ if (m_pauseOverlay.visible){ return; }; if (meetRequirementsToBuild(_arg2)){ enterConstructionMode(_arg2); _arg1.stopImmediatePropagation(); }; } private function changeSelectedBuildPage(_arg1:int):void{ var _local2:int; while (_local2 < m_buildingPanelTabs.length) { m_buildingPanelTabs[_local2].getChildAt(1).visible = !((_local2 == _arg1)); m_buildingPanelPages[_local2].visible = (_local2 == _arg1); _local2++; }; } private function ufoAttack(_arg1:TickEvent):void{ if (m_ufoAutomata != null){ trace("ufo attack already in progress"); return; }; var _local2:int = Math.floor((Math.random() * NUM_COLS)); var _local3:int = Math.floor((Math.random() * NUM_ROWS)); var _local4:GameTile = (m_mainLayer.getTile(_local2, _local3) as GameTile); if (m_ufo == null){ m_ufo = new Ufo(); }; if (((((!((_local4 == null))) && (!(_local4.gameObject.isRawMaterial)))) && (!((_local4.gameObject is FemaBuilding))))){ trace("UFO Incoming!"); updateStatus("Government radar has detected an incoming UFO"); m_ufoAutomata = new Automata(this, new UfoAutomataType(), _local4, null, m_scene.lookupLayer("sky")); m_ufoAutomata.px = -((Math.floor((Math.random() * 400)) + 200)); m_ufoAutomata.py = -((Math.floor((Math.random() * 400)) + 200)); m_ufoAutomata.resumeMovement(); m_ufoAutomata.waypointList.push(new Point(m_ufoAutomata.px, m_ufoAutomata.py)); m_gameEngine.addEffectListener("moveUfo", moveUfo, 30); } else { trace(("UFO cannot attack: " + _local4)); }; } } }//packageSection 582//Game_action_remove (Game_action_remove) package { import mx.core.*; public class Game_action_remove extends BitmapAsset { } }//packageSection 583//Game_BackgroundGraphic (Game_BackgroundGraphic) package { import mx.core.*; public class Game_BackgroundGraphic extends BitmapAsset { } }//packageSection 584//Game_FenceTile (Game_FenceTile) package { import mx.core.*; public class Game_FenceTile extends BitmapAsset { } }//packageSection 585//Game_gameloop (Game_gameloop) package { import mx.core.*; public class Game_gameloop extends SoundAsset { } }//packageSection 586//Game_GrassTile (Game_GrassTile) package { import mx.core.*; public class Game_GrassTile extends BitmapAsset { } }//packageSection 587//Game_HighlightedTile (Game_HighlightedTile) package { import mx.core.*; public class Game_HighlightedTile extends BitmapAsset { } }//packageSection 588//Game_HighlightedTileBack (Game_HighlightedTileBack) package { import mx.core.*; public class Game_HighlightedTileBack extends BitmapAsset { } }//packageSection 589//Game_HighlightedTileFront (Game_HighlightedTileFront) package { import mx.core.*; public class Game_HighlightedTileFront extends BitmapAsset { } }//packageSection 590//Game_IsoMask (Game_IsoMask) package { import mx.core.*; public class Game_IsoMask extends BitmapAsset { } }//packageSection 591//Game_UIActionsPanel (Game_UIActionsPanel) package { import mx.core.*; public class Game_UIActionsPanel extends BitmapAsset { } }//packageSection 592//Game_UIGameNavBottom (Game_UIGameNavBottom) package { import mx.core.*; public class Game_UIGameNavBottom extends BitmapAsset { } }//packageSection 593//Game_UIGoalButton (Game_UIGoalButton) package { import mx.core.*; public class Game_UIGoalButton extends ButtonAsset { } }//packageSection 594//Game_UIHelpButton (Game_UIHelpButton) package { import mx.core.*; public class Game_UIHelpButton extends ButtonAsset { } }//packageSection 595//Game_UIInfoPanel (Game_UIInfoPanel) package { import mx.core.*; public class Game_UIInfoPanel extends BitmapAsset { } }//packageSection 596//Game_UIPauseButton (Game_UIPauseButton) package { import mx.core.*; public class Game_UIPauseButton extends ButtonAsset { } }//packageSection 597//Game_UIQuitButton (Game_UIQuitButton) package { import mx.core.*; public class Game_UIQuitButton extends ButtonAsset { } }//packageSection 598//Game_UIResourceIconCar (Game_UIResourceIconCar) package { import mx.core.*; public class Game_UIResourceIconCar extends BitmapAsset { } }//packageSection 599//Game_UIResourceIconDebt (Game_UIResourceIconDebt) package { import mx.core.*; public class Game_UIResourceIconDebt extends BitmapAsset { } }//packageSection 600//Game_UIResourceIconFace (Game_UIResourceIconFace) package { import mx.core.*; public class Game_UIResourceIconFace extends MovieClipAsset { } }//packageSection 601//Game_UIResourceIconGlobe (Game_UIResourceIconGlobe) package { import mx.core.*; public class Game_UIResourceIconGlobe extends MovieClipAsset { } }//packageSection 602//Game_UIResourceIconHybrid (Game_UIResourceIconHybrid) package { import mx.core.*; public class Game_UIResourceIconHybrid extends BitmapAsset { } }//packageSection 603//Game_UIResourceIconMetal (Game_UIResourceIconMetal) package { import mx.core.*; public class Game_UIResourceIconMetal extends BitmapAsset { } }//packageSection 604//Game_UIResourceIconMoney (Game_UIResourceIconMoney) package { import mx.core.*; public class Game_UIResourceIconMoney extends BitmapAsset { } }//packageSection 605//Game_UIResourceIconOil (Game_UIResourceIconOil) package { import mx.core.*; public class Game_UIResourceIconOil extends BitmapAsset { } }//packageSection 606//Game_UIResourceIconSuv (Game_UIResourceIconSuv) package { import mx.core.*; public class Game_UIResourceIconSuv extends BitmapAsset { } }//packageSection 607//Game_UIResourcePanel (Game_UIResourcePanel) package { import mx.core.*; public class Game_UIResourcePanel extends BitmapAsset { } }//packageSection 608//Game_UITabBars (Game_UITabBars) package { import mx.core.*; public class Game_UITabBars extends BitmapAsset { } }//packageSection 609//Game_UITabMask (Game_UITabMask) package { import mx.core.*; public class Game_UITabMask extends BitmapAsset { } }//packageSection 610//IndecisionLoader (IndecisionLoader) package { import flash.events.*; import flash.display.*; import com.urbansquall.preloader.*; import com.urbansquall.utils.*; import flash.net.*; public class IndecisionLoader extends AbstractPreloader { private var m_title:DisplayObject; private var m_bg:DisplayObject; private var m_arrow:MovieClip; private var m_blinker:MovieClip; private static var miniloadingani:Class = IndecisionLoader_miniloadingani; private static var percentloader:Class = IndecisionLoader_percentloader; public static var cclogo:Sprite = null; private static var preloader_bg:Class = IndecisionLoader_preloader_bg; private static var preloader_title:Class = IndecisionLoader_preloader_title; override protected function endLoading():void{ if (cclogo != null){ this.removeChild(cclogo); cclogo = null; }; if (m_title != null){ this.removeChild(m_title); m_title = null; }; if (m_bg != null){ this.removeChild(m_bg); m_bg = null; }; if (m_arrow != null){ this.removeChild(m_arrow); m_arrow = null; }; if (m_blinker != null){ this.removeChild(m_blinker); m_blinker = null; }; } override protected function updateLoading(_arg1:Number):void{ if (m_arrow != null){ m_arrow.gotoAndStop(Math.round((_arg1 * 100))); }; } private function beginLoadingWithLogo():void{ this.addChild(cclogo); } public function onLogoLoadComplete(_arg1:Event, _arg2:Function):void{ cclogo = new Sprite(); cclogo.addChild(_arg1.currentTarget.content); cclogo.x = (stage.stageWidth - (cclogo.width / 2)); cclogo.y = (cclogo.height / 2); _arg2(); } public function handleSwfNotFound(_arg1:Event):void{ } public function loadCclogo(_arg1:Function):void{ var _local2:Loader = new Loader(); _local2.contentLoaderInfo.addEventListener(Event.COMPLETE, Delegate.create(this, onLogoLoadComplete, _arg1)); _local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.handleSwfNotFound); _local2.load(new URLRequest("CCLogo.swf")); } override protected function beginLoading():void{ m_title = new preloader_title(); m_title.x = ((stage.stageWidth - m_title.width) / 2); m_title.y = 50; this.addChild(m_title); m_bg = new preloader_bg(); m_bg.x = ((stage.stageWidth - m_bg.width) / 2); m_bg.y = ((m_title.y + m_title.height) + 70); this.addChild(m_bg); m_arrow = new percentloader(); m_arrow.x = ((stage.stageWidth / 2) - 7); m_arrow.y = ((m_bg.y + (m_bg.height / 2)) - 7); m_arrow.gotoAndStop(1); this.addChild(m_arrow); m_blinker = new miniloadingani(); m_blinker.x = ((m_bg.x + m_bg.width) - (m_blinker.width / 2)); m_blinker.y = ((m_bg.y + m_bg.height) - (m_blinker.height / 2)); this.addChild(m_blinker); loadCclogo(beginLoadingWithLogo); } } }//packageSection 611//IndecisionLoader_miniloadingani (IndecisionLoader_miniloadingani) package { import flash.display.*; import mx.core.*; public class IndecisionLoader_miniloadingani extends MovieClipAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//packageSection 612//IndecisionLoader_percentloader (IndecisionLoader_percentloader) package { import flash.display.*; import mx.core.*; public class IndecisionLoader_percentloader extends MovieClipAsset { public var dt_text:DisplayObject; public var dt_mission:DisplayObject; } }//packageSection 613//IndecisionLoader_preloader_bg (IndecisionLoader_preloader_bg) package { import mx.core.*; public class IndecisionLoader_preloader_bg extends BitmapAsset { } }//packageSection 614//IndecisionLoader_preloader_title (IndecisionLoader_preloader_title) package { import mx.core.*; public class IndecisionLoader_preloader_title extends BitmapAsset { } }//packageSection 615//IndecisionObject (IndecisionObject) package { import com.urbansquall.wrighton.*; import flash.media.*; public class IndecisionObject extends GameObject { protected var m_sfx:Sound; public static const CATEGORY_GLOBAL:String = "Global"; public static const CATEGORY_LUXURY:String = "Luxury"; public static const CATEGORY_GOVERNMENT:String = "Government"; public static const CATEGORY_PRODUCTION:String = "Production"; public static const CATEGORY_WORKERS:String = "Workers"; public static const CATEGORY_SERVICES:String = "Services"; public static var workerhouse:Class = IndecisionObject_workerhouse; public function IndecisionObject(){ m_category = CATEGORY_WORKERS; m_sfx = new workerhouse(); } public function get soundEffect():Sound{ return (m_sfx); } public static function compareObjectsByMoneyResourceRequirement(_arg1:Object, _arg2:Object):int{ var _local3:IndecisionResources; var _local4:IndecisionResources; if ((((_arg1 is GameObject)) && ((_arg2 is GameObject)))){ _local3 = ((_arg1 as GameObject).resourceRequirements as IndecisionResources); _local4 = ((_arg2 as GameObject).resourceRequirements as IndecisionResources); if (_local3.money > _local4.money){ return (-1); }; if (_local3.money < _local4.money){ return (1); }; }; return (0); } } }//packageSection 616//IndecisionObject_workerhouse (IndecisionObject_workerhouse) package { import mx.core.*; import flash.display.*; public class IndecisionObject_workerhouse extends SoundAsset { public var dt_text:DisplayObject; } }//packageSection 617//IndecisionResources (IndecisionResources) package { import com.urbansquall.wrighton.*; public class IndecisionResources extends GameResources { private var m_oil:int; private var m_carsHybrid:int; private var m_happiness:int; private var m_totalWorkers:int; private var m_debt:int; private var m_money:int; private var m_workers:int; private var m_metal:int; private var m_carsSuv:int; private var m_global:int; private var m_carsBasic:int; public static const MAX_WORKERS:int = 999; public static const MIN_HAPPINESS:int = -100; public static const MAX_HAPPINESS:int = 100; public function IndecisionResources(){ this.m_workers = 0; this.m_totalWorkers = 0; this.m_oil = 0; this.m_money = 0; this.m_metal = 0; this.m_carsBasic = 0; this.m_carsSuv = 0; this.m_carsHybrid = 0; this.m_happiness = 0; this.m_global = 0; this.m_debt = 0; } public function set carsSuv(_arg1:int):void{ m_carsSuv = _arg1; } public function get carsSuv():int{ return (m_carsSuv); } public function get global():int{ return (m_global); } public function set workers(_arg1:int):void{ this.m_workers = _arg1; } public function get metal():int{ return (m_metal); } public function get money():int{ return (this.m_money); } public function get totalWorkers():int{ return (m_totalWorkers); } public function get oil():int{ return (this.m_oil); } public function get debt():int{ return (this.m_debt); } public function get carsBasic():int{ return (m_carsBasic); } public function get workers():int{ return (this.m_workers); } public function set money(_arg1:int):void{ this.m_money = _arg1; } override public function toStringCompare(_arg1:GameResources, _arg2:Boolean=true, _arg3:String="R: V", _arg4:String=" ", _arg5:Boolean=false, _arg6:Boolean=false):String{ return (fixResourceNames(super.toStringCompare(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6))); } public function set metal(_arg1:int):void{ this.m_metal = _arg1; } public function set totalWorkers(_arg1:int):void{ var _local2:int; if (_arg1 > MAX_WORKERS){ m_totalWorkers = MAX_WORKERS; } else { _local2 = (_arg1 - m_totalWorkers); this.m_workers = (this.m_workers + _local2); this.m_totalWorkers = _arg1; }; } public function set oil(_arg1:int):void{ this.m_oil = _arg1; } public function set debt(_arg1:int):void{ m_debt = _arg1; } public function get happiness():int{ return (m_happiness); } public function get carsHybrid():int{ return (m_carsHybrid); } override public function toString(_arg1:Boolean=true, _arg2:String="R: V", _arg3:String=" ", _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false):String{ return (fixResourceNames(super.toString(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6))); } public function set carsBasic(_arg1:int):void{ this.m_carsBasic = _arg1; } public function set happiness(_arg1:int):void{ m_happiness = _arg1; if (m_happiness > MAX_HAPPINESS){ m_happiness = MAX_HAPPINESS; } else { if (m_happiness < MIN_HAPPINESS){ m_happiness = MIN_HAPPINESS; }; }; } public function set carsHybrid(_arg1:int):void{ m_carsHybrid = _arg1; } private function fixResourceNames(_arg1:String):String{ var a_str = _arg1; a_str = a_str.replace("carsBasic", "cars"); a_str = a_str.replace("carsSuv", "SUVs"); a_str = a_str.replace("carsHybrid", "hybrid cars"); a_str = a_str.replace("happiness", "worker happiness"); a_str = a_str.replace("global", "global happiness"); a_str = a_str.replace(/(\d{2,10})\smoney/, function (... _args):String{ return (("$" + _args[1])); }); return (a_str); } public function set global(_arg1:int):void{ m_global = _arg1; if (m_global > MAX_HAPPINESS){ m_global = MAX_HAPPINESS; } else { if (m_global < MIN_HAPPINESS){ m_global = MIN_HAPPINESS; }; }; } } }//packageSection 618//Main (Main) package { import flash.events.*; import ui.*; import flash.display.*; import com.urbansquall.ui.*; import gs3.*; import com.urbansquall.audio.*; import flash.system.*; import flash.utils.*; import com.urbansquall.display.*; import com.urbansquall.utils.*; import flash.net.*; public class Main extends InitializingSprite { private const MISSIONS_TO_OFFER:int = 15; private var m_game:Game; private var g_gsPath:String;// = "" private var m_missionSelectPanel:Sprite; private var m_titleScreenContainer:Sprite; private var m_instructionsOverlay:InstructionsOverlay; private var m_scoresOverlay:HighScoresOverlay; private var m_titleScreenPanel:UrbansquallPanel; private var g_flashVars:Object; private var g_gsModuleName:String;// = "gs3.swf" public static const MISSION_DESCRIPTIONS:Array = [[], ["The Basics", "Every shadowy, global financial powerhouse has to start someplace. In this case, Mr. Bostwick, it's the beautiful Bostwick Animal Sanctuary and Oil Drilling Meadows."], ["Collecting Metals", "Your friends in Congress just passed the Level Playing Field Act, giving the newly formed Bostwick Group a chance to honor America's \"purple strip mine majesty.\""], ["Working with Factories", "Your faithful workers deserve a break, so why not show America's altruism and welcome the Third World's dirtiest poor into a warm, pristine Bostwick Automotive Plant?"], ["Installing a Government", "Government \"by the people, for the people\" is fine so long as \"the people\" are the Bostwick Group. You've got deep pockets, so maybe drop a politician or two in there?"], ["The White House", "It's every child's dream: To grow up to be the President of the United States' secret boss. God Bless America."], ["Health of Your People", "The health and happiness of your workers is of paramount concern, right? How about making them build some houses that they can buy from you? That'd shut 'em up."], ["Financial Institutions", "Making all this money sure is stressful. Take some time to blow off steam by rolling the dice in your own casino... er, I mean stock market. It's how rich people gamble."], ["Competing Nations", "The world shows its gratitude to the U.S. by trying to beat us in a market we stole in good faith? Show them we can make anything bigger, better and more gas-guzzlingly!"], ["World Trade", "The rest of the world can be such a bunch of whiny babies. We want stability! We want food! Waa, waa, waa! Teach them the beauty of superficial consumer bliss."], ["Military Buildup", "A strain of ore that can be both burnt as fuel and snorted up the nose has been discovered in the Third World nation of Parazuelistan. Financial independence? Hell no!"], ["Natural Disasters", "The thriving economy you've fostered has lead to rampant liberalism, and God is showing his anger in the form of roving, localized Armageddons. Run for it!"], ["World Wars", "Nothing appeases the big guy upstairs like a good patriotic war with a nearly defenseless scapegoat nation. Rally the troops for God and country!"], ["Global Warning", "Global warming, a hole in the atmosphere, oxygen spilling into space. The peons are starting to blame you just because you're responsible. Get marketing on the phone!"], ["Alien Invasion", "Aliens, the greatest threat to America. While we're at war, in economic turmoil and environmental ruin, the Phlypluxxians are seizing their chance to harvest our organs."], ["World Peace", "Is there any possible way to turn this intergalactic invasion into a profit? Maybe. But you'll have to convince the world that everything's okay while you negotiate."]]; public static var mouseclick:Class = Main_mouseclick; public static var sound_bg_main:Class = Main_sound_bg_main; public static var ScoresButton:Class = Main_ScoresButton; public static var InstructionsButton:Class = Main_InstructionsButton; public static var MissionSelectScreen:Class = Main_MissionSelectScreen; public static var SplashScreenBackground:Class = Main_SplashScreenBackground; public static var comedyCentralLogo:Sprite = new Sprite(); public static var menu1loopable:Class = Main_menu1loopable; public static var MainBackgroundImage:Class = Main_MainBackgroundImage; public static var mouseover:Class = Main_mouseover; public static var PlayNowButton:Class = Main_PlayNowButton; public function Main(){ var _local1:Loader = new Loader(); _local1.contentLoaderInfo.addEventListener(Event.COMPLETE, onLogoLoadComplete, false, 0, true); _local1.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.handleSwfNotFound); _local1.load(new URLRequest("CCLogo.swf")); } private function showScoresClickHandler(_arg1:MouseEvent):void{ showScorePopup(); } private function postBackendConnectionInit():void{ } private function startGameClickHandler(_arg1:MouseEvent):void{ SoundSystem.instance.stopLoop("menu"); Main.comedyCentralLogo.visible = false; var _local2:int = parseInt((_arg1.target as DisplayObject).name); m_game = new Game(_local2); m_game.addEventListener(Event.COMPLETE, gameCompletedHandler); this.addChild(m_game); this.removeChild(m_titleScreenContainer); if ((((stage.focus == null)) || (!((stage.focus == stage))))){ stage.focus = stage; }; } public function showInstructionsPopup():void{ initInstructionScreen(); m_instructionsOverlay.x = Math.floor(m_instructionsOverlay.x); m_instructionsOverlay.y = Math.floor(m_instructionsOverlay.y); this.addChild(m_instructionsOverlay); } private function testResults():void{ var _local1:ResultsOverlay = new ResultsOverlay(true, null); _local1.addRow("Completed Bonus = ", StringUtils.convertToCurrency(1000)); _local1.addRow("Actions Bonus = ", StringUtils.convertToCurrency(4000)); _local1.addRow("Time Bonus = ", StringUtils.convertToCurrency(3000)); _local1.addRow("<b><font color='#00FF00'>Total Score = </font></b>", (("<b><font color='#00FF00'>" + StringUtils.convertToCurrency(6000)) + "</font></b>")); addChild(_local1); } public function onLogoLoadComplete(_arg1:Event):void{ comedyCentralLogo.addChild(_arg1.currentTarget.content); comedyCentralLogo.x = (stage.stageWidth - (comedyCentralLogo.width / 2)); comedyCentralLogo.y = (comedyCentralLogo.height / 2); this.parent.addChild(comedyCentralLogo); } private function gameCompletedHandler(_arg1:Event):void{ this.addChild(m_titleScreenContainer); initMissionSelectScreen(); showMissionSelectScreen(); m_game.removeEventListener(Event.COMPLETE, gameCompletedHandler); m_game.dispose(); m_game = null; Main.comedyCentralLogo.visible = true; SoundSystem.instance.startLoop("menu"); } private function initMissionSelectScreen():void{ var _local9:int; var _local10:InfoBar; m_missionSelectPanel = new Sprite(); m_missionSelectPanel.addChild(new MissionSelectScreen()); var _local1:Array = [[], [0, "Always unlocked"], [1, "Beat mission 1 to unlock"], [2, "Beat mission 2 to unlock"], [3, "Beat mission 3 to unlock"], [3, "Beat mission 3 to unlock"], [3, "Beat mission 3 to unlock"], [6, "Beat missions 4, 5, and 6 to unlock"], [6, "Beat missions 4, 5, and 6 to unlock"], [6, "Beat missions 4, 5, and 6 to unlock"], [9, "Beat missions 7, 8, and 9 to unlock"], [9, "Beat missions 7, 8, and 9 to unlock"], [9, "Beat missions 7, 8, and 9 to unlock"], [12, "Beat missions 10, 11, and 12 to unlock"], [13, "Beat mission 13 to unlock"], [14, "Beat mission 14 to unlock"]]; var _local2 = 15; var _local3:SharedObject = SharedObject.getLocal("missions"); var _local4:Array = ((_local3.data.missions) || (new Array())); var _local5 = 1; while (_local5 <= MISSIONS_TO_OFFER) { if (_local4[_local5] != true){ _local2 = (_local5 - 1); break; }; _local5++; }; var _local6:Sprite = new Sprite(); var _local7 = 1; while (_local7 <= MISSIONS_TO_OFFER) { _local9 = _local1[_local7][0]; _local10 = new InfoBar(_local7.toString(), _local1[_local7][1]); _local10.y = (30 * (_local7 - 1)); _local10.name = _local7.toString(); _local10.alpha = 0.5; _local10.mouseEnabled = false; if (_local9 <= _local2){ _local10.alpha = 1; _local10.mouseEnabled = true; _local10.blueText = (MISSION_DESCRIPTIONS[_local7][0] + ((_local4[_local7] == true)) ? " [Complete!]" : ""); _local10.addEventListener(MouseEvent.CLICK, startGameClickHandler); _local10.addEventListener(MouseEvent.CLICK, playMouseClickSound); }; _local6.addChild(_local10); _local7++; }; var _local8:VerticalScrollPane = new VerticalScrollPane(_local6); _local8.x = (((m_missionSelectPanel.width - _local8.width) / 2) + 30); _local8.height = 205; _local8.y = ((stage.stageHeight - _local8.height) / 2); m_missionSelectPanel.addChild(_local8); if (_local2 > 13){ _local8.setScrollPosition(0.99); } else { if (_local2 > 6){ _local8.setScrollPosition(0.87); }; }; } public function gameServicesCallback(_arg1:Object, _arg2:String):void{ var _local3:Boolean; var _local4:int; var _local5:String; var _local6:String; var _local7:Array; var _local8:Array; var _local9:Number; var _local10:Number; var _local11:String; var _local12:Object; var _local13:String; var _local14:Array; var _local15:String; var _local16:String; var _local17:Sprite; trace("gameServicesCallback", _arg2); if (_arg1 != null){ _local3 = !(_arg1.isError()); } else { if (_arg2.length > 0){ _local3 = true; }; }; if (!_local3){ trace(((((((((((("Error=" + _arg1.getErrorMessage()) + "; ") + _arg1.getExtendedInfo()) + "\n") + _arg1.getErrorMessage()) + "; ") + _arg1.getExtendedInfo()) + "\nCommand ") + _arg2) + " failed: ") + _arg1.getErrorMessage())); } else { _local6 = ""; switch (_arg2){ case "GSLoaded": trace((((((("Game Services module " + g_gsModuleName) + " loaded, version is ") + GameServices.getVersionString()) + "\nBaseDir=") + GameServices.getBaseDir()) + "\n")); break; case "GSLoadFailed": trace("GS Load Failed"); break; case "StfCheckData": break; case "StfSend": break; case "SetUserScoreGetScores": case "SetUserScoreGetScoresUnauth": case "GetScoreRanks": case "GetScoreRanksUnauth": case "GetUserScoreRanks": case "GetUserRatingRanks": case "GetRatingRanks": _local8 = _arg1.getResults(); _local5 = ""; if (_local8.length > 0){ _local4 = 0; while (_local4 < _local8.length) { _local5 = (_local5 + (((((15 * 10) + _local4) + 1) + ". ") + _local8[_local4].user_name)); _local5 = (_local5 + ("\t\t" + _local8[_local4].score)); if (typeof(_local8[_local4].game_data) == "string"){ _local5 = (_local5 + ("\t" + _local8[_local4].game_data)); }; _local5 = (_local5 + "\n"); _local4++; }; } else { _local5 = "There are no entries"; }; trace(_local5); m_scoresOverlay.parse(_arg1.getResults()); break; case "SetUserScoreGetRank": case "SetUserScoreGetRankUnauth": case "GetSiteUserRank": _local9 = _arg1.getOutputParams().user_rank; trace(("Your rank is " + _local9)); break; case "GetUserScore": _local7 = _arg1.getResults(); _local10 = _local7[0].score; _local11 = _local7[0].game_data; trace(((("Your score is " + _local10) + "\nThe game performance was ") + _local11)); break; case "GetRegistrationStatus": case "UserLogin": _local7 = _arg1.getResults(); _local12 = _local7[0]; trace(((((((((("User " + _local12["user_name"]) + " (id=") + _local12["user_id"]) + ") created on ") + _local12["date_created"]) + "\nLogged in ") + _local12["login_count"]) + " times, last login on ") + _local12["last_login"])); GameServices.loadAvatar(1, this, "myAvatar"); break; case "GetUserGameGroupExperiencePoints": case "GetUserGameExperiencePoints": case "GetUserSiteExperiencePoints": _local7 = _arg1.getResults(); _local13 = _local7[0]["experience_points"]; trace((("You currently have " + _local13) + " experience points.")); break; case "AcceptUserBuddy": case "AddUserBuddy": break; case "GetUserBuddies": _local14 = _arg1.getResults(); _local15 = ""; _local16 = ""; _local17 = null; if (_local14.length > 0){ _local4 = 0; while (_local4 < _local14.length) { _local15 = ((((((_local15 + (_local4 + 1)) + ". ") + _local14[_local4].user_name) + "\t\t") + _local14[_local4].buddy_user_id) + "\n"); _local16 = ("buddiesAvatar" + _local14[_local4].buddy_user_id); _local17 = GameServices.loadAvatarForUser(_local14[_local4].buddy_user_id, 2, this, _local16); _local17.y = ((_local4 * 20) + 50); _local4++; }; } else { _local15 = "There are no entries"; }; trace(_local15); break; case "AdReady": if (GameServices.isAdEnabled()){ }; break; case "AdComplete": break; case "userInfo": case "friendInfo": case "friendInfoAndScores": break; }; if (_arg2.indexOf("SetUserScore") != -1){ _local6 = _arg1.getErrorMessage(); if (_local6 == "UNCHANGED"){ trace("You already have a better score."); } else { trace("Score submitted!"); }; }; }; } public function handleSwfNotFound(_arg1:Event):void{ } override protected function init():void{ this.addChild(new MainBackgroundImage()); m_titleScreenContainer = new Sprite(); this.addChild(m_titleScreenContainer); m_titleScreenPanel = new UrbansquallPanel(new SplashScreenBackground()); m_titleScreenContainer.addChild(m_titleScreenPanel); var _local1:SimpleButton = new InstructionsButton(); _local1.x = (10 + (_local1.width / 2)); _local1.y = ((stage.stageHeight - _local1.height) - 13); _local1.addEventListener(MouseEvent.CLICK, showInstructionsClickHandler); _local1.addEventListener(MouseEvent.CLICK, playMouseClickSound); _local1.addEventListener(MouseEvent.MOUSE_OVER, playMouseOverSound); m_titleScreenContainer.addChild(_local1); var _local2:SimpleButton = new PlayNowButton(); _local2.x = ((stage.stageWidth / 2) + 7); _local2.y = ((stage.stageHeight - _local2.height) - 13); _local2.addEventListener(MouseEvent.CLICK, showMissionSelectClickHandler); _local2.addEventListener(MouseEvent.CLICK, playMouseClickSound); _local2.addEventListener(MouseEvent.MOUSE_OVER, playMouseOverSound); m_titleScreenContainer.addChild(_local2); initInstructionScreen(); initScoreScreen(); initMissionSelectScreen(); var _local3:Sprite = new Sprite(); _local3.addChild(new sound_bg_main()); _local3.x = (m_titleScreenContainer.width - _local3.width); _local3.y = (m_titleScreenContainer.height - 88); m_titleScreenContainer.addChild(_local3); var _local4:VolumeButton = new VolumeButton(); _local4.x = (_local3.x + 45); _local4.y = (_local3.y + 15); _local4.addEventListener(MouseEvent.CLICK, playMouseClickSound); _local4.addEventListener(MouseEvent.MOUSE_OVER, playMouseOverSound); m_titleScreenContainer.addChild(_local4); SoundSystem.instance.createLoop("menu", new menu1loopable()); } private function onLoadError(_arg1:IOErrorEvent):void{ gameServicesCallback(null, "GSLoadFailed"); } private function showInstructionsClickHandler(_arg1:MouseEvent):void{ showInstructionsPopup(); } private function showMissionSelectClickHandler(_arg1:MouseEvent):void{ showMissionSelectScreen(); } private function initScoreScreen():void{ m_scoresOverlay = new HighScoresOverlay(); } public function showScorePopup():void{ this.addChild(m_scoresOverlay); m_scoresOverlay.update(); } private function initInstructionScreen():void{ m_instructionsOverlay = new InstructionsOverlay(); } private function loadGameServices(_arg1:String):void{ var url = _arg1; var gsURL:URLRequest = new URLRequest(url); gsURL.method = URLRequestMethod.GET; var swfLoader:Loader = new Loader(); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete); trace(("loadGameServices: Attempting to load GS from " + url)); try { swfLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError); swfLoader.load(gsURL, new LoaderContext(false, ApplicationDomain.currentDomain)); trace(("get timer " + getTimer())); } catch(e:SecurityError) { trace("loadGameServices failure"); gameServicesCallback(null, "GSLoadFailed"); }; } private function showMissionSelectScreen():void{ m_titleScreenPanel.removeChildren(); m_titleScreenPanel.addChild(m_missionSelectPanel); } private function onLoadComplete(_arg1:Event):void{ trace(("complete " + getTimer())); if (_arg1.type == Event.COMPLETE){ GameServices.setCallback(gameServicesCallback); GameServices.setStage(this, g_flashVars); gameServicesCallback(null, "GSLoaded"); postBackendConnectionInit(); } else { trace("onLoadCompletel failure"); gameServicesCallback(null, "GSLoadFailed"); }; } public static function playMouseOverSound(_arg1:MouseEvent):void{ } public static function playMouseClickSound(_arg1:MouseEvent):void{ SoundSystem.instance.playSound(new mouseclick()); } } }//packageSection 619//Main_InstructionsButton (Main_InstructionsButton) package { import mx.core.*; public class Main_InstructionsButton extends ButtonAsset { } }//packageSection 620//Main_MainBackgroundImage (Main_MainBackgroundImage) package { import mx.core.*; public class Main_MainBackgroundImage extends BitmapAsset { } }//packageSection 621//Main_menu1loopable (Main_menu1loopable) package { import mx.core.*; public class Main_menu1loopable extends SoundAsset { } }//packageSection 622//Main_MissionSelectScreen (Main_MissionSelectScreen) package { import mx.core.*; public class Main_MissionSelectScreen extends BitmapAsset { } }//packageSection 623//Main_mouseclick (Main_mouseclick) package { import mx.core.*; public class Main_mouseclick extends SoundAsset { } }//packageSection 624//Main_mouseover (Main_mouseover) package { import mx.core.*; public class Main_mouseover extends SoundAsset { } }//packageSection 625//Main_PlayNowButton (Main_PlayNowButton) package { import mx.core.*; public class Main_PlayNowButton extends ButtonAsset { } }//packageSection 626//Main_ScoresButton (Main_ScoresButton) package { import mx.core.*; public class Main_ScoresButton extends ButtonAsset { } }//packageSection 627//Main_sound_bg_main (Main_sound_bg_main) package { import mx.core.*; public class Main_sound_bg_main extends BitmapAsset { } }//packageSection 628//Main_SplashScreenBackground (Main_SplashScreenBackground) package { import mx.core.*; public class Main_SplashScreenBackground extends BitmapAsset { } }//packageSection 629//TutorialBase (TutorialBase) package { import ui.*; import com.urbansquall.audio.*; public class TutorialBase { protected var m_game:Game; protected var m_activeBalloons:Array; public static const TIMEOUT:int = 10000; public static var successful:Class = TutorialBase_successful; public function TutorialBase(_arg1:Game){ m_game = _arg1; m_activeBalloons = []; } protected function playSuccessSound():void{ SoundSystem.instance.playSound(new successful()); } public function start():void{ } protected function clearActiveBalloons(_arg1:Boolean=true):void{ if ((((m_activeBalloons.length > 0)) && (_arg1))){ playSuccessSound(); }; var _local2:int = (m_activeBalloons.length - 1); while (_local2 >= 0) { (m_activeBalloons.pop() as HelpBalloonThing).remove(); _local2--; }; } } }//packageSection 630//TutorialBase_successful (TutorialBase_successful) package { import mx.core.*; public class TutorialBase_successful extends SoundAsset { } }//packageSection 631//TutorialLevel1 (TutorialLevel1) package { import com.urbansquall.wrighton.events.*; import actions.*; import objects.*; public class TutorialLevel1 extends TutorialBase { private static const TEXT_2:String = "Place an Oil Refinery on top of an Oil Vein to excavate Oil."; private static const TEXT_3:String = "Click a tab to look at more buildings."; private static const TEXT_5:String = "Here is where your game stats are displayed."; private static const TEXT_1:String = "Place a House here to add workers to the world."; private static const TEXT_4:String = "Most buildings have the ability to take action. Click this refinery to show its actions."; private static const TEXT_4a:String = "Here is where actions appear. Increase oil production."; public function TutorialLevel1(_arg1:Game){ super(_arg1); } private function onBuild1(_arg1:GameObjectEvent):void{ if (_arg1.gameObject.name != House.NAME){ return; }; m_game.removeEventListener(GameObjectEvent.CONSTRUCTED, onBuild1); clearActiveBalloons(); m_activeBalloons.push(m_game.createBalloon(TEXT_2, 135, 80)); m_activeBalloons.push(m_game.createBalloon(TEXT_3, 70, 310)); m_game.addEventListener(GameObjectEvent.CONSTRUCTED, onBuild2); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 233, 97)); m_game.addEventListener(GameObjectEvent.CONSTRUCTED, onBuild1); } private function onAction1(_arg1:GameActionEvent):void{ if ((_arg1.action is UpgradeOilRefineryAction)){ clearActiveBalloons(); }; } private function onBuild2(_arg1:GameObjectEvent):void{ if ((_arg1.gameObject is OilRefinery)){ m_game.removeEventListener(GameObjectEvent.CONSTRUCTED, onBuild2); clearActiveBalloons(); m_activeBalloons.push(m_game.createBalloon(TEXT_4, 135, 70)); m_activeBalloons.push(m_game.createBalloon(TEXT_4a, 395, 225)); m_game.addEventListener(GameActionEvent.FIRED, onAction1); }; } } }//packageSection 632//TutorialLevel10 (TutorialLevel10) package { import com.urbansquall.metronome.*; public class TutorialLevel10 extends TutorialBase { private static const TEXT_1:String = "New Military Base building gives you the ability to go into a Cold War with a foreign nation."; public function TutorialLevel10(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 330, 280)); m_game.engine.addEffectListener("TutorialLevel10_balloon1", onTimerComplete1, TIMEOUT, 1); } } }//packageSection 633//TutorialLevel11 (TutorialLevel11) package { import com.urbansquall.metronome.*; public class TutorialLevel11 extends TutorialBase { private static const TEXT_1:String = "New FEMA building is available to rebuild destroyed buildings."; public function TutorialLevel11(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 330, 300)); m_game.engine.addEffectListener("TutorialLevel11_balloon1", onTimerComplete1, TIMEOUT, 1); } } }//packageSection 634//TutorialLevel14 (TutorialLevel14) package { import com.urbansquall.metronome.*; public class TutorialLevel14 extends TutorialBase { private static const TEXT_1:String = "The Military Base can protect against Alien attacks within a certain area around the Military Base."; public function TutorialLevel14(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 330, 270)); m_game.engine.addEffectListener("TutorialLevel11_balloon1", onTimerComplete1, TIMEOUT, 1); } } }//packageSection 635//TutorialLevel2 (TutorialLevel2) package { import com.urbansquall.metronome.*; import com.urbansquall.wrighton.events.*; import actions.*; import objects.*; public class TutorialLevel2 extends TutorialBase { private var m_hasBorderBeenOpened:Boolean; private static const TEXT_2:String = "Open the Border Crossing to let in additional workers. The economy will change based on the decisions you make."; private static const TEXT_3:String = "New buildings like the Research Facility will become available the further you progress in the game."; private static const TEXT_1a:String = "Here is where the amount of metals you have is displayed."; private static const TEXT_1:String = "Place a Mining Facility on top of a Mineral Deposit to excavate Metals."; public function TutorialLevel2(_arg1:Game){ super(_arg1); m_hasBorderBeenOpened = false; } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); m_activeBalloons.push(m_game.createBalloon(TEXT_2, 335, 155, true)); m_game.addEventListener(GameActionEvent.FIRED, onAction1); } private function onBuild1(_arg1:GameObjectEvent):void{ if ((_arg1.gameObject is MiningFacility)){ m_game.removeEventListener(GameObjectEvent.CONSTRUCTED, onBuild1); clearActiveBalloons(); m_activeBalloons.push(m_game.createBalloon(TEXT_1a, 10, 58, true)); m_game.engine.addEffectListener("TutorialLevel2_balloon1a", onTimerComplete1, TIMEOUT, 1); }; } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 165, 200, true)); m_game.addEventListener(GameObjectEvent.CONSTRUCTED, onBuild1); } private function onAction1(_arg1:GameActionEvent):void{ if ((((_arg1.action is OpenBorderAction)) && (!(m_hasBorderBeenOpened)))){ m_hasBorderBeenOpened = true; clearActiveBalloons(); m_activeBalloons.push(m_game.createBalloon(TEXT_3, 70, 270)); m_game.engine.addEffectListener("TutorialLevel2_balloon3", onTimerComplete, TIMEOUT, 1); }; } private function onTimerComplete(_arg1:TickEvent):void{ clearActiveBalloons(false); } } }//packageSection 636//TutorialLevel3 (TutorialLevel3) package { import com.urbansquall.metronome.*; import com.urbansquall.wrighton.events.*; import objects.*; public class TutorialLevel3 extends TutorialBase { private static const TEXT_2:String = "Place a Car Factory to have the ability to produce cars."; private static const TEXT_1:String = "Here is where you can keep track of the cars you made."; public function TutorialLevel3(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); m_activeBalloons.push(m_game.createBalloon(TEXT_2, 232, 200)); m_game.addEventListener(GameObjectEvent.CONSTRUCTED, onBuild1); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 60, 58, true)); m_game.engine.addEffectListener("TutorialLevel3_balloon1", onTimerComplete1, TIMEOUT, 1); } private function onBuild1(_arg1:GameObjectEvent):void{ if ((_arg1.gameObject is CarFactory)){ m_game.removeEventListener(GameObjectEvent.CONSTRUCTED, onBuild1); clearActiveBalloons(); }; } } }//packageSection 637//TutorialLevel4 (TutorialLevel4) package { import com.urbansquall.metronome.*; public class TutorialLevel4 extends TutorialBase { private static const TEXT_2:String = "New Capital building is available to get more out of your workers."; private static const TEXT_1:String = "New Service buildings are available to you to increase sales."; public function TutorialLevel4(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); m_activeBalloons.push(m_game.createBalloon(TEXT_2, 332, 300)); m_game.engine.addEffectListener("TutorialLevel4_balloon2", onTimerComplete2, TIMEOUT, 1); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 155, 300)); m_game.engine.addEffectListener("TutorialLevel4_balloon1", onTimerComplete1, TIMEOUT, 1); } private function onTimerComplete2(_arg1:TickEvent):void{ clearActiveBalloons(false); } } }//packageSection 638//TutorialLevel5 (TutorialLevel5) package { import com.urbansquall.metronome.*; public class TutorialLevel5 extends TutorialBase { private static const TEXT_2:String = "New White House building is available to get more out of your workers."; private static const TEXT_1:String = "New Port Exports building is available to increase foreign sales."; public function TutorialLevel5(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); m_activeBalloons.push(m_game.createBalloon(TEXT_2, 340, 298)); m_game.engine.addEffectListener("TutorialLevel5_balloon2", onTimerComplete2, TIMEOUT, 1); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 332, 300)); m_game.engine.addEffectListener("TutorialLevel5_balloon1", onTimerComplete1, TIMEOUT, 1); } private function onTimerComplete2(_arg1:TickEvent):void{ clearActiveBalloons(false); } } }//packageSection 639//TutorialLevel6 (TutorialLevel6) package { import com.urbansquall.metronome.*; public class TutorialLevel6 extends TutorialBase { private static const TEXT_2:String = "Here is where you can keep track of how your workers feel. Green means very happy, red means pissed off."; private static const TEXT_1:String = "New Luxury buildings are available to increase worker happiness."; public function TutorialLevel6(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); m_activeBalloons.push(m_game.createBalloon(TEXT_2, 191, 40, true)); m_game.engine.addEffectListener("TutorialLevel6_balloon2", onTimerComplete2, TIMEOUT, 1); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 400, 300)); m_game.engine.addEffectListener("TutorialLevel6_balloon1", onTimerComplete1, TIMEOUT, 1); } private function onTimerComplete2(_arg1:TickEvent):void{ clearActiveBalloons(false); } } }//packageSection 640//TutorialLevel7 (TutorialLevel7) package { import com.urbansquall.metronome.*; public class TutorialLevel7 extends TutorialBase { private static const TEXT_2:String = "The new Federal Reserve building you can change interest and stock return rates."; private static const TEXT_1:String = "New Services buildings are available. The Bank and Stock Market where you can borrow and make more money."; public function TutorialLevel7(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); m_activeBalloons.push(m_game.createBalloon(TEXT_2, 340, 290)); m_game.engine.addEffectListener("TutorialLevel7_balloon2", onTimerComplete2, TIMEOUT, 1); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 150, 270)); m_game.engine.addEffectListener("TutorialLevel7_balloon1", onTimerComplete1, TIMEOUT, 1); } private function onTimerComplete2(_arg1:TickEvent):void{ clearActiveBalloons(false); } } }//packageSection 641//TutorialLevel9 (TutorialLevel9) package { import com.urbansquall.metronome.*; public class TutorialLevel9 extends TutorialBase { private static const TEXT_1:String = "New UN building is available to enact free trade."; public function TutorialLevel9(_arg1:Game){ super(_arg1); } private function onTimerComplete1(_arg1:TickEvent):void{ clearActiveBalloons(false); } override public function start():void{ m_activeBalloons.push(m_game.createBalloon(TEXT_1, 250, 300)); m_game.engine.addEffectListener("TutorialLevel9_balloon1", onTimerComplete1, TIMEOUT, 1); } } }//package
Library Items
Symbol 1 Graphic | Used by:2 | |
Symbol 2 MovieClip | Uses:1 | Used by:11 |
Symbol 3 Graphic | Used by:11 | |
Symbol 4 Graphic | Used by:11 | |
Symbol 5 Graphic | Used by:11 | |
Symbol 6 Graphic | Used by:11 | |
Symbol 7 Graphic | Used by:11 | |
Symbol 8 Graphic | Used by:11 | |
Symbol 9 Graphic | Used by:11 | |
Symbol 10 Graphic | Used by:11 | |
Symbol 11 MovieClip {IndecisionLoader_percentloader} [percentloader] | Uses:2 3 4 5 6 7 8 9 10 | |
Symbol 12 Bitmap | Used by:13 | |
Symbol 13 Graphic | Uses:12 | Used by:14 |
Symbol 14 MovieClip | Uses:13 | Used by:15 |
Symbol 15 MovieClip {IndecisionLoader_miniloadingani} [miniloadingani] | Uses:14 | |
Symbol 16 Bitmap {IndecisionLoader_preloader_bg} | ||
Symbol 17 Bitmap {IndecisionLoader_preloader_title} | ||
Symbol 18 Sound {Main_mouseclick} [mouseclick] | ||
Symbol 19 Bitmap {Main_MissionSelectScreen} [bkgd_mission_select] | ||
Symbol 20 Sound {Main_mouseover} [mouseover] | ||
Symbol 21 Sound {Main_menu1loopable} [menu1loopable] | ||
Symbol 22 Bitmap | Used by:23 | |
Symbol 23 Graphic | Uses:22 | Used by:24 25 |
Symbol 24 MovieClip | Uses:23 | Used by:25 |
Symbol 25 Button {Main_InstructionsButton} [howtoplay_bu] | Uses:24 23 | |
Symbol 26 Bitmap {Main_SplashScreenBackground} [bkgd_splash] | ||
Symbol 27 Bitmap | Used by:28 | |
Symbol 28 Graphic | Uses:27 | Used by:29 30 |
Symbol 29 MovieClip | Uses:28 | Used by:30 |
Symbol 30 Button {Main_ScoresButton} [highscores_bu] | Uses:29 28 | |
Symbol 31 Bitmap {Main_MainBackgroundImage} [bkgd_main] | ||
Symbol 32 Bitmap | Used by:33 | |
Symbol 33 Graphic | Uses:32 | Used by:34 35 |
Symbol 34 MovieClip | Uses:33 | Used by:35 |
Symbol 35 Button {Main_PlayNowButton} [playnow_bu] | Uses:34 33 | |
Symbol 36 Bitmap | Used by:37 | |
Symbol 37 Graphic | Uses:36 | Used by:38 40 |
Symbol 38 MovieClip | Uses:37 | Used by:39 40 |
Symbol 39 MovieClip | Uses:38 | Used by:40 |
Symbol 40 Button {Game_UIQuitButton} [quit_bu] | Uses:38 39 37 | |
Symbol 41 Bitmap | Used by:42 | |
Symbol 42 Graphic | Uses:41 | Used by:43 45 |
Symbol 43 MovieClip | Uses:42 | Used by:44 45 |
Symbol 44 MovieClip | Uses:43 | Used by:45 |
Symbol 45 Button {Game_UIHelpButton} [help_bu] | Uses:43 44 42 | |
Symbol 46 Bitmap | Used by:47 | |
Symbol 47 Graphic | Uses:46 | Used by:56 |
Symbol 48 Bitmap | Used by:49 | |
Symbol 49 Graphic | Uses:48 | Used by:56 |
Symbol 50 Bitmap | Used by:51 | |
Symbol 51 Graphic | Uses:50 | Used by:56 |
Symbol 52 Bitmap | Used by:53 | |
Symbol 53 Graphic | Uses:52 | Used by:56 |
Symbol 54 Bitmap | Used by:55 | |
Symbol 55 Graphic | Uses:54 | Used by:56 |
Symbol 56 MovieClip {Game_UIResourceIconGlobe} [global_indicator_mc] | Uses:47 49 51 53 55 | |
Symbol 57 Bitmap | Used by:58 | |
Symbol 58 Graphic | Uses:57 | Used by:59 61 |
Symbol 59 MovieClip | Uses:58 | Used by:60 61 |
Symbol 60 MovieClip | Uses:59 | Used by:61 |
Symbol 61 Button {Game_UIPauseButton} [pause_bu] | Uses:59 60 58 | |
Symbol 62 Bitmap | Used by:63 | |
Symbol 63 Graphic | Uses:62 | Used by:64 65 |
Symbol 64 MovieClip | Uses:63 | Used by:65 |
Symbol 65 Button {Game_UIGoalButton} [goals_bu] | Uses:64 63 | |
Symbol 66 Bitmap | Used by:67 | |
Symbol 67 Graphic | Uses:66 | Used by:76 |
Symbol 68 Bitmap | Used by:69 | |
Symbol 69 Graphic | Uses:68 | Used by:76 |
Symbol 70 Bitmap | Used by:71 | |
Symbol 71 Graphic | Uses:70 | Used by:76 |
Symbol 72 Bitmap | Used by:73 | |
Symbol 73 Graphic | Uses:72 | Used by:76 |
Symbol 74 Bitmap | Used by:75 | |
Symbol 75 Graphic | Uses:74 | Used by:76 |
Symbol 76 MovieClip {Game_UIResourceIconFace} [face_indicator_mc] | Uses:67 69 71 73 75 | |
Symbol 77 Sound {Game_gameloop} [gameloop] | ||
Symbol 78 Bitmap | Used by:79 | |
Symbol 79 Graphic | Uses:78 | Used by:80 81 |
Symbol 80 MovieClip | Uses:79 | Used by:81 |
Symbol 81 Button {ui.Overlay_CloseButtonClass} [close_bu] | Uses:80 79 | |
Symbol 82 Graphic | Used by:195 | |
Symbol 83 Bitmap | Used by:84 | |
Symbol 84 Graphic | Uses:83 | Used by:195 |
Symbol 85 Font | Used by:86 87 95 106 109 112 115 118 119 122 125 137 138 139 140 141 142 143 144 155 156 157 158 159 160 161 164 171 172 173 174 175 176 179 182 185 186 187 192 | |
Symbol 86 Text | Uses:85 | Used by:195 |
Symbol 87 Text | Uses:85 | Used by:195 |
Symbol 88 Graphic | Used by:89 | |
Symbol 89 MovieClip | Uses:88 | Used by:195 |
Symbol 90 Bitmap | Used by:93 | |
Symbol 91 Bitmap | Used by:93 | |
Symbol 92 Bitmap | Used by:93 | |
Symbol 93 Graphic | Uses:91 90 92 | Used by:94 |
Symbol 94 MovieClip | Uses:93 | Used by:195 |
Symbol 95 Text | Uses:85 | Used by:195 |
Symbol 96 Font | Used by:97 98 99 100 101 102 128 | |
Symbol 97 Text | Uses:96 | Used by:195 |
Symbol 98 Text | Uses:96 | Used by:195 |
Symbol 99 Text | Uses:96 | Used by:195 |
Symbol 100 Text | Uses:96 | Used by:195 |
Symbol 101 Text | Uses:96 | Used by:195 |
Symbol 102 Text | Uses:96 | Used by:195 |
Symbol 103 Bitmap | Used by:104 | |
Symbol 104 Graphic | Uses:103 | Used by:195 |
Symbol 105 Font | Used by:106 109 112 115 118 119 122 125 137 138 139 140 141 142 143 144 155 156 157 158 159 160 161 164 171 172 173 174 175 176 179 182 185 186 187 192 | |
Symbol 106 Text | Uses:105 85 | Used by:195 |
Symbol 107 Bitmap | Used by:108 | |
Symbol 108 Graphic | Uses:107 | Used by:195 |
Symbol 109 Text | Uses:105 85 | Used by:195 |
Symbol 110 Bitmap | Used by:111 | |
Symbol 111 Graphic | Uses:110 | Used by:195 |
Symbol 112 Text | Uses:105 85 | Used by:195 |
Symbol 113 Bitmap | Used by:114 | |
Symbol 114 Graphic | Uses:113 | Used by:195 |
Symbol 115 Text | Uses:105 85 | Used by:195 |
Symbol 116 Bitmap | Used by:117 | |
Symbol 117 Graphic | Uses:116 | Used by:195 |
Symbol 118 Text | Uses:105 85 | Used by:195 |
Symbol 119 Text | Uses:105 85 | Used by:195 |
Symbol 120 Bitmap | Used by:121 | |
Symbol 121 Graphic | Uses:120 | Used by:195 |
Symbol 122 Text | Uses:105 85 | Used by:195 |
Symbol 123 Bitmap | Used by:124 | |
Symbol 124 Graphic | Uses:123 | Used by:195 |
Symbol 125 Text | Uses:105 85 | Used by:195 |
Symbol 126 Bitmap | Used by:127 | |
Symbol 127 Graphic | Uses:126 | Used by:195 |
Symbol 128 Text | Uses:96 | Used by:195 |
Symbol 129 Bitmap | Used by:136 | |
Symbol 130 Bitmap | Used by:136 | |
Symbol 131 Bitmap | Used by:136 | |
Symbol 132 Bitmap | Used by:136 | |
Symbol 133 Bitmap | Used by:136 | |
Symbol 134 Bitmap | Used by:136 | |
Symbol 135 Bitmap | Used by:136 | |
Symbol 136 Graphic | Uses:134 133 132 131 130 129 135 | Used by:195 |
Symbol 137 Text | Uses:105 85 | Used by:195 |
Symbol 138 Text | Uses:105 85 | Used by:195 |
Symbol 139 Text | Uses:105 85 | Used by:195 |
Symbol 140 Text | Uses:105 85 | Used by:195 |
Symbol 141 Text | Uses:105 85 | Used by:195 |
Symbol 142 Text | Uses:105 85 | Used by:195 |
Symbol 143 Text | Uses:105 85 | Used by:195 |
Symbol 144 Text | Uses:105 85 | Used by:195 |
Symbol 145 Bitmap | Used by:146 | |
Symbol 146 Graphic | Uses:145 | Used by:195 |
Symbol 147 Bitmap | Used by:154 | |
Symbol 148 Bitmap | Used by:154 | |
Symbol 149 Bitmap | Used by:154 | |
Symbol 150 Bitmap | Used by:154 | |
Symbol 151 Bitmap | Used by:154 | |
Symbol 152 Bitmap | Used by:154 | |
Symbol 153 Bitmap | Used by:154 | |
Symbol 154 Graphic | Uses:152 151 150 149 148 147 153 | Used by:195 |
Symbol 155 Text | Uses:105 85 | Used by:195 |
Symbol 156 Text | Uses:105 85 | Used by:195 |
Symbol 157 Text | Uses:105 85 | Used by:195 |
Symbol 158 Text | Uses:105 85 | Used by:195 |
Symbol 159 Text | Uses:105 85 | Used by:195 |
Symbol 160 Text | Uses:105 85 | Used by:195 |
Symbol 161 Text | Uses:105 85 | Used by:195 |
Symbol 162 Bitmap | Used by:163 | |
Symbol 163 Graphic | Uses:162 | Used by:195 |
Symbol 164 Text | Uses:105 85 | Used by:195 |
Symbol 165 Bitmap | Used by:170 | |
Symbol 166 Bitmap | Used by:170 | |
Symbol 167 Bitmap | Used by:170 | |
Symbol 168 Bitmap | Used by:170 | |
Symbol 169 Bitmap | Used by:170 | |
Symbol 170 Graphic | Uses:168 167 166 165 169 | Used by:195 |
Symbol 171 Text | Uses:105 85 | Used by:195 |
Symbol 172 Text | Uses:105 85 | Used by:195 |
Symbol 173 Text | Uses:105 85 | Used by:195 |
Symbol 174 Text | Uses:105 85 | Used by:195 |
Symbol 175 Text | Uses:105 85 | Used by:195 |
Symbol 176 Text | Uses:105 85 | Used by:195 |
Symbol 177 Bitmap | Used by:178 | |
Symbol 178 Graphic | Uses:177 | Used by:195 |
Symbol 179 Text | Uses:105 85 | Used by:195 |
Symbol 180 Bitmap | Used by:181 | |
Symbol 181 Graphic | Uses:180 | Used by:195 |
Symbol 182 Text | Uses:105 85 | Used by:195 |
Symbol 183 Bitmap | Used by:184 | |
Symbol 184 Graphic | Uses:183 | Used by:195 |
Symbol 185 Text | Uses:105 85 | Used by:195 |
Symbol 186 Text | Uses:105 85 | Used by:195 |
Symbol 187 Text | Uses:105 85 | Used by:195 |
Symbol 188 Bitmap | Used by:191 | |
Symbol 189 Bitmap | Used by:191 | |
Symbol 190 Bitmap | Used by:191 | |
Symbol 191 Graphic | Uses:189 188 190 | Used by:195 |
Symbol 192 Text | Uses:105 85 | Used by:195 |
Symbol 193 Bitmap | Used by:194 | |
Symbol 194 Graphic | Uses:193 | Used by:195 |
Symbol 195 MovieClip {ui.InstructionsOverlay_howtoplay} [howtoplay] | Uses:82 84 86 87 89 94 95 97 98 99 100 101 102 104 106 108 109 111 112 114 115 117 118 119 121 122 124 125 127 128 136 137 138 139 140 141 142 143 144 146 154 155 156 157 158 159 160 161 163 164 170 171 172 173 174 175 176 178 179 181 182 184 185 186 187 191 192 194 | |
Symbol 196 Bitmap | Used by:197 | |
Symbol 197 Graphic | Uses:196 | Used by:198 199 |
Symbol 198 MovieClip | Uses:197 | Used by:199 |
Symbol 199 Button {ui.ResultsOverlay_continue_win_bu} [continue_win_bu] | Uses:198 197 | |
Symbol 200 Sound {ui.ResultsOverlay_youwin} [youwin] | ||
Symbol 201 Sound {ui.ResultsOverlay_youlose} [youlose] | ||
Symbol 202 Bitmap | Used by:203 | |
Symbol 203 Graphic | Uses:202 | Used by:204 205 |
Symbol 204 MovieClip | Uses:203 | Used by:205 |
Symbol 205 Button {ui.ResultsOverlay_continue_lose_bu} [continue_lose_bu] | Uses:204 203 | |
Symbol 206 Bitmap | Used by:207 | |
Symbol 207 Graphic | Uses:206 | Used by:208 210 |
Symbol 208 MovieClip | Uses:207 | Used by:209 210 |
Symbol 209 MovieClip | Uses:208 | Used by:210 |
Symbol 210 Button {ui.VolumeButton_UIVolumeButton} [volume_bu] | Uses:208 209 207 | |
Symbol 211 Bitmap | Used by:212 | |
Symbol 212 Graphic | Uses:211 | Used by:213 214 |
Symbol 213 MovieClip | Uses:212 | Used by:214 |
Symbol 214 Button {ui.VolumeButton_UIVolumeOffButton} [volume_off_bu] | Uses:213 212 | |
Symbol 215 Bitmap | Used by:216 | |
Symbol 216 Graphic | Uses:215 | Used by:217 |
Symbol 217 MovieClip {ui.Label_LabelBackground} [ui.Label_LabelBackground] | Uses:216 | |
Symbol 218 Sound {IndecisionObject_workerhouse} [workerhouse] | ||
Symbol 219 Font | Used by:220 240 | |
Symbol 220 EditableText | Uses:219 | Used by:221 |
Symbol 221 MovieClip {ui.SerpentineMedium_serpentine_medium} [serpentine_medium] | Uses:220 | |
Symbol 222 Bitmap {ui.MissionOverlay_Mission2} [mission2] | ||
Symbol 223 Bitmap {ui.MissionOverlay_Mission1} [mission1] | ||
Symbol 224 Bitmap {ui.MissionOverlay_Mission9} [mission9] | ||
Symbol 225 Bitmap {ui.MissionOverlay_Mission11} [mission11] | ||
Symbol 226 Bitmap {ui.MissionOverlay_Mission8} [mission8] | ||
Symbol 227 Bitmap {ui.MissionOverlay_Mission10} [mission10] | ||
Symbol 228 Bitmap {ui.MissionOverlay_Mission7} [mission7] | ||
Symbol 229 Bitmap {ui.MissionOverlay_Mission6} [mission6] | ||
Symbol 230 Bitmap {ui.MissionOverlay_Mission5} [mission5] | ||
Symbol 231 Bitmap {ui.MissionOverlay_Mission4} [mission4] | ||
Symbol 232 Bitmap | Used by:233 | |
Symbol 233 Graphic | Uses:232 | Used by:234 235 |
Symbol 234 MovieClip | Uses:233 | Used by:235 |
Symbol 235 Button {ui.MissionOverlay_play_bu} [play_bu] | Uses:234 233 | |
Symbol 236 Bitmap {ui.MissionOverlay_Mission3} [mission3] | ||
Symbol 237 Bitmap {ui.MissionOverlay_Mission16} [mission_end] | ||
Symbol 238 Bitmap {ui.MissionOverlay_Mission13} [mission13] | ||
Symbol 239 Bitmap {ui.MissionOverlay_Mission12} [mission12] | ||
Symbol 240 EditableText | Uses:219 | Used by:241 |
Symbol 241 MovieClip {ui.MissionOverlay_SerpentineText} [serpentine_txt] | Uses:240 | |
Symbol 242 Bitmap {ui.MissionOverlay_Mission15} [mission15] | ||
Symbol 243 Bitmap {ui.MissionOverlay_Mission14} [mission14] | ||
Symbol 244 Sound {objects.CarFactory_carfactory} [carfactory] | ||
Symbol 245 Sound {objects.WhiteHouse_hailtothechief_v1} [hailtothechief_v1] | ||
Symbol 246 Sound {objects.OilRefinery_oilfactory} [oilfactory] | ||
Symbol 247 Sound {TutorialBase_successful} [successful] | ||
Symbol 248 Sound {objects.MiningFacility_minefactory} [minefactory] | ||
Symbol 249 Bitmap | Used by:250 | |
Symbol 250 Graphic | Uses:249 | Used by:251 |
Symbol 251 MovieClip {ui.HelpBalloonThing_Background} [ui.HelpBalloonThing_Background] | Uses:250 | |
Symbol 252 Sound {ui.Ufo_ufohovering_v1} [ufohovering_v1] | ||
Symbol 253 Sound {ui.Ufo_questionablesound} [questionablesound] | ||
Symbol 254 Sound {ui.Ufo_ufoexplodes_v1} [ufoexplodes_v1] | ||
Symbol 255 Sound {objects.MilitaryBase_presidentialtune1_v1} [presidentialtune1_v1] | ||
Symbol 256 Sound {ui.Lightning_lightningfromthegods_v1} [lightningfromthegods_v1] | ||
Symbol 257 Bitmap | Used by:258 | |
Symbol 258 Graphic | Uses:257 | Used by:259 260 |
Symbol 259 MovieClip | Uses:258 | Used by:260 |
Symbol 260 Button {ui.QuitOverlay_ConfirmQuitButton} [red_quit_bu] | Uses:259 258 | |
Symbol 261 Bitmap | Used by:262 | |
Symbol 262 Graphic | Uses:261 | Used by:263 264 |
Symbol 263 MovieClip | Uses:262 | Used by:264 |
Symbol 264 Button {ui.Slider_ScrollLeft} [leftarrow_bu] | Uses:263 262 | |
Symbol 265 Bitmap | Used by:266 | |
Symbol 266 Graphic | Uses:265 | Used by:267 |
Symbol 267 MovieClip {ui.Slider_ScrollThumb} [slider_horizontal_mc] | Uses:266 | |
Symbol 268 Bitmap | Used by:269 | |
Symbol 269 Graphic | Uses:268 | Used by:270 272 |
Symbol 270 MovieClip | Uses:269 | Used by:271 272 |
Symbol 271 MovieClip | Uses:270 | Used by:272 |
Symbol 272 Button {ui.Slider_ScrollRight} [rightarrow_bu] | Uses:270 271 269 | |
Symbol 273 Bitmap {automata.SuvAutomataType_CarSW} | ||
Symbol 274 Bitmap {actions.GlobalistNeutralAction_action_global_barter} | ||
Symbol 275 Bitmap {actions.StockMarketPayDebt_action_debt_pay} | ||
Symbol 276 Bitmap {actions.RaiseRatesAction_action_raise_rates} | ||
Symbol 277 Bitmap {actions.WatchMovieAction_action_watch_movies} | ||
Symbol 278 Bitmap {Game_UIGameNavBottom} | ||
Symbol 279 Font {ui.Label_FontNormal} | ||
Symbol 280 Bitmap {actions.BuildHybridAction_ButtonImage} | ||
Symbol 281 Bitmap {automata.SuvAutomataType_CarSE} | ||
Symbol 282 Bitmap {actions.CureWorldHungerAction_action_hunger_cure} | ||
Symbol 283 Bitmap {automata.HybridAutomataType_CarNE} | ||
Symbol 284 Bitmap {Game_UIResourceIconDebt} | ||
Symbol 285 Bitmap {automata.CarAutomataType_CarNE} | ||
Symbol 286 Bitmap {objects.MiningFacility_Tile4} | ||
Symbol 287 Bitmap {objects.MiningFacility_Tile2} | ||
Symbol 288 Bitmap {objects.Bank_Tile} | ||
Symbol 289 Bitmap {objects.MiningFacility_Tile3} | ||
Symbol 290 Bitmap {objects.MiningFacility_Tile1} | ||
Symbol 291 Bitmap {objects.PortExport_Tile4} | ||
Symbol 292 Bitmap {objects.PortExport_Tile3} | ||
Symbol 293 Bitmap {objects.PortExport_Tile2} | ||
Symbol 294 Bitmap {objects.PortExport_Tile1} | ||
Symbol 295 Bitmap {actions.ImportCarAction_ButtonCarImage} | ||
Symbol 296 Bitmap {actions.EmissionsTreatyAction_action_treaty_emissions} | ||
Symbol 297 Bitmap {automata.CarAutomataType_CarNW} | ||
Symbol 298 Bitmap {actions.OpenBorderAction_action_border_open} | ||
Symbol 299 Bitmap {actions.SellSuvAction_ButtonSuvImage} | ||
Symbol 300 Bitmap {objects.Mall_Tile} | ||
Symbol 301 Bitmap {ui.InfoBar_MissionInfoBar} | ||
Symbol 302 Bitmap {objects.WhiteHouse_Tile} | ||
Symbol 303 Bitmap {automata.PersonAutomataType_Person2Back1} | ||
Symbol 304 Bitmap {automata.HybridAutomataType_CarNW} | ||
Symbol 305 Bitmap {automata.PersonAutomataType_Person2Back2} | ||
Symbol 306 Bitmap {automata.PersonAutomataType_Person2Back3} | ||
Symbol 307 Bitmap {automata.PersonAutomataType_Person2Back4} | ||
Symbol 308 Bitmap {automata.PersonAutomataType_Person2Back5} | ||
Symbol 309 Bitmap {automata.PersonAutomataType_Person2Back6} | ||
Symbol 310 Bitmap {objects.FederalReserve_Tile} | ||
Symbol 311 Bitmap {automata.PersonAutomataType_Person2Front6} | ||
Symbol 312 Bitmap {objects.HybridFactory_Tile4} | ||
Symbol 313 Bitmap {objects.HybridFactory_Tile3} | ||
Symbol 314 Bitmap {objects.HybridFactory_Tile2} | ||
Symbol 315 Bitmap {objects.HybridFactory_Tile1} | ||
Symbol 316 Bitmap {Main_sound_bg_main} | ||
Symbol 317 Bitmap {objects.MilitaryBase_Tile} | ||
Symbol 318 Bitmap {Game_UIResourceIconCar} | ||
Symbol 319 Bitmap {actions.ElectEconomistAction_action_elect_economist} | ||
Symbol 320 Bitmap {automata.PersonAutomataType_Person2Front1} | ||
Symbol 321 Bitmap {automata.PersonAutomataType_Person2Front3} | ||
Symbol 322 Bitmap {automata.PersonAutomataType_Person2Front2} | ||
Symbol 323 Bitmap {automata.PersonAutomataType_Person2Front5} | ||
Symbol 324 Bitmap {automata.PersonAutomataType_Person2Front4} | ||
Symbol 325 Bitmap {actions.BuildCarAction_ButtonImage} | ||
Symbol 326 Bitmap {objects.StockMarket_Tile4} | ||
Symbol 327 Bitmap {objects.StockMarket_Tile3} | ||
Symbol 328 Bitmap {objects.StockMarket_Tile2} | ||
Symbol 329 Bitmap {objects.House_Tile} | ||
Symbol 330 Bitmap {objects.StockMarket_Tile1} | ||
Symbol 331 Bitmap {actions.GlobalistNegativeAction_action_tariffs_lower} | ||
Symbol 332 Font {ui.UILabel_FontBold} | ||
Symbol 333 Bitmap {Game_UIResourceIconMetal} | ||
Symbol 334 Bitmap {automata.PersonAutomataType_Person1Back6} | ||
Symbol 335 Bitmap {automata.PersonAutomataType_Person1Back5} | ||
Symbol 336 Bitmap {automata.CarAutomataType_CarSE} | ||
Symbol 337 Bitmap {ui.Ufo_ufoArt} | ||
Symbol 338 Bitmap {automata.PersonAutomataType_Person1Back2} | ||
Symbol 339 Bitmap {ui.MissionOverlay_CheckBoxOn} | ||
Symbol 340 Bitmap {actions.ForeignRetreatAction_action_war_retreat} | ||
Symbol 341 Bitmap {automata.PersonAutomataType_Person1Back1} | ||
Symbol 342 Bitmap {automata.PersonAutomataType_Person1Back4} | ||
Symbol 343 Bitmap {automata.PersonAutomataType_Person1Back3} | ||
Symbol 344 Bitmap {automata.CarAutomataType_CarSW} | ||
Symbol 345 Bitmap {actions.MallShopAction_action_mall_shop} | ||
Symbol 346 Bitmap {actions.OutsourceCreateSuvAction_ButtonSuvImage} | ||
Symbol 347 Bitmap {actions.EconomistNegativeAction_Icon} | ||
Symbol 348 Bitmap {ui.QuitOverlay_QuitPanel} | ||
Symbol 349 Bitmap {actions.ElectLaborerAction_action_elect_laborer} | ||
Symbol 350 Bitmap {actions.UpgradeMiningFacilityAction_UpgradeImage} | ||
Symbol 351 Bitmap {actions.LowerTaxesAction_action_taxes_lower} | ||
Symbol 352 Bitmap {ui.ResultsOverlay_WinPanel} | ||
Symbol 353 Bitmap {actions.UpgradeOilRefineryLevel2Action_UpgradeImage} | ||
Symbol 354 Bitmap {Game_HighlightedTileFront} | ||
Symbol 355 Bitmap {actions.RepairDamagedBuildingAction_action_rebuild} | ||
Symbol 356 Bitmap {objects.Apartment_Tile} | ||
Symbol 357 Bitmap {objects.Condos_Tile} | ||
Symbol 358 Bitmap {actions.ExportCarAction_ButtonCarImage} | ||
Symbol 359 Bitmap {actions.InvestIPOAction_ButtonImage} | ||
Symbol 360 Bitmap {Game_action_remove} | ||
Symbol 361 Bitmap {Game_UIResourceIconOil} | ||
Symbol 362 Bitmap {actions.LaborerNeutralAction_action_labor_alien} | ||
Symbol 363 Bitmap {ui.MissionOverlay_MissionBg} | ||
Symbol 364 Bitmap {objects.GovernmentHealthcare_Tile} | ||
Symbol 365 Bitmap {actions.ImpeachPresidentAction_action_president_impeach} | ||
Symbol 366 Bitmap {actions.SellHybridAction_ButtonHybridImage} | ||
Symbol 367 Bitmap {Game_UIActionsPanel} | ||
Symbol 368 Bitmap {Game_UIResourceIconHybrid} | ||
Symbol 369 Bitmap {objects.FemaBuilding_Tile} | ||
Symbol 370 Bitmap {actions.InvestBlueChipAction_ButtonImage} | ||
Symbol 371 Bitmap {actions.UpgradeMiningFacilityLevel2Action_UpgradeImage} | ||
Symbol 372 Bitmap {objects.Capitol_Tile} | ||
Symbol 373 Bitmap {actions.ImportHybridAction_ButtonHybridImage} | ||
Symbol 374 Bitmap {actions.UnlockSuvAction_Icon} | ||
Symbol 375 Bitmap {Game_UIInfoPanel} | ||
Symbol 376 Bitmap {Game_BackgroundGraphic} | ||
Symbol 377 Bitmap {objects.CarCorporation_Tile1} | ||
Symbol 378 Bitmap {objects.ResearchFacility_Tile1} | ||
Symbol 379 Bitmap {Game_UIResourcePanel} | ||
Symbol 380 Bitmap {objects.WaterTreatment_Tile1} | ||
Symbol 381 Bitmap {objects.CondoHighrise_Tile} | ||
Symbol 382 Bitmap {actions.ElectGlobalistAction_action_elect_globalist} | ||
Symbol 383 Bitmap {actions.AssistProtectionAction_action_workers_assist} | ||
Symbol 384 Bitmap {actions.RaiseTaxesAction_action_taxes_raise} | ||
Symbol 385 Bitmap {objects.GasStation_Tile} | ||
Symbol 386 Bitmap {objects.BorderGate_Tile1} | ||
Symbol 387 Bitmap {objects.BorderGate_Tile2} | ||
Symbol 388 Bitmap {actions.UpgradeCarFactoryAction_UpgradeImage} | ||
Symbol 389 Bitmap {actions.EconomistNeutralAction_Icon} | ||
Symbol 390 Bitmap {actions.UnlockMining3Action_Icon} | ||
Symbol 391 Bitmap {actions.UpgradeOilRefineryAction_UpgradeImage} | ||
Symbol 392 Bitmap {actions.ForeignWarAction_action_war_start} | ||
Symbol 393 Bitmap {actions.FreeTradeAction_action_global_free} | ||
Symbol 394 Bitmap {objects.PortImport_Tile3} | ||
Symbol 395 Bitmap {Game_FenceTile} | ||
Symbol 396 Bitmap {actions.UnlockOilRefinery3Action_Icon} | ||
Symbol 397 Bitmap {objects.PortImport_Tile4} | ||
Symbol 398 Bitmap {Game_GrassTile} | ||
Symbol 399 Bitmap {objects.PortImport_Tile1} | ||
Symbol 400 Bitmap {actions.BuyCarBulkAction_ButtonCarImage} | ||
Symbol 401 Bitmap {objects.PortImport_Tile2} | ||
Symbol 402 Bitmap {actions.TakeOutLoanAction_ButtonLoan} | ||
Symbol 403 Bitmap {actions.EconomistPositiveAction_Icon} | ||
Symbol 404 Bitmap {actions.LaborerPositiveAction_action_labor_child} | ||
Symbol 405 Bitmap {objects.WaterTreatment_Tile4} | ||
Symbol 406 Bitmap {actions.CloseBorderAction_action_border_close} | ||
Symbol 407 Bitmap {objects.WaterTreatment_Tile3} | ||
Symbol 408 Bitmap {objects.WaterTreatment_Tile2} | ||
Symbol 409 Bitmap {objects.MovieTheater_Tile} | ||
Symbol 410 Bitmap {actions.UpgradeSuvFactoryAction_UpgradeImage} | ||
Symbol 411 Bitmap {objects.OutsourceCars_Tile1} | ||
Symbol 412 Bitmap {ui.PauseOverlay_popup_pause} | ||
Symbol 413 Bitmap {actions.SellCarAction_ButtonCarImage} | ||
Symbol 414 Bitmap {actions.PayDebtMoreAction_ButtonPayDebt} | ||
Symbol 415 Bitmap {Game_HighlightedTileBack} | ||
Symbol 416 Bitmap {Game_UIResourceIconMoney} | ||
Symbol 417 Bitmap {ui.ResultsOverlay_LosePanel} | ||
Symbol 418 Bitmap {ui.MissionOverlay_CheckBoxOff} | ||
Symbol 419 Bitmap {automata.PersonAutomataType_Person1Front1} | ||
Symbol 420 Bitmap {automata.PersonAutomataType_Person1Front2} | ||
Symbol 421 Bitmap {automata.PersonAutomataType_Person1Front5} | ||
Symbol 422 Bitmap {automata.PersonAutomataType_Person1Front6} | ||
Symbol 423 Bitmap {automata.PersonAutomataType_Person1Front3} | ||
Symbol 424 Bitmap {actions.ExportHybridAction_ButtonHybridImage} | ||
Symbol 425 Bitmap {automata.PersonAutomataType_Person1Front4} | ||
Symbol 426 Bitmap {objects.Oil_Tile3} | ||
Symbol 427 Bitmap {objects.Oil_Tile4} | ||
Symbol 428 Bitmap {objects.Oil_Tile1} | ||
Symbol 429 Bitmap {Game_IsoMask} | ||
Symbol 430 Bitmap {objects.Oil_Tile2} | ||
Symbol 431 Bitmap {actions.BuySuvBulkAction_ButtonSuvImage} | ||
Symbol 432 Bitmap {actions.SellHybridBulkAction_ButtonHybridImage} | ||
Symbol 433 Bitmap {ui.HighScoresOverlay_ScoresPanel} | ||
Symbol 434 Bitmap {ui.Ufo_ufoex0015} | ||
Symbol 435 Bitmap {ui.Ufo_ufoex0016} | ||
Symbol 436 Bitmap {ui.Ufo_ufoex0013} | ||
Symbol 437 Bitmap {ui.Ufo_ufoex0014} | ||
Symbol 438 Bitmap {ui.Ufo_ufoex0011} | ||
Symbol 439 Bitmap {Game_HighlightedTile} | ||
Symbol 440 Bitmap {ui.Ufo_ufoex0012} | ||
Symbol 441 Bitmap {actions.ColdWarAction_action_war_coldwar_enter} | ||
Symbol 442 Bitmap {ui.Ufo_ufoex0010} | ||
Symbol 443 Bitmap {objects.Minerals_Tile1} | ||
Symbol 444 Bitmap {actions.GlobalistPositiveAction_action_tariffs_raise} | ||
Symbol 445 Bitmap {Game_UITabMask} | ||
Symbol 446 Bitmap {Game_UIResourceIconSuv} | ||
Symbol 447 Bitmap {actions.PrepareProtectionAction_action_workers_prepare} | ||
Symbol 448 Bitmap {objects.Hospital_Tile} | ||
Symbol 449 Bitmap {objects.UnitedNations_Tile1} | ||
Symbol 450 Bitmap {automata.PersonAutomataType_Person3Back3} | ||
Symbol 451 Bitmap {automata.SuvAutomataType_CarNE} | ||
Symbol 452 Bitmap {automata.PersonAutomataType_Person3Back4} | ||
Symbol 453 Bitmap {automata.PersonAutomataType_Person3Back5} | ||
Symbol 454 Bitmap {automata.PersonAutomataType_Person3Back6} | ||
Symbol 455 Bitmap {actions.ImportSuvAction_ButtonSuvImage} | ||
Symbol 456 Bitmap {actions.UnlockMining2Action_Icon} | ||
Symbol 457 Bitmap {automata.PersonAutomataType_Person3Back2} | ||
Symbol 458 Bitmap {automata.PersonAutomataType_Person3Back1} | ||
Symbol 459 Bitmap {actions.GotoStadiumAction_action_goto_stadium} | ||
Symbol 460 Bitmap {objects.NuclearPlant_Tile4} | ||
Symbol 461 Bitmap {objects.SuvFactory_Tile2} | ||
Symbol 462 Bitmap {objects.NuclearPlant_Tile3} | ||
Symbol 463 Bitmap {objects.SuvFactory_Tile1} | ||
Symbol 464 Bitmap {objects.SuvFactory_Tile4} | ||
Symbol 465 Bitmap {objects.SuvFactory_Tile3} | ||
Symbol 466 Bitmap {actions.LaborerNegativeAction_action_labor_elderly} | ||
Symbol 467 Bitmap {automata.SuvAutomataType_CarNW} | ||
Symbol 468 Bitmap {objects.NuclearPlant_Tile1} | ||
Symbol 469 Bitmap {ui.Lightning_li0010} | ||
Symbol 470 Bitmap {automata.PersonAutomataType_Person3Front1} | ||
Symbol 471 Bitmap {ui.Lightning_li0007} | ||
Symbol 472 Bitmap {automata.PersonAutomataType_Person3Front2} | ||
Symbol 473 Bitmap {automata.HybridAutomataType_CarSE} | ||
Symbol 474 Bitmap {actions.ExportSuvAction_ButtonSuvImage} | ||
Symbol 475 Bitmap {automata.PersonAutomataType_Person3Front3} | ||
Symbol 476 Bitmap {automata.PersonAutomataType_Person3Front4} | ||
Symbol 477 Bitmap {ui.Lightning_li0006} | ||
Symbol 478 Bitmap {objects.Park_Tile2} | ||
Symbol 479 Bitmap {ui.Lightning_li0003} | ||
Symbol 480 Bitmap {objects.Park_Tile1} | ||
Symbol 481 Bitmap {objects.Park_Tile4} | ||
Symbol 482 Bitmap {actions.BuyHybridBulkAction_ButtonHybridImage} | ||
Symbol 483 Bitmap {objects.Park_Tile3} | ||
Symbol 484 Bitmap {automata.PersonAutomataType_Person3Front5} | ||
Symbol 485 Bitmap {automata.PersonAutomataType_Person3Front6} | ||
Symbol 486 Bitmap {actions.LowerRatesAction_action_lower_rates} | ||
Symbol 487 Bitmap {actions.SellSuvBulkAction_ButtonSuvImage} | ||
Symbol 488 Bitmap {automata.HybridAutomataType_CarSW} | ||
Symbol 489 Bitmap {objects.CarFactory_Tile4} | ||
Symbol 490 Bitmap {actions.OfferGovernmentCareAction_action_govt_assist} | ||
Symbol 491 Bitmap {ui.Lightning_li0002} | ||
Symbol 492 Bitmap {objects.CarFactory_Tile3} | ||
Symbol 493 Bitmap {objects.CarFactory_Tile2} | ||
Symbol 494 Bitmap {objects.Stadium_Tile1} | ||
Symbol 495 Bitmap {objects.CarFactory_Tile1} | ||
Symbol 496 Bitmap {objects.OilRefinery_Tile3} | ||
Symbol 497 Bitmap {actions.VisitParkAction_actions_visit_park} | ||
Symbol 498 Bitmap {objects.OilRefinery_Tile4} | ||
Symbol 499 Bitmap {objects.OilRefinery_Tile1} | ||
Symbol 500 Bitmap {objects.OilRefinery_Tile2} | ||
Symbol 501 Bitmap {actions.OfferCareAction_action_hospital_assist} | ||
Symbol 502 Bitmap {ui.Lightning_li0015} | ||
Symbol 503 Bitmap {actions.UnlockHybridAction_Icon} | ||
Symbol 504 Bitmap {actions.SellCarBulkAction_ButtonCarImage} | ||
Symbol 505 Bitmap {ui.Ufo_ufoex0002} | ||
Symbol 506 Bitmap {ui.Ufo_ufoex0003} | ||
Symbol 507 Bitmap {ui.Ufo_ufoex0004} | ||
Symbol 508 Bitmap {ui.Ufo_ufoex0005} | ||
Symbol 509 Bitmap {objects.OutsourcingLarge_Tile1} | ||
Symbol 510 Bitmap {ui.Ufo_ufoex0006} | ||
Symbol 511 Bitmap {ui.Ufo_ufoex0007} | ||
Symbol 512 Bitmap {ui.Ufo_ufoex0008} | ||
Symbol 513 Bitmap {ui.Ufo_ufoex0009} | ||
Symbol 514 Bitmap {ui.Lightning_li0014} | ||
Symbol 515 Bitmap {ui.Lightning_li0012} | ||
Symbol 516 Bitmap {ui.InstructionsOverlay_popup_how_to_play} | ||
Symbol 517 Bitmap {objects.CarDealership_Tile1} | ||
Symbol 518 Bitmap {ui.Ufo_ufoex0001} | ||
Symbol 519 Bitmap {Game_UITabBars} |
Instance Names
"dt_text" | Symbol 221 MovieClip {ui.SerpentineMedium_serpentine_medium} [serpentine_medium] Frame 1 | Symbol 220 EditableText |
"dt_mission" | Symbol 241 MovieClip {ui.MissionOverlay_SerpentineText} [serpentine_txt] Frame 1 | Symbol 240 EditableText |
Special Tags
FileAttributes (69) | Timeline Frame 1 | Access network only, Metadata present, AS3. |
SWFMetaData (77) | Timeline Frame 1 | 458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..." |
ScriptLimits (65) | Timeline Frame 1 | MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds |
ExportAssets (56) | Timeline Frame 1 | Symbol 11 as "percentloader" |
ExportAssets (56) | Timeline Frame 1 | Symbol 15 as "miniloadingani" |
ExportAssets (56) | Timeline Frame 2 | Symbol 18 as "mouseclick" |
ExportAssets (56) | Timeline Frame 2 | Symbol 19 as "bkgd_mission_select" |
ExportAssets (56) | Timeline Frame 2 | Symbol 20 as "mouseover" |
ExportAssets (56) | Timeline Frame 2 | Symbol 21 as "menu1loopable" |
ExportAssets (56) | Timeline Frame 2 | Symbol 25 as "howtoplay_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 26 as "bkgd_splash" |
ExportAssets (56) | Timeline Frame 2 | Symbol 30 as "highscores_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 31 as "bkgd_main" |
ExportAssets (56) | Timeline Frame 2 | Symbol 35 as "playnow_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 40 as "quit_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 45 as "help_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 56 as "global_indicator_mc" |
ExportAssets (56) | Timeline Frame 2 | Symbol 61 as "pause_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 65 as "goals_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 76 as "face_indicator_mc" |
ExportAssets (56) | Timeline Frame 2 | Symbol 77 as "gameloop" |
ExportAssets (56) | Timeline Frame 2 | Symbol 81 as "close_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 195 as "howtoplay" |
ExportAssets (56) | Timeline Frame 2 | Symbol 199 as "continue_win_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 200 as "youwin" |
ExportAssets (56) | Timeline Frame 2 | Symbol 201 as "youlose" |
ExportAssets (56) | Timeline Frame 2 | Symbol 205 as "continue_lose_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 210 as "volume_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 214 as "volume_off_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 217 as "ui.Label_LabelBackground" |
ExportAssets (56) | Timeline Frame 2 | Symbol 218 as "workerhouse" |
ExportAssets (56) | Timeline Frame 2 | Symbol 221 as "serpentine_medium" |
ExportAssets (56) | Timeline Frame 2 | Symbol 222 as "mission2" |
ExportAssets (56) | Timeline Frame 2 | Symbol 223 as "mission1" |
ExportAssets (56) | Timeline Frame 2 | Symbol 224 as "mission9" |
ExportAssets (56) | Timeline Frame 2 | Symbol 225 as "mission11" |
ExportAssets (56) | Timeline Frame 2 | Symbol 226 as "mission8" |
ExportAssets (56) | Timeline Frame 2 | Symbol 227 as "mission10" |
ExportAssets (56) | Timeline Frame 2 | Symbol 228 as "mission7" |
ExportAssets (56) | Timeline Frame 2 | Symbol 229 as "mission6" |
ExportAssets (56) | Timeline Frame 2 | Symbol 230 as "mission5" |
ExportAssets (56) | Timeline Frame 2 | Symbol 231 as "mission4" |
ExportAssets (56) | Timeline Frame 2 | Symbol 235 as "play_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 236 as "mission3" |
ExportAssets (56) | Timeline Frame 2 | Symbol 237 as "mission_end" |
ExportAssets (56) | Timeline Frame 2 | Symbol 238 as "mission13" |
ExportAssets (56) | Timeline Frame 2 | Symbol 239 as "mission12" |
ExportAssets (56) | Timeline Frame 2 | Symbol 241 as "serpentine_txt" |
ExportAssets (56) | Timeline Frame 2 | Symbol 242 as "mission15" |
ExportAssets (56) | Timeline Frame 2 | Symbol 243 as "mission14" |
ExportAssets (56) | Timeline Frame 2 | Symbol 244 as "carfactory" |
ExportAssets (56) | Timeline Frame 2 | Symbol 245 as "hailtothechief_v1" |
ExportAssets (56) | Timeline Frame 2 | Symbol 246 as "oilfactory" |
ExportAssets (56) | Timeline Frame 2 | Symbol 247 as "successful" |
ExportAssets (56) | Timeline Frame 2 | Symbol 248 as "minefactory" |
ExportAssets (56) | Timeline Frame 2 | Symbol 251 as "ui.HelpBalloonThing_Background" |
ExportAssets (56) | Timeline Frame 2 | Symbol 252 as "ufohovering_v1" |
ExportAssets (56) | Timeline Frame 2 | Symbol 253 as "questionablesound" |
ExportAssets (56) | Timeline Frame 2 | Symbol 254 as "ufoexplodes_v1" |
ExportAssets (56) | Timeline Frame 2 | Symbol 255 as "presidentialtune1_v1" |
ExportAssets (56) | Timeline Frame 2 | Symbol 256 as "lightningfromthegods_v1" |
ExportAssets (56) | Timeline Frame 2 | Symbol 260 as "red_quit_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 264 as "leftarrow_bu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 267 as "slider_horizontal_mc" |
ExportAssets (56) | Timeline Frame 2 | Symbol 272 as "rightarrow_bu" |
SerialNumber (41) | Timeline Frame 1 |
Labels
"IndecisionLoader" | Frame 1 |
"Main" | Frame 2 |
|