Section 1
//Achievement (Data.Achievement)
package Data {
public class Achievement {
private var _title:String;
private var _isGlobal:Boolean;
private var completionFunction:Function;
private var _description:String;
public static const ACHIEVEMENTS:Array = [new Achievement("Ineffective Publicist", "Return to the faerie world without affecting any humans.", Progress.noHumans), new Achievement("Mold Ambassador", "Return to the faerie world after affecting a human's life.", Progress.onlySomeHumans), new Achievement("Thorough Advocate", "Return to the faerie world after affecting every human in the town.", Progress.everyHuman), new Achievement("Decaying Paragon", "Show the most positive side of mold.", Progress.paragon), new Achievement("Fuzzy Savior", "Give a generally good impression of mold.", Progress.good), new Achievement("Balanced Demonstrator", "Provide an even-handed view of mold.", Progress.neutral), new Achievement("Rotting Scourge", "Show the dark side of mold.", Progress.bad), new Achievement("Budding Horror", "Slaughter as many humans as possible.", Progress.horror), new Achievement("Fruiting Body", "Drop at least 2000 mold spores in one game.", function ():Boolean{
return ((Progress.moldSporesDropped >= 2000));
}), new Achievement("Slime Friend", "Collect at least 25 slime mold spores across all games.", function ():Boolean{
return ((Progress.numSlimeSporesCollected() >= 25));
}, true), new Achievement("Slime Savior", "Collect at least 50 slime mold spores across all games.", function ():Boolean{
return ((Progress.numSlimeSporesCollected() >= 50));
}, true), new Achievement("Fruit Spoiler", "Mold every kind of fruit.", Progress.fruitSpoiler), new Achievement("Beacon of Hope", "Lead the lost child to safety.", Progress.childGuided), new Achievement("Gourmet Chef", "Provide the restaurant with an exotic new ingredient.", Progress.restaurantSaved), new Achievement("Health Infector", "Create a health code violation at the restaurant.", Progress.restaurantShutdown), new Achievement("Deadly Cook", "Create a tragic incident at the restaurant.", Progress.restaurantPoisoned), new Achievement("Home Wrecker", "Save a family's finances in an unorthodox way.", Progress.houseSaved), new Achievement("Domestic Tragedian", "Put a struggling family out of their misery.", Progress.housePoisoned), new Achievement("Malpracticing Nurse", "Poison a patient with hospital food.", Progress.hospitalPoisoned), new Achievement("Surprise Recovery Nurse", "Assist in the mysterious recovery of a patient.", Progress.hospitalCured), new Achievement("Serendipitous Researcher", "Provide a lasting cure to a virulent disease.", Progress.hospitalCureFound), new Achievement("Plot Foiler", "Make an invalid suspicious enough to call the police.", Progress.mansionMotherSaved), new Achievement("Double Rescuer", "Cure an invalid and uncover a plot.", Progress.mansionMotherCured), new Achievement("Fungal Robin Hood", "Eliminate a rich family.", Progress.mansionAllDead)];
public function Achievement(_arg1:String, _arg2:String, _arg3:Function, _arg4:Boolean=false){
this._title = _arg1;
this._description = _arg2;
this.completionFunction = _arg3;
this._isGlobal = _arg4;
}
public function get registered():Boolean{
return (Progress.currProgress.achievementComplete(title));
}
public function get isGlobal():Boolean{
return (_isGlobal);
}
public function get title():String{
return (_title);
}
public function get complete():Boolean{
return (completionFunction());
}
public function get description():String{
return (_description);
}
}
}//package Data
Section 2
//Level (Data.Level)
package Data {
import flash.display.*;
import flash.media.*;
import Resources.*;
public class Level {
public var darknessMask:Sprite;
public var music:Sound;
public var name:String;
public var background:Class;
public var overlay:Class;
public var parallax:Class;
public var collision:Class;
public var contents:XML;
public var alphaMap:Class;
public static const HOUSE:Level = new Level("House", Backgrounds.clsHouse, Backgrounds.clsHouseTrans, Backgrounds.clsHouseCollision, Backgrounds.clsHousePara, null, HouseContents, SFX.MAIN_LOOP);
;
public static const HOSPITAL:Level = new Level("Hospital", Backgrounds.clsHospital, Backgrounds.clsHospitalTrans, Backgrounds.clsHospitalCollision, Backgrounds.clsHousePara, null, HospitalContents, SFX.MAIN_LOOP);
;
private static const HouseContents:XML = <levelcontents x="100" y="950">
<slimespores>
<slimespore x="1070" y="170"/>
<slimespore x="395" y="570"/>
<slimespore x="360" y="1445"/>
<slimespore x="945" y="1255"/>
<slimespore x="1260" y="785"/>
<slimespore x="1305" y="1255"/>
<slimespore x="1855" y="1255"/>
<slimespore x="1830" y="960"/>
</slimespores>
<moldables>
<moldable type="PEACH" x="1405" y="930"/>
<moldable type="BANANA" x="1325" y="930"/>
<moldable type="INSULATION" x="1190" y="815"/>
<moldable type="INSULATION" x="1190" y="965"/>
<moldable type="INSULATION" x="1190" y="1115"/>
<moldable type="MUSHROOM" x="500" y="1420"/>
<moldable type="MUSHROOM" x="770" y="1420"/>
<moldable type="MUSHROOM" x="1000" y="1420"/>
<moldable type="MUSHROOM" x="1230" y="1420"/>
<moldable type="MUSHROOM" x="1500" y="1420"/>
</moldables>
<puppets>
<puppet x="1680" y="870" bottom="DENIM" top="PINK_FABRIC" face="POOR_MOTHER" startAnim="WORRY" skinColor="0xeeccaa"/>
<puppet x="1030" y="1090" bottom="PINK_FABRIC" top="HOSPITAL_GREENS" face="POOR_KID" startAnim="CROSSLEGGED" ischild="true" skinColor="0xeeccaa"/>
</puppets>
<zones>
<zone x="1300" y="660" width="525" height="600" source="POORMOTHER"/>
</zones>
</levelcontents>
;
private static const HospitalContents:XML = <levelcontents x="50" y="840">
<slimespores>
<slimespore x="245" y="665"/>
<slimespore x="330" y="715"/>
<slimespore x="1615" y="172"/>
<slimespore x="1665" y="1308"/>
<slimespore x="875" y="995"/>
<slimespore x="290" y="1912"/>
<slimespore x="1595" y="1325"/>
<slimespore x="680" y="52"/>
</slimespores>
<moldables>
<moldable type="FLASK" x="385" y="1610"/>
<moldable type="FLASK" x="840" y="1620"/>
<moldable type="PETRIDISH" x="1000" y="1670"/>
<moldable type="SANDWICH" x="1025" y="490"/>
<moldable type="GREENAPPLE" x="960" y="485"/>
</moldables>
<source x="1620" y="1013" type="TOXIC"/>
<puppets>
<puppet x="520" y="525" bottom="HOSPITAL_GREENS" top="WHITE_SKIN" face="SICK_KID" startAnim="SICK" skinColor="0xeeccaa" ischild="true" sideview="true" rotation="-90"/>
<puppet x="640" y="1525" bottom="HOSPITAL_GREENS" top="WHITE_FABRIC" face="SCIENTIST" startAnim="SCIENCE" skinColor="0xeeccaa"/>
<puppet x="1050" y="915" bottom="FLORAL_PATTERN" top="WHITE_FABRIC" face="NURSE" startAnim="NURSE" skinColor="0xeeccaa"/>
</puppets>
<zones>
<zone x="355" y="1330" width="600" height="600" source="SCIENTIST"/>
</zones>
</levelcontents>
;
private static const RestaurantContents:XML = <levelcontents x="75" y="350">
<moldables>
<moldable type="CHEESE" x="2780" y="140"/>
<moldable type="CHEESE" x="2685" y="320"/>
<moldable type="LETTUCE" x="2625" y="290"/>
<moldable type="LETTUCE" x="2750" y="285"/>
<moldable type="REDAPPLE" x="2705" y="120"/>
<moldable type="GREENAPPLE" x="2565" y="305"/>
<moldable type="SPAGHETTI" x="850" y="385"/>
<moldable type="SPAGHETTI" x="1510" y="385"/>
</moldables>
<slimespores>
<slimespore x="115" y="32"/>
<slimespore x="150" y="650"/>
<slimespore x="450" y="440"/>
<slimespore x="1125" y="650"/>
<slimespore x="2135" y="650"/>
<slimespore x="2300" y="340"/>
<slimespore x="2835" y="165"/>
<slimespore x="2815" y="345"/>
</slimespores>
<puppets>
<puppet x="570" y="265" bottom="BLACK_FABRIC" top="WHITE_FABRIC" face="MAITRE_D" startAnim="MAITRE_D_IDLE" skinColor="0xeeccaa"/>
<puppet x="930" y="320" bottom="BLACK_FABRIC" top="FLORAL_PATTERN" face="DINER1" startAnim="DINER" skinColor="0x553311"/>
<puppet x="1595" y="320" bottom="DENIM" top="BLACK_PLAID" face="DINER2" startAnim="DINER" skinColor="0xeeccaa"/>
<puppet x="2450" y="265" bottom="WHITE_FABRIC" top="WHITE_FABRIC" face="CHEF" startAnim="COOKING" skinColor="0xeeccaa"/>
</puppets>
<zones>
<zone x="350" y="0" width="400" height="720" source="MAITRED"/>
<zone x="750" y="0" width="400" height="720" source="DINER1"/>
<zone x="1400" y="0" width="400" height="720" source="DINER2"/>
<zone x="2250" y="0" width="400" height="720" source="CHEF"/>
</zones>
</levelcontents>
;
public static const FOREST:Level = new Level("Forest", Backgrounds.clsForest, Backgrounds.clsForestTrans, Backgrounds.clsForestCollision, Backgrounds.clsForestPara, getForestDarkness(), ForestContents, SFX.CALM_LOOP);
;
private static const RiverContents:XML = <levelcontents x="75" y="150">
<source x="1720" y="340" type="MUTANT"/>
<zones>
<zone x="300" y="0" width="400" height="480" source="SLIMEMOLD"/>
</zones>
<slimespores>
<slimespore x="70" y="410"/>
<slimespore x="85" y="435"/>
<slimespore x="78" y="423"/>
<slimespore x="1580" y="65"/>
<slimespore x="1640" y="60"/>
<slimespore x="1570" y="62"/>
<slimespore x="1745" y="400"/>
<slimespore x="1780" y="405"/>
</slimespores>
</levelcontents>
;
private static const MansionContents:XML = <levelcontents x="75" y="900">
<puppets>
<puppet x="1225" y="360" bottom="FLORAL_PATTERN" top="FLORAL_PATTERN" face="OLD_LADY" startAnim="OLD_LADY" skinColor="0xc1ae96" sideview="true" rotation="-90"/>
<puppet x="825" y="1050" bottom="BLACK_FABRIC" top="PINK_FABRIC" face="RICH_SON" startAnim="RICH_SON" skinColor="0xeeccaa"/>
</puppets>
<signs>
<sign x="1020" y="1060" signindex="3"/>
</signs>
<moldables>
<moldable type="BREADLOAF" x="1060" y="1065"/>
<moldable type="BANANA" x="1190" y="1075"/>
</moldables>
<source x="1755" y="1350" type="BLUE"/>
<zones>
<zone x="695" y="730" width="800" height="680" source="RICHSON"/>
<zone x="695" y="30" width="800" height="680" source="OLDLADY"/>
</zones>
<slimespores>
<slimespore x="1380" y="1120"/>
<slimespore x="1830" y="925"/>
<slimespore x="1855" y="927"/>
<slimespore x="1870" y="670"/>
<slimespore x="36" y="668"/>
<slimespore x="360" y="770"/>
<slimespore x="1085" y="695"/>
<slimespore x="990" y="405"/>
<slimespore x="685" y="670"/>
</slimespores>
</levelcontents>
;
public static const RIVER:Level = new Level("River", Backgrounds.clsRiver, Backgrounds.clsRiverTrans, Backgrounds.clsRiverCollision, Backgrounds.clsForestPara, null, RiverContents, SFX.CALM_LOOP);
;
public static const MANSION:Level = new Level("Mansion", Backgrounds.clsMansion, Backgrounds.clsMansionTrans, Backgrounds.clsMansionCollision, Backgrounds.clsHousePara, null, MansionContents, SFX.BUSY_LOOP);
;
private static const ForestContents:XML = <levelcontents x="340" y="350">
<moldables>
<moldable type="REDAPPLE" x="250" y="200"/>
<moldable type="REDAPPLE" x="350" y="225"/>
<moldable type="REDAPPLE" x="400" y="100"/>
<moldable type="REDAPPLE" x="950" y="375"/>
<moldable type="MUSHROOM" x="1284" y="1042"/>
<moldable type="MUSHROOM" x="1229" y="1039"/>
<moldable type="MUSHROOM" x="1170" y="1044"/>
<moldable type="MUSHROOM" x="1060" y="1042"/>
<moldable type="MUSHROOM" x="80" y="995"/>
<moldable type="MUSHROOM" x="150" y="1025"/>
<moldable type="MUSHROOM" x="455" y="1045"/>
<moldable type="MUSHROOM" x="675" y="1044"/>
</moldables>
<slimespores>
<slimespore x="50" y="420"/>
<slimespore x="1760" y="1073"/>
<slimespore x="1780" y="1066"/>
<slimespore x="1735" y="1068"/>
<slimespore x="1819" y="1326"/>
<slimespore x="1806" y="1375"/>
<slimespore x="1722" y="1395"/>
<slimespore x="1359" y="1359"/>
<slimespore x="77" y="876"/>
</slimespores>
<signs>
<sign x="425" y="325" signindex="0"/>
<sign x="825" y="290" signindex="1"/>
<sign x="1560" y="300" signindex="2"/>
</signs>
<source x="750" y="350" type="BREAD"/>
<zones>
<zone x="1200" y="0" width="400" height="480" source="WELL"/>
<zone x="60" y="720" width="540" height="360" source="LOSTBOY"/>
</zones>
<puppets>
<puppet x="340" y="925" bottom="DENIM" top="RED_PLAID" face="LOST_KID" startAnim="HUDDLE" skinColor="0xeeccaa" ischild="true" sideview="true" rotation="45"/>
</puppets>
</levelcontents>
;
public static const RESTAURANT:Level = new Level("Restaurant", Backgrounds.clsRestaurant, Backgrounds.clsRestaurantTrans, Backgrounds.clsRestaurantCollision, Backgrounds.clsHousePara, null, RestaurantContents, SFX.BUSY_LOOP, Backgrounds.clsRestaurantOverlay);
;
public function Level(_arg1:String, _arg2:Class, _arg3:Class, _arg4:Class, _arg5:Class, _arg6:Sprite, _arg7:XML, _arg8:Sound, _arg9:Class=null){
this.name = _arg1;
this.background = _arg2;
this.alphaMap = _arg3;
this.collision = _arg4;
this.parallax = _arg5;
this.darknessMask = _arg6;
this.contents = _arg7;
this.overlay = _arg9;
this.music = _arg8;
}
private static function getForestDarkness():Sprite{
var _local1:Sprite = new Sprite();
_local1.graphics.beginFill(0);
_local1.graphics.drawRect(0, 0, 1935, 500);
return (_local1);
}
}
}//package Data
Section 3
//MoldSpecies (Data.MoldSpecies)
package Data {
import Util.*;
import Resources.*;
public class MoldSpecies {
private var _name:String;
private var _sourceSpriteSheet:SpriteSheet;
private var colors:Array;
private var _description:String;
public static const BREAD_MOLD:MoldSpecies = new MoldSpecies([0x999999, 3368499, 4478293], "R. stolonifer", "A common mold, sometimes called \"Black Bread Mold,\" often found on bread surfaces and soft fruit. It is typically grayish-green when young, and is not particularly toxic. It is likely to cause more disgust than actual harm.", Sprites.SOURCE_BREAD);
;
public static const TOXIC_MOLD:MoldSpecies = new MoldSpecies([4465186, 0x220000, 0x222222], "S. chartarum", "This greenish-black mold is known as \"Toxic Black Mold\" due to its deadly toxins, which can be ingested or delivered through airborne spores. A house colonized by this mold can be quite dangerous to occupants. If a significant infestation is present and has not been disclosed by the sellers of a house, it may be grounds for a lawsuit by the residents.", Sprites.SOURCE_TOXIC);
;
public static const MUTANT_MOLD:MoldSpecies = new MoldSpecies([0xFF00, 0xDD00, 0xDDFF00], "P. mutans", "This is a strangely glowing mold of the Penicillum genus. It appears to have been mutated by industrial and biological waste. It gives off a bright green glow, sufficient to illuminate a dark area. It is also a potential source of new antibiotics; its cousin, P. chrysogenum, was the source of the drug penicillin.", Sprites.SOURCE_MUTANT);
;
public static const BLUE_MOLD:MoldSpecies = new MoldSpecies([0xDDDDDD, 8947967, 2237149], "P. roqueforti", "This blue-green mold is found commonly in nature. Its primary use is in the production of cheeses, where it provides a pungent, tangy taste.", Sprites.SOURCE_BLUE);
;
public function MoldSpecies(_arg1:Array, _arg2:String, _arg3:String, _arg4:SpriteSheet){
this.colors = _arg1;
this._name = _arg2;
this._description = _arg3;
this._sourceSpriteSheet = _arg4;
}
public function get name():String{
return (_name);
}
public function getRandomColor():uint{
return (colors[SugarMath.randint(0, (colors.length - 1))]);
}
public function get description():String{
return (_description);
}
public function get sourceSpriteSheet():SpriteSheet{
return (_sourceSpriteSheet);
}
public static function getSpeciesByCommonName(_arg1:String):MoldSpecies{
switch (_arg1){
case "BREAD":
return (BREAD_MOLD);
case "MUTANT":
return (MUTANT_MOLD);
case "BLUE":
return (BLUE_MOLD);
case "TOXIC":
return (TOXIC_MOLD);
default:
return (null);
};
}
}
}//package Data
Section 4
//Progress (Data.Progress)
package Data {
import flash.utils.*;
import WorldObjects.*;
import flash.net.*;
public class Progress {
private var moldsFoundThisGame:Dictionary;
private var moldedObjects:Dictionary;
public var currMold:MoldSpecies;
private var _moldSporesDropped:int;// = 0
private static const ACHIEVEMENTCOMPLETE:String = "ACHIEVEMENTCOMPLETE";
private static const FOUND:String = "FOUND";
private static const SLIMESPORECOLLECTED:String = "SLIMESPORECOLLECTED";
private static const NUMSLIMESPORES:String = "NUMSLIMESPORES";
private static const datastore:SharedObject = SharedObject.getLocal("MoldFairy", "/");
private static var _currProgress:Progress;
public function Progress(){
moldedObjects = new Dictionary();
moldsFoundThisGame = new Dictionary();
super();
if (moldFound(MoldSpecies.BREAD_MOLD)){
currMold = MoldSpecies.BREAD_MOLD;
} else {
if (moldFound(MoldSpecies.BLUE_MOLD)){
currMold = MoldSpecies.BLUE_MOLD;
} else {
if (moldFound(MoldSpecies.MUTANT_MOLD)){
currMold = MoldSpecies.MUTANT_MOLD;
} else {
if (moldFound(MoldSpecies.TOXIC_MOLD)){
currMold = MoldSpecies.TOXIC_MOLD;
};
};
};
};
}
public function moldedTypesAtLeastInWith(_arg1:Array, _arg2:int, _arg3:Level, _arg4:Array):Boolean{
var _local6:Moldable;
var _local5:int;
for each (_local6 in moldedObjects[_arg3]) {
if (((arraysIntersect(_local6.molds, _arg4)) && (!((_arg1.indexOf(_local6.type) == -1))))){
_local5++;
};
};
return ((_local5 >= _arg2));
}
private function arraysIntersect(_arg1:Array, _arg2:Array):Boolean{
var _local3:*;
for each (_local3 in _arg1) {
if (_arg2.indexOf(_local3) != -1){
return (true);
};
};
return (false);
}
public function collectSlimeSpore(_arg1:Level, _arg2:int):void{
if (!slimeSporeCollected(_arg1, _arg2)){
if (datastore.data[NUMSLIMESPORES] == null){
datastore.data[NUMSLIMESPORES] = 1;
} else {
var _local3 = datastore.data;
var _local4 = NUMSLIMESPORES;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
};
};
datastore.data[((_arg1.name + _arg2) + SLIMESPORECOLLECTED)] = true;
}
public function moldFound(_arg1:MoldSpecies):Boolean{
if (datastore.data[(_arg1.name + FOUND)] == true){
return (true);
};
return (false);
}
public function moldedTypeInWithOnly(_arg1:Array, _arg2:Level, _arg3:MoldSpecies):Boolean{
var _local4:Moldable;
for each (_local4 in moldedObjects[_arg2]) {
if (((((!((_arg1.indexOf(_local4.type) == -1))) && ((_local4.molds.length == 1)))) && ((_local4.molds[0] == _arg3)))){
return (true);
};
};
return (false);
}
public function slimeSporeCollected(_arg1:Level, _arg2:int):Boolean{
if (datastore.data[((_arg1.name + _arg2) + SLIMESPORECOLLECTED)] == true){
return (true);
};
return (false);
}
public function getMoldedObject(_arg1:Level, _arg2:int):Moldable{
if ((((moldedObjects[_arg1] == null)) || ((moldedObjects[_arg1].length <= _arg2)))){
return (null);
};
return (Moldable(moldedObjects[_arg1][_arg2]));
}
public function achievementComplete(_arg1:String):Boolean{
if (datastore.data[(_arg1 + ACHIEVEMENTCOMPLETE)] == true){
return (true);
};
return (false);
}
public function moldObject(_arg1:Level, _arg2:int, _arg3:Moldable):void{
if (moldedObjects[_arg1] == null){
moldedObjects[_arg1] = new Array();
};
moldedObjects[_arg1][_arg2] = _arg3;
}
public function moldedTypeAtLeastInWithOnly(_arg1:String, _arg2:int, _arg3:Level, _arg4:MoldSpecies):Boolean{
var _local6:Moldable;
var _local5:int;
for each (_local6 in moldedObjects[_arg3]) {
if ((((((_local6.type == _arg1)) && ((_local6.molds.length == 1)))) && ((_local6.molds[0] == _arg4)))){
_local5++;
};
};
return ((_local5 >= _arg2));
}
public function moldFoundThisGame(_arg1:MoldSpecies):Boolean{
if (moldsFoundThisGame[_arg1] == true){
return (true);
};
return (false);
}
public function moldedTypeAtLeast(_arg1:Array, _arg2:int):Boolean{
var _local4:Array;
var _local5:Moldable;
var _local3:int;
for each (_local4 in moldedObjects) {
for each (_local5 in _local4) {
if (_arg1.indexOf(_local5.type) != -1){
_local3++;
if (_local3 >= _arg2){
return (true);
};
};
};
};
return (false);
}
public function moldedAtLeastInWith(_arg1:int, _arg2:Level, _arg3:Array):Boolean{
var _local5:Moldable;
var _local4:int;
for each (_local5 in moldedObjects[_arg2]) {
if (arraysIntersect(_local5.molds, _arg3)){
_local4++;
};
};
return ((_local4 >= _arg1));
}
public function findMold(_arg1:MoldSpecies):void{
datastore.data[(_arg1.name + FOUND)] = true;
moldsFoundThisGame[_arg1] = true;
}
public function anyAchievementComplete():Boolean{
return (achievementComplete("ANY"));
}
public function completeAchievement(_arg1:String):void{
datastore.data[(_arg1 + ACHIEVEMENTCOMPLETE)] = true;
datastore.data[("ANY" + ACHIEVEMENTCOMPLETE)] = true;
}
public function moldedTypeInWith(_arg1:Array, _arg2:Level, _arg3:MoldSpecies):Boolean{
var _local4:Moldable;
for each (_local4 in moldedObjects[_arg2]) {
if (((!((_arg1.indexOf(_local4.type) == -1))) && (!((_local4.molds.indexOf(_arg3) == -1))))){
return (true);
};
};
return (false);
}
public static function hospitalPoisoned():Boolean{
return (currProgress.moldedTypeInWith([Moldable.TYPE_SANDWICH, Moldable.TYPE_GREENAPPLE], Level.HOSPITAL, MoldSpecies.TOXIC_MOLD));
}
public static function hospitalCureFound():Boolean{
return (((currProgress.moldedTypeInWithOnly([Moldable.TYPE_FLASK, Moldable.TYPE_PETRIDISH], Level.HOSPITAL, MoldSpecies.MUTANT_MOLD)) && (!(hospitalPoisoned()))));
}
public static function hospitalCured():Boolean{
return (((((currProgress.moldedTypeInWithOnly([Moldable.TYPE_SANDWICH, Moldable.TYPE_GREENAPPLE], Level.HOSPITAL, MoldSpecies.MUTANT_MOLD)) && (!(hospitalCureFound())))) && (!(hospitalPoisoned()))));
}
public static function onlySomeHumans():Boolean{
return (((((((((((((((((((((childGuided()) || (housePoisoned()))) || (houseSaved()))) || (restaurantPoisoned()))) || (restaurantSaved()))) || (restaurantShutdown()))) || (hospitalCured()))) || (hospitalCureFound()))) || (hospitalPoisoned()))) || (mansionAllDead()))) || (mansionMotherSaved())));
}
public static function houseSaved():Boolean{
return (((currProgress.moldedTypesAtLeastInWith([Moldable.TYPE_MUSHROOM, Moldable.TYPE_INSULATION], 3, Level.HOUSE, [MoldSpecies.TOXIC_MOLD])) && (!(housePoisoned()))));
}
public static function restaurantSaved():Boolean{
return (((((currProgress.moldedTypeInWithOnly([Moldable.TYPE_CHEESE], Level.RESTAURANT, MoldSpecies.BLUE_MOLD)) && (!(restaurantShutdown())))) && (!(restaurantPoisoned()))));
}
public static function restaurantPoisoned():Boolean{
return (currProgress.moldedAtLeastInWith(2, Level.RESTAURANT, [MoldSpecies.TOXIC_MOLD]));
}
public static function bad():Boolean{
return ((killCount > saviorCount));
}
public static function mansionMotherCured():Boolean{
return (((currProgress.moldedAtLeastInWith(1, Level.MANSION, [MoldSpecies.MUTANT_MOLD])) && (!(mansionAllDead()))));
}
public static function fruitSpoiler():Boolean{
return (((((((Progress.currProgress.moldedTypeAtLeast([Moldable.TYPE_REDAPPLE], 1)) && (Progress.currProgress.moldedTypeAtLeast([Moldable.TYPE_GREENAPPLE], 1)))) && (Progress.currProgress.moldedTypeAtLeast([Moldable.TYPE_BANANA], 1)))) && (Progress.currProgress.moldedTypeAtLeast([Moldable.TYPE_PEACH], 1))));
}
public static function get killCount():int{
var _local1:int;
if (housePoisoned()){
_local1++;
};
if (restaurantPoisoned()){
_local1++;
};
if (mansionAllDead()){
_local1++;
};
if (hospitalPoisoned()){
_local1++;
};
return (_local1);
}
public static function everyHuman():Boolean{
return (((((((((childGuided()) && (((housePoisoned()) || (houseSaved()))))) && (((((restaurantPoisoned()) || (restaurantSaved()))) || (restaurantShutdown()))))) && (((((hospitalCured()) || (hospitalCureFound()))) || (hospitalPoisoned()))))) && (((mansionAllDead()) || (mansionMotherSaved())))));
}
public static function mansionAllDead():Boolean{
return (currProgress.moldedAtLeastInWith(1, Level.MANSION, [MoldSpecies.TOXIC_MOLD]));
}
public static function clearProgress():void{
_currProgress = null;
}
public static function noHumans():Boolean{
return (((!(onlySomeHumans())) && (!(everyHuman()))));
}
public static function get saviorCount():int{
var _local1:int;
if (childGuided()){
_local1++;
};
if (houseSaved()){
_local1++;
};
if (mansionMotherSaved()){
_local1++;
};
if (((hospitalCured()) || (hospitalCureFound()))){
_local1++;
};
if (restaurantSaved()){
_local1++;
};
return (_local1);
}
public static function childGuided():Boolean{
return (currProgress.moldedTypeAtLeastInWithOnly(Moldable.TYPE_MUSHROOM, 4, Level.FOREST, MoldSpecies.MUTANT_MOLD));
}
public static function paragon():Boolean{
return ((saviorCount == 5));
}
public static function clearAllSavedProgress():void{
datastore.clear();
}
public static function horror():Boolean{
return ((((killCount == 4)) && ((saviorCount == 0))));
}
public static function restaurantShutdown():Boolean{
return (((currProgress.moldedAtLeastInWith(2, Level.RESTAURANT, [MoldSpecies.BREAD_MOLD, MoldSpecies.MUTANT_MOLD])) && (!(restaurantPoisoned()))));
}
public static function neutral():Boolean{
return ((killCount == saviorCount));
}
public static function mansionMotherSaved():Boolean{
return (((((currProgress.moldedAtLeastInWith(1, Level.MANSION, [MoldSpecies.BLUE_MOLD, MoldSpecies.BREAD_MOLD])) && (!(mansionAllDead())))) && (!(mansionMotherCured()))));
}
public static function housePoisoned():Boolean{
return (currProgress.moldedTypeInWith([Moldable.TYPE_PEACH, Moldable.TYPE_BANANA], Level.HOUSE, MoldSpecies.TOXIC_MOLD));
}
public static function set moldSporesDropped(_arg1:int):void{
currProgress._moldSporesDropped = _arg1;
}
public static function get moldSporesDropped():int{
return (currProgress._moldSporesDropped);
}
public static function numSlimeSporesCollected():int{
return (datastore.data[NUMSLIMESPORES]);
}
public static function good():Boolean{
return ((((saviorCount < 5)) && ((saviorCount > killCount))));
}
public static function get currProgress():Progress{
if (_currProgress == null){
_currProgress = new (Progress);
};
return (_currProgress);
}
}
}//package Data
Section 5
//AchievementIndicator (Interface.AchievementIndicator)
package Interface {
import Util.*;
import flash.display.*;
import flash.text.*;
import Data.*;
import Resources.*;
public class AchievementIndicator extends Sprite {
public function AchievementIndicator(_arg1:Achievement, _arg2:Boolean){
var _local4:TextField;
super();
mouseEnabled = false;
if (_arg1.registered){
SugarGraphics.drawSprite(graphics, Sprites.CHECK.bitmapData, 0, 10);
};
var _local3:TextField = new TextField();
_local3.textColor = 0xFFFFFF;
_local3.defaultTextFormat = Fonts.HEADING;
_local3.embedFonts = true;
_local3.text = _arg1.title;
_local3.width = 300;
_local3.x = 30;
this.addChild(_local3);
_local4 = new TextField();
_local4.textColor = 0xFFFFFF;
_local4.defaultTextFormat = Fonts.STANDARD;
_local4.embedFonts = true;
_local4.text = _arg1.description;
_local4.y = 25;
_local4.width = 280;
_local4.wordWrap = true;
_local4.x = 30;
this.addChild(_local4);
if (_arg2){
if (!_arg1.complete){
this.alpha = 0.65;
};
} else {
if (!_arg1.registered){
this.alpha = 0.5;
};
};
this.mouseChildren = false;
}
}
}//package Interface
Section 6
//BaseButton (Interface.BaseButton)
package Interface {
import flash.events.*;
import flash.display.*;
public class BaseButton extends Sprite {
public function BaseButton(){
this.addEventListener(MouseEvent.MOUSE_OVER, onOver);
this.addEventListener(MouseEvent.MOUSE_OUT, onOut);
}
protected function onOver(_arg1:MouseEvent):void{
Cursor.setDot(true);
}
protected function onOut(_arg1:MouseEvent):void{
Cursor.setDot(false);
}
}
}//package Interface
Section 7
//Cursor (Interface.Cursor)
package Interface {
import flash.display.*;
public class Cursor extends Sprite {
private static var cursorDot:Sprite;
public static var theCursor:Cursor = new (Cursor);
;
private static var cursorSclera:Sprite;
public function Cursor(){
this.mouseEnabled = false;
this.mouseChildren = false;
graphics.lineStyle(3, 0);
graphics.drawCircle(0, 0, 8);
graphics.lineStyle(1, 0xFFFFFF);
graphics.drawCircle(0, 0, 8);
cursorDot = new Sprite();
cursorDot.graphics.lineStyle(1, 0);
cursorDot.graphics.beginFill(0xFFFFFF);
cursorDot.graphics.drawCircle(0, 0, 4);
cursorDot.graphics.endFill();
cursorDot.visible = false;
this.addChild(cursorDot);
cursorSclera = new Sprite();
cursorSclera.graphics.lineStyle(6, 0);
cursorSclera.graphics.moveTo(-10, -6);
cursorSclera.graphics.lineTo(-14, 0);
cursorSclera.graphics.lineTo(-10, 6);
cursorSclera.graphics.moveTo(10, -6);
cursorSclera.graphics.lineTo(14, 0);
cursorSclera.graphics.lineTo(10, 6);
cursorSclera.graphics.lineStyle(1, 0xFFFFFF);
cursorSclera.graphics.moveTo(-10, -6);
cursorSclera.graphics.lineTo(-14, 0);
cursorSclera.graphics.lineTo(-10, 6);
cursorSclera.graphics.moveTo(10, -6);
cursorSclera.graphics.lineTo(14, 0);
cursorSclera.graphics.lineTo(10, 6);
cursorSclera.visible = false;
this.addChild(cursorSclera);
}
public static function setSclera(_arg1:Boolean):void{
cursorSclera.visible = _arg1;
}
public static function setDot(_arg1:Boolean):void{
cursorDot.visible = _arg1;
}
}
}//package Interface
Section 8
//MapLocation (Interface.MapLocation)
package Interface {
import Screens.*;
import flash.events.*;
import Util.*;
import Data.*;
public class MapLocation extends BaseButton {
private var level:Level;
private var sprites:SpriteSheet;
public function MapLocation(_arg1:SpriteSheet, _arg2:Level){
this.sprites = _arg1;
this.level = _arg2;
SugarGraphics.drawSprite(graphics, _arg1.getFrame(0, 0), 0, 0);
this.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
this.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
this.addEventListener(MouseEvent.CLICK, mouseClick);
}
private function mouseOut(_arg1:MouseEvent):void{
graphics.clear();
SugarGraphics.drawSprite(graphics, sprites.getFrame(0, 0), 0, 0);
}
private function mouseOver(_arg1:MouseEvent):void{
graphics.clear();
SugarGraphics.drawSprite(graphics, sprites.getFrame(0, 1), 0, 0);
}
private function mouseClick(_arg1:MouseEvent):void{
if (level != null){
Main.theMain.pushScreen(new PlayScreen(level));
MapScreen(parent).setLocation(this);
} else {
Main.theMain.pushScreen(new EndGameVerificationScreen());
};
}
}
}//package Interface
Section 9
//NewspaperBlock (Interface.NewspaperBlock)
package Interface {
import flash.text.*;
import Resources.*;
public class NewspaperBlock extends BaseButton {
public function NewspaperBlock(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String, _arg5:TextFormat){
var _local7:TextField;
super();
mouseChildren = false;
graphics.beginFill(0, 0);
graphics.drawRect(0, 0, _arg1, _arg2);
var _local6:TextField = new TextField();
_local6.width = _arg1;
_local6.height = int(_arg5.size);
_local6.defaultTextFormat = _arg5;
_local6.text = _arg3;
_local6.embedFonts = true;
this.addChild(_local6);
if (_arg4){
_local7 = new TextField();
_local7.width = _arg1;
_local7.height = (_arg2 - int(_arg5.size));
_local7.defaultTextFormat = Fonts.NEWSPAPER_BODY;
_local7.text = _arg4;
_local7.embedFonts = true;
_local7.y = _local6.height;
_local7.wordWrap = true;
this.addChild(_local7);
};
}
}
}//package Interface
Section 10
//SoundToggle (Interface.SoundToggle)
package Interface {
import flash.events.*;
import Resources.*;
public class SoundToggle extends SpriteButton {
public function SoundToggle(){
super(Sprites.MUSIC_ICON);
x = 616;
y = 8;
this.addEventListener(MouseEvent.CLICK, onClick);
}
private function onClick(_arg1:MouseEvent):void{
SFX.soundEnabled = !(SFX.soundEnabled);
if (SFX.soundEnabled){
alpha = 1;
} else {
alpha = 0.5;
};
}
}
}//package Interface
Section 11
//SpriteButton (Interface.SpriteButton)
package Interface {
import Util.*;
public class SpriteButton extends BaseButton {
private var _sprite:SpriteSheet;
private var _buttonActive:Boolean;
public function SpriteButton(_arg1:SpriteSheet){
_sprite = _arg1;
SugarGraphics.drawSprite(graphics, _arg1.getFrame(0, 0), 0, 0);
}
public function set buttonActive(_arg1:Boolean):void{
_buttonActive = _arg1;
if (_sprite.cols > 1){
graphics.clear();
if (_arg1){
SugarGraphics.drawSprite(graphics, _sprite.getFrame(0, 1), 0, 0);
} else {
SugarGraphics.drawSprite(graphics, _sprite.getFrame(0, 0), 0, 0);
};
};
}
public function get buttonActive():Boolean{
return (_buttonActive);
}
}
}//package Interface
Section 12
//StatusBar (Interface.StatusBar)
package Interface {
import Screens.*;
import flash.events.*;
import Util.*;
import flash.display.*;
import flash.text.*;
import Data.*;
import Resources.*;
public class StatusBar extends Sprite {
private var currSpeechText:TextField;
private var moldName:TextField;
private var nextSpeechText:TextField;
private var myPlayScreen:PlayScreen;
private var blackButton:SpriteButton;
private var slimeSporeCount:TextField;
private var greenButton:SpriteButton;
private var moldInfo:SpriteButton;
private var blueButton:SpriteButton;
private var currSpeech:String;
private var nextSpeech:String;
private var grayButton:SpriteButton;
public static const HEIGHT:int = 60;
public function StatusBar(_arg1:PlayScreen){
this.myPlayScreen = _arg1;
graphics.beginFill(0);
graphics.drawRect(0, (Main.GAME_HEIGHT - HEIGHT), Main.GAME_WIDTH, HEIGHT);
SugarGraphics.drawSprite(graphics, Sprites.SLIME_SPORE.getFrame(0, 0), 100, (Main.GAME_HEIGHT - 27), null, 2);
slimeSporeCount = new TextField();
slimeSporeCount.textColor = 0xFFFFFF;
slimeSporeCount.defaultTextFormat = Fonts.STANDARD;
slimeSporeCount.embedFonts = true;
updateSlimeCount();
slimeSporeCount.selectable = false;
slimeSporeCount.width = 100;
slimeSporeCount.x = 120;
slimeSporeCount.y = (Main.GAME_HEIGHT - 35);
this.addChild(slimeSporeCount);
grayButton = new SpriteButton(Sprites.BUTTON_BREAD);
blueButton = new SpriteButton(Sprites.BUTTON_BLUE);
blackButton = new SpriteButton(Sprites.BUTTON_TOXIC);
greenButton = new SpriteButton(Sprites.BUTTON_MUTANT);
grayButton.x = 200;
blueButton.x = 250;
blackButton.x = 300;
greenButton.x = 350;
grayButton.y = (Main.GAME_HEIGHT - 35);
blueButton.y = (Main.GAME_HEIGHT - 35);
blackButton.y = (Main.GAME_HEIGHT - 35);
greenButton.y = (Main.GAME_HEIGHT - 35);
grayButton.visible = false;
blueButton.visible = false;
blackButton.visible = false;
greenButton.visible = false;
this.addChild(grayButton);
this.addChild(blueButton);
this.addChild(blackButton);
this.addChild(greenButton);
grayButton.addEventListener(MouseEvent.CLICK, onMoldButtonClicked);
blueButton.addEventListener(MouseEvent.CLICK, onMoldButtonClicked);
blackButton.addEventListener(MouseEvent.CLICK, onMoldButtonClicked);
greenButton.addEventListener(MouseEvent.CLICK, onMoldButtonClicked);
moldName = new TextField();
moldName.textColor = 0xFFFFFF;
moldName.defaultTextFormat = Fonts.STANDARD;
moldName.embedFonts = true;
moldName.text = "R. stolonifer";
moldName.selectable = false;
moldName.width = 100;
moldName.x = 390;
moldName.y = (Main.GAME_HEIGHT - 35);
this.addChild(moldName);
moldInfo = new SpriteButton(Sprites.BUTTON_BOOK);
moldInfo.x = 500;
moldInfo.y = (Main.GAME_HEIGHT - 35);
moldInfo.addEventListener(MouseEvent.CLICK, onInfoButtonClicked);
this.addChild(moldInfo);
var _local2:SpriteButton = new SpriteButton(Sprites.BUTTON_TITLE);
_local2.x = 550;
_local2.y = (Main.GAME_HEIGHT - 35);
_local2.addEventListener(MouseEvent.CLICK, onTitleButtonClicked);
this.addChild(_local2);
var _local3:SpriteButton = new SpriteButton(Sprites.PAUSE);
_local3.x = 600;
_local3.y = (Main.GAME_HEIGHT - 30);
_local3.addEventListener(MouseEvent.CLICK, onPauseClick);
this.addChild(_local3);
var _local4:SpriteButton = new SpriteButton(Sprites.BUTTON_MAP);
_local4.addEventListener(MouseEvent.CLICK, onMapButtonClicked);
_local4.x = 10;
_local4.y = (Main.GAME_HEIGHT - 35);
this.addChild(_local4);
currSpeechText = new TextField();
currSpeechText.textColor = 0xFFFFFF;
currSpeechText.defaultTextFormat = Fonts.STANDARD;
currSpeechText.embedFonts = true;
currSpeechText.selectable = false;
currSpeechText.x = Main.GAME_WIDTH;
currSpeechText.y = (Main.GAME_HEIGHT - HEIGHT);
currSpeechText.mouseEnabled = false;
this.addChild(currSpeechText);
nextSpeechText = new TextField();
nextSpeechText.textColor = 0xFFFFFF;
nextSpeechText.defaultTextFormat = Fonts.STANDARD;
nextSpeechText.embedFonts = true;
nextSpeechText.selectable = false;
nextSpeechText.x = Main.GAME_WIDTH;
nextSpeechText.y = (Main.GAME_HEIGHT - HEIGHT);
nextSpeechText.mouseEnabled = false;
this.addChild(nextSpeechText);
refreshMolds();
}
private function onMoldButtonClicked(_arg1:MouseEvent):void{
if (_arg1.target != grayButton){
grayButton.buttonActive = false;
};
if (_arg1.target != blueButton){
blueButton.buttonActive = false;
};
if (_arg1.target != blackButton){
blackButton.buttonActive = false;
};
if (_arg1.target != greenButton){
greenButton.buttonActive = false;
};
_arg1.target.buttonActive = true;
switch (_arg1.target){
case grayButton:
Progress.currProgress.currMold = MoldSpecies.BREAD_MOLD;
break;
case blueButton:
Progress.currProgress.currMold = MoldSpecies.BLUE_MOLD;
break;
case blackButton:
Progress.currProgress.currMold = MoldSpecies.TOXIC_MOLD;
break;
case greenButton:
Progress.currProgress.currMold = MoldSpecies.MUTANT_MOLD;
break;
};
if (_arg1.target == greenButton){
myPlayScreen.fairy.lightOn();
} else {
myPlayScreen.fairy.lightOff();
};
moldName.text = Progress.currProgress.currMold.name;
}
public function step():void{
var _local1:TextField;
if (currSpeech != null){
currSpeechText.x = (currSpeechText.x - 3);
if ((currSpeechText.x + currSpeechText.width) < 0){
currSpeech = null;
currSpeechText.x = Main.GAME_WIDTH;
if (nextSpeech != null){
_local1 = currSpeechText;
currSpeechText = nextSpeechText;
nextSpeechText = _local1;
currSpeech = nextSpeech;
nextSpeech = null;
};
};
};
if (nextSpeech != null){
nextSpeechText.x = (nextSpeechText.x - 3);
if ((nextSpeechText.x + nextSpeechText.width) < 0){
nextSpeech = null;
nextSpeechText.x = Main.GAME_WIDTH;
};
};
}
public function updateSlimeCount():void{
slimeSporeCount.text = ("x " + Progress.numSlimeSporesCollected());
}
private function onTitleButtonClicked(_arg1:MouseEvent):void{
Main.theMain.pushScreen(new AchievementScreen(true));
}
private function onMapButtonClicked(_arg1:MouseEvent):void{
Main.theMain.popScreen();
}
public function saySpeech(_arg1:String):void{
if (currSpeech == null){
currSpeech = _arg1;
currSpeechText.text = _arg1;
currSpeechText.width = (currSpeechText.textWidth + 4);
} else {
if ((((((nextSpeech == null)) && (!((currSpeech == _arg1))))) && (((currSpeechText.x + currSpeechText.width) < (Main.GAME_WIDTH - 100))))){
nextSpeech = _arg1;
nextSpeechText.text = _arg1;
nextSpeechText.width = (nextSpeechText.textWidth + 4);
};
};
}
private function onInfoButtonClicked(_arg1:MouseEvent):void{
Main.theMain.pushScreen(new DatabankScreen());
}
private function onPauseClick(_arg1:MouseEvent):void{
Main.theMain.pushScreen(new PauseOverlay());
}
public function refreshMolds():void{
var _local2:SpriteButton;
var _local1:int;
if (Progress.currProgress.moldFound(MoldSpecies.BREAD_MOLD)){
_local1++;
grayButton.visible = true;
_local2 = grayButton;
if (Progress.currProgress.currMold == MoldSpecies.BREAD_MOLD){
grayButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
};
if (Progress.currProgress.moldFound(MoldSpecies.BLUE_MOLD)){
_local1++;
blueButton.visible = true;
if (_local2 == null){
_local2 = blueButton;
};
if (Progress.currProgress.currMold == MoldSpecies.BLUE_MOLD){
blueButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
};
if (Progress.currProgress.moldFound(MoldSpecies.TOXIC_MOLD)){
_local1++;
blackButton.visible = true;
if (_local2 == null){
_local2 = blackButton;
};
if (Progress.currProgress.currMold == MoldSpecies.TOXIC_MOLD){
blackButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
};
if (Progress.currProgress.moldFound(MoldSpecies.MUTANT_MOLD)){
_local1++;
greenButton.visible = true;
if (_local2 == null){
_local2 = greenButton;
};
if (Progress.currProgress.currMold == MoldSpecies.MUTANT_MOLD){
greenButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
};
if (_local1 == 0){
moldName.visible = false;
moldInfo.visible = false;
} else {
moldName.visible = true;
moldInfo.visible = true;
if (Progress.currProgress.currMold == null){
_local2.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
};
}
}
}//package Interface
Section 13
//TextButton (Interface.TextButton)
package Interface {
import flash.text.*;
import Resources.*;
public class TextButton extends BaseButton {
private var _text:String;
public function TextButton(_arg1:String, _arg2:uint=0xFFFFFF, _arg3:TextFormat=null){
if (_arg3 == null){
_arg3 = Fonts.MENU_ITEM;
};
this.mouseChildren = false;
var _local4:TextField = new TextField();
_local4.textColor = _arg2;
_local4.defaultTextFormat = _arg3;
_local4.embedFonts = true;
_local4.text = _arg1;
_local4.width = (_local4.textWidth + 10);
this.addChild(_local4);
this._text = _arg1;
}
public function get text():String{
return (_text);
}
}
}//package Interface
Section 14
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.0.0.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 15
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 16
//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.core
Section 17
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 18
//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.core
Section 19
//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.core
Section 20
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 21
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 22
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 23
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 24
//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.core
Section 25
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 26
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 27
//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.core
Section 28
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 29
//Backgrounds (Resources.Backgrounds)
package Resources {
import flash.display.*;
import flash.geom.*;
public class Backgrounds {
public static var clsForestTrans:Class = Backgrounds_clsForestTrans;
public static var clsMansion:Class = Backgrounds_clsMansion;
public static var clsRestaurant:Class = Backgrounds_clsRestaurant;
public static var clsRiver:Class = Backgrounds_clsRiver;
public static var clsForestCollision:Class = Backgrounds_clsForestCollision;
public static var clsNewspaper:Class = Backgrounds_clsNewspaper;
public static var clsHospital:Class = Backgrounds_clsHospital;
public static var clsHospitalCollision:Class = Backgrounds_clsHospitalCollision;
public static var clsHousePara:Class = Backgrounds_clsHousePara;
public static var clsTitania:Class = Backgrounds_clsTitania;
public static var clsMansionTrans:Class = Backgrounds_clsMansionTrans;
public static var clsHouse:Class = Backgrounds_clsHouse;
public static var origin:Point = new Point(0, 0);
public static var clsMansionCollision:Class = Backgrounds_clsMansionCollision;
public static var clsHospitalTrans:Class = Backgrounds_clsHospitalTrans;
public static var clsHouseTrans:Class = Backgrounds_clsHouseTrans;
public static var clsHouseCollision:Class = Backgrounds_clsHouseCollision;
public static var clsRiverTrans:Class = Backgrounds_clsRiverTrans;
public static var clsRestaurantOverlay:Class = Backgrounds_clsRestaurantOverlay;
public static var clsRiverCollision:Class = Backgrounds_clsRiverCollision;
public static var clsMap:Class = Backgrounds_clsMap;
public static var clsForestDarkness:Class = Backgrounds_clsForestDarkness;
public static var clsRestaurantTrans:Class = Backgrounds_clsRestaurantTrans;
public static var clsForestPara:Class = Backgrounds_clsForestPara;
public static var clsRestaurantCollision:Class = Backgrounds_clsRestaurantCollision;
public static var clsForest:Class = Backgrounds_clsForest;
public static function applyTransparency(_arg1:BitmapData, _arg2:BitmapData):Bitmap{
var _local3:BitmapData = new BitmapData(_arg1.width, _arg1.height, true, 0);
_local3.copyPixels(_arg1, _arg1.rect, origin, _arg2, origin);
return (new Bitmap(_local3));
}
}
}//package Resources
Section 30
//Backgrounds_clsForest (Resources.Backgrounds_clsForest)
package Resources {
import mx.core.*;
public class Backgrounds_clsForest extends BitmapAsset {
}
}//package Resources
Section 31
//Backgrounds_clsForestCollision (Resources.Backgrounds_clsForestCollision)
package Resources {
import mx.core.*;
public class Backgrounds_clsForestCollision extends BitmapAsset {
}
}//package Resources
Section 32
//Backgrounds_clsForestDarkness (Resources.Backgrounds_clsForestDarkness)
package Resources {
import mx.core.*;
public class Backgrounds_clsForestDarkness extends BitmapAsset {
}
}//package Resources
Section 33
//Backgrounds_clsForestPara (Resources.Backgrounds_clsForestPara)
package Resources {
import mx.core.*;
public class Backgrounds_clsForestPara extends BitmapAsset {
}
}//package Resources
Section 34
//Backgrounds_clsForestTrans (Resources.Backgrounds_clsForestTrans)
package Resources {
import mx.core.*;
public class Backgrounds_clsForestTrans extends BitmapAsset {
}
}//package Resources
Section 35
//Backgrounds_clsHospital (Resources.Backgrounds_clsHospital)
package Resources {
import mx.core.*;
public class Backgrounds_clsHospital extends BitmapAsset {
}
}//package Resources
Section 36
//Backgrounds_clsHospitalCollision (Resources.Backgrounds_clsHospitalCollision)
package Resources {
import mx.core.*;
public class Backgrounds_clsHospitalCollision extends BitmapAsset {
}
}//package Resources
Section 37
//Backgrounds_clsHospitalTrans (Resources.Backgrounds_clsHospitalTrans)
package Resources {
import mx.core.*;
public class Backgrounds_clsHospitalTrans extends BitmapAsset {
}
}//package Resources
Section 38
//Backgrounds_clsHouse (Resources.Backgrounds_clsHouse)
package Resources {
import mx.core.*;
public class Backgrounds_clsHouse extends BitmapAsset {
}
}//package Resources
Section 39
//Backgrounds_clsHouseCollision (Resources.Backgrounds_clsHouseCollision)
package Resources {
import mx.core.*;
public class Backgrounds_clsHouseCollision extends BitmapAsset {
}
}//package Resources
Section 40
//Backgrounds_clsHousePara (Resources.Backgrounds_clsHousePara)
package Resources {
import mx.core.*;
public class Backgrounds_clsHousePara extends BitmapAsset {
}
}//package Resources
Section 41
//Backgrounds_clsHouseTrans (Resources.Backgrounds_clsHouseTrans)
package Resources {
import mx.core.*;
public class Backgrounds_clsHouseTrans extends BitmapAsset {
}
}//package Resources
Section 42
//Backgrounds_clsMansion (Resources.Backgrounds_clsMansion)
package Resources {
import mx.core.*;
public class Backgrounds_clsMansion extends BitmapAsset {
}
}//package Resources
Section 43
//Backgrounds_clsMansionCollision (Resources.Backgrounds_clsMansionCollision)
package Resources {
import mx.core.*;
public class Backgrounds_clsMansionCollision extends BitmapAsset {
}
}//package Resources
Section 44
//Backgrounds_clsMansionTrans (Resources.Backgrounds_clsMansionTrans)
package Resources {
import mx.core.*;
public class Backgrounds_clsMansionTrans extends BitmapAsset {
}
}//package Resources
Section 45
//Backgrounds_clsMap (Resources.Backgrounds_clsMap)
package Resources {
import mx.core.*;
public class Backgrounds_clsMap extends BitmapAsset {
}
}//package Resources
Section 46
//Backgrounds_clsNewspaper (Resources.Backgrounds_clsNewspaper)
package Resources {
import mx.core.*;
public class Backgrounds_clsNewspaper extends BitmapAsset {
}
}//package Resources
Section 47
//Backgrounds_clsRestaurant (Resources.Backgrounds_clsRestaurant)
package Resources {
import mx.core.*;
public class Backgrounds_clsRestaurant extends BitmapAsset {
}
}//package Resources
Section 48
//Backgrounds_clsRestaurantCollision (Resources.Backgrounds_clsRestaurantCollision)
package Resources {
import mx.core.*;
public class Backgrounds_clsRestaurantCollision extends BitmapAsset {
}
}//package Resources
Section 49
//Backgrounds_clsRestaurantOverlay (Resources.Backgrounds_clsRestaurantOverlay)
package Resources {
import mx.core.*;
public class Backgrounds_clsRestaurantOverlay extends BitmapAsset {
}
}//package Resources
Section 50
//Backgrounds_clsRestaurantTrans (Resources.Backgrounds_clsRestaurantTrans)
package Resources {
import mx.core.*;
public class Backgrounds_clsRestaurantTrans extends BitmapAsset {
}
}//package Resources
Section 51
//Backgrounds_clsRiver (Resources.Backgrounds_clsRiver)
package Resources {
import mx.core.*;
public class Backgrounds_clsRiver extends BitmapAsset {
}
}//package Resources
Section 52
//Backgrounds_clsRiverCollision (Resources.Backgrounds_clsRiverCollision)
package Resources {
import mx.core.*;
public class Backgrounds_clsRiverCollision extends BitmapAsset {
}
}//package Resources
Section 53
//Backgrounds_clsRiverTrans (Resources.Backgrounds_clsRiverTrans)
package Resources {
import mx.core.*;
public class Backgrounds_clsRiverTrans extends BitmapAsset {
}
}//package Resources
Section 54
//Backgrounds_clsTitania (Resources.Backgrounds_clsTitania)
package Resources {
import mx.core.*;
public class Backgrounds_clsTitania extends BitmapAsset {
}
}//package Resources
Section 55
//Faces (Resources.Faces)
package Resources {
import flash.display.*;
public class Faces {
public static const POOR_MOTHER:Bitmap = new poormother();
public static const OLD_LADY:Bitmap = new oldlady();
public static const CHEF:Bitmap = new chef();
public static const RICH_SON:Bitmap = new richson();
public static const LOST_KID:Bitmap = new lostkid();
public static const NURSE:Bitmap = new nurse();
public static const DINER1:Bitmap = new diner1();
public static const DINER2:Bitmap = new diner2();
public static const POOR_KID:Bitmap = new poorkid();
public static const SICK_KID:Bitmap = new sickkid();
public static const MAITRE_D:Bitmap = new maitred();
public static const SCIENTIST:Bitmap = new scientist();
private static var richson:Class = Faces_richson;
private static var sickkid:Class = Faces_sickkid;
private static var chef:Class = Faces_chef;
private static var scientist:Class = Faces_scientist;
private static var nurse:Class = Faces_nurse;
private static var poorkid:Class = Faces_poorkid;
private static var oldlady:Class = Faces_oldlady;
private static var maitred:Class = Faces_maitred;
private static var poormother:Class = Faces_poormother;
private static var lostkid:Class = Faces_lostkid;
private static var diner1:Class = Faces_diner1;
private static var diner2:Class = Faces_diner2;
public static function getFace(_arg1:String):Bitmap{
switch (_arg1){
case "CHEF":
return (CHEF);
case "MAITRE_D":
return (MAITRE_D);
case "DINER1":
return (DINER1);
case "DINER2":
return (DINER2);
case "SICK_KID":
return (SICK_KID);
case "SCIENTIST":
return (SCIENTIST);
case "OLD_LADY":
return (OLD_LADY);
case "RICH_SON":
return (RICH_SON);
case "LOST_KID":
return (LOST_KID);
case "NURSE":
return (NURSE);
case "POOR_MOTHER":
return (POOR_MOTHER);
case "POOR_KID":
return (POOR_KID);
};
return (null);
}
}
}//package Resources
Section 56
//Faces_chef (Resources.Faces_chef)
package Resources {
import mx.core.*;
public class Faces_chef extends BitmapAsset {
}
}//package Resources
Section 57
//Faces_diner1 (Resources.Faces_diner1)
package Resources {
import mx.core.*;
public class Faces_diner1 extends BitmapAsset {
}
}//package Resources
Section 58
//Faces_diner2 (Resources.Faces_diner2)
package Resources {
import mx.core.*;
public class Faces_diner2 extends BitmapAsset {
}
}//package Resources
Section 59
//Faces_lostkid (Resources.Faces_lostkid)
package Resources {
import mx.core.*;
public class Faces_lostkid extends BitmapAsset {
}
}//package Resources
Section 60
//Faces_maitred (Resources.Faces_maitred)
package Resources {
import mx.core.*;
public class Faces_maitred extends BitmapAsset {
}
}//package Resources
Section 61
//Faces_nurse (Resources.Faces_nurse)
package Resources {
import mx.core.*;
public class Faces_nurse extends BitmapAsset {
}
}//package Resources
Section 62
//Faces_oldlady (Resources.Faces_oldlady)
package Resources {
import mx.core.*;
public class Faces_oldlady extends BitmapAsset {
}
}//package Resources
Section 63
//Faces_poorkid (Resources.Faces_poorkid)
package Resources {
import mx.core.*;
public class Faces_poorkid extends BitmapAsset {
}
}//package Resources
Section 64
//Faces_poormother (Resources.Faces_poormother)
package Resources {
import mx.core.*;
public class Faces_poormother extends BitmapAsset {
}
}//package Resources
Section 65
//Faces_richson (Resources.Faces_richson)
package Resources {
import mx.core.*;
public class Faces_richson extends BitmapAsset {
}
}//package Resources
Section 66
//Faces_scientist (Resources.Faces_scientist)
package Resources {
import mx.core.*;
public class Faces_scientist extends BitmapAsset {
}
}//package Resources
Section 67
//Faces_sickkid (Resources.Faces_sickkid)
package Resources {
import mx.core.*;
public class Faces_sickkid extends BitmapAsset {
}
}//package Resources
Section 68
//Fonts (Resources.Fonts)
package Resources {
import flash.text.*;
public class Fonts {
private static const PARMA_PETIT:String = "ParmaPetit";
public static const NEWSPAPER_HEADLINE_MEDIUM:TextFormat = new TextFormat(HEADLINE, 24, null, null, null, null, null, null, TextFormatAlign.CENTER);
public static const HEADING:TextFormat = new TextFormat(PARMA_PETIT, 24);
public static const TITLE_CENTERED:TextFormat = new TextFormat(FAIRY_DUST_B, 80, null, null, null, null, null, null, TextFormatAlign.CENTER);
public static const ACCENT_CENTERED:TextFormat = new TextFormat(FAIRY_DUST_B, 60, null, null, null, null, null, null, TextFormatAlign.CENTER);
public static const NEWSPAPER_HEADLINE_SMALL:TextFormat = new TextFormat(HEADLINE, 18, null, null, null, null, null, null, TextFormatAlign.CENTER);
private static const HEADLINE:String = "Headline";
public static const NEWSPAPER_HEADLINE_LARGE:TextFormat = new TextFormat(HEADLINE, 36, null, null, null, null, null, null, TextFormatAlign.CENTER);
public static const STANDARD_MARGINS:TextFormat = new TextFormat(PARMA_PETIT, 20, null, null, null, null, null, null, null, 5, 5);
private static const CLOISTER_BLACK:String = "CloisterBlack";
public static const MENU_ITEM:TextFormat = new TextFormat(PARMA_PETIT, 40);
public static const NEWSPAPER_BODY:TextFormat = new TextFormat(GOUDY_BOOKLETTER_1911, 14, null, null, null, null, null, null, TextFormatAlign.JUSTIFY);
public static const NEWSPAPER_FLAG:TextFormat = new TextFormat(CLOISTER_BLACK, 60, null, null, null, null, null, null, TextFormatAlign.CENTER);
private static const GOUDY_BOOKLETTER_1911:String = "GoudyBookletter1911";
public static const STANDARD:TextFormat = new TextFormat(PARMA_PETIT, 20, null, null, null, null, null, null, null, null, null, null, -4);
private static const FAIRY_DUST_B:String = "FairyDustB";
private static var fairyDustB:String = "Fonts_fairyDustB";
private static var parmaPetit:String = "Fonts_parmaPetit";
private static var goudyBookletter1911:String = "Fonts_goudyBookletter1911";
private static var headline:String = "Fonts_headline";
private static var cloisterBlack:String = "Fonts_cloisterBlack";
}
}//package Resources
Section 69
//Fonts_cloisterBlack (Resources.Fonts_cloisterBlack)
package Resources {
import mx.core.*;
public class Fonts_cloisterBlack extends FontAsset {
}
}//package Resources
Section 70
//Fonts_fairyDustB (Resources.Fonts_fairyDustB)
package Resources {
import mx.core.*;
public class Fonts_fairyDustB extends FontAsset {
}
}//package Resources
Section 71
//Fonts_goudyBookletter1911 (Resources.Fonts_goudyBookletter1911)
package Resources {
import mx.core.*;
public class Fonts_goudyBookletter1911 extends FontAsset {
}
}//package Resources
Section 72
//Fonts_headline (Resources.Fonts_headline)
package Resources {
import mx.core.*;
public class Fonts_headline extends FontAsset {
}
}//package Resources
Section 73
//Fonts_parmaPetit (Resources.Fonts_parmaPetit)
package Resources {
import mx.core.*;
public class Fonts_parmaPetit extends FontAsset {
}
}//package Resources
Section 74
//PuppetAnimations (Resources.PuppetAnimations)
package Resources {
public class PuppetAnimations {
public static const WORRY:XML = <animation>
<position length="20">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
<set part="URArm" angle="10"/>
<set part="LRArm" angle="90"/>
<set part="ULArm" angle="0"/>
<set part="LLArm" angle="0"/>
</position>
<wait length="80"/>
<position length="20">
<set part="LRArm" angle="75"/>
</position>
<position length="20">
<set part="LRArm" angle="90"/>
</position>
<position length="20">
<set part="LRArm" angle="75"/>
</position>
</animation>
;
public static const OLD_LADY:XML = <animation>
<position length="30">
<set part="ULLeg" angle="10"/>
<set part="LLLeg" angle="-10"/>
<set part="URLeg" angle="15"/>
<set part="LRLeg" angle="-15"/>
<set part="URArm" angle="15"/>
<set part="LRArm" angle="-15"/>
<set part="ULArm" angle="15"/>
<set part="LLArm" angle="-15"/>
</position>
<wait length="120"/>
<position length="30">
<set part="URArm" angle="-15"/>
</position>
<position length="10">
<set part="URArm" angle="-20"/>
<set part="LRArm" angle="-20"/>
</position>
<position length="10">
<set part="URArm" angle="-15"/>
<set part="LRArm" angle="-15"/>
</position>
<position length="10">
<set part="URArm" angle="-20"/>
<set part="LRArm" angle="-20"/>
</position>
<position length="10">
<set part="URArm" angle="-15"/>
<set part="LRArm" angle="-15"/>
</position>
</animation>
;
public static const SCIENCE:XML = <animation>
<position length="20">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
<set part="ULArm" angle="10"/>
<set part="LLArm" angle="-10"/>
</position>
<wait length="80"/>
<position length="30">
<set part="URArm" angle="-135"/>
<set part="LRArm" angle="-90"/>
</position>
<position length="10">
<set part="URArm" angle="-125"/>
<set part="LRArm" angle="-100"/>
</position>
<position length="10">
<set part="URArm" angle="-135"/>
<set part="LRArm" angle="-90"/>
</position>
<position length="10">
<set part="URArm" angle="-125"/>
<set part="LRArm" angle="-100"/>
</position>
<position length="10">
<set part="URArm" angle="-135"/>
<set part="LRArm" angle="-90"/>
</position>
<position length="20">
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
</position>
<wait length="80"/>
<position length="30">
<set part="ULArm" angle="-30"/>
<set part="LLArm" angle="-140"/>
</position>
<wait length="40"/>
</animation>
;
public static const HUDDLE:XML = <animation>
<position length="30">
<set part="ULLeg" angle="-90"/>
<set part="LLLeg" angle="135"/>
<set part="URLeg" angle="-85"/>
<set part="LRLeg" angle="135"/>
<set part="URArm" angle="-45"/>
<set part="LRArm" angle="0"/>
<set part="ULArm" angle="-45"/>
<set part="LLArm" angle="0"/>
</position>
<wait length="50"/>
<position length="20">
<set part="URArm" angle="-70"/>
<set part="LRArm" angle="-120"/>
<set part="ULArm" angle="-70"/>
<set part="LLArm" angle="-120"/>
</position>
<position length="20">
<set part="LRArm" angle="-110"/>
<set part="LLArm" angle="-110"/>
</position>
<position length="20">
<set part="LRArm" angle="-120"/>
<set part="LLArm" angle="-120"/>
</position>
<position length="20">
<set part="LRArm" angle="-110"/>
<set part="LLArm" angle="-110"/>
</position>
<position length="20">
<set part="LRArm" angle="-120"/>
<set part="LLArm" angle="-120"/>
</position>
</animation>
;
public static const RICH_SON:XML = <animation>
<position length="1">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
<set part="ULArm" angle="10"/>
<set part="LLArm" angle="-10"/>
</position>
<wait length="25"/>
<position length="20">
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="-110"/>
</position>
<position length="10">
<set part="URArm" angle="-40"/>
<set part="LRArm" angle="-90"/>
</position>
<position length="10">
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="-110"/>
</position>
<position length="20">
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
</position>
<wait length="25"/>
<position length="10" x="744">
<set part="ULLeg" angle="30"/>
<set part="LLLeg" angle="-30"/>
</position>
<position length="10" x="663">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
</position>
<position length="10" x="582">
<set part="URLeg" angle="-30"/>
<set part="LRLeg" angle="30"/>
</position>
<position length="10" x="500">
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
</position>
<fade target="0" length="10"/>
<setlocation length="1" x="500" y="285"/>
<fade target="1" length="10"/>
<position length="10" x="582">
<set part="ULLeg" angle="30"/>
<set part="LLLeg" angle="-30"/>
</position>
<position length="10" x="663">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
</position>
<position length="10" x="744">
<set part="URLeg" angle="-30"/>
<set part="LRLeg" angle="30"/>
</position>
<position length="10" x="825">
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
</position>
<wait length="25"/>
<position length="20">
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="-110"/>
</position>
<position length="10">
<set part="URArm" angle="-40"/>
<set part="LRArm" angle="-90"/>
</position>
<position length="10">
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="-110"/>
</position>
<position length="20">
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
</position>
<wait length="25"/>
<position length="10" x="744">
<set part="ULLeg" angle="30"/>
<set part="LLLeg" angle="-30"/>
</position>
<position length="10" x="663">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
</position>
<position length="10" x="582">
<set part="URLeg" angle="-30"/>
<set part="LRLeg" angle="30"/>
</position>
<position length="10" x="500">
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
</position>
<fade target="0" length="10"/>
<setlocation length="1" x="500" y="1050"/>
<fade target="1" length="10"/>
<position length="10" x="582">
<set part="ULLeg" angle="30"/>
<set part="LLLeg" angle="-30"/>
</position>
<position length="10" x="663">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
</position>
<position length="10" x="744">
<set part="URLeg" angle="-30"/>
<set part="LRLeg" angle="30"/>
</position>
<position length="10" x="825">
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
</position>
</animation>
;
public static const COOKING:XML = <animation>
<position length="10">
<set part="ULLeg" angle="5"/>
<set part="LLLeg" angle="-5"/>
<set part="URLeg" angle="-5"/>
<set part="LRLeg" angle="5"/>
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
<set part="ULArm" angle="15"/>
<set part="LLArm" angle="110"/>
</position>
<wait length="60"/>
<position length="10">
<set part="URArm" angle="-60"/>
<set part="LRArm" angle="120"/>
</position>
<position length="10">
<set part="URArm" angle="-90"/>
<set part="LRArm" angle="0"/>
</position>
<position length="10">
<set part="URArm" angle="0"/>
<set part="LRArm" angle="80"/>
</position>
<position length="10">
<set part="URArm" angle="80"/>
<set part="LRArm" angle="0"/>
</position>
</animation>
;
public static const IDLE:XML = <animation>
<position length="30">
<set part="ULLeg" angle="10"/>
<set part="LLLeg" angle="-10"/>
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
<set part="URArm" angle="-135"/>
<set part="LRArm" angle="-45"/>
<set part="ULArm" angle="45"/>
<set part="LLArm" angle="135"/>
</position>
<wait length="10"/>
<position length="30">
<set part="URLeg" angle="-10"/>
<set part="LRLeg" angle="10"/>
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
<set part="ULArm" angle="135"/>
<set part="LLArm" angle="45"/>
<set part="URArm" angle="-45"/>
<set part="LRArm" angle="-135"/>
</position>
<wait length="10"/>
</animation>
;
public static const DINER:XML = <animation>
<position length="10">
<set part="ULLeg" angle="60"/>
<set part="LLLeg" angle="-60"/>
<set part="URLeg" angle="-60"/>
<set part="LRLeg" angle="60"/>
<set part="URArm" angle="-60"/>
<set part="LRArm" angle="120"/>
<set part="ULArm" angle="60"/>
<set part="LLArm" angle="-120"/>
</position>
<position length="10">
<set part="URArm" angle="60"/>
<set part="LRArm" angle="125"/>
</position>
<position length="10">
<set part="URArm" angle="-60"/>
<set part="LRArm" angle="120"/>
</position>
<position length="10">
<set part="ULArm" angle="-60"/>
<set part="LLArm" angle="-125"/>
</position>
</animation>
;
public static const CROSSLEGGED:XML = <animation>
<position length="40">
<set part="ULLeg" angle="75"/>
<set part="LLLeg" angle="-150"/>
<set part="URLeg" angle="-75"/>
<set part="LRLeg" angle="150"/>
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
<set part="ULArm" angle="10"/>
<set part="LLArm" angle="-10"/>
</position>
<wait length="80"/>
<position length="40">
<set part="LLArm" angle="-15"/>
</position>
</animation>
;
public static const MAITRE_D_IDLE:XML = <animation>
<position length="5">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
<set part="ULArm" angle="15"/>
<set part="LLArm" angle="40"/>
</position>
<wait length="100"/>
<position length="5">
<set part="LLArm" angle="50"/>
</position>
<position length="5">
<set part="LLArm" angle="40"/>
</position>
<position length="5">
<set part="LLArm" angle="50"/>
</position>
<position length="5">
<set part="LLArm" angle="40"/>
</position>
<position length="5">
<set part="LLArm" angle="50"/>
</position>
</animation>
;
public static const NURSE:XML = <animation>
<position length="20">
<set part="ULLeg" angle="0"/>
<set part="LLLeg" angle="0"/>
<set part="URLeg" angle="0"/>
<set part="LRLeg" angle="0"/>
<set part="URArm" angle="-10"/>
<set part="LRArm" angle="10"/>
<set part="ULArm" angle="10"/>
<set part="LLArm" angle="-10"/>
</position>
<wait length="150"/>
<position length="30">
<set part="URArm" angle="-135"/>
<set part="LRArm" angle="-90"/>
</position>
<position length="15">
<set part="LRArm" angle="-75"/>
</position>
<position length="15">
<set part="LRArm" angle="-90"/>
</position>
</animation>
;
public static const SICK:XML = <animation>
<position length="30">
<set part="ULLeg" angle="15"/>
<set part="LLLeg" angle="-15"/>
<set part="URLeg" angle="-30"/>
<set part="LRLeg" angle="70"/>
<set part="URArm" angle="15"/>
<set part="LRArm" angle="-15"/>
<set part="ULArm" angle="15"/>
<set part="LLArm" angle="-15"/>
</position>
<wait length="60"/>
<position length="30">
<set part="URLeg" angle="-35"/>
<set part="LRLeg" angle="75"/>
</position>
<position length="30">
<set part="URLeg" angle="-30"/>
<set part="LRLeg" angle="70"/>
</position>
<wait length="60"/>
<position length="30">
<set part="URArm" angle="20"/>
<set part="LRArm" angle="-20"/>
</position>
</animation>
;
public static function getAnimation(_arg1:String):XML{
switch (_arg1){
case "IDLE":
return (IDLE);
case "MAITRE_D_IDLE":
return (MAITRE_D_IDLE);
case "DINER":
return (DINER);
case "COOKING":
return (COOKING);
case "SICK":
return (SICK);
case "SCIENCE":
return (SCIENCE);
case "OLD_LADY":
return (OLD_LADY);
case "RICH_SON":
return (RICH_SON);
case "HUDDLE":
return (HUDDLE);
case "NURSE":
return (NURSE);
case "WORRY":
return (WORRY);
case "CROSSLEGGED":
return (CROSSLEGGED);
};
return (null);
}
}
}//package Resources
Section 75
//SFX (Resources.SFX)
package Resources {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class SFX {
public static const MOLD_PICKUP:Sound = new moldpickupClass();
public static const CLONK:Sound = new clonkClass();
public static const MENU_LOOP:Sound = new menuLoopClass();
public static const CALM_LOOP:Sound = new calmLoopClass();
public static const WOOSH:Sound = new wooshClass();
public static const MAIN_LOOP:Sound = new mainLoopClass();
public static const BUSY_LOOP:Sound = new busyLoopClass();
public static const DING:Sound = new dingClass();
private static var currLoop:SoundChannel;
private static var fadeOutPercent:Number;
private static var moldpickupClass:Class = SFX_moldpickupClass;
private static var mainLoopClass:Class = SFX_mainLoopClass;
private static var clonkClass:Class = SFX_clonkClass;
private static var dingClass:Class = SFX_dingClass;
private static var menuLoopClass:Class = SFX_menuLoopClass;
private static var currSound:Sound;
private static var calmLoopClass:Class = SFX_calmLoopClass;
private static var fadeInPercent:Number;
private static var _soundEnabled:Boolean = true;
private static var oldLoop:SoundChannel;
private static var wooshClass:Class = SFX_wooshClass;
private static var busyLoopClass:Class = SFX_busyLoopClass;
private static function loopSound(_arg1:Event):void{
currLoop.removeEventListener(Event.SOUND_COMPLETE, loopSound);
currLoop = currSound.play(0, 0, currLoop.soundTransform);
currLoop.addEventListener(Event.SOUND_COMPLETE, loopSound);
}
public static function set soundEnabled(_arg1:Boolean):void{
_soundEnabled = _arg1;
if (!_arg1){
if (currLoop){
currLoop.soundTransform = new SoundTransform(0);
};
if (oldLoop){
oldLoop.soundTransform = new SoundTransform(0);
};
} else {
if (currLoop){
currLoop.soundTransform = new SoundTransform(1);
};
};
}
public static function playSound(_arg1:Sound):void{
if (_soundEnabled){
_arg1.play();
};
}
private static function crossFade(_arg1:TimerEvent):void{
if (_soundEnabled){
if (oldLoop){
fadeOutPercent = (fadeOutPercent - 0.05);
oldLoop.soundTransform = new SoundTransform(fadeOutPercent);
if (fadeOutPercent <= 0){
oldLoop.stop();
currLoop = currSound.play(0, 0, new SoundTransform(0));
currLoop.addEventListener(Event.SOUND_COMPLETE, loopSound);
oldLoop = null;
};
} else {
currLoop.soundTransform = new SoundTransform(1);
Timer(_arg1.target).stop();
Timer(_arg1.target).removeEventListener(TimerEvent.TIMER, crossFade);
};
} else {
if (oldLoop){
oldLoop.stop();
};
if (currLoop == null){
currLoop = currSound.play(0, 0, new SoundTransform(0));
};
Timer(_arg1.target).stop();
Timer(_arg1.target).removeEventListener(TimerEvent.TIMER, crossFade);
};
}
public static function startLoop(_arg1:Sound):void{
var _local2:Timer;
if (_arg1 != currSound){
if (currLoop != null){
currLoop.removeEventListener(Event.SOUND_COMPLETE, loopSound);
oldLoop = currLoop;
fadeOutPercent = 1;
fadeInPercent = 0;
_local2 = new Timer((1000 / Main.STEP_RATE));
_local2.addEventListener(TimerEvent.TIMER, crossFade);
_local2.start();
currLoop = null;
} else {
if (_soundEnabled){
currLoop = _arg1.play();
} else {
currLoop = _arg1.play(0, 0, new SoundTransform(0));
};
currLoop.addEventListener(Event.SOUND_COMPLETE, loopSound);
};
currSound = _arg1;
};
}
public static function get soundEnabled():Boolean{
return (_soundEnabled);
}
}
}//package Resources
Section 76
//SFX_busyLoopClass (Resources.SFX_busyLoopClass)
package Resources {
import mx.core.*;
public class SFX_busyLoopClass extends SoundAsset {
}
}//package Resources
Section 77
//SFX_calmLoopClass (Resources.SFX_calmLoopClass)
package Resources {
import mx.core.*;
public class SFX_calmLoopClass extends SoundAsset {
}
}//package Resources
Section 78
//SFX_clonkClass (Resources.SFX_clonkClass)
package Resources {
import mx.core.*;
public class SFX_clonkClass extends SoundAsset {
}
}//package Resources
Section 79
//SFX_dingClass (Resources.SFX_dingClass)
package Resources {
import mx.core.*;
public class SFX_dingClass extends SoundAsset {
}
}//package Resources
Section 80
//SFX_mainLoopClass (Resources.SFX_mainLoopClass)
package Resources {
import mx.core.*;
public class SFX_mainLoopClass extends SoundAsset {
}
}//package Resources
Section 81
//SFX_menuLoopClass (Resources.SFX_menuLoopClass)
package Resources {
import mx.core.*;
public class SFX_menuLoopClass extends SoundAsset {
}
}//package Resources
Section 82
//SFX_moldpickupClass (Resources.SFX_moldpickupClass)
package Resources {
import mx.core.*;
public class SFX_moldpickupClass extends SoundAsset {
}
}//package Resources
Section 83
//SFX_wooshClass (Resources.SFX_wooshClass)
package Resources {
import mx.core.*;
public class SFX_wooshClass extends SoundAsset {
}
}//package Resources
Section 84
//Sprites (Resources.Sprites)
package Resources {
import Util.*;
import flash.display.*;
public class Sprites {
public static const LOTUS_FAIRY:Bitmap = new clsLotusFairy();
public static const NEWS_GRAVES:Bitmap = (new clsNewspaperGraves() as Bitmap);
public static const PAUSE:SpriteSheet = new SpriteSheet(new clsPause(), 1, 1);
public static const PETRIDISH:Bitmap = new clsPetriDish();
public static const FAIRY_HOVER:SpriteSheet = new SpriteSheet(new clsFairyHover(), 1, 4);
public static const INSULATION:Bitmap = new clsInsulation();
public static const LETTUCE:Bitmap = new clsLettuce();
public static const MAP_RIVER:SpriteSheet = new SpriteSheet(new clsMapRiver(), 1, 2);
public static const GREENAPPLE:Bitmap = new clsGreenApple();
public static const MAP_RESTAURANT:SpriteSheet = new SpriteSheet(new clsMapRestaurant(), 1, 2);
public static const FAIRY_SPORE:SpriteSheet = new SpriteSheet(new clsFairySpore(), 1, 4);
public static const MAP_HOUSE:SpriteSheet = new SpriteSheet(new clsMapHouse(), 1, 2);
public static const SOURCE_MUTANT:SpriteSheet = new SpriteSheet(new clsMutantSource(), 1, 4);
public static const SIGNS:Array = [(new clsTutSign1() as Bitmap).bitmapData, (new clsTutSign2() as Bitmap).bitmapData, (new clsTutSign3() as Bitmap).bitmapData, (new clsPoisonBottle() as Bitmap).bitmapData];
public static const BUTTON_MUTANT:SpriteSheet = new SpriteSheet(new clsButtonMutant(), 1, 2);
public static const SPAGHETTI:Bitmap = new clsSpaghetti();
public static const SANDWICH:Bitmap = new clsSandwich();
public static const BUTTON_BLUE:SpriteSheet = new SpriteSheet(new clsButtonBlue(), 1, 2);
public static const PEACH:Bitmap = new clsPeach();
public static const BANANA:Bitmap = new clsBanana();
public static const REDAPPLE:Bitmap = new clsRedApple();
public static const TITLE_APPLE:Bitmap = new clsTitleApple();
public static const MUSIC_ICON:SpriteSheet = new SpriteSheet(new clsMusicIcon(), 1, 1);
public static const MAP_FOREST:SpriteSheet = new SpriteSheet(new clsMapForest(), 1, 2);
public static const NEWS_MOLD:Bitmap = (new clsNewspaperMold() as Bitmap);
public static const NEWS_TOWN:Bitmap = (new clsNewspaperTown() as Bitmap);
public static const BUTTON_BREAD:SpriteSheet = new SpriteSheet(new clsButtonBread(), 1, 2);
public static const BUTTON_CLOSE:SpriteSheet = new SpriteSheet(new clsButtonClose(), 1, 1);
public static const BUTTON_MAP:SpriteSheet = new SpriteSheet(new clsButtonMap(), 1, 1);
public static const BREADLOAF:Bitmap = new clsBread();
public static const FAIRY_FLY:SpriteSheet = new SpriteSheet(new clsFairyFlyR(), 1, 4);
public static const CAVE_MUSHROOM:Bitmap = new clsCaveMushroom();
public static const SOURCE_BREAD:SpriteSheet = new SpriteSheet(new clsBreadSource(), 1, 4);
public static const MAP_PORTAL:SpriteSheet = new SpriteSheet(new clsMapPortal(), 1, 2);
public static const FLASK:Bitmap = new clsFlask();
public static const CHEESE:Bitmap = new clsCheese();
public static const FALLING_FAIRY:Bitmap = new clsFallingFairy();
public static const MAP_HOSPITAL:SpriteSheet = new SpriteSheet(new clsMapHospital(), 1, 2);
public static const BUTTON_BOOK:SpriteSheet = new SpriteSheet(new clsButtonBook(), 1, 1);
public static const CHECK:Bitmap = (new clsCheck() as Bitmap);
public static const SLIME_SPORE:SpriteSheet = new SpriteSheet(new clsSlimeSpore(), 1, 4);
public static const ZOOM_OUT:SpriteSheet = new SpriteSheet(new clsZoomOut(), 1, 1);
public static const BUTTON_TITLE:SpriteSheet = new SpriteSheet(new clsButtonTitle(), 1, 1);
public static const SOURCE_TOXIC:SpriteSheet = new SpriteSheet(new clsToxicSource(), 1, 4);
public static const BUTTON_TOXIC:SpriteSheet = new SpriteSheet(new clsButtonToxic(), 1, 2);
public static const MAP_FAIRY:Bitmap = (new clsMapFairy() as Bitmap);
public static const MAP_MANSION:SpriteSheet = new SpriteSheet(new clsMapMansion(), 1, 2);
public static const SOURCE_BLUE:SpriteSheet = new SpriteSheet(new clsBlueSource(), 1, 4);
private static var clsButtonBook:Class = Sprites_clsButtonBook;
private static var clsCheck:Class = Sprites_clsCheck;
private static var clsPause:Class = Sprites_clsPause;
private static var clsTutSign3:Class = Sprites_clsTutSign3;
private static var clsTutSign1:Class = Sprites_clsTutSign1;
private static var clsTutSign2:Class = Sprites_clsTutSign2;
private static var clsMapFairy:Class = Sprites_clsMapFairy;
private static var clsMapHospital:Class = Sprites_clsMapHospital;
private static var clsBanana:Class = Sprites_clsBanana;
private static var clsLotusFairy:Class = Sprites_clsLotusFairy;
private static var clsFairyHover:Class = Sprites_clsFairyHover;
private static var clsMusicIcon:Class = Sprites_clsMusicIcon;
private static var clsPetriDish:Class = Sprites_clsPetriDish;
private static var clsSlimeSpore:Class = Sprites_clsSlimeSpore;
private static var clsCaveMushroom:Class = Sprites_clsCaveMushroom;
private static var clsFairySpore:Class = Sprites_clsFairySpore;
private static var clsButtonBread:Class = Sprites_clsButtonBread;
private static var clsSpaghetti:Class = Sprites_clsSpaghetti;
private static var clsMapRiver:Class = Sprites_clsMapRiver;
private static var clsButtonClose:Class = Sprites_clsButtonClose;
private static var clsPeach:Class = Sprites_clsPeach;
private static var clsPoisonBottle:Class = Sprites_clsPoisonBottle;
private static var clsMapHouse:Class = Sprites_clsMapHouse;
private static var clsSandwich:Class = Sprites_clsSandwich;
private static var clsMapForest:Class = Sprites_clsMapForest;
private static var clsRedApple:Class = Sprites_clsRedApple;
private static var clsButtonToxic:Class = Sprites_clsButtonToxic;
private static var clsNewspaperGraves:Class = Sprites_clsNewspaperGraves;
private static var clsCheese:Class = Sprites_clsCheese;
private static var clsButtonBlue:Class = Sprites_clsButtonBlue;
private static var clsToxicSource:Class = Sprites_clsToxicSource;
private static var clsBreadSource:Class = Sprites_clsBreadSource;
private static var clsFairyFlyR:Class = Sprites_clsFairyFlyR;
private static var clsTitleApple:Class = Sprites_clsTitleApple;
private static var clsMapRestaurant:Class = Sprites_clsMapRestaurant;
private static var clsLettuce:Class = Sprites_clsLettuce;
private static var clsButtonMutant:Class = Sprites_clsButtonMutant;
private static var clsNewspaperTown:Class = Sprites_clsNewspaperTown;
private static var clsButtonTitle:Class = Sprites_clsButtonTitle;
private static var clsFallingFairy:Class = Sprites_clsFallingFairy;
private static var clsInsulation:Class = Sprites_clsInsulation;
private static var clsMapPortal:Class = Sprites_clsMapPortal;
private static var clsBlueSource:Class = Sprites_clsBlueSource;
private static var clsMutantSource:Class = Sprites_clsMutantSource;
private static var clsGreenApple:Class = Sprites_clsGreenApple;
private static var clsButtonMap:Class = Sprites_clsButtonMap;
private static var clsFlask:Class = Sprites_clsFlask;
private static var clsMapMansion:Class = Sprites_clsMapMansion;
private static var clsZoomOut:Class = Sprites_clsZoomOut;
private static var clsBread:Class = Sprites_clsBread;
private static var clsNewspaperMold:Class = Sprites_clsNewspaperMold;
}
}//package Resources
Section 85
//Sprites_clsBanana (Resources.Sprites_clsBanana)
package Resources {
import mx.core.*;
public class Sprites_clsBanana extends BitmapAsset {
}
}//package Resources
Section 86
//Sprites_clsBlueSource (Resources.Sprites_clsBlueSource)
package Resources {
import mx.core.*;
public class Sprites_clsBlueSource extends BitmapAsset {
}
}//package Resources
Section 87
//Sprites_clsBread (Resources.Sprites_clsBread)
package Resources {
import mx.core.*;
public class Sprites_clsBread extends BitmapAsset {
}
}//package Resources
Section 88
//Sprites_clsBreadSource (Resources.Sprites_clsBreadSource)
package Resources {
import mx.core.*;
public class Sprites_clsBreadSource extends BitmapAsset {
}
}//package Resources
Section 89
//Sprites_clsButtonBlue (Resources.Sprites_clsButtonBlue)
package Resources {
import mx.core.*;
public class Sprites_clsButtonBlue extends BitmapAsset {
}
}//package Resources
Section 90
//Sprites_clsButtonBook (Resources.Sprites_clsButtonBook)
package Resources {
import mx.core.*;
public class Sprites_clsButtonBook extends BitmapAsset {
}
}//package Resources
Section 91
//Sprites_clsButtonBread (Resources.Sprites_clsButtonBread)
package Resources {
import mx.core.*;
public class Sprites_clsButtonBread extends BitmapAsset {
}
}//package Resources
Section 92
//Sprites_clsButtonClose (Resources.Sprites_clsButtonClose)
package Resources {
import mx.core.*;
public class Sprites_clsButtonClose extends BitmapAsset {
}
}//package Resources
Section 93
//Sprites_clsButtonMap (Resources.Sprites_clsButtonMap)
package Resources {
import mx.core.*;
public class Sprites_clsButtonMap extends BitmapAsset {
}
}//package Resources
Section 94
//Sprites_clsButtonMutant (Resources.Sprites_clsButtonMutant)
package Resources {
import mx.core.*;
public class Sprites_clsButtonMutant extends BitmapAsset {
}
}//package Resources
Section 95
//Sprites_clsButtonTitle (Resources.Sprites_clsButtonTitle)
package Resources {
import mx.core.*;
public class Sprites_clsButtonTitle extends BitmapAsset {
}
}//package Resources
Section 96
//Sprites_clsButtonToxic (Resources.Sprites_clsButtonToxic)
package Resources {
import mx.core.*;
public class Sprites_clsButtonToxic extends BitmapAsset {
}
}//package Resources
Section 97
//Sprites_clsCaveMushroom (Resources.Sprites_clsCaveMushroom)
package Resources {
import mx.core.*;
public class Sprites_clsCaveMushroom extends BitmapAsset {
}
}//package Resources
Section 98
//Sprites_clsCheck (Resources.Sprites_clsCheck)
package Resources {
import mx.core.*;
public class Sprites_clsCheck extends BitmapAsset {
}
}//package Resources
Section 99
//Sprites_clsCheese (Resources.Sprites_clsCheese)
package Resources {
import mx.core.*;
public class Sprites_clsCheese extends BitmapAsset {
}
}//package Resources
Section 100
//Sprites_clsFairyFlyR (Resources.Sprites_clsFairyFlyR)
package Resources {
import mx.core.*;
public class Sprites_clsFairyFlyR extends BitmapAsset {
}
}//package Resources
Section 101
//Sprites_clsFairyHover (Resources.Sprites_clsFairyHover)
package Resources {
import mx.core.*;
public class Sprites_clsFairyHover extends BitmapAsset {
}
}//package Resources
Section 102
//Sprites_clsFairySpore (Resources.Sprites_clsFairySpore)
package Resources {
import mx.core.*;
public class Sprites_clsFairySpore extends BitmapAsset {
}
}//package Resources
Section 103
//Sprites_clsFallingFairy (Resources.Sprites_clsFallingFairy)
package Resources {
import mx.core.*;
public class Sprites_clsFallingFairy extends BitmapAsset {
}
}//package Resources
Section 104
//Sprites_clsFlask (Resources.Sprites_clsFlask)
package Resources {
import mx.core.*;
public class Sprites_clsFlask extends BitmapAsset {
}
}//package Resources
Section 105
//Sprites_clsGreenApple (Resources.Sprites_clsGreenApple)
package Resources {
import mx.core.*;
public class Sprites_clsGreenApple extends BitmapAsset {
}
}//package Resources
Section 106
//Sprites_clsInsulation (Resources.Sprites_clsInsulation)
package Resources {
import mx.core.*;
public class Sprites_clsInsulation extends BitmapAsset {
}
}//package Resources
Section 107
//Sprites_clsLettuce (Resources.Sprites_clsLettuce)
package Resources {
import mx.core.*;
public class Sprites_clsLettuce extends BitmapAsset {
}
}//package Resources
Section 108
//Sprites_clsLotusFairy (Resources.Sprites_clsLotusFairy)
package Resources {
import mx.core.*;
public class Sprites_clsLotusFairy extends BitmapAsset {
}
}//package Resources
Section 109
//Sprites_clsMapFairy (Resources.Sprites_clsMapFairy)
package Resources {
import mx.core.*;
public class Sprites_clsMapFairy extends BitmapAsset {
}
}//package Resources
Section 110
//Sprites_clsMapForest (Resources.Sprites_clsMapForest)
package Resources {
import mx.core.*;
public class Sprites_clsMapForest extends BitmapAsset {
}
}//package Resources
Section 111
//Sprites_clsMapHospital (Resources.Sprites_clsMapHospital)
package Resources {
import mx.core.*;
public class Sprites_clsMapHospital extends BitmapAsset {
}
}//package Resources
Section 112
//Sprites_clsMapHouse (Resources.Sprites_clsMapHouse)
package Resources {
import mx.core.*;
public class Sprites_clsMapHouse extends BitmapAsset {
}
}//package Resources
Section 113
//Sprites_clsMapMansion (Resources.Sprites_clsMapMansion)
package Resources {
import mx.core.*;
public class Sprites_clsMapMansion extends BitmapAsset {
}
}//package Resources
Section 114
//Sprites_clsMapPortal (Resources.Sprites_clsMapPortal)
package Resources {
import mx.core.*;
public class Sprites_clsMapPortal extends BitmapAsset {
}
}//package Resources
Section 115
//Sprites_clsMapRestaurant (Resources.Sprites_clsMapRestaurant)
package Resources {
import mx.core.*;
public class Sprites_clsMapRestaurant extends BitmapAsset {
}
}//package Resources
Section 116
//Sprites_clsMapRiver (Resources.Sprites_clsMapRiver)
package Resources {
import mx.core.*;
public class Sprites_clsMapRiver extends BitmapAsset {
}
}//package Resources
Section 117
//Sprites_clsMusicIcon (Resources.Sprites_clsMusicIcon)
package Resources {
import mx.core.*;
public class Sprites_clsMusicIcon extends BitmapAsset {
}
}//package Resources
Section 118
//Sprites_clsMutantSource (Resources.Sprites_clsMutantSource)
package Resources {
import mx.core.*;
public class Sprites_clsMutantSource extends BitmapAsset {
}
}//package Resources
Section 119
//Sprites_clsNewspaperGraves (Resources.Sprites_clsNewspaperGraves)
package Resources {
import mx.core.*;
public class Sprites_clsNewspaperGraves extends BitmapAsset {
}
}//package Resources
Section 120
//Sprites_clsNewspaperMold (Resources.Sprites_clsNewspaperMold)
package Resources {
import mx.core.*;
public class Sprites_clsNewspaperMold extends BitmapAsset {
}
}//package Resources
Section 121
//Sprites_clsNewspaperTown (Resources.Sprites_clsNewspaperTown)
package Resources {
import mx.core.*;
public class Sprites_clsNewspaperTown extends BitmapAsset {
}
}//package Resources
Section 122
//Sprites_clsPause (Resources.Sprites_clsPause)
package Resources {
import mx.core.*;
public class Sprites_clsPause extends BitmapAsset {
}
}//package Resources
Section 123
//Sprites_clsPeach (Resources.Sprites_clsPeach)
package Resources {
import mx.core.*;
public class Sprites_clsPeach extends BitmapAsset {
}
}//package Resources
Section 124
//Sprites_clsPetriDish (Resources.Sprites_clsPetriDish)
package Resources {
import mx.core.*;
public class Sprites_clsPetriDish extends BitmapAsset {
}
}//package Resources
Section 125
//Sprites_clsPoisonBottle (Resources.Sprites_clsPoisonBottle)
package Resources {
import mx.core.*;
public class Sprites_clsPoisonBottle extends BitmapAsset {
}
}//package Resources
Section 126
//Sprites_clsRedApple (Resources.Sprites_clsRedApple)
package Resources {
import mx.core.*;
public class Sprites_clsRedApple extends BitmapAsset {
}
}//package Resources
Section 127
//Sprites_clsSandwich (Resources.Sprites_clsSandwich)
package Resources {
import mx.core.*;
public class Sprites_clsSandwich extends BitmapAsset {
}
}//package Resources
Section 128
//Sprites_clsSlimeSpore (Resources.Sprites_clsSlimeSpore)
package Resources {
import mx.core.*;
public class Sprites_clsSlimeSpore extends BitmapAsset {
}
}//package Resources
Section 129
//Sprites_clsSpaghetti (Resources.Sprites_clsSpaghetti)
package Resources {
import mx.core.*;
public class Sprites_clsSpaghetti extends BitmapAsset {
}
}//package Resources
Section 130
//Sprites_clsTitleApple (Resources.Sprites_clsTitleApple)
package Resources {
import mx.core.*;
public class Sprites_clsTitleApple extends BitmapAsset {
}
}//package Resources
Section 131
//Sprites_clsToxicSource (Resources.Sprites_clsToxicSource)
package Resources {
import mx.core.*;
public class Sprites_clsToxicSource extends BitmapAsset {
}
}//package Resources
Section 132
//Sprites_clsTutSign1 (Resources.Sprites_clsTutSign1)
package Resources {
import mx.core.*;
public class Sprites_clsTutSign1 extends BitmapAsset {
}
}//package Resources
Section 133
//Sprites_clsTutSign2 (Resources.Sprites_clsTutSign2)
package Resources {
import mx.core.*;
public class Sprites_clsTutSign2 extends BitmapAsset {
}
}//package Resources
Section 134
//Sprites_clsTutSign3 (Resources.Sprites_clsTutSign3)
package Resources {
import mx.core.*;
public class Sprites_clsTutSign3 extends BitmapAsset {
}
}//package Resources
Section 135
//Sprites_clsZoomOut (Resources.Sprites_clsZoomOut)
package Resources {
import mx.core.*;
public class Sprites_clsZoomOut extends BitmapAsset {
}
}//package Resources
Section 136
//Text (Resources.Text)
package Resources {
public class Text {
public static const SPEECH_CHEF:String = ""Oh, dear, oh, dear," the frazzled cook cries. "All night I cook them pastas and salads and pies! Even so the restaurant loses cash! I need a clever dish idea, and fast!"";
public static const SPEECH_RESEARCHER:String = "The scientist muses, "I must find a cure! If I can do nothing, the boy's death is sure!"";
public static const ARTICLE_RESTAURANT_POISONED:String = " A local restaurant was the site of a tragedy last night when the food was mysteriously contaminated by a mycotoxin derived from a toxic black mold. Several diners died and more were sickened by the contamination.
Investigators have not yet discovered the source of the contamination, but they are examining the head chef, who reportedly was experiencing a large amount of stress lately due to recent difficulties in the business of the restaurant. The chef is currently hospitalized after tasting some of the contaminated food.";
public static const SPEECH_WELL:String = "A faint voice echoes from deep inside the well. "It's dark down here!" it cries. "Anyone, help!"";
public static const ARTICLE_RESTAURANT_CLOSED:String = " A long-standing local restaurant closed its doors last night after a long stretch of financial difficulties. According to the head chef, the restaurant had been struggling in the difficult economy, and diners were no longer willing to pay even discount prices for the food.
"If only I'd been able to come up with a special dish," the chef explained, "I might have won people over. But now they'll just all have to eat at cheap but lousy fast food places. I wish things could have been different." The fate of the building is unclear; it may stay boarded-up for some time.";
public static const ARTICLE_CHILD_LOST:String = " The search still continues for a young boy who disappeared from his home last night. He was last seen heading in the direction of the woods at the center of town, but searches have turned up no leads. Town officials say that they will be searching the old wells and mine shafts in the area, but this will take some time.
"He's an adventurous boy," said the child's mother, "and sometimes he doesn't realize how risky it can be to go off alone. If anyone knows anything about where he is, please tell us. I just want my baby back safe and sound."
This is the first disappearance of a child in town this year. Police report that there is no sign of foul play.";
public static const SPEECH_SLIMEMOLD_COMPLETE:String = ""Oh, thank you, little fairy," the slime mold cries. "I've strived and grown to an enormous size! I'll always recall your giant, caring heart, and I regret that you must soon depart."";
public static const ARTICLE_HOUSE_FORECLOSED:String = " A local family was evicted from their house last evening after their mortgage was foreclosed. The mother was laid off from her position at a local canning factory, and was unable to keep up with the mortgage payments.
The house will be sold by the owning bank at an auction next week.";
public static const SPEECH_DINER1:String = ""Of all the food in town, no pasta is finer! But the salad's rather bland," says the diner.";
public static const SPEECH_DINER2:String = ""I wish that this dinner could have a bit more zest," murmurs a diner. "Then it'd be the best!"";
public static const ARTICLE_MANSION_MOMDIED:String = " The richest woman in town died last night. She was ninety years old, and had been invalid for the greater part of a decade. She is succeeded by her son, who will inherit her mansion and her vast fortune.
"I'm absolutely heartbroken," the son said. "Mother dearest was everything to me, and I will miss her dearly. Not even her vast fortune can make up for the loss of her sweet voice."
According to her son, the woman had been feeling worse than usual for the past week or two, and slipped quietly and peacefully to sleep late last night. The police have no plans to conduct an autopsy.";
public static const ARTICLE_HOUSE_POISONED:String = " A local family died yesterday from poisoning by a strain of toxic black mold. Police investigators say the mother and child most likely ate contaminated fruit and died of massive organ failure.
The mother was out of work and facing foreclosure of the house; the police have not yet ruled out suicide.";
public static const ARTICLE_SLIMEMOLD_COMPLETE:String = " A record-sized slime mold was discovered by scientists yesterday. The specimen was collected beside the town river, and is the largest of its species ever found.
Experts have no explanation for the unusual size of this specimen, although they do suspect that it incorporates cells from multiple locations.";
public static const ARTICLE_SLIMEMOLD_GROWING:String = " According to local scientists, the slime molds in the region are growing slightly larger than normal. Slime molds, which are not actually molds, play an important role in the decomposition of vegetation.
Scientists do not know why the slime molds are larger than average this year.";
public static const SPEECH_LOSTBOY:String = "The child whimpers in the darkness alone. "I hope someone finds me! I want to go home!"";
public static const ARTICLE_HOSPITAL_FOUND_CURE:String = " Researchers at the town hospital have discovered a cure for a dehabilitating disease that affects children, causing pain and extreme weakness. The discovery was a fortunate accident; the researcher discovered that several of his research specimens had been contaminated by a strange, bioluminescent mold that is so far unknown to biologists. Upon closer examination, this mold was found to produce a compound which is effective against the pathogens that cause the disease.
"This could rightfully be called a miracle," said the head researcher. "We've been searching for years, and this little mold has delivered a solution."";
public static const ARTICLE_RESTAURANT_SAVED:String = " Local diners are raving about a new salad debuted at a local restaurant last night. The salad makes use of a new kind of cheese: "blue cheese," called that because of the veins of blue mold that run through it. It may not sound appetizing, but those who have tried it speak highly of the strong, tangy flavor of the cheese.
Health experts state that the cheese is completely safe, and food experts have expressed an interest in developing a way of producing the cheese commercially. The restaurant, which was facing financial difficulties, now has a very secure future.";
public static const ARTICLE_RESTAURANT_SHUTDOWN:String = " A local restaurant was closed by public health officials last night when diners reported unusual amounts of mold in the food being served. According to the officials, moldy food, besides being unappetizing, carries a risk of sickness from toxins produced by the mold.
The restaurant staff declined to comment, but sources suggest that the restaurant was facing financial troubles and may have tried to cut costs by using substandard ingredients and unsanitary practices. Given the state of the business, it is likely that the restaurant will be closed indefinitely.";
public static const ARTICLE_MANSION_ALLDEAD:String = " The last two members of the richest family in town died last night. Investigators attribute their death to an infestation of toxic mold in the family's food. Strangely, traces of a different poison were found in the mother's body, but not the son's.
An anonymous source revealed that the police suspect the deaths to be an accident that occurred during an attempt to poison the mother.
In the absence of an heir, the family's fortune will be donated to a charity for orphans. The family mansion will, after disposal of the mold, become a home for disadvantaged youths.";
public static const ARTICLE_HOSPITAL_NO_CURE:String = " Research still continues at the local hospital toward a cure for the dehabilitating disease that is affecting hundreds of children country-wide. This rare disease causes extreme weakness and pain, and has no known cure. The lead researcher at the hospital has made no progress, despite the urgency of finding a solution before there are too many more deaths.
"This will, unfortunately, take some time," reported the researcher. "All known approaches to combating this disease have failed, so we must search for something new. There is no way to know how long it will be until we have a cure."";
public static const SPEECH_SLIMEMOLD_INCOMPLETE:String = "A little voice speaks beside the flowing stream. "Oh, please assist me to achieve my dream! I am a little slime mold, as you see, but there could be ever much more to me! Find the fifty spores around the town so I become a slime mold of renown!"";
public static const SPEECH_RICHSON:String = "The young man snickers softly. "Just a tad more poison, Mother, dear, dripped on your bread."";
public static const INTRO_TEXT:Array = ["The great Titania, Queen of Fairy, called\nFor one of the littlest fairies of all.", "\"Spore-spreader,\" the queen declared in tones most bold,\n\"I fear the mortals have no respect for mold.\"", "\"That blighter of crops, that killer of germs and man,\nThe poison and food that grows across the land.\"", "\"The humans think it only mess and dirt,\nIgnoring mold's great power to help and hurt.\"", "\"Go down into the mortal world, my child,\"\nThe queen declared, \"and show the strength of the wild!\"", "\"'Tis not just the bear and the tree they must respect,\nBut all of nature, down to the smallest speck!\"", "\"Now go,\" commanded the Queen, \"my weaver of hyphae,\nAnd show the mortals the errors of their ways!\""];
public static const ARTICLE_SLIMEMOLD_SMALL:String = " Local biologists report an unexplained decrease in the size and number of slime molds found near the rivers around town. The slime mold, a strange multicellular organism, is normally common in the area.
The experts say that there may be some difficulty with their reproductive cycle.";
public static const ARTICLE_HOSPITAL_MYSTERIOUS_CURE:String = " A child at a local hospital who was suffering from an apparently uncurable disease has mysteriously recovered. According to hospital staff, no change was made in the patient's treatment, but the child is showing definite signs of recovery.
The head researcher studying the disease locally is stumped. "This recovery is unprecedented. The patient might have a natural immunity, or something genetic that provided late resistance to the disease. Alternately, there could have been something in his food or in a gift. We will strive to discover what the cure was, so that we might provide it to other patients."";
public static const ARTICLE_MANSION_MOMCURED:String = " The richest woman in town miraculously recovered from a long illness last night, despite the shocking discovery that her son has been poisoning her. The woman had been invalid for some time, and suddenly began feeling better. Medical experts examined her food for signs of some curative agent, but instead found trace amounts of poison.
When confronted, the son confessed. "I got tired of waiting for the old harpy to die!" he declared. Before the revelation, he was the sole heir of her fortune.
"I always knew he was a no-good kid," the mother responded.";
public static const SPEECH_POORMOTHER:String = ""Oh dear, oh dear," the worried mother cries. "I just can't make the bills. The cost, the size!"";
public static const ARTICLE_HOSPITAL_POISONED:String = " A patient at a local hospital died yesterday by an unknown toxin in his food. The child was suffering from a currently incurable disease that causes pain and extreme weakness. Local police have declined to comment on the investigation, but have stated that they have not yet ruled out murder. The doctor who performed the autopsy reports that the substance that poisoned the patient was a mycotoxin, likely derived from some sort of fungus.
The hospital's kitchen was checked for mold infestation, but it appears uncontaminated. All ongoing research at the hospital has been suspended until the investigation is complete.";
public static const ARTICLE_MANSION_MOMLIVED:String = " A shocking plot came to light last night. The richest woman in town has been slowly poisoned over the course of weeks, allegedly by her son. She is currently in the hospital, recovering her health, and her son is in police custody.
The plot came to light when the son brought his mother bread with a spot of mold on it. The woman, slightly delirious, believed he was trying to kill her, and called the police. While investigating, the police found a bottle of rat poison beside the moldy bread. According to her doctors, the woman would have been dead within the night had she not called the police.";
public static const SPEECH_OLDLADY:String = "The invalid shrieks loudly. "Awful son! Come here and bring me food; don't think you're done!"";
public static const SPEECH_MAITRED:String = ""A slow and quiet evening," the maître d' mutters. "We're low on cash and might not stand another."";
public static const ARTICLE_CHILD_FOUND:String = " A missing young boy was found today in the woods at the center of town. A passing hiker heard his cries for help coming from an abandoned well, and was able to rescue him. The child was suffering from only minor dehydration, and went home immediately.
According to the boy, he was saved by luminescent fungus. "I fell down and got lost and couldn't see nothing," the boy said. "But then all of a sudden these mushrooms started glowing. I followed them to the hole where I fell in, and then I got found."
A leading expert on fungi explained that the glow was caused by a strange mutant mold. This is the first time on record of a lost child being saved by mold.";
public static const ARTICLE_HOUSE_SAVED:String = " A local family was saved from bankruptcy yesterday when their home, which was going through foreclosure, was found to be contaminated with toxic black mold that was not disclosed by the original seller. In a swift settlement, the family was given 2.3 million, which let the out-of-work mother pay her debts.";
}
}//package Resources
Section 137
//Textures (Resources.Textures)
package Resources {
import flash.display.*;
public class Textures {
public static const BLACK_PLAID:Bitmap = new blackplaid();
public static const BLACK_FABRIC:Bitmap = new blackfabric();
public static const FLORAL_PATTERN:Bitmap = new floralpattern();
public static const RED_PLAID:Bitmap = new redplaid();
public static const PINK_FABRIC:Bitmap = new pinkfabric();
public static const DENIM:Bitmap = new denim();
public static const WHITE_FABRIC:Bitmap = new whitefabric();
public static const WHITE_SKIN:Bitmap = new whiteskin();
public static const HOSPITAL_GREENS:Bitmap = new hospitalgreens();
private static var whitefabric:Class = Textures_whitefabric;
private static var redplaid:Class = Textures_redplaid;
private static var hospitalgreens:Class = Textures_hospitalgreens;
private static var pinkfabric:Class = Textures_pinkfabric;
private static var blackplaid:Class = Textures_blackplaid;
private static var blackfabric:Class = Textures_blackfabric;
private static var whiteskin:Class = Textures_whiteskin;
private static var denim:Class = Textures_denim;
private static var floralpattern:Class = Textures_floralpattern;
public static function getTexture(_arg1:String):Bitmap{
switch (_arg1){
case "BLACK_FABRIC":
return (BLACK_FABRIC);
case "WHITE_FABRIC":
return (WHITE_FABRIC);
case "FLORAL_PATTERN":
return (FLORAL_PATTERN);
case "DENIM":
return (DENIM);
case "BLACK_PLAID":
return (BLACK_PLAID);
case "WHITE_SKIN":
return (WHITE_SKIN);
case "HOSPITAL_GREENS":
return (HOSPITAL_GREENS);
case "PINK_FABRIC":
return (PINK_FABRIC);
case "RED_PLAID":
return (RED_PLAID);
};
return (null);
}
}
}//package Resources
Section 138
//Textures_blackfabric (Resources.Textures_blackfabric)
package Resources {
import mx.core.*;
public class Textures_blackfabric extends BitmapAsset {
}
}//package Resources
Section 139
//Textures_blackplaid (Resources.Textures_blackplaid)
package Resources {
import mx.core.*;
public class Textures_blackplaid extends BitmapAsset {
}
}//package Resources
Section 140
//Textures_denim (Resources.Textures_denim)
package Resources {
import mx.core.*;
public class Textures_denim extends BitmapAsset {
}
}//package Resources
Section 141
//Textures_floralpattern (Resources.Textures_floralpattern)
package Resources {
import mx.core.*;
public class Textures_floralpattern extends BitmapAsset {
}
}//package Resources
Section 142
//Textures_hospitalgreens (Resources.Textures_hospitalgreens)
package Resources {
import mx.core.*;
public class Textures_hospitalgreens extends BitmapAsset {
}
}//package Resources
Section 143
//Textures_pinkfabric (Resources.Textures_pinkfabric)
package Resources {
import mx.core.*;
public class Textures_pinkfabric extends BitmapAsset {
}
}//package Resources
Section 144
//Textures_redplaid (Resources.Textures_redplaid)
package Resources {
import mx.core.*;
public class Textures_redplaid extends BitmapAsset {
}
}//package Resources
Section 145
//Textures_whitefabric (Resources.Textures_whitefabric)
package Resources {
import mx.core.*;
public class Textures_whitefabric extends BitmapAsset {
}
}//package Resources
Section 146
//Textures_whiteskin (Resources.Textures_whiteskin)
package Resources {
import mx.core.*;
public class Textures_whiteskin extends BitmapAsset {
}
}//package Resources
Section 147
//AchievementScreen (Screens.AchievementScreen)
package Screens {
import flash.events.*;
import Data.*;
import Interface.*;
import Resources.*;
public class AchievementScreen extends Screen {
private var currPage:int;// = 1
private var inGame:Boolean;
private var pageButtons:Array;
public function AchievementScreen(_arg1:Boolean){
var _local2:TextButton;
var _local4:TextButton;
pageButtons = new Array();
super();
graphics.beginFill(0);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
this.inGame = _arg1;
addAchievements(0);
var _local3:int;
while (_local3 < (Achievement.ACHIEVEMENTS.length / 16)) {
_local2 = new TextButton((_local3 + 1).toString());
_local2.x = (400 + (32 * _local3));
_local2.y = 435;
_local2.addEventListener(MouseEvent.CLICK, onPageClick);
this.addChild(_local2);
pageButtons.push(_local2);
if (_local3 != 0){
_local2.alpha = 0.5;
};
_local3++;
};
_local4 = new TextButton("Continue >", 0xFFFFFF, Fonts.STANDARD);
_local4.x = 500;
_local4.y = 450;
_local4.addEventListener(MouseEvent.CLICK, onContinueClick);
this.addChild(_local4);
}
private function addAchievements(_arg1:int):void{
var _local2:AchievementIndicator;
var _local3:int;
while (_local3 < 12) {
if ((_arg1 + _local3) >= Achievement.ACHIEVEMENTS.length){
break;
};
_local2 = new AchievementIndicator(Achievement.ACHIEVEMENTS[(_arg1 + _local3)], inGame);
if (_local3 < 6){
_local2.y = (10 + (_local3 * 75));
_local2.x = 10;
} else {
_local2.y = (10 + ((_local3 - 6) * 75));
_local2.x = 330;
};
this.addChild(_local2);
_local3++;
};
}
private function removeAchievements():void{
var _local1:int;
while (_local1 < this.numChildren) {
if ((this.getChildAt(_local1) is AchievementIndicator)){
this.removeChildAt(_local1);
_local1--;
};
_local1++;
};
}
private function onPageClick(_arg1:MouseEvent):void{
var _local2:int = parseInt(TextButton(_arg1.target).text);
if (_local2 != currPage){
pageButtons[(currPage - 1)].alpha = 0.5;
pageButtons[(_local2 - 1)].alpha = 1;
currPage = _local2;
removeAchievements();
addAchievements(((currPage - 1) * 12));
};
}
private function onContinueClick(_arg1:MouseEvent):void{
Main.theMain.popScreen();
}
}
}//package Screens
Section 148
//CreditsScreen (Screens.CreditsScreen)
package Screens {
import flash.events.*;
import flash.text.*;
import Interface.*;
import Resources.*;
public class CreditsScreen extends Screen {
public function CreditsScreen(){
var _local1:TextField;
super();
graphics.beginFill(0);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
_local1 = new TextField();
_local1.selectable = false;
_local1.textColor = 0xFFFFFF;
_local1.defaultTextFormat = Fonts.STANDARD;
_local1.embedFonts = true;
_local1.width = (Main.GAME_WIDTH - 40);
_local1.height = (Main.GAME_HEIGHT - 40);
_local1.x = 20;
_local1.y = 20;
_local1.wordWrap = true;
_local1.htmlText = "The Mold Fairy was created by Gregory Weir.\nIt is sponsored by Armor Games.\nIt contains music by Evan Merz (<a href='http://www.computermusicblog.com/'>computermusicblog.com</a>).\n\nIt uses many public domain and freely licensed images and textures, including images from cgtextures.com, publicdomainpictures.net, and commons.wikimedia.org.\n\nIt uses the following fonts:\nFairydustB by Marcel de Jong (http://www.marceldejong.com/)\nParmaPetit by Manfred Klein (http://manfred-klein.ina-mar.com/)\nGoudy Bookletter 1911 by Barry Schwartz (http://home.comcast.net/~crudfactory/cf3/index.html)\nCloister Black by Dieter Steffmann (http://www.steffmann.de/)\nHeadline by HPLHS Prop Fonts (http://www.cthulhulives.org/toybox/PROPDOCS/PropFonts.html)\n\nSpecial thanks to Melissa Avery.\n\nFor more things by Gregory Weir, visit <a href='http://ludusnovus.net'>ludusnovus.net</a>.";
this.addChild(_local1);
var _local2:TextButton = new TextButton("Continue >");
_local2.x = 460;
_local2.y = 435;
_local2.addEventListener(MouseEvent.CLICK, onContinueClick);
this.addChild(_local2);
}
private function onContinueClick(_arg1:MouseEvent):void{
Main.theMain.popScreen();
}
}
}//package Screens
Section 149
//DatabankScreen (Screens.DatabankScreen)
package Screens {
import flash.events.*;
import flash.text.*;
import Data.*;
import Interface.*;
import Resources.*;
public class DatabankScreen extends Screen {
private var descField:TextField;
private var blueButton:SpriteButton;
private var blackButton:SpriteButton;
private var greenButton:SpriteButton;
private var grayButton:SpriteButton;
public function DatabankScreen(){
var _local1:SpriteButton;
super();
graphics.beginFill(0, 0.2);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
graphics.beginFill(0x333333, 1);
graphics.lineStyle(3, 0xCCCCCC);
graphics.drawRect(100, 100, (Main.GAME_WIDTH - 200), (Main.GAME_HEIGHT - 200));
_local1 = new SpriteButton(Sprites.BUTTON_CLOSE);
_local1.x = (Main.GAME_WIDTH - 125);
_local1.y = 100;
_local1.addEventListener(MouseEvent.CLICK, onClickClose);
this.addChild(_local1);
grayButton = new SpriteButton(Sprites.BUTTON_BREAD);
blueButton = new SpriteButton(Sprites.BUTTON_BLUE);
blackButton = new SpriteButton(Sprites.BUTTON_TOXIC);
greenButton = new SpriteButton(Sprites.BUTTON_MUTANT);
grayButton.x = 115;
blueButton.x = 115;
blackButton.x = 115;
greenButton.x = 115;
grayButton.y = 125;
blueButton.y = 195;
blackButton.y = 265;
greenButton.y = 335;
if (Progress.currProgress.moldFound(MoldSpecies.BREAD_MOLD)){
this.addChild(grayButton);
};
if (Progress.currProgress.moldFound(MoldSpecies.BLUE_MOLD)){
this.addChild(blueButton);
};
if (Progress.currProgress.moldFound(MoldSpecies.TOXIC_MOLD)){
this.addChild(blackButton);
};
if (Progress.currProgress.moldFound(MoldSpecies.MUTANT_MOLD)){
this.addChild(greenButton);
};
grayButton.addEventListener(MouseEvent.CLICK, onMoldButtonClicked);
blueButton.addEventListener(MouseEvent.CLICK, onMoldButtonClicked);
blackButton.addEventListener(MouseEvent.CLICK, onMoldButtonClicked);
greenButton.addEventListener(MouseEvent.CLICK, onMoldButtonClicked);
descField = new TextField();
descField.textColor = 0xFFFFFF;
descField.defaultTextFormat = Fonts.STANDARD_MARGINS;
descField.embedFonts = true;
descField.selectable = false;
descField.width = (Main.GAME_WIDTH - 280);
descField.height = (Main.GAME_HEIGHT - 250);
descField.x = 160;
descField.y = 125;
descField.background = true;
descField.backgroundColor = 0;
descField.wordWrap = true;
descField.border = true;
descField.borderColor = 0;
this.addChild(descField);
switch (Progress.currProgress.currMold){
case MoldSpecies.BREAD_MOLD:
grayButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
break;
case MoldSpecies.BLUE_MOLD:
blueButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
break;
case MoldSpecies.TOXIC_MOLD:
blackButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
break;
case MoldSpecies.MUTANT_MOLD:
greenButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
break;
};
}
private function onMoldButtonClicked(_arg1:MouseEvent):void{
var _local2:MoldSpecies;
if (_arg1.target != grayButton){
grayButton.buttonActive = false;
};
if (_arg1.target != blueButton){
blueButton.buttonActive = false;
};
if (_arg1.target != blackButton){
blackButton.buttonActive = false;
};
if (_arg1.target != greenButton){
greenButton.buttonActive = false;
};
_arg1.target.buttonActive = true;
switch (_arg1.target){
case grayButton:
_local2 = MoldSpecies.BREAD_MOLD;
break;
case blueButton:
_local2 = MoldSpecies.BLUE_MOLD;
break;
case blackButton:
_local2 = MoldSpecies.TOXIC_MOLD;
break;
case greenButton:
_local2 = MoldSpecies.MUTANT_MOLD;
break;
};
descField.text = ((_local2.name + "\n\n") + _local2.description);
Progress.currProgress.currMold = _local2;
if ((Main.theMain.secondScreen is PlayScreen)){
PlayScreen(Main.theMain.secondScreen).statusBar.refreshMolds();
};
}
private function onClickClose(_arg1:MouseEvent):void{
Main.theMain.popScreen();
}
}
}//package Screens
Section 150
//EndGameSummaryScreen (Screens.EndGameSummaryScreen)
package Screens {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import Data.*;
import Interface.*;
import Resources.*;
public class EndGameSummaryScreen extends Screen {
public function EndGameSummaryScreen(){
var _local3:TextField;
var _local6:Achievement;
var _local7:TextField;
super();
graphics.beginFill(0);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
var _local1:Bitmap = new Backgrounds.clsTitania();
_local1.y = -100;
this.addChild(_local1);
var _local2:Sprite = new Sprite();
_local2.graphics.beginFill(0, 0.5);
_local2.graphics.lineStyle(3);
_local2.graphics.drawRect(0, 0, 500, 400);
_local2.x = 70;
_local2.y = 40;
this.addChild(_local2);
_local3 = new TextField();
_local3.selectable = false;
_local3.textColor = 0xFFFFFF;
_local3.defaultTextFormat = Fonts.HEADING;
_local3.embedFonts = true;
_local3.width = 480;
_local3.x = 80;
_local3.y = 50;
_local3.text = "My child, your work among the humans has\ncaused me to grant you the following titles:";
this.addChild(_local3);
var _local4:TextField = new TextField();
_local4.selectable = false;
_local4.textColor = 0xFFFFFF;
_local4.defaultTextFormat = Fonts.STANDARD;
_local4.embedFonts = true;
_local4.width = 480;
_local4.height = 300;
_local4.x = 100;
_local4.y = 110;
var _local5:int;
for each (_local6 in Achievement.ACHIEVEMENTS) {
if (_local6.complete){
Progress.currProgress.completeAchievement(_local6.title);
_local4.appendText((_local6.title + "\n"));
_local5++;
};
};
this.addChild(_local4);
_local7 = new TextField();
_local7.selectable = false;
_local7.textColor = 0xFFFFFF;
_local7.defaultTextFormat = Fonts.HEADING;
_local7.embedFonts = true;
_local7.width = 480;
_local7.x = 80;
_local7.y = 400;
if (_local5 == 2){
_local7.text = "I am quite disappointed.";
} else {
if (_local5 < 5){
_local7.text = "I expected more of you.";
} else {
_local7.text = "You have made me proud.";
};
};
this.addChild(_local7);
var _local8:TextButton = new TextButton("Done >", 0);
_local8.x = 525;
_local8.y = 435;
_local8.addEventListener(MouseEvent.CLICK, onContinueClick);
this.addChild(_local8);
}
private function onContinueClick(_arg1:MouseEvent):void{
Main.theMain.popScreen();
}
}
}//package Screens
Section 151
//EndGameVerificationScreen (Screens.EndGameVerificationScreen)
package Screens {
import flash.events.*;
import flash.text.*;
import Interface.*;
import Resources.*;
public class EndGameVerificationScreen extends Screen {
public function EndGameVerificationScreen(){
var _local1:TextField;
super();
graphics.beginFill(0, 0);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
graphics.beginFill(0x2200, 1);
graphics.lineStyle(4, 0x6600);
graphics.drawRect(150, 200, 350, 100);
_local1 = new TextField();
_local1.textColor = 0xFFFFFF;
_local1.defaultTextFormat = Fonts.STANDARD;
_local1.embedFonts = true;
_local1.selectable = false;
_local1.x = 160;
_local1.y = 210;
_local1.width = 330;
_local1.mouseEnabled = false;
_local1.text = "Are you ready to return to the Land of Fairy?";
this.addChild(_local1);
var _local2:TextButton = new TextButton("Depart");
_local2.x = 190;
_local2.y = 240;
_local2.addEventListener(MouseEvent.CLICK, onClickExit);
this.addChild(_local2);
var _local3:TextButton = new TextButton("Stay");
_local3.x = 400;
_local3.y = 240;
_local3.addEventListener(MouseEvent.CLICK, onClickStay);
this.addChild(_local3);
}
private function onClickStay(_arg1:MouseEvent):void{
Main.theMain.popScreen();
}
private function onClickExit(_arg1:MouseEvent):void{
Main.theMain.popScreen();
Main.theMain.popScreen();
Main.theMain.pushScreen(new NewspaperScreen());
}
}
}//package Screens
Section 152
//FallingOverlay (Screens.FallingOverlay)
package Screens {
import flash.display.*;
import Data.*;
import Resources.*;
public class FallingOverlay extends Screen {
private var falling:Bitmap;
public function FallingOverlay(){
falling = Sprites.FALLING_FAIRY;
super();
graphics.beginFill(0, 0);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
falling.x = 312;
falling.y = -100;
this.addChild(falling);
SFX.playSound(SFX.WOOSH);
}
override public function step():void{
if (falling.y < 200){
falling.y = (falling.y + 8);
} else {
MapScreen(Main.theMain.secondScreen).setLocation(null);
Main.theMain.pushScreen(new PlayScreen(Level.FOREST));
Main.theMain.removeSecondScreen();
Main.theMain.pushScreen(new FlashScreen(0xFF00));
SFX.playSound(SFX.CLONK);
};
}
}
}//package Screens
Section 153
//FlashScreen (Screens.FlashScreen)
package Screens {
public class FlashScreen extends Screen {
public function FlashScreen(_arg1:uint){
graphics.beginFill(_arg1);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
}
override public function step():void{
if (alpha > 0){
alpha = (alpha - 0.1);
} else {
Main.theMain.popScreen();
};
}
}
}//package Screens
Section 154
//HelpScreen (Screens.HelpScreen)
package Screens {
import flash.events.*;
import flash.display.*;
import Interface.*;
public class HelpScreen extends Screen {
public static const HELP_SCREEN:Bitmap = new clsHelpScreen();
private static var clsHelpScreen:Class = HelpScreen_clsHelpScreen;
public function HelpScreen(){
addChild(HELP_SCREEN);
var _local1:TextButton = new TextButton("Continue >");
_local1.x = 460;
_local1.y = 435;
_local1.addEventListener(MouseEvent.CLICK, onContinueClick);
this.addChild(_local1);
}
private function onContinueClick(_arg1:MouseEvent):void{
Main.theMain.popScreen();
}
}
}//package Screens
Section 155
//HelpScreen_clsHelpScreen (Screens.HelpScreen_clsHelpScreen)
package Screens {
import mx.core.*;
public class HelpScreen_clsHelpScreen extends BitmapAsset {
}
}//package Screens
Section 156
//IntroScreen (Screens.IntroScreen)
package Screens {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import Data.*;
import Interface.*;
import Resources.*;
public class IntroScreen extends Screen {
private var narration:TextField;
private var narrationBG:Sprite;
private var background:Bitmap;
private var lotus:Bitmap;
private var lineTimer:int;// = 0
private var blackFade:Sprite;
private var narrationLine:int;// = 0
public function IntroScreen(){
background = new Backgrounds.clsTitania();
lotus = Sprites.LOTUS_FAIRY;
super();
blackFade = new Sprite();
blackFade.graphics.beginFill(0);
blackFade.graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
background.y = 0;
this.addChild(background);
lotus.y = Main.GAME_HEIGHT;
lotus.x = 300;
this.addChild(lotus);
narrationBG = new Sprite();
narrationBG.graphics.beginFill(0);
narrationBG.graphics.drawRect(0, 0, 450, 70);
narrationBG.x = 20;
narrationBG.y = 400;
narrationBG.visible = false;
narration = new TextField();
narration.textColor = 0xFFFFFF;
narration.defaultTextFormat = Fonts.STANDARD;
narration.embedFonts = true;
narration.selectable = false;
narration.x = 10;
narration.y = 10;
narration.width = 430;
narration.height = 50;
narration.mouseEnabled = false;
narrationBG.addChild(narration);
this.addChild(narrationBG);
this.addChild(blackFade);
var _local1:TextButton = new TextButton("SKIP", 0xFFFFFF, Fonts.STANDARD);
_local1.x = 590;
_local1.y = 450;
_local1.addEventListener(MouseEvent.CLICK, onSkipClick);
this.addChild(_local1);
}
private function onSkipClick(_arg1:MouseEvent):void{
Main.theMain.pushScreen(new MapScreen());
MapScreen(Main.theMain.currScreen).setLocation(null);
Main.theMain.removeSecondScreen();
Main.theMain.pushScreen(new PlayScreen(Level.FOREST));
}
override public function step():void{
if (blackFade.alpha > 0){
blackFade.alpha = (blackFade.alpha - 0.05);
} else {
if (background.y > -160){
background.y--;
} else {
if ((((narrationLine == 1)) && ((lotus.y > 300)))){
narrationBG.visible = false;
lotus.y = (lotus.y - 2);
} else {
if (narrationLine == Text.INTRO_TEXT.length){
Main.theMain.pushScreen(new MapScreen());
Main.theMain.removeSecondScreen();
Main.theMain.pushScreen(new FallingOverlay());
} else {
narrationBG.visible = true;
if (lineTimer == 0){
narration.text = Text.INTRO_TEXT[narrationLine];
lineTimer++;
} else {
lineTimer++;
if (lineTimer >= 200){
lineTimer = 0;
narrationLine++;
};
};
};
};
};
};
}
}
}//package Screens
Section 157
//LoadingScreen (Screens.LoadingScreen)
package Screens {
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import Resources.*;
public class LoadingScreen extends Screen {
public function LoadingScreen(){
graphics.beginFill(0);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
var _local1:TextField = new TextField();
_local1.textColor = 0xFFFFFF;
_local1.defaultTextFormat = Fonts.ACCENT_CENTERED;
_local1.embedFonts = true;
_local1.text = "Once upon a time . . .";
_local1.selectable = false;
_local1.width = Main.GAME_WIDTH;
_local1.y = 200;
this.addChild(_local1);
var _local2:Timer = new Timer(500, 1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
_local2.start();
SFX.startLoop(SFX.MAIN_LOOP);
}
private function timerComplete(_arg1:TimerEvent):void{
_arg1.target.removeEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
Main.theMain.pushScreen(new IntroScreen());
Main.theMain.removeSecondScreen();
}
}
}//package Screens
Section 158
//MapScreen (Screens.MapScreen)
package Screens {
import flash.display.*;
import Data.*;
import Interface.*;
import Resources.*;
public class MapScreen extends Screen {
private var mapfairy:Bitmap;
public function MapScreen(){
var _local1:MapLocation;
var _local2:MapLocation;
var _local3:MapLocation;
mapfairy = Sprites.MAP_FAIRY;
super();
this.addChild(new Backgrounds.clsMap());
_local1 = new MapLocation(Sprites.MAP_FOREST, Level.FOREST);
_local1.x = 195;
_local1.y = 131;
this.addChild(_local1);
_local2 = new MapLocation(Sprites.MAP_PORTAL, null);
_local2.x = 232.5;
_local2.y = -75;
this.addChild(_local2);
_local3 = new MapLocation(Sprites.MAP_RESTAURANT, Level.RESTAURANT);
_local3.x = 450;
_local3.y = 75;
this.addChild(_local3);
var _local4:MapLocation = new MapLocation(Sprites.MAP_HOSPITAL, Level.HOSPITAL);
_local4.x = 60;
_local4.y = 225;
this.addChild(_local4);
var _local5:MapLocation = new MapLocation(Sprites.MAP_HOUSE, Level.HOUSE);
_local5.x = 25;
_local5.y = 25;
this.addChild(_local5);
var _local6:MapLocation = new MapLocation(Sprites.MAP_MANSION, Level.MANSION);
_local6.x = 400;
_local6.y = 225;
this.addChild(_local6);
var _local7:MapLocation = new MapLocation(Sprites.MAP_RIVER, Level.RIVER);
_local7.y = 390;
this.addChild(_local7);
SFX.startLoop(SFX.MAIN_LOOP);
mapfairy.x = ((_local1.x + (_local1.width / 2)) - 16);
mapfairy.y = ((_local1.y + (_local1.height / 2)) - 16);
}
override public function awaken():void{
SFX.startLoop(SFX.MAIN_LOOP);
}
public function setLocation(_arg1:MapLocation):void{
if (_arg1 != null){
mapfairy.x = ((_arg1.x + (_arg1.width / 2)) - 16);
mapfairy.y = ((_arg1.y + (_arg1.height / 2)) - 16);
};
if (!contains(mapfairy)){
this.addChild(mapfairy);
};
}
}
}//package Screens
Section 159
//NewspaperScreen (Screens.NewspaperScreen)
package Screens {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import Data.*;
import Interface.*;
import Resources.*;
import flash.filters.*;
public class NewspaperScreen extends Screen {
private var zoomOutButton:SpriteButton;
private var activeArticle:NewspaperBlock;
private var hintField:TextField;
private var continueButton:TextButton;
private var leadImage:Bitmap;
private static const ZOOMED_OUT_SCALE:Number = 0.46875;
public function NewspaperScreen(){
this.scaleX = ZOOMED_OUT_SCALE;
this.scaleY = ZOOMED_OUT_SCALE;
graphics.beginFill(0);
graphics.drawRect(0, 0, (Main.GAME_WIDTH / ZOOMED_OUT_SCALE), ((Main.GAME_HEIGHT * 2) / ZOOMED_OUT_SCALE));
var _local1:Bitmap = new Backgrounds.clsNewspaper();
_local1.x = (((Main.GAME_WIDTH / ZOOMED_OUT_SCALE) - _local1.width) / 2);
this.addChild(_local1);
addBlock(360, 25, new NewspaperBlock(640, 75, "The Town Herald", null, Fonts.NEWSPAPER_FLAG));
if ((Progress.saviorCount + Progress.killCount) <= 2){
leadImage = Sprites.NEWS_TOWN;
addBlock(360, 100, new NewspaperBlock(440, 400, "TOWN STRUGGLES", null, Fonts.NEWSPAPER_HEADLINE_LARGE));
} else {
if (((Progress.horror()) || (Progress.bad()))){
leadImage = Sprites.NEWS_GRAVES;
addBlock(360, 100, new NewspaperBlock(440, 400, "WAVE OF MOLD DEATHS", null, Fonts.NEWSPAPER_HEADLINE_LARGE));
} else {
leadImage = Sprites.NEWS_MOLD;
addBlock(360, 100, new NewspaperBlock(440, 400, "MOLD AFFECTS LIVES", null, Fonts.NEWSPAPER_HEADLINE_LARGE));
};
};
leadImage.x = 360;
leadImage.y = 150;
this.addChild(leadImage);
if (Progress.mansionAllDead()){
addBlock(360, 500, new NewspaperBlock(310, 250, "Rich Family Destroyed by Mold", Text.ARTICLE_MANSION_ALLDEAD, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
if (Progress.mansionMotherCured()){
addBlock(360, 500, new NewspaperBlock(310, 250, "Rich Woman Survives Illness, Poison", Text.ARTICLE_MANSION_MOMCURED, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
if (Progress.mansionMotherSaved()){
addBlock(360, 500, new NewspaperBlock(310, 250, "Wealthy Woman Escapes Poisoning", Text.ARTICLE_MANSION_MOMLIVED, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
addBlock(360, 500, new NewspaperBlock(310, 250, "Local Money Maven Passes", Text.ARTICLE_MANSION_MOMDIED, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
};
};
};
if (Progress.hospitalPoisoned()){
addBlock(675, 500, new NewspaperBlock(320, 250, "Local Hospital Patient Dies of Poisoning", Text.ARTICLE_HOSPITAL_POISONED, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
if (Progress.hospitalCureFound()){
addBlock(675, 500, new NewspaperBlock(320, 250, "Cure Discovered at Town Hospital", Text.ARTICLE_HOSPITAL_FOUND_CURE, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
if (Progress.hospitalCured()){
addBlock(675, 500, new NewspaperBlock(320, 250, "Strange Recovery at Town Hospital", Text.ARTICLE_HOSPITAL_MYSTERIOUS_CURE, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
addBlock(675, 500, new NewspaperBlock(320, 250, "No Cure Yet at Local Hospital", Text.ARTICLE_HOSPITAL_NO_CURE, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
};
};
};
if (Progress.childGuided()){
addBlock(800, 100, new NewspaperBlock(200, 400, "Missing Child Rescued", Text.ARTICLE_CHILD_FOUND, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
addBlock(800, 100, new NewspaperBlock(200, 400, "Local Child Still Missing", Text.ARTICLE_CHILD_LOST, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
};
if (Progress.restaurantSaved()){
addBlock(360, 750, new NewspaperBlock(310, 250, "Local Restaurant Debuts New Blue Cheese", Text.ARTICLE_RESTAURANT_SAVED, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
if (Progress.restaurantShutdown()){
addBlock(360, 750, new NewspaperBlock(310, 250, "Local Restaurant Closed for Moldy Food", Text.ARTICLE_RESTAURANT_SHUTDOWN, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
if (Progress.restaurantPoisoned()){
addBlock(360, 750, new NewspaperBlock(310, 250, "Tragedy at Local Restaurant", Text.ARTICLE_RESTAURANT_POISONED, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
} else {
addBlock(360, 750, new NewspaperBlock(310, 250, "Local Restaurant Goes Out of Business", Text.ARTICLE_RESTAURANT_CLOSED, Fonts.NEWSPAPER_HEADLINE_MEDIUM));
};
};
};
if (Progress.housePoisoned()){
addBlock(675, 750, new NewspaperBlock(160, 250, "Family Dies of Mold Poisoning", Text.ARTICLE_HOUSE_POISONED, Fonts.NEWSPAPER_HEADLINE_SMALL));
} else {
if (Progress.houseSaved()){
addBlock(675, 750, new NewspaperBlock(160, 250, "Family Saved By Mold Growth", Text.ARTICLE_HOUSE_SAVED, Fonts.NEWSPAPER_HEADLINE_SMALL));
} else {
addBlock(675, 750, new NewspaperBlock(160, 250, "Family Evicted From Home", Text.ARTICLE_HOUSE_FORECLOSED, Fonts.NEWSPAPER_HEADLINE_SMALL));
};
};
if (Progress.numSlimeSporesCollected() <= 5){
addBlock(840, 750, new NewspaperBlock(160, 250, "Slime Molds Absent", Text.ARTICLE_SLIMEMOLD_SMALL, Fonts.NEWSPAPER_HEADLINE_SMALL));
} else {
if (Progress.numSlimeSporesCollected() < 50){
addBlock(840, 750, new NewspaperBlock(160, 250, "Growing Slime Molds", Text.ARTICLE_SLIMEMOLD_GROWING, Fonts.NEWSPAPER_HEADLINE_SMALL));
} else {
addBlock(840, 750, new NewspaperBlock(160, 250, "Largest Slime Mold Ever Found", Text.ARTICLE_SLIMEMOLD_COMPLETE, Fonts.NEWSPAPER_HEADLINE_SMALL));
};
};
zoomOutButton = new SpriteButton(Sprites.ZOOM_OUT);
zoomOutButton.visible = false;
zoomOutButton.addEventListener(MouseEvent.CLICK, onZoomOutClicked);
this.addChild(zoomOutButton);
hintField = new TextField();
hintField.textColor = 0xFFFFFF;
hintField.defaultTextFormat = Fonts.HEADING;
hintField.scaleX = 2;
hintField.scaleY = 2;
hintField.embedFonts = true;
hintField.text = "Click to Zoom";
hintField.x = 20;
hintField.y = 950;
hintField.width = 200;
hintField.mouseEnabled = false;
this.addChild(hintField);
continueButton = new TextButton("Continue >");
continueButton.filters = [new DropShadowFilter(0, 0, 0, 1, 4, 4, 8)];
continueButton.x = (470 / ZOOMED_OUT_SCALE);
continueButton.y = (420 / ZOOMED_OUT_SCALE);
continueButton.scaleX = (1 / ZOOMED_OUT_SCALE);
continueButton.scaleY = (1 / ZOOMED_OUT_SCALE);
continueButton.addEventListener(MouseEvent.CLICK, onContinueClick);
this.addChild(continueButton);
}
private function onBlockClicked(_arg1:MouseEvent):void{
var _local2:NewspaperBlock = NewspaperBlock(_arg1.target);
if (activeArticle == _local2){
zoomOut();
} else {
activeArticle = _local2;
this.scaleX = 1;
this.scaleY = 1;
this.x = (-(_local2.x) + ((Main.GAME_WIDTH - _local2.width) / 2));
this.y = (-(_local2.y) + ((Main.GAME_HEIGHT - _local2.height) / 2));
zoomOutButton.x = (-(this.x) + 10);
zoomOutButton.y = (-(this.y) + 425);
zoomOutButton.visible = true;
continueButton.x = (-(this.x) + 470);
continueButton.y = (-(this.y) + 420);
continueButton.scaleX = 1;
continueButton.scaleY = 1;
hintField.visible = false;
};
}
private function onContinueClick(_arg1:MouseEvent):void{
Main.theMain.popScreen();
Main.theMain.pushScreen(new EndGameSummaryScreen());
}
private function onZoomOutClicked(_arg1:MouseEvent):void{
zoomOut();
}
private function addBlock(_arg1:Number, _arg2:Number, _arg3:NewspaperBlock):void{
_arg3.x = _arg1;
_arg3.y = _arg2;
_arg3.addEventListener(MouseEvent.CLICK, onBlockClicked);
this.addChild(_arg3);
}
private function zoomOut():void{
activeArticle = null;
zoomOutButton.visible = false;
this.x = 0;
this.y = 0;
this.scaleX = ZOOMED_OUT_SCALE;
this.scaleY = ZOOMED_OUT_SCALE;
continueButton.x = (470 / ZOOMED_OUT_SCALE);
continueButton.y = (420 / ZOOMED_OUT_SCALE);
continueButton.scaleX = (1 / ZOOMED_OUT_SCALE);
continueButton.scaleY = (1 / ZOOMED_OUT_SCALE);
hintField.visible = true;
}
}
}//package Screens
Section 160
//PauseOverlay (Screens.PauseOverlay)
package Screens {
import flash.events.*;
import flash.text.*;
import Resources.*;
public class PauseOverlay extends Screen {
public function PauseOverlay(){
var _local1:TextField;
super();
graphics.beginFill(0, 0.5);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
_local1 = new TextField();
_local1.textColor = 0xFFFFFF;
_local1.defaultTextFormat = Fonts.TITLE_CENTERED;
_local1.embedFonts = true;
_local1.text = "PAUSED";
_local1.selectable = false;
_local1.y = 200;
_local1.width = Main.GAME_WIDTH;
_local1.mouseEnabled = false;
this.addChild(_local1);
this.addEventListener(MouseEvent.CLICK, onClick);
}
private function onClick(_arg1:MouseEvent):void{
Main.theMain.popScreen();
}
}
}//package Screens
Section 161
//PlayScreen (Screens.PlayScreen)
package Screens {
import Util.*;
import flash.display.*;
import WorldObjects.Puppet.*;
import Data.*;
import WorldObjects.*;
import Interface.*;
import Resources.*;
public class PlayScreen extends Screen {
public var statusBar:StatusBar;
private var _level:Level;
private var collisionMap:Bitmap;
public var fairy:MoldFairy;
private var parallax:Bitmap;
private var contents:Array;
private var lightMask:Sprite;
private var fairyGuiding:Boolean;
private var background:Bitmap;
public var worldSprite:Sprite;
private var spores:Array;
private var moldables:Array;
private static const SCROLL_MARGIN:int = 200;
public function PlayScreen(_arg1:Level){
contents = new Array();
spores = new Array();
moldables = new Array();
super();
this._level = _arg1;
graphics.beginFill(0x222222);
graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT);
worldSprite = new Sprite();
if (_arg1.darknessMask){
lightMask = new Sprite();
lightMask.addChild(_arg1.darknessMask);
this.addChild(lightMask);
worldSprite.mask = lightMask;
};
this.addChild(worldSprite);
collisionMap = new _arg1.collision();
parallax = new _arg1.parallax();
worldSprite.addChild(parallax);
var _local2:Bitmap = new _arg1.background();
var _local3:Bitmap = new _arg1.alphaMap();
background = Backgrounds.applyTransparency(_local2.bitmapData, _local3.bitmapData);
worldSprite.addChild(background);
populateContents();
if (_arg1.overlay){
worldSprite.addChild(new _arg1.overlay());
};
worldSprite.addChild(fairy);
contents.push(fairy);
statusBar = new StatusBar(this);
this.addChild(statusBar);
updateViewport();
SFX.startLoop(_arg1.music);
}
private function updateContents():void{
var _local2:WorldObject;
var _local1:Array = new Array();
for each (_local2 in contents) {
_local2.step();
if ((_local2 is SlimeSpore)){
if (fairy.getRect(worldSprite).contains(_local2.x, _local2.y)){
SlimeSpore(_local2).getCollected();
_local1.push(_local2);
statusBar.updateSlimeCount();
};
} else {
if ((_local2 is MoldSource)){
if (fairy.getRect(worldSprite).intersects(_local2.getRect(worldSprite))){
Progress.currProgress.findMold(MoldSource(_local2).species);
MoldSource(_local2).getCollected();
statusBar.refreshMolds();
_local1.push(_local2);
};
} else {
if ((_local2 is SpeechZone)){
if (fairy.getRect(worldSprite).intersects(_local2.getRect(worldSprite))){
statusBar.saySpeech(SpeechZone(_local2).getText());
};
};
};
};
if (_local2.lightSpot){
_local2.lightSpot.x = _local2.x;
_local2.lightSpot.y = _local2.y;
};
};
for each (_local2 in _local1) {
contents.splice(contents.indexOf(_local2), 1);
if (_local2.lightSpot != null){
lightMask.removeChild(_local2.lightSpot);
};
worldSprite.removeChild(_local2);
};
}
public function get level():Level{
return (_level);
}
private function createSpore():void{
var _local1:MoldSpore;
if (Progress.currProgress.currMold != null){
_local1 = new MoldSpore(Progress.currProgress.currMold, this);
_local1.x = (fairy.x + fairy.sporeX);
_local1.y = (fairy.y + fairy.sporeY);
worldSprite.addChild(_local1);
if (((!((_local1.lightSpot == null))) && (!((lightMask == null))))){
lightMask.addChild(_local1.lightSpot);
};
contents.push(_local1);
spores.push(_local1);
Progress.moldSporesDropped++;
};
}
override public function step():void{
updateMouseControl();
updateContents();
updateViewport();
updateMoldSpores();
statusBar.step();
}
private function updateViewport():void{
if ((((fairy.x > ((Main.GAME_WIDTH - worldSprite.x) - SCROLL_MARGIN))) && ((fairy.x < (background.width - SCROLL_MARGIN))))){
worldSprite.x = ((Main.GAME_WIDTH - SCROLL_MARGIN) - fairy.x);
} else {
if ((((fairy.x < (SCROLL_MARGIN - worldSprite.x))) && ((fairy.x > SCROLL_MARGIN)))){
worldSprite.x = (SCROLL_MARGIN - fairy.x);
};
};
if ((((fairy.y > ((Main.GAME_HEIGHT - worldSprite.y) - SCROLL_MARGIN))) && ((fairy.y < ((background.height + StatusBar.HEIGHT) - SCROLL_MARGIN))))){
worldSprite.y = ((Main.GAME_HEIGHT - SCROLL_MARGIN) - fairy.y);
} else {
if ((((fairy.y < (SCROLL_MARGIN - worldSprite.y))) && ((fairy.y > SCROLL_MARGIN)))){
worldSprite.y = (SCROLL_MARGIN - fairy.y);
};
};
if (lightMask){
lightMask.x = worldSprite.x;
lightMask.y = worldSprite.y;
};
parallax.x = (worldSprite.x / -2);
parallax.y = (worldSprite.y / -2);
}
private function addWorldObject(_arg1:int, _arg2:int, _arg3:WorldObject):void{
_arg3.x = _arg1;
_arg3.y = _arg2;
worldSprite.addChild(_arg3);
contents.push(_arg3);
if (((!((_arg3.lightSpot == null))) && (!((lightMask == null))))){
lightMask.addChild(_arg3.lightSpot);
};
}
private function updateMoldSpores():void{
var _local1:MoldSpore;
var _local3:int;
var _local2:int;
for (;_local2 < spores.length;_local2++) {
_local1 = spores[_local2];
if (_local1.y > background.height){
removeSporeAt(_local2);
_local2--;
} else {
_local3 = 0;
for (;_local3 < moldables.length;_local3++) {
if (moldables[_local3].testHitPointWithAlpha(_local1.x, _local1.y)){
moldables[_local3].startMold((_local1.x - moldables[_local3].x), (_local1.y - moldables[_local3].y), _local1.species);
removeSporeAt(_local2);
_local2--;
continue;
};
};
if (collisionAt(_local1.x, _local1.y)){
removeSporeAt(_local2);
_local2--;
continue;
};
};
};
}
private function get mouseOver():Boolean{
return ((stage.mouseY <= (Main.GAME_HEIGHT - StatusBar.HEIGHT)));
}
private function removeSporeAt(_arg1:int):void{
contents.splice(contents.indexOf(spores[_arg1]), 1);
if (worldSprite.contains(spores[_arg1])){
worldSprite.removeChild(spores[_arg1]);
if (((!((lightMask == null))) && (!((spores[_arg1].lightSpot == null))))){
lightMask.removeChild(spores[_arg1].lightSpot);
};
};
spores.splice(_arg1, 1);
}
public function collisionAt(_arg1:int, _arg2:int):Boolean{
return ((collisionMap.bitmapData.getPixel(_arg1, _arg2) == 0));
}
private function updateMouseControl():void{
if ((((((((stage.mouseX >= 0)) && ((stage.mouseX < Preloader.STAGE_WIDTH)))) && ((stage.mouseY >= 0)))) && ((stage.mouseY < Preloader.STAGE_HEIGHT)))){
if (((!(fairyGuiding)) && ((SugarMath.distance(worldSprite.mouseX, worldSprite.mouseY, (fairy.x + (fairy.width / 2)), (fairy.y + (fairy.height / 2))) <= MoldFairy.SPORE_SENSITIVITY)))){
Cursor.setDot(true);
if (((Main.mouseButtonDown) && (mouseOver))){
fairy.spreadingSpores = true;
createSpore();
} else {
fairy.spreadingSpores = false;
};
} else {
if (mouseOver){
Cursor.setDot(false);
if (Main.mouseButtonDown){
fairy.spreadingSpores = false;
fairyGuiding = true;
fairy.setDestination(worldSprite.mouseX, worldSprite.mouseY);
};
};
};
};
if (!Main.mouseButtonDown){
fairyGuiding = false;
};
}
private function populateContents():void{
var _local1:Puppet;
var _local2:Moldable;
var _local3:XML;
var _local5:MoldSpecies;
var _local6:SlimeMold;
for each (_local3 in level.contents.puppets.puppet) {
_local1 = new Puppet(Textures.getTexture(_local3.@top), Textures.getTexture(_local3.@bottom), Faces.getFace(_local3.@face), uint(_local3.@skinColor), this, !((_local3.@sideview.length() == 0)), !((_local3.@ischild.length() == 0)));
if (_local3.@rotation != null){
_local1.rotation = _local3.@rotation;
};
_local1.startAnimation(PuppetAnimations.getAnimation(_local3.@startAnim), true, true);
addWorldObject(_local3.@x, _local3.@y, _local1);
};
for each (_local3 in level.contents.moldables.moldable) {
_local2 = Progress.currProgress.getMoldedObject(level, _local3.childIndex());
if (_local2 == null){
_local2 = new Moldable(_local3.@type, _local3.childIndex(), this);
} else {
_local2.myScreen = this;
};
addMoldable(_local3.@x, _local3.@y, _local2);
};
for each (_local3 in level.contents.slimespores.slimespore) {
if (!Progress.currProgress.slimeSporeCollected(level, _local3.childIndex())){
addWorldObject(_local3.@x, _local3.@y, new SlimeSpore(level, _local3.childIndex(), this));
};
};
for each (_local3 in level.contents.signs.sign) {
addWorldObject(_local3.@x, _local3.@y, new Sign(Sprites.SIGNS[int(_local3.@signindex)], this));
};
for each (_local3 in level.contents.zones.zone) {
addWorldObject(_local3.@x, _local3.@y, new SpeechZone(_local3.@width, _local3.@height, _local3.@source, this));
};
if (level == Level.RIVER){
_local6 = new SlimeMold(this);
addWorldObject(500, 250, _local6);
};
var _local4:XMLList = level.contents.source;
if (_local4.length() == 1){
_local5 = MoldSpecies.getSpeciesByCommonName(_local4.@type);
if (!Progress.currProgress.moldFoundThisGame(_local5)){
addWorldObject(_local4.@x, _local4.@y, new MoldSource(_local5, this));
};
};
fairy = new MoldFairy(level.contents.@x, level.contents.@y, this);
if (lightMask){
lightMask.addChild(fairy.lightSpot);
};
}
private function addMoldable(_arg1:int, _arg2:int, _arg3:Moldable):void{
addWorldObject(_arg1, _arg2, _arg3);
moldables.push(_arg3);
}
}
}//package Screens
Section 162
//Screen (Screens.Screen)
package Screens {
import flash.display.*;
public class Screen extends Sprite {
public function awaken():void{
}
public function step():void{
}
}
}//package Screens
Section 163
//TitleScreen (Screens.TitleScreen)
package Screens {
import flash.events.*;
import Util.*;
import flash.display.*;
import flash.text.*;
import Data.*;
import WorldObjects.*;
import Interface.*;
import Resources.*;
import flash.net.*;
public class TitleScreen extends Screen {
private var achievementButton:TextButton;
private var frameCount:int;
private var apple:Moldable;
public static const TITLE_SCREEN:Bitmap = new clsTitleScreen();
private static var clsTitleScreen:Class = TitleScreen_clsTitleScreen;
private static var TwitterLogoClass:Class = TitleScreen_TwitterLogoClass;
private static var ArmorGamesLogoSmallClass:Class = TitleScreen_ArmorGamesLogoSmallClass;
public function TitleScreen(){
super();
this.addChild(TITLE_SCREEN);
apple = new Moldable(Moldable.TYPE_TITLE_APPLE, 0, null);
apple.x = 250;
apple.y = 130;
apple.startMold(5, 74, MoldSpecies.BREAD_MOLD);
this.addChild(apple);
var titleField:TextField = new TextField();
titleField.textColor = 0xFFFFFF;
titleField.defaultTextFormat = Fonts.TITLE_CENTERED;
titleField.embedFonts = true;
titleField.text = "The Mold Fairy";
titleField.selectable = false;
titleField.width = Main.GAME_WIDTH;
this.addChild(titleField);
var startButton:TextButton = new TextButton("Start Story");
startButton.addEventListener(MouseEvent.CLICK, onClickStart);
startButton.x = 450;
startButton.y = 125;
this.addChild(startButton);
var moreButton:TextButton = new TextButton("More Games");
moreButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://armorgames.com"), "_blank");
});
moreButton.x = 450;
moreButton.y = 175;
this.addChild(moreButton);
var helpButton:TextButton = new TextButton("How to Play");
helpButton.addEventListener(MouseEvent.CLICK, onClickHelp);
helpButton.x = 450;
helpButton.y = 225;
this.addChild(helpButton);
var creditsButton:TextButton = new TextButton("View Credits");
creditsButton.addEventListener(MouseEvent.CLICK, onClickCredits);
creditsButton.x = 450;
creditsButton.y = 275;
this.addChild(creditsButton);
achievementButton = new TextButton("View Titles");
achievementButton.addEventListener(MouseEvent.CLICK, onClickTitles);
achievementButton.x = 450;
achievementButton.y = 325;
this.addChild(achievementButton);
var byMe:TextField = new TextField();
byMe.htmlText = "<a href=\"http://ludusnovus.net\" target=\"_blank\">Developed by Gregory Weir\nhttp://ludusnovus.net</a>";
byMe.textColor = 0xFFFFFF;
byMe.x = 5;
byMe.y = (Main.GAME_HEIGHT - 50);
byMe.width = (Main.GAME_WIDTH / 2);
byMe.setTextFormat(Fonts.STANDARD);
byMe.embedFonts = true;
this.addChild(byMe);
var logo:SpriteButton = new SpriteButton(new SpriteSheet(new ArmorGamesLogoSmallClass(), 1, 1));
logo.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://armorgames.com"), "_blank");
});
logo.x = 450;
logo.y = 400;
this.addChild(logo);
var twitter:SpriteButton = new SpriteButton(new SpriteSheet(new TwitterLogoClass(), 1, 1));
twitter.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://twitter.com/armorgames"), "_blank");
});
twitter.x = 525;
twitter.y = 450;
this.addChild(twitter);
if (!Progress.currProgress.anyAchievementComplete()){
achievementButton.visible = false;
};
SFX.startLoop(SFX.MENU_LOOP);
}
private function onClickTitles(_arg1:MouseEvent):void{
Main.theMain.pushScreen(new AchievementScreen(false));
}
override public function awaken():void{
SFX.startLoop(SFX.MENU_LOOP);
if (Progress.currProgress.anyAchievementComplete()){
achievementButton.visible = true;
};
}
private function onClickHelp(_arg1:MouseEvent):void{
Main.theMain.pushScreen(new HelpScreen());
}
override public function step():void{
frameCount++;
if (frameCount == 4){
apple.expandMold(MoldSpecies.BREAD_MOLD);
frameCount = 0;
};
}
private function onClickCredits(_arg1:MouseEvent):void{
Main.theMain.pushScreen(new CreditsScreen());
}
private function onClickStart(_arg1:MouseEvent):void{
Main.theMain.pushScreen(new LoadingScreen());
Progress.clearProgress();
}
}
}//package Screens
Section 164
//TitleScreen_ArmorGamesLogoSmallClass (Screens.TitleScreen_ArmorGamesLogoSmallClass)
package Screens {
import mx.core.*;
public class TitleScreen_ArmorGamesLogoSmallClass extends BitmapAsset {
}
}//package Screens
Section 165
//TitleScreen_clsTitleScreen (Screens.TitleScreen_clsTitleScreen)
package Screens {
import mx.core.*;
public class TitleScreen_clsTitleScreen extends BitmapAsset {
}
}//package Screens
Section 166
//TitleScreen_TwitterLogoClass (Screens.TitleScreen_TwitterLogoClass)
package Screens {
import mx.core.*;
public class TitleScreen_TwitterLogoClass extends BitmapAsset {
}
}//package Screens
Section 167
//SpriteSheet (Util.SpriteSheet)
package Util {
import flash.display.*;
import flash.geom.*;
public class SpriteSheet {
private var _cols:int;
private var bmSheet:BitmapData;
private var _rows:int;
public function SpriteSheet(_arg1:Bitmap, _arg2:int, _arg3:int){
bmSheet = _arg1.bitmapData;
_rows = _arg2;
_cols = _arg3;
}
public function getFrame(_arg1:int, _arg2:int):BitmapData{
var _local3:BitmapData = new BitmapData((bmSheet.width / cols), (bmSheet.height / rows));
_local3.copyPixels(bmSheet, new Rectangle((_arg2 * _local3.width), (_arg1 * _local3.height), _local3.width, _local3.height), new Point(0, 0));
return (_local3);
}
public function get rows():int{
return (_rows);
}
public function get cols():int{
return (_cols);
}
}
}//package Util
Section 168
//SugarGraphics (Util.SugarGraphics)
package Util {
import flash.display.*;
import flash.geom.*;
public class SugarGraphics {
public static function drawSprite(_arg1:Graphics, _arg2:BitmapData, _arg3:Number, _arg4:Number, _arg5:Matrix=null, _arg6:Number=1):void{
if (_arg5 == null){
_arg5 = new Matrix();
};
_arg5.scale(_arg6, _arg6);
_arg5.translate(_arg3, _arg4);
_arg1.beginBitmapFill(_arg2, _arg5);
_arg1.drawRect(_arg3, _arg4, (_arg2.width * _arg6), (_arg2.height * _arg6));
_arg1.endFill();
}
}
}//package Util
Section 169
//SugarMath (Util.SugarMath)
package Util {
import flash.geom.*;
public class SugarMath {
public static function Cartesian2Theta(_arg1:Number, _arg2:Number):Number{
return (Math.atan2(_arg2, _arg1));
}
public static function distance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.sqrt((((_arg1 - _arg3) * (_arg1 - _arg3)) + ((_arg2 - _arg4) * (_arg2 - _arg4)))));
}
public static function Degrees2Radians(_arg1:Number):Number{
return (((_arg1 / 360) * (2 * Math.PI)));
}
public static function randint(_arg1:int, _arg2:int):int{
if (_arg1 == _arg2){
return (_arg1);
};
var _local3:Number = Math.random();
var _local4:int = (Math.floor((_local3 * ((_arg2 - _arg1) + 1))) + _arg1);
if (_local4 > _arg2){
return (_arg2);
};
return (_local4);
}
public static function Polar2Cartesian(_arg1:Number, _arg2:Number):Point{
var _local3:int = (Math.cos(_arg2) * _arg1);
var _local4:int = (Math.sin(_arg2) * _arg1);
return (new Point(_local3, _local4));
}
public static function Radians2Degrees(_arg1:Number):Number{
return (((_arg1 / (2 * Math.PI)) * 360));
}
public static function getVectorBetween(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Point{
var _local6:Point = new Point((_arg3 - _arg1), (_arg4 - _arg2));
if (!isNaN(_arg5)){
if (_arg5 < 0){
_local6.x = -(_local6.x);
_local6.y = -(_local6.y);
_arg5 = -(_arg5);
};
_local6.normalize(_arg5);
};
return (_local6);
}
}
}//package Util
Section 170
//FacePiece (WorldObjects.Puppet.FacePiece)
package WorldObjects.Puppet {
import Screens.*;
import Util.*;
import flash.display.*;
public class FacePiece extends PuppetPiece {
public function FacePiece(_arg1:Bitmap, _arg2:PlayScreen){
super(_arg1, _arg2);
}
override public function draw():void{
graphics.clear();
SugarGraphics.drawSprite(graphics, texture.bitmapData, (-(texture.width) / 2), -(texture.height));
}
}
}//package WorldObjects.Puppet
Section 171
//HandPiece (WorldObjects.Puppet.HandPiece)
package WorldObjects.Puppet {
import Screens.*;
import flash.display.*;
public class HandPiece extends PuppetPiece {
private var skinColor:uint;
public function HandPiece(_arg1:uint, _arg2:Bitmap, _arg3:PlayScreen){
super(_arg2, _arg3);
this.skinColor = _arg1;
}
override public function draw():void{
graphics.clear();
graphics.beginFill(skinColor);
graphics.lineStyle(2, 0, 1, true, LineScaleMode.NONE);
graphics.moveTo(-18, 0);
graphics.lineTo(-18, 10);
graphics.curveTo(0, 30, 18, 10);
graphics.lineTo(18, 0);
}
}
}//package WorldObjects.Puppet
Section 172
//HipPiece (WorldObjects.Puppet.HipPiece)
package WorldObjects.Puppet {
import Screens.*;
import flash.display.*;
public class HipPiece extends PuppetPiece {
private var sideView:Boolean;
public function HipPiece(_arg1:Bitmap, _arg2:PlayScreen, _arg3:Boolean=false){
sideView = _arg3;
super(_arg1, _arg2);
}
override protected function drawOutline():void{
if (sideView){
graphics.moveTo(-40, 0);
graphics.lineTo(40, 0);
graphics.lineTo(30, 40);
graphics.lineTo(-30, 40);
graphics.lineTo(-40, 0);
} else {
graphics.moveTo(-60, 0);
graphics.lineTo(60, 0);
graphics.lineTo(50, 40);
graphics.lineTo(-50, 40);
graphics.lineTo(-60, 0);
};
}
}
}//package WorldObjects.Puppet
Section 173
//LeftFootPiece (WorldObjects.Puppet.LeftFootPiece)
package WorldObjects.Puppet {
import Screens.*;
import flash.display.*;
public class LeftFootPiece extends PuppetPiece {
public function LeftFootPiece(_arg1:Bitmap, _arg2:PlayScreen){
super(_arg1, _arg2);
}
override public function draw():void{
graphics.clear();
graphics.beginFill(4465169);
graphics.lineStyle(2, 0, 1, true, LineScaleMode.NONE);
graphics.moveTo(20, -5);
graphics.lineTo(20, 30);
graphics.lineTo(-40, 30);
graphics.curveTo(-50, 15, -40, -5);
graphics.lineTo(-20, -5);
}
}
}//package WorldObjects.Puppet
Section 174
//LimbPiece (WorldObjects.Puppet.LimbPiece)
package WorldObjects.Puppet {
import Screens.*;
import flash.display.*;
public class LimbPiece extends PuppetPiece {
public function LimbPiece(_arg1:Bitmap, _arg2:PlayScreen){
super(_arg1, _arg2);
}
override protected function drawOutline():void{
graphics.moveTo(-20, -10);
graphics.curveTo(0, -30, 20, -10);
graphics.lineTo(20, 90);
graphics.lineTo(-20, 90);
graphics.lineTo(-20, -10);
}
}
}//package WorldObjects.Puppet
Section 175
//Puppet (WorldObjects.Puppet.Puppet)
package WorldObjects.Puppet {
import Screens.*;
import flash.events.*;
import flash.display.*;
import WorldObjects.*;
public class Puppet extends WorldObject {
private var loopAnimation:Boolean;
private var hips:HipPiece;
private var ULArm:LimbPiece;
private var currAnimStep:int;
private var currAnimFrame:int;
private var face:FacePiece;
private var LRLeg:LimbPiece;
private var URLeg:LimbPiece;
private var currAnimation:XML;
private var torso:TorsoPiece;
private var LLLeg:LimbPiece;
private var LRArm:LimbPiece;
private var ULLeg:LimbPiece;
private var LLArm:LimbPiece;
private var URArm:LimbPiece;
public function Puppet(_arg1:Bitmap, _arg2:Bitmap, _arg3:Bitmap, _arg4:uint, _arg5:PlayScreen, _arg6:Boolean=false, _arg7:Boolean=false){
super(_arg5);
if (_arg6){
constructSideView(_arg1, _arg2, _arg3, _arg4);
} else {
constructFrontView(_arg1, _arg2, _arg3, _arg4);
};
if (_arg7){
this.scaleX = 0.75;
this.scaleY = 0.75;
face.scaleX = 1.333;
face.scaleY = 1.333;
};
addEventListener(Event.ADDED_TO_STAGE, onAdded);
}
public function startAnimation(_arg1:XML, _arg2:Boolean, _arg3:Boolean=false):void{
currAnimation = _arg1;
currAnimStep = 0;
currAnimFrame = 0;
loopAnimation = _arg2;
if (_arg3){
snapToPosition(currAnimation.children()[currAnimStep]);
currAnimFrame = currAnimation.children()[currAnimStep].@length;
};
}
override public function step():void{
if (currAnimation){
stepAnimation();
};
}
private function constructSideView(_arg1:Bitmap, _arg2:Bitmap, _arg3:Bitmap, _arg4:uint):void{
ULLeg = new LimbPiece(_arg2, myScreen);
ULLeg.x = 0;
ULLeg.y = 160;
ULLeg.draw();
this.addChild(ULLeg);
LLLeg = new LimbPiece(_arg2, myScreen);
LLLeg.x = 0;
LLLeg.y = 90;
LLLeg.draw();
ULLeg.addChild(LLLeg);
var _local5:RightFootPiece = new RightFootPiece(null, myScreen);
_local5.x = 0;
_local5.y = 90;
_local5.draw();
LLLeg.addChild(_local5);
ULArm = new LimbPiece(_arg1, myScreen);
ULArm.x = 0;
ULArm.y = 0;
ULArm.draw();
this.addChild(ULArm);
LLArm = new LimbPiece(_arg1, myScreen);
LLArm.x = 0;
LLArm.y = 90;
LLArm.draw();
ULArm.addChild(LLArm);
var _local6:HandPiece = new HandPiece(_arg4, null, myScreen);
_local6.x = 0;
_local6.y = 90;
_local6.draw();
LLArm.addChild(_local6);
torso = new TorsoPiece(_arg1, myScreen, true);
this.addChild(torso);
this.face = new FacePiece(_arg3, myScreen);
face.x = 0;
face.y = -10;
torso.addChild(face);
hips = new HipPiece(_arg2, myScreen, true);
hips.y = 140;
torso.addChild(hips);
URLeg = new LimbPiece(_arg2, myScreen);
URLeg.x = 0;
URLeg.y = 40;
hips.addChild(URLeg);
LRLeg = new LimbPiece(_arg2, myScreen);
LRLeg.x = 0;
LRLeg.y = 90;
URLeg.addChild(LRLeg);
var _local7:RightFootPiece = new RightFootPiece(null, myScreen);
_local7.x = 0;
_local7.y = 90;
_local7.draw();
LRLeg.addChild(_local7);
URArm = new LimbPiece(_arg1, myScreen);
URArm.x = 0;
URArm.y = 0;
URArm.draw();
torso.addChild(URArm);
LRArm = new LimbPiece(_arg1, myScreen);
LRArm.x = 0;
LRArm.y = 90;
LRArm.draw();
URArm.addChild(LRArm);
_local6 = new HandPiece(_arg4, null, myScreen);
_local6.x = 0;
_local6.y = 90;
_local6.draw();
LRArm.addChild(_local6);
}
private function constructFrontView(_arg1:Bitmap, _arg2:Bitmap, _arg3:Bitmap, _arg4:uint):void{
torso = new TorsoPiece(_arg1, myScreen, false);
this.addChild(torso);
this.face = new FacePiece(_arg3, myScreen);
face.x = 0;
face.y = -10;
torso.addChild(face);
hips = new HipPiece(_arg2, myScreen);
hips.y = 140;
torso.addChild(hips);
ULLeg = new LimbPiece(_arg2, myScreen);
ULLeg.x = -40;
ULLeg.y = 40;
ULLeg.draw();
hips.addChild(ULLeg);
LLLeg = new LimbPiece(_arg2, myScreen);
LLLeg.x = 0;
LLLeg.y = 90;
LLLeg.draw();
ULLeg.addChild(LLLeg);
var _local5:LeftFootPiece = new LeftFootPiece(null, myScreen);
_local5.x = 0;
_local5.y = 90;
_local5.draw();
LLLeg.addChild(_local5);
URLeg = new LimbPiece(_arg2, myScreen);
URLeg.x = 40;
URLeg.y = 40;
hips.addChild(URLeg);
LRLeg = new LimbPiece(_arg2, myScreen);
LRLeg.x = 0;
LRLeg.y = 90;
URLeg.addChild(LRLeg);
var _local6:RightFootPiece = new RightFootPiece(null, myScreen);
_local6.x = 0;
_local6.y = 90;
_local6.draw();
LRLeg.addChild(_local6);
ULArm = new LimbPiece(_arg1, myScreen);
ULArm.x = -70;
ULArm.y = 0;
ULArm.draw();
torso.addChild(ULArm);
LLArm = new LimbPiece(_arg1, myScreen);
LLArm.x = 0;
LLArm.y = 90;
LLArm.draw();
ULArm.addChild(LLArm);
var _local7:HandPiece = new HandPiece(_arg4, null, myScreen);
_local7.x = 0;
_local7.y = 90;
_local7.draw();
LLArm.addChild(_local7);
URArm = new LimbPiece(_arg1, myScreen);
URArm.x = 70;
URArm.y = 0;
URArm.draw();
torso.addChild(URArm);
LRArm = new LimbPiece(_arg1, myScreen);
LRArm.x = 0;
LRArm.y = 90;
LRArm.draw();
URArm.addChild(LRArm);
_local7 = new HandPiece(_arg4, null, myScreen);
_local7.x = 0;
_local7.y = 90;
_local7.draw();
LRArm.addChild(_local7);
}
private function stepAnimation():void{
var currStep:XML = currAnimation.children()[currAnimStep];
if (currStep.@length == currAnimFrame){
currAnimStep++;
currAnimFrame = 0;
if (currAnimation.children().length() == currAnimStep){
if (loopAnimation){
currAnimStep = 0;
currAnimFrame = 0;
};
};
currStep = currAnimation.children()[currAnimStep];
};
if (currStep.name().localName == "position"){
stepPartAnimation(currStep.*.(@part == "URArm"), URArm, currStep.@length);
stepPartAnimation(currStep.*.(@part == "ULArm"), ULArm, currStep.@length);
stepPartAnimation(currStep.*.(@part == "LLArm"), LLArm, currStep.@length);
stepPartAnimation(currStep.*.(@part == "LRArm"), LRArm, currStep.@length);
stepPartAnimation(currStep.*.(@part == "ULLeg"), ULLeg, currStep.@length);
stepPartAnimation(currStep.*.(@part == "URLeg"), URLeg, currStep.@length);
stepPartAnimation(currStep.*.(@part == "LLLeg"), LLLeg, currStep.@length);
stepPartAnimation(currStep.*.(@part == "LRLeg"), LRLeg, currStep.@length);
if (currStep.hasOwnProperty("@x")){
stepLocation(currStep.@x, currStep.@length);
};
} else {
if (currStep.name().localName == "fade"){
stepFade(currStep.@target, currStep.@length);
} else {
if (currStep.name().localName == "setlocation"){
x = currStep.@x;
y = currStep.@y;
};
};
};
currAnimFrame++;
}
private function onAdded(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
torso.draw();
}
private function stepPartAnimation(_arg1:XMLList, _arg2:PuppetPiece, _arg3:int):void{
var _local4:Number;
if (_arg1.length() > 0){
_local4 = (_arg1.@angle - _arg2.rotation);
_arg2.rotation = (_arg2.rotation + (_local4 / (_arg3 - currAnimFrame)));
_arg2.draw();
};
}
private function stepFade(_arg1:Number, _arg2:int):void{
var _local3:Number = (_arg1 - alpha);
this.alpha = (this.alpha + (_local3 / (_arg2 - currAnimFrame)));
}
private function stepLocation(_arg1:int, _arg2:int):void{
var _local3:Number = (_arg1 - x);
this.x = (this.x + (_local3 / (_arg2 - currAnimFrame)));
var _local4:int;
while (_local4 < this.numChildren) {
if ((this.getChildAt(_local4) is PuppetPiece)){
PuppetPiece(this.getChildAt(_local4)).draw();
};
_local4++;
};
}
private function snapToPosition(_arg1:XML):void{
var position = _arg1;
URArm.rotation = position.*.(@part == "URArm").@angle;
ULArm.rotation = position.*.(@part == "ULArm").@angle;
LLArm.rotation = position.*.(@part == "LLArm").@angle;
LRArm.rotation = position.*.(@part == "LRArm").@angle;
ULLeg.rotation = position.*.(@part == "ULLeg").@angle;
URLeg.rotation = position.*.(@part == "URLeg").@angle;
LLLeg.rotation = position.*.(@part == "LLLeg").@angle;
LRLeg.rotation = position.*.(@part == "LRLeg").@angle;
}
}
}//package WorldObjects.Puppet
Section 176
//PuppetPiece (WorldObjects.Puppet.PuppetPiece)
package WorldObjects.Puppet {
import Screens.*;
import Util.*;
import flash.display.*;
import flash.geom.*;
public class PuppetPiece extends Sprite {
protected var texture:Bitmap;
private var myPlayScreen:PlayScreen;
public function PuppetPiece(_arg1:Bitmap, _arg2:PlayScreen){
this.texture = _arg1;
this.myPlayScreen = _arg2;
}
public function get globalRotation():Number{
if (parent){
if ((parent is Puppet)){
return (((this.rotation + parent.rotation) % 360));
};
if ((parent is PuppetPiece)){
return (((this.rotation + (parent as PuppetPiece).globalRotation) % 360));
};
throw (new Error("A PuppetPiece should only be added to a Puppet or another PuppetPiece."));
} else {
};
return (!NULL!);
}
public function draw():void{
graphics.clear();
graphics.lineStyle(2, 0, 1, true, LineScaleMode.NONE);
graphics.beginBitmapFill(texture.bitmapData, getTextureMatrix());
drawOutline();
graphics.endFill();
var _local1:int;
while (_local1 < this.numChildren) {
if ((this.getChildAt(_local1) is PuppetPiece)){
PuppetPiece(this.getChildAt(_local1)).draw();
};
_local1++;
};
}
public function get globalScale():Number{
if ((parent is Puppet)){
return (parent.scaleX);
};
if (parent == null){
return (1);
};
return (PuppetPiece(parent).globalScale);
}
protected function getTextureMatrix():Matrix{
var _local1:Matrix = new Matrix();
var _local2:Point = new Point(0, 0);
_local2 = localToGlobal(_local2);
if (Main.theMain.currScreen){
_local2 = myPlayScreen.worldSprite.globalToLocal(_local2);
};
_local1.translate(-(_local2.x), -(_local2.y));
_local1.scale((1 / globalScale), (1 / globalScale));
_local1.rotate(-(SugarMath.Degrees2Radians(globalRotation)));
return (_local1);
}
protected function drawOutline():void{
throw (new Error("PuppetPiece is an abstract base class and should not be used alone."));
}
}
}//package WorldObjects.Puppet
Section 177
//RightFootPiece (WorldObjects.Puppet.RightFootPiece)
package WorldObjects.Puppet {
import Screens.*;
import flash.display.*;
public class RightFootPiece extends PuppetPiece {
public function RightFootPiece(_arg1:Bitmap, _arg2:PlayScreen){
super(_arg1, _arg2);
}
override public function draw():void{
graphics.clear();
graphics.beginFill(4465169);
graphics.lineStyle(2, 0, 1, true, LineScaleMode.NONE);
graphics.moveTo(-20, -5);
graphics.lineTo(-20, 30);
graphics.lineTo(40, 30);
graphics.curveTo(50, 15, 40, -5);
graphics.lineTo(20, -5);
}
}
}//package WorldObjects.Puppet
Section 178
//TorsoPiece (WorldObjects.Puppet.TorsoPiece)
package WorldObjects.Puppet {
import Screens.*;
import flash.display.*;
public class TorsoPiece extends PuppetPiece {
private var sideView:Boolean;
public function TorsoPiece(_arg1:Bitmap, _arg2:PlayScreen, _arg3:Boolean){
this.sideView = _arg3;
super(_arg1, _arg2);
}
override protected function drawOutline():void{
if (sideView){
graphics.moveTo(-50, -10);
graphics.curveTo(0, -50, 50, -10);
graphics.lineTo(40, 140);
graphics.lineTo(-40, 140);
graphics.lineTo(-50, -10);
} else {
graphics.moveTo(-80, -10);
graphics.curveTo(0, -50, 80, -10);
graphics.lineTo(60, 140);
graphics.lineTo(-60, 140);
graphics.lineTo(-80, -10);
};
}
}
}//package WorldObjects.Puppet
Section 179
//Moldable (WorldObjects.Moldable)
package WorldObjects {
import Screens.*;
import Util.*;
import flash.display.*;
import Data.*;
import flash.geom.*;
import Resources.*;
public class Moldable extends WorldObject {
private var dormantMatrix:Array;
private var _sporesHit:int;
private var _index:int;
private var _type:String;
private var baseBitmap:BitmapData;
private var moldData:Array;
public var molds:Array;
private var moldBitmap:BitmapData;
private var newMoldData:Array;
private var _lightSporesHit:int;
public static const TYPE_SPAGHETTI:String = "SPAGHETTI";
public static const TYPE_BANANA:String = "BANANA";
public static const TYPE_PETRIDISH:String = "PETRIDISH";
public static const TYPE_PEACH:String = "PEACH";
public static const TYPE_REDAPPLE:String = "REDAPPLE";
public static const TYPE_FLASK:String = "FLASK";
public static const TYPE_LETTUCE:String = "LETTUCE";
private static const SEMITRANS:uint = 3137339392;
public static const TYPE_GREENAPPLE:String = "GREENAPPLE";
public static const TYPE_SANDWICH:String = "SANDWICH";
public static const TYPE_TITLE_APPLE:String = "TITLE_APPLE";
public static const TYPE_INSULATION:String = "INSULATION";
public static const TYPE_BREADLOAF:String = "BREADLOAF";
public static const TYPE_CHEESE:String = "CHEESE";
public static const TYPE_MUSHROOM:String = "MUSHROOM";
public function Moldable(_arg1:String, _arg2:int, _arg3:PlayScreen){
var _local6:int;
molds = new Array();
super(_arg3);
this._type = _arg1;
this._index = _arg2;
var _local4:Bitmap = bitmapFromType(_arg1);
baseBitmap = _local4.bitmapData.clone();
moldBitmap = new BitmapData(baseBitmap.width, baseBitmap.height, true, 0);
moldData = new Array(baseBitmap.width);
newMoldData = new Array(baseBitmap.width);
dormantMatrix = new Array(baseBitmap.width);
var _local5:int;
while (_local5 < moldData.length) {
moldData[_local5] = new Array(baseBitmap.height);
newMoldData[_local5] = new Array(baseBitmap.height);
dormantMatrix[_local5] = new Array(baseBitmap.height);
_local6 = 0;
while (_local6 < baseBitmap.height) {
moldData[_local5][_local6] = null;
dormantMatrix[_local5][_local6] = false;
_local6++;
};
_local5++;
};
SugarGraphics.drawSprite(graphics, baseBitmap, 0, 0);
lightSpot = new Sprite();
}
public function testHitPointWithAlpha(_arg1:int, _arg2:int):Boolean{
if (((parent) && (getBounds(this.parent).contains(_arg1, _arg2)))){
return (baseBitmap.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - this.x), (_arg2 - this.y))));
};
return (false);
}
private function trySpread(_arg1:int, _arg2:int):Boolean{
var _local3:Boolean;
var _local4:MoldSpecies = moldData[_arg1][_arg2];
_local3 = ((trySpreadTo((_arg1 + 1), _arg2, _local4)) || (_local3));
_local3 = ((trySpreadTo((_arg1 - 1), _arg2, _local4)) || (_local3));
_local3 = ((trySpreadTo(_arg1, (_arg2 + 1), _local4)) || (_local3));
_local3 = ((trySpreadTo(_arg1, (_arg2 - 1), _local4)) || (_local3));
return (_local3);
}
public function expandMold(_arg1:MoldSpecies):void{
var _local4:int;
var _local2:int;
while (_local2 < baseBitmap.width) {
_local4 = 0;
while (_local4 < baseBitmap.height) {
newMoldData[_local2][_local4] = moldData[_local2][_local4];
_local4++;
};
_local2++;
};
_local2 = 0;
while (_local2 < baseBitmap.width) {
_local4 = 0;
while (_local4 < baseBitmap.height) {
if (dormantMatrix[_local2][_local4]){
} else {
if (moldData[_local2][_local4] == _arg1){
if (!trySpread(_local2, _local4)){
dormantMatrix[_local2][_local4] = true;
};
};
};
_local4++;
};
_local2++;
};
var _local3:Array = moldData;
moldData = newMoldData;
newMoldData = _local3;
}
override public function step():void{
}
public function startMold(_arg1:int, _arg2:int, _arg3:MoldSpecies):void{
if (moldData[_arg1][_arg2] == null){
moldData[_arg1][_arg2] = _arg3;
moldBitmap.setPixel32(_arg1, _arg2, (SEMITRANS + _arg3.getRandomColor()));
expandMold(_arg3);
redraw();
if (_arg3 == MoldSpecies.MUTANT_MOLD){
_lightSporesHit++;
redrawLight();
};
} else {
if (moldData[_arg1][_arg2] == _arg3){
expandMold(_arg3);
if (_arg3 == MoldSpecies.MUTANT_MOLD){
_lightSporesHit++;
redrawLight();
};
};
};
_sporesHit++;
if (_sporesHit >= 5){
Progress.currProgress.moldObject(myScreen.level, _index, this);
};
if (molds.indexOf(_arg3) == -1){
molds.push(_arg3);
};
}
private function redrawLight():void{
var _local1:int = _sporesHit;
if (_local1 > 50){
_local1 = 50;
};
lightSpot.graphics.clear();
lightSpot.graphics.beginFill(0);
lightSpot.graphics.drawCircle((baseBitmap.width / 2), (baseBitmap.height / 2), _local1);
}
private function trySpreadTo(_arg1:int, _arg2:int, _arg3:MoldSpecies):Boolean{
if ((((((((((_arg1 < 0)) || ((_arg1 >= baseBitmap.width)))) || ((_arg2 < 0)))) || ((_arg2 >= baseBitmap.height)))) || ((baseBitmap.getPixel32(_arg1, _arg2) < 0xFF)))){
return (false);
};
if (moldData[_arg1][_arg2] == null){
if (SugarMath.randint(1, 4) == 1){
newMoldData[_arg1][_arg2] = _arg3;
moldBitmap.setPixel32(_arg1, _arg2, (SEMITRANS + _arg3.getRandomColor()));
};
return (true);
};
return (false);
}
private function redraw():void{
graphics.clear();
SugarGraphics.drawSprite(graphics, baseBitmap, 0, 0);
SugarGraphics.drawSprite(graphics, moldBitmap, 0, 0);
}
public function get type():String{
return (_type);
}
private static function bitmapFromType(_arg1:String):Bitmap{
switch (_arg1){
case TYPE_REDAPPLE:
return (Sprites.REDAPPLE);
case TYPE_GREENAPPLE:
return (Sprites.GREENAPPLE);
case TYPE_MUSHROOM:
return (Sprites.CAVE_MUSHROOM);
case TYPE_CHEESE:
return (Sprites.CHEESE);
case TYPE_LETTUCE:
return (Sprites.LETTUCE);
case TYPE_SPAGHETTI:
return (Sprites.SPAGHETTI);
case TYPE_FLASK:
return (Sprites.FLASK);
case TYPE_PETRIDISH:
return (Sprites.PETRIDISH);
case TYPE_SANDWICH:
return (Sprites.SANDWICH);
case TYPE_BANANA:
return (Sprites.BANANA);
case TYPE_PEACH:
return (Sprites.PEACH);
case TYPE_INSULATION:
return (Sprites.INSULATION);
case TYPE_TITLE_APPLE:
return (Sprites.TITLE_APPLE);
case TYPE_BREADLOAF:
return (Sprites.BREADLOAF);
default:
return (null);
};
}
}
}//package WorldObjects
Section 180
//MoldFairy (WorldObjects.MoldFairy)
package WorldObjects {
import Screens.*;
import Util.*;
import flash.display.*;
import flash.geom.*;
import Resources.*;
public class MoldFairy extends WorldObject {
private var facingRight:Boolean;// = true
private var floatx:Number;
public var spreadingSpores:Boolean;
private var destination:Point;
private var currFrame:int;
private var floaty:Number;
private static const HALF_HEIGHT:int = 24;
public static const SPORE_SENSITIVITY:int = 25;
private static const MOVE_SPEED:int = 8;
public function MoldFairy(_arg1:int, _arg2:int, _arg3:PlayScreen){
super(_arg3);
lightSpot = new Sprite();
x = _arg1;
y = _arg2;
floatx = x;
floaty = y;
}
public function lightOff():void{
lightSpot.graphics.clear();
}
public function get centerX():Number{
return ((floatx + HALF_HEIGHT));
}
public function get centerY():Number{
return ((floaty + HALF_HEIGHT));
}
override public function step():void{
var _local2:SpriteSheet;
var _local1:Matrix = new Matrix();
_local1.scale(-1, 1);
if (destination != null){
_local2 = Sprites.FAIRY_FLY;
} else {
if (spreadingSpores){
_local2 = Sprites.FAIRY_SPORE;
} else {
_local2 = Sprites.FAIRY_HOVER;
};
};
if ((currFrame % 4) == 0){
graphics.clear();
if (facingRight){
SugarGraphics.drawSprite(graphics, _local2.getFrame(0, (currFrame / 4)), 0, 0);
} else {
SugarGraphics.drawSprite(graphics, _local2.getFrame(0, (currFrame / 4)), 0, 0, _local1);
};
};
currFrame = ((currFrame + 1) % 16);
if (destination){
moveTowardDestination();
};
}
public function set centerX(_arg1:Number):void{
floatx = (_arg1 - HALF_HEIGHT);
}
public function set centerY(_arg1:Number):void{
floaty = (_arg1 - HALF_HEIGHT);
}
private function moveTowardDestination():void{
if ((((this.centerX == destination.x)) && ((this.centerY == destination.y)))){
destination = null;
this.floatx = x;
this.floaty = y;
return;
};
var _local1:Point = new Point(this.centerX, this.centerY);
var _local2:Point = destination.subtract(_local1);
if (_local2.length <= MOVE_SPEED){
this.centerX = destination.x;
this.centerY = destination.y;
destination = null;
} else {
_local2.normalize(MOVE_SPEED);
this.centerX = (this.centerX + _local2.x);
this.centerY = (this.centerY + _local2.y);
};
if (myScreen.collisionAt(centerX, centerY)){
if (!myScreen.collisionAt(centerX, (y + HALF_HEIGHT))){
this.x = int(floatx);
this.floaty = y;
} else {
if (!myScreen.collisionAt((x + HALF_HEIGHT), centerY)){
this.floatx = x;
this.y = int(floaty);
} else {
this.floatx = x;
this.floaty = y;
destination = null;
};
};
} else {
this.x = int(floatx);
this.y = int(floaty);
};
}
public function get sporeX():int{
if (facingRight){
return (43);
};
return (4);
}
public function get sporeY():int{
return (26);
}
public function lightOn():void{
lightSpot.graphics.clear();
lightSpot.graphics.beginFill(0);
lightSpot.graphics.drawCircle(HALF_HEIGHT, HALF_HEIGHT, (HALF_HEIGHT + 35));
}
public function setDestination(_arg1:int, _arg2:int):void{
this.destination = new Point(_arg1, _arg2);
if (destination.x < this.centerX){
facingRight = false;
} else {
if (destination.x > this.centerX){
facingRight = true;
};
};
}
}
}//package WorldObjects
Section 181
//MoldSource (WorldObjects.MoldSource)
package WorldObjects {
import Screens.*;
import Util.*;
import Data.*;
import Resources.*;
public class MoldSource extends WorldObject {
private var mySprite:SpriteSheet;
private var currFrame:int;// = -1
private var _species:MoldSpecies;
private var frameCounter:int;// = 8
private static const FRAME_DELAY:int = 8;
public function MoldSource(_arg1:MoldSpecies, _arg2:PlayScreen){
super(_arg2);
_species = _arg1;
mySprite = _arg1.sourceSpriteSheet;
}
public function get species():MoldSpecies{
return (_species);
}
public function getCollected():void{
SFX.playSound(SFX.MOLD_PICKUP);
}
override public function step():void{
if (frameCounter == FRAME_DELAY){
frameCounter = -1;
currFrame++;
if (currFrame >= mySprite.cols){
currFrame = 0;
};
graphics.clear();
SugarGraphics.drawSprite(graphics, mySprite.getFrame(0, currFrame), 0, 0);
};
frameCounter++;
}
}
}//package WorldObjects
Section 182
//MoldSpore (WorldObjects.MoldSpore)
package WorldObjects {
import Screens.*;
import flash.display.*;
import Data.*;
public class MoldSpore extends WorldObject {
private var _species:MoldSpecies;
public function MoldSpore(_arg1:MoldSpecies, _arg2:PlayScreen){
super(_arg2);
this._species = _arg1;
graphics.beginFill(_arg1.getRandomColor());
graphics.drawCircle(0, 0, 1);
graphics.endFill();
if (_arg1 == MoldSpecies.MUTANT_MOLD){
lightSpot = new Sprite();
lightSpot.graphics.beginFill(0);
lightSpot.graphics.drawCircle(0, 0, 5);
};
}
public function get species():MoldSpecies{
return (_species);
}
override public function step():void{
this.y = (this.y + 2);
var _local1:Number = Math.random();
if (_local1 < 0.25){
x = (x + 2);
} else {
if (_local1 < 0.5){
x = (x - 2);
};
};
}
}
}//package WorldObjects
Section 183
//Sign (WorldObjects.Sign)
package WorldObjects {
import Screens.*;
import Util.*;
import flash.display.*;
public class Sign extends WorldObject {
public function Sign(_arg1:BitmapData, _arg2:PlayScreen){
super(_arg2);
SugarGraphics.drawSprite(graphics, _arg1, 0, 0);
}
}
}//package WorldObjects
Section 184
//SlimeMold (WorldObjects.SlimeMold)
package WorldObjects {
import Screens.*;
import Util.*;
import flash.display.*;
import Data.*;
import flash.geom.*;
public class SlimeMold extends WorldObject {
private var currSize:int;
private var frame:int;
private var bitmap:BitmapData;
private var growthCandidates:Array;
private static const ACTIVE_COLOR:uint = 4294927872;
private static const INACTIVE_COLOR:uint = 0;
public function SlimeMold(_arg1:PlayScreen){
growthCandidates = new Array();
bitmap = new BitmapData(9, 9, true, INACTIVE_COLOR);
super(_arg1);
addSectorAt(4, 4);
while (currSize < Progress.numSlimeSporesCollected()) {
addSector();
currSize++;
};
redraw();
}
private function redraw():void{
graphics.clear();
SugarGraphics.drawSprite(graphics, bitmap, -72, -72, null, 16);
graphics.beginFill(0);
graphics.drawCircle(-4, 0, 1);
graphics.drawCircle(4, 0, 1);
graphics.endFill();
}
private function addSector():void{
var _local1:Point = growthCandidates[SugarMath.randint(0, (growthCandidates.length - 1))];
var _local2:Point = addRandomNeighbor(_local1);
if (_local2 == null){
growthCandidates.splice(growthCandidates.indexOf(_local1), 1);
addSector();
};
}
private function neighborsAvailable(_arg1:int, _arg2:int):Boolean{
if ((((_arg1 > 0)) && ((bitmap.getPixel32((_arg1 - 1), _arg2) == INACTIVE_COLOR)))){
return (true);
};
if ((((_arg1 < 8)) && ((bitmap.getPixel32((_arg1 + 1), _arg2) == INACTIVE_COLOR)))){
return (true);
};
if ((((_arg2 > 0)) && ((bitmap.getPixel32(_arg1, (_arg2 - 1)) == INACTIVE_COLOR)))){
return (true);
};
if ((((_arg2 < 8)) && ((bitmap.getPixel32(_arg1, (_arg2 + 1)) == INACTIVE_COLOR)))){
return (true);
};
return (false);
}
private function currentlyActiveSquares():int{
var _local3:int;
var _local1:int;
var _local2:int;
while (_local2 < bitmap.width) {
_local3 = 0;
while (_local3 < bitmap.height) {
if (bitmap.getPixel32(_local2, _local3) != INACTIVE_COLOR){
_local1++;
};
_local3++;
};
_local2++;
};
return (_local1);
}
override public function step():void{
frame++;
if (frame == 32){
frame = 0;
this.alpha = (0.85 + (0.1 * Math.random()));
};
}
private function addRandomNeighbor(_arg1:Point):Point{
var _local3:Point;
var _local2:Array = new Array();
if ((((_arg1.x > 0)) && ((bitmap.getPixel32((_arg1.x - 1), _arg1.y) == INACTIVE_COLOR)))){
_local2.push(new Point((_arg1.x - 1), _arg1.y));
};
if ((((_arg1.x < 8)) && ((bitmap.getPixel32((_arg1.x + 1), _arg1.y) == INACTIVE_COLOR)))){
_local2.push(new Point((_arg1.x + 1), _arg1.y));
};
if ((((_arg1.y > 0)) && ((bitmap.getPixel32(_arg1.x, (_arg1.y - 1)) == INACTIVE_COLOR)))){
_local2.push(new Point(_arg1.x, (_arg1.y - 1)));
};
if ((((_arg1.y < 8)) && ((bitmap.getPixel32(_arg1.x, (_arg1.y + 1)) == INACTIVE_COLOR)))){
_local2.push(new Point(_arg1.x, (_arg1.y + 1)));
};
if (_local2.length == 0){
return (null);
};
_local3 = _local2[SugarMath.randint(0, (_local2.length - 1))];
addSectorAt(_local3.x, _local3.y);
return (_local3);
}
private function scrubCandidatesBeside(_arg1:int, _arg2:int):void{
var _local3:Point;
var _local4:int;
while (_local4 < growthCandidates.length) {
_local3 = growthCandidates[_local4];
if ((((((((((((_local3.x == (_arg1 - 1))) && ((_local3.y == _arg2)))) && (!(neighborsAvailable(_local3.x, _local3.y))))) || ((((((_local3.x == (_arg1 + 1))) && ((_local3.y == _arg2)))) && (!(neighborsAvailable(_local3.x, _local3.y))))))) || ((((((_local3.x == _arg1)) && ((_local3.y == (_arg2 - 1))))) && (!(neighborsAvailable(_local3.x, _local3.y))))))) || ((((((_local3.x == _arg1)) && ((_local3.y == (_arg2 + 1))))) && (!(neighborsAvailable(_local3.x, _local3.y))))))){
growthCandidates.splice(_local4, 1);
_local4--;
};
_local4++;
};
}
private function addSectorAt(_arg1:int, _arg2:int):void{
bitmap.setPixel32(_arg1, _arg2, ACTIVE_COLOR);
if (neighborsAvailable(_arg1, _arg2)){
growthCandidates.push(new Point(_arg1, _arg2));
};
scrubCandidatesBeside(_arg1, _arg2);
}
}
}//package WorldObjects
Section 185
//SlimeSpore (WorldObjects.SlimeSpore)
package WorldObjects {
import Screens.*;
import Util.*;
import Data.*;
import Resources.*;
public class SlimeSpore extends WorldObject {
private var _index:int;
private var _level:Level;
private var currFrame:int;// = 0
public function SlimeSpore(_arg1:Level, _arg2:int, _arg3:PlayScreen){
super(_arg3);
_index = _arg2;
_level = _arg1;
step();
}
public function getCollected():void{
Progress.currProgress.collectSlimeSpore(_level, _index);
SFX.playSound(SFX.DING);
}
override public function step():void{
if ((currFrame % 4) == 0){
graphics.clear();
SugarGraphics.drawSprite(graphics, Sprites.SLIME_SPORE.getFrame(0, (currFrame / 4)), -3, -3);
};
currFrame++;
if (currFrame >= 16){
currFrame = 0;
};
}
}
}//package WorldObjects
Section 186
//SpeechZone (WorldObjects.SpeechZone)
package WorldObjects {
import Screens.*;
import Data.*;
import Resources.*;
public class SpeechZone extends WorldObject {
private var source:String;
private static const SLIMEMOLD:String = "SLIMEMOLD";
private static const POORMOTHER:String = "POORMOTHER";
private static const CHEF:String = "CHEF";
private static const LOSTBOY:String = "LOSTBOY";
private static const WELL:String = "WELL";
private static const OLDLADY:String = "OLDLADY";
private static const MAITRED:String = "MAITRED";
private static const DINER1:String = "DINER1";
private static const DINER2:String = "DINER2";
private static const RICHSON:String = "RICHSON";
private static const SCIENTIST:String = "SCIENTIST";
public function SpeechZone(_arg1:int, _arg2:int, _arg3:String, _arg4:PlayScreen){
super(_arg4);
graphics.beginFill(0, 0);
graphics.drawRect(0, 0, _arg1, _arg2);
this.source = _arg3;
}
public function getText():String{
switch (source){
case SLIMEMOLD:
if (Progress.numSlimeSporesCollected() < 50){
return (Text.SPEECH_SLIMEMOLD_INCOMPLETE);
};
return (Text.SPEECH_SLIMEMOLD_COMPLETE);
case DINER1:
return (Text.SPEECH_DINER1);
case DINER2:
return (Text.SPEECH_DINER2);
case MAITRED:
return (Text.SPEECH_MAITRED);
case CHEF:
return (Text.SPEECH_CHEF);
case WELL:
return (Text.SPEECH_WELL);
case OLDLADY:
return (Text.SPEECH_OLDLADY);
case RICHSON:
return (Text.SPEECH_RICHSON);
case LOSTBOY:
return (Text.SPEECH_LOSTBOY);
case SCIENTIST:
return (Text.SPEECH_RESEARCHER);
case POORMOTHER:
return (Text.SPEECH_POORMOTHER);
};
return (null);
}
}
}//package WorldObjects
Section 187
//WorldObject (WorldObjects.WorldObject)
package WorldObjects {
import Screens.*;
import flash.display.*;
public class WorldObject extends Sprite {
public var myScreen:PlayScreen;
public var lightSpot:Sprite;
public function WorldObject(_arg1:PlayScreen){
this.myScreen = _arg1;
}
public function step():void{
}
}
}//package WorldObjects
Section 188
//Main (Main)
package {
import Screens.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import WorldObjects.Puppet.*;
import Interface.*;
import flash.ui.*;
public class Main extends Sprite {
private var puppet:Puppet;
private var introTimer:Timer;
private var screenStack:Array;
private var introAnim:MovieClip;
public static const GAME_WIDTH:int = 640;
public static const STEP_RATE:int = 30;
public static const GAME_HEIGHT:int = 480;
private static var agIntroClass:Class = Main_agIntroClass;
public static var theMain:Main;
public static var mouseButtonDown:Boolean;
public function Main():void{
screenStack = new Array();
super();
theMain = this;
if (stage){
init();
} else {
addEventListener(Event.ADDED_TO_STAGE, init);
};
}
public function get secondScreen():Screen{
return (screenStack[(screenStack.length - 2)]);
}
public function popScreen():void{
theMain.removeChildAt((theMain.numChildren - 3));
screenStack.pop();
if (currScreen){
currScreen.awaken();
};
}
public function pushScreen(_arg1:Screen):void{
theMain.addChildAt(_arg1, (theMain.numChildren - 2));
screenStack.push(_arg1);
}
public function removeSecondScreen():void{
theMain.removeChildAt((theMain.numChildren - 4));
screenStack.splice((screenStack.length - 2), 1);
}
private function introDone(_arg1:Event):void{
var hostDomain:String;
var index:String;
var offset:int;
var e = _arg1;
introTimer.removeEventListener(TimerEvent.TIMER, introDone);
introTimer.stop();
introTimer = null;
Loader(introAnim.getChildAt(0)).unload();
this.removeChild(introAnim);
introAnim = null;
var domainsAllowed:Array = new Array("armorgames.com");
var lock:Boolean;
if (domainsAllowed.length > 0){
lock = false;
hostDomain = stage.loaderInfo.url.split("/")[2];
for (index in domainsAllowed) {
offset = hostDomain.toLowerCase().indexOf(domainsAllowed[index]);
if ((((offset > -1)) && ((offset == (hostDomain.length - domainsAllowed[index].length))))){
lock = true;
break;
};
};
};
if (!lock){
this.alpha = 0;
};
var frameTimer:Timer = new Timer((1000 / STEP_RATE));
frameTimer.addEventListener(TimerEvent.TIMER, frameLoop);
frameTimer.start();
var mask:Sprite = new Sprite();
mask.graphics.beginFill(0);
mask.graphics.drawRect(0, 0, GAME_WIDTH, GAME_HEIGHT);
mask.graphics.endFill();
this.mask = mask;
this.addChild(mask);
this.addChild(new SoundToggle());
this.addChild(Cursor.theCursor);
pushScreen(new TitleScreen());
stage.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:MouseEvent):void{
mouseButtonDown = true;
});
stage.addEventListener(MouseEvent.MOUSE_UP, function (_arg1:MouseEvent):void{
mouseButtonDown = false;
});
stage.addEventListener(MouseEvent.MOUSE_MOVE, function (_arg1:MouseEvent):void{
mouseButtonDown = _arg1.buttonDown;
});
}
private function init(_arg1:Event=null):void{
removeEventListener(Event.ADDED_TO_STAGE, init);
Mouse.hide();
introAnim = new agIntroClass();
var _local2:Number = (Main.GAME_WIDTH / introAnim.width);
introAnim.scaleX = _local2;
introAnim.scaleY = _local2;
introAnim.y = ((Main.GAME_HEIGHT - (introAnim.height * _local2)) / 2);
this.addChild(introAnim);
introTimer = new Timer(6000, 1);
introTimer.addEventListener(TimerEvent.TIMER, introDone);
introTimer.start();
}
public function frameLoop(_arg1:TimerEvent):void{
Cursor.theCursor.x = theMain.mouseX;
Cursor.theCursor.y = theMain.mouseY;
if (currScreen){
currScreen.step();
};
}
public function get currScreen():Screen{
return (screenStack[(screenStack.length - 1)]);
}
}
}//package
Section 189
//Main_agIntroClass (Main_agIntroClass)
package {
import mx.core.*;
import flash.utils.*;
public class Main_agIntroClass extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function Main_agIntroClass(){
dataClass = Main_agIntroClass_dataClass;
super();
initialWidth = (11000 / 20);
initialHeight = (8000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package
Section 190
//Main_agIntroClass_dataClass (Main_agIntroClass_dataClass)
package {
import mx.core.*;
public class Main_agIntroClass_dataClass extends ByteArrayAsset {
}
}//package
Section 191
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
public class Preloader extends MovieClip {
public static const STAGE_WIDTH:int = 640;
public static const STAGE_HEIGHT:int = 480;
private static var ArmorGamesLogoClass:Class = Preloader_ArmorGamesLogoClass;
public function Preloader(){
super();
stage.stageWidth = STAGE_WIDTH;
stage.stageHeight = STAGE_HEIGHT;
stage.scaleMode = StageScaleMode.NO_SCALE;
addEventListener(Event.ENTER_FRAME, checkFrame);
var logo:Sprite = new Sprite();
logo.addChild((new ArmorGamesLogoClass() as Bitmap));
logo.buttonMode = true;
logo.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://armorgames.com"), "_blank");
});
logo.x = 70;
logo.y = 75;
this.addChild(logo);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, progress);
drawProgressBar(0);
}
private function drawProgressBar(_arg1:Number):void{
graphics.clear();
graphics.lineStyle(2, 136);
graphics.drawRect(50, 250, (640 - 100), 25);
graphics.lineStyle();
graphics.beginFill(51);
graphics.drawRect(50, 250, ((640 - 100) * _arg1), 25);
graphics.endFill();
}
private function checkFrame(_arg1:Event):void{
if (currentFrame == totalFrames){
removeEventListener(Event.ENTER_FRAME, checkFrame);
startup();
};
}
private function progress(_arg1:ProgressEvent):void{
drawProgressBar((_arg1.bytesLoaded / _arg1.bytesTotal));
}
private function startup():void{
graphics.clear();
this.removeChildAt(0);
stop();
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progress);
var _local1:Class = (getDefinitionByName("Main") as Class);
addChild((new (_local1) as DisplayObject));
}
}
}//package
Section 192
//Preloader_ArmorGamesLogoClass (Preloader_ArmorGamesLogoClass)
package {
import mx.core.*;
public class Preloader_ArmorGamesLogoClass extends BitmapAsset {
}
}//package