Section 1
//Level (Data.Level)
package Data {
public class Level {
public var levelTiles:String;
public var totalCoins:int;
public var bronzeTime:Number;// = 0
public var levelRifts:String;
public var name:String;
public var goldTime:Number;// = 0
public var levelXML:XML;
public var silverTime:Number;// = 0
public var levelCoins:String;
public static var LevelN1:Level = new Level("N1", new TxtLevelN1(), new TxtLevelN1Rifts(), LevelN1XML, new TxtLevelN1Coins(), 0, 0, 0, 175);
;
private static var LevelF1XML:XML = <level character="Fuzor" startx="64" starty="-96">
<intro>
<line character="Mom" speech="Fuzor, my child, you're so fast!"/>
<line character="Fuzor" speech="Thank you, mother! I'm training for the
race!"/>
<line character="Mom" speech="Then here's a challenge; get to the goal
as fast as you can!"/>
<line character="Mom" speech="Ready... set... go!"/>
</intro>
<contents>
<npc x="32" y="-96" character="Mom" speech="Go, go, go!"/>
<goal x="4004" y="-32"/>
</contents>
</level>
;
public static var LevelN3:Level = new Level("N3", new TxtLevelN3(), new TxtLevelN3Rifts(), LevelN3XML, new TxtLevelN3Coins(), 0, 0, 0, 194);
;
private static var Level1XML:XML = <level character="Mom" startx="64" starty="-32">
<intro>
<line character="NPC" speech="All right, it's time for your physical
therapy session! We need to make sure
your new arms are strong and healthy so
you can take care of your adorable new
children!"/>
<line character="NPC" speech="Go through the course and make sure you
see all the signs along the way! That's
SEE, as in the letter C! You can talk to me
or other people in the same way, C?
Good luck!"/>
</intro>
<contents>
<npc x="32" y="-32" speech="Work hard! The harder you work, the
sooner you'll be up to full strength." character="NPC"/>
<sign x="196" y="-32" text="PRESS X TO JUMP UPWARD."/>
<sign x="420" y="-128" text="HOLD UP AND PRESS X TO JUMP HIGHER
OR FURTHER."/>
<sign x="676" y="-192" text="PIT AHEAD. PRESS UP AND DOWN IN MIDAIR
TO FLY. GO DOWN TO THE OTHER SIDE."/>
<sign x="852" y="0" text="WHAT GOES OUT MUST COME IN."/>
<sign x="1190" y="0" text="PRESS X TO JUMP DOWNWARD."/>
<sign x="1334" y="96" text="SLINGSHOT YOURSELF TO PROCEED."/>
<sign x="1508" y="-224" text="THE PULL IS STRONGER THE FURTHER YOU
ARE FROM THE CENTER. YOU JUMP LESS
HIGH THE HIGHER YOU START."/>
<sign x="1766" y="160" text="THIS AREA UNDER CONSTRUCTION."/>
<sign x="2148" y="0" text="WARNING: PURPLE RIFTS TRANSPORT YOU
TO A NEARBY PORTAL. WHITE PORTALS ARE
SAFE."/>
<portal x="2212" y="0"/>
<sign x="2468" y="-32" text="HOLD UP OR HOLD DOWN IN MIDAIR TO
STABILIZE AT A CONSTANT ALTITUDE."/>
<portal x="2564" y="-32"/>
<portal x="3141" y="0"/>
<sign x="3908" y="64" text="TOUCH THE SILVER ROD TO FINISH THE
LEVEL."/>
<goal x="4004" y="64"/>
</contents>
</level>
;
private static var TxtLevelN1Coins:Class = Level_TxtLevelN1Coins;
private static var TxtLevelF3Rifts:Class = Level_TxtLevelF3Rifts;
private static var LevelM1XML:XML = <level character="Mell" startx="100" starty="-224">
<intro>
<line character="Mom" speech="Good morning, Mell! Your sisters have
both left already. I'm looking forward to
just having you and me in the house."/>
<line character="Mell" speech="Oh, mother. I'll be busy with research.
We won't have much time together."/>
<line character="Mom" speech="I know, I know. How is the research going,
by the way?"/>
<line character="Mell" speech="Quite well. I expect a major discovery
soon."/>
<line character="Mom" speech="My! I do hope it's something good."/>
</intro>
<contents>
<npc x="36" y="-224" character="Mom" speech="Have a nice day, dear!"/>
<npc x="69" y="-96" character="NPC" speech="Oh, hello, Mell. Good to see you again."/>
<npc x="54" y="-10" character="NPC" speech="What's new, Mell?
I'm just hangin' out."/>
<npc x="36" y="64" character="NPC" speech="Um, why are you in my home?"/>
<npc x="64" y="192" character="NPC" speech="I wish I didn't live on the outer floor.
Slingshotting makes me nauseous."/>
<npc x="613.5" y="160" character="NPC" facing="left" speech="I like the view from the balcony."/>
<npc x="788" y="0" character="NPC" facing="left" speech="Hi, Mell! How is the research going?"/>
<npc x="1016" y="0" character="NPC" speech="Hey, Mell. Don't wait up for me. I'll be a
bit late today."/>
<npc x="837" y="-224" character="NPC" speech="I'm almost done with a new sign for the
rehab course."/>
<sign x="968" y="-224" text="GOOD JOB! YOU'RE WORKING SO HARD!
YOU SHOULD BE BACK TO FULL HEALTH IN
(the sign just ends there)"/>
<npc x="791" y="-64" character="NPC" speech="Do you mind? I'm trying to get ready."/>
<npc x="1363" y="0" character="NPC" speech="Oh, look, it's boring old Mell. How's that
dumb research? Done anything useful
with it yet?"/>
<npc x="1427" y="0" character="NPC" facing="left" speech="Why don't you do something with your
life that actually benefits people?"/>
<npc x="1828" y="-32" character="NPC" facing="left" speech="Can I speak with you later today, Mell? I'd
like to go over some readings with you."/>
<npc x="1825" y="-192" character="NPC" speech="I'm concerned about these fluctuations,
Mell. We need to do a long-term trend
analysis."/>
<npc x="2185" y="-192" character="NPC" facing="left" speech="Can't talk now. I have to finish this
presentation by tomorrow."/>
<portal x="1760" y="160"/>
<npc x="1904" y="96" character="NPC" speech="I can't believe you're willing to go through
those rifts. They give me the creeps."/>
<npc x="2100" y="96" character="NPC" facing="left" speech="We've managed to stabilize this one, I
think. It's not spreading anymore."/>
<npc x="2560" y="-32" character="NPC" facing="left" speech="You damn researchers lose control of
your experiments, and we have to clean
up after you. Can't you leave well enough
alone?"/>
<portal x="2621" y="-145"/>
<sign x="2785" y="-32" text="WARNING: ANOMALOUS AREA. USE CAUTION."/>
<npc x="3825" y="-64" character="NPC" facing="left" speech="I have a bad feeling, Mell. The rifts are
growing."/>
<goal x="4020" y="-32"/>
</contents>
</level>
;
public static var LevelF3:Level = new Level("F3", new TxtLevelF3(), new TxtLevelF3Rifts(), LevelF3XML, null, 60, 35, 23);
;
private static var TxtLevelN3Rifts:Class = Level_TxtLevelN3Rifts;
private static var LevelN1XML:XML = <level character="Naaij" startx="134" starty="-64">
<intro>
<line character="Mom" speech="Naijj, are you sure this is what you want
to do with yourself?"/>
<line character="Naaij" speech="Collect the priceless coins of lost
civilizations? Of course, Mother!"/>
<line character="Mom" speech="Well, then... good luck. And stay safe."/>
<line character="Naaij" speech="I will."/>
</intro>
<contents>
<npc x="46" y="-64" character="Mom" speech="Make sure you do the best job you can."/>
<goal x="4004" y="-16"/>
</contents>
</level>
;
private static var TxtLevelM1:Class = Level_TxtLevelM1;
private static var TxtLevelM2:Class = Level_TxtLevelM2;
private static var TxtLevel1:Class = Level_TxtLevel1;
public static var LevelF2:Level = new Level("F2", new TxtLevelF2(), new TxtLevelF2Rifts(), LevelF2XML, null, 45, 33, 29);
;
private static var TxtLevelM3:Class = Level_TxtLevelM3;
private static var TxtLevelM1Rifts:Class = Level_TxtLevelM1Rifts;
public static var LevelF1:Level = new Level("F1", new TxtLevelF1(), new TxtLevelF1Rifts(), LevelF1XML, null, 30, 22, 18);
;
private static var TxtLevelN2Coins:Class = Level_TxtLevelN2Coins;
private static var TxtLevelM2Rifts:Class = Level_TxtLevelM2Rifts;
private static var TxtLevelN1:Class = Level_TxtLevelN1;
private static var TxtLevel1Rifts:Class = Level_TxtLevel1Rifts;
private static var TxtLevelN3:Class = Level_TxtLevelN3;
private static var TxtLevelN2:Class = Level_TxtLevelN2;
private static var TxtLevelF2:Class = Level_TxtLevelF2;
private static var TxtLevelF3:Class = Level_TxtLevelF3;
private static var LevelF3XML:XML = <level character="Fuzor" startx="98" starty="-224">
<intro>
<line character="NPC" speech="Everyone, this is the final race before the
racing association closes for good."/>
<line character="NPC" speech="After this, everyone will go back to their
families and wait for the end."/>
<line character="NPC" speech="A record made today will last forever.
It will never be broken."/>
<line character="NPC" speech="Go."/>
</intro>
<contents>
<portal x="224" y="-224"/>
<portal x="1028" y="192"/>
<portal x="1704" y="-96"/>
<portal x="2732" y="-64"/>
<portal x="3456" y="-16"/>
<goal x="4004" y="-16"/>
</contents>
</level>
;
private static var TxtLevelN3Coins:Class = Level_TxtLevelN3Coins;
private static var LevelM3XML:XML = <level character="Mell" startx="100" starty="-224">
<intro>
<line character="Mom" speech="Good morning, Mell... do you think it will
happen today?"/>
<line character="Mell" speech="Today is just another day, Mother."/>
<line character="Mom" speech="I know. Do you think it will happen today?"/>
<line character="Mell" speech="I... don't know."/>
<line character="Mom" speech="I hope it happens today."/>
</intro>
<contents>
<npc x="36" y="-224" character="Mom" speech="I'm tired, Mell."/>
<npc x="69" y="-96" character="NPC" speech="What do you want? This is all your fault."/>
<portal x="32" y="-16"/>
<npc x="54" y="-10" character="NPC" speech="There's no point in doing anything
anymore."/>
<npc x="36" y="64" character="NPC" speech="Come in. Keep me company for a while."/>
<npc x="165" y="192" character="NPC" speech="My home was overrun today.
I have nowhere else to go."/>
<npc x="599" y="32" character="NPC" speech="I wish the balcony was still there."/>
<npc x="788" y="0" character="NPC" facing="left" speech="I don't blame you, Mell. I know you just
discovered the truth. You didn't make it
happen."/>
<npc x="1016" y="0" character="NPC" speech="Did anything we ever did ever matter?"/>
<npc x="837" y="-224" character="NPC" speech="They've shut down the rehab course."/>
<portal x="840" y="64"/>
<sign x="968" y="-224" text="CLOSED INDEFINI-"/>
<npc x="791" y="-64" character="NPC" speech="Why do you bother going anywhere
anymore?"/>
<npc x="1355" y="-64" character="NPC" speech="I'm sorry I ever made fun of you.
I didn't know."/>
<npc x="1427" y="-64" character="NPC" facing="left" speech="I wish someone had looked into it sooner.
Maybe we could have done something
before it was too late."/>
<npc x="1828" y="-32" character="NPC" facing="left" speech="We're still researching to see if there's
a solution. We haven't given up like you,
Mell."/>
<npc x="1825" y="-192" character="NPC" speech="I knew it would happen this way. I knew it.
I didn't want to admit it, but I knew it."/>
<npc x="2140" y="-192" character="NPC" facing="left" speech="Can't you just stay and talk?"/>
<portal x="1760" y="160"/>
<npc x="1904" y="96" character="NPC" speech="We've found nothing. There's no solution.
I just keep working to stay busy."/>
<npc x="2100" y="96" character="NPC" facing="left" speech="Even the contained rift expanded a while
back. We're goners."/>
<npc x="2595" y="-64" character="NPC" facing="left" speech="There's no point in cleaning anything up.
Everything always gets worse."/>
<portal x="2736" y="-145"/>
<sign x="2785" y="-16" text="WARN G: ANO OUS AREA. USE C ION."/>
<npc x="3825" y="-64" character="NPC" facing="left" speech="What do you suppose our babies dream of,
Mell? Before they open their eyes?
Before they have any memory? What do
they dream about?"/>
<goal x="4020" y="-32"/>
</contents>
</level>
;
private static var TxtLevelF1Rifts:Class = Level_TxtLevelF1Rifts;
private static var LevelN3XML:XML = <level character="Naaij" startx="196" starty="-160">
<intro>
<line character="NPC" speech="Naaij... why do you keep collecting coins?
The world is moving on and there's no
point to it."/>
<line character="Naaij" speech="The world changes nothing. If it was ever
worth doing, it still is."/>
<line character="NPC" speech="But they're not worth anything anymore."/>
<line character="Naaij" speech="It was never about the having. It has
always been about the collecting.
The quest to become."/>
</intro>
<contents>
<npc x="136" y="-160" speech="I don't understand you."/>
<npc x="545" y="-475" facing="left" speech="The world is falling apart..."/>
<portal x="390" y="-259"/>
<portal x="1203" y="-182"/>
<npc x="2114" y="-352" speech="I wonder what it will feel like..."/>
<portal x="2668" y="-350"/>
<goal x="4002" y="-512"/>
</contents>
</level>
;
private static var TxtLevelN1Rifts:Class = Level_TxtLevelN1Rifts;
private static var TxtLevelM3Rifts:Class = Level_TxtLevelM3Rifts;
private static var TxtLevelF1:Class = Level_TxtLevelF1;
public static var Level1:Level = new Level("T", new TxtLevel1(), new TxtLevel1Rifts(), Level1XML);
;
private static var LevelF2XML:XML = <level character="Fuzor" startx="98" starty="-256">
<intro>
<line character="NPC" speech="And up next in the qualifying
race: Fuzor!"/>
<line character="NPC" speech="This promising young racer has won
every competition she's entered!"/>
<line character="NPC" speech="The timer is ready! On your mark, get
set... go!"/>
</intro>
<contents>
<goal x="4004" y="-16"/>
</contents>
</level>
;
public static var LevelM1:Level = new Level("M1", new TxtLevelM1(), new TxtLevelM1Rifts(), LevelM1XML);
;
public static var LevelM2:Level = new Level("M2", new TxtLevelM2(), new TxtLevelM2Rifts(), LevelM2XML);
;
public static var LevelN2:Level = new Level("N2", new TxtLevelN2(), new TxtLevelN2Rifts(), LevelN2XML, new TxtLevelN2Coins(), 0, 0, 0, 324);
;
private static var TxtLevelF2Rifts:Class = Level_TxtLevelF2Rifts;
private static var LevelN2XML:XML = <level character="Naaij" startx="40" starty="-32">
<intro>
<line character="NPC" speech="Are you going to be fine in there on your
own, Naaij?"/>
<line character="Naaij" speech="Of course. Wait here to help me out when
I'm done."/>
<line character="NPC" speech="All right. Good luck."/>
</intro>
<contents>
<npc x="0" y="-224"/>
<portal x="100" y="-128"/>
<portal x="452" y="-128"/>
<portal x="868" y="-16"/>
<portal x="1796" y="-288"/>
<portal x="2190" y="-16"/>
<portal x="2532" y="192"/>
<portal x="3118" y="-16"/>
<portal x="3264" y="160"/>
<goal x="4036" y="-32"/>
</contents>
</level>
;
public static var LevelM3:Level = new Level("M3", new TxtLevelM3(), new TxtLevelM3Rifts(), LevelM3XML);
;
private static var TxtLevelN2Rifts:Class = Level_TxtLevelN2Rifts;
private static var LevelM2XML:XML = <level character="Mell" startx="100" starty="-160">
<intro>
<line character="NPC" speech="Mell? Hello? Mell!"/>
<line character="Mell" speech="Huh? Oh, I'm sorry. I was lost in thought."/>
<line character="NPC" speech="I know you're still dealing with the
implications of the study, but you have an
announcement to make."/>
<line character="Mell" speech="Yes... yes, I know. Thank you. I'm ready."/>
</intro>
<contents>
<npc x="41" y="-192" character="NPC" speech="Good luck."/>
<npc x="322" y="-64" character="NPC" speech="We've gone over the results a hundred
times. There's no chance of error."/>
<npc x="199" y="160" character="NPC" speech="There are a whole lot of people out there."/>
<npc x="551" y="96" character="NPC" facing="left" speech="I wish we could be announcing GOOD news."/>
<npc x="896" y="160" character="NPC" facing="left" speech="Don't be nervous. This needs to be done."/>
<npc x="949" y="160" character="NPC" facing="left" speech="We believe in you, Mell."/>
<npc x="1347" y="64" character="NPC" speech="Can you hear the crowd? They seem
nervous."/>
<npc x="1570" y="96" character="NPC" facing="left" speech="This is it. This will change everything."/>
<npc x="1704" y="-160" character="NPC" facing="left" speech="Everyone's ready."/>
<npc x="1924" y="-192" character="NPC" speech="Here goes nothing, right, Mell?"/>
<npc x="2212" y="-192" character="Mom" facing="left" speech="No matter what anyone says,
Mell, I'm proud of you."/>
<npc x="896" y="160" character="NPC" facing="left" speech="Don't be nervous. This needs to be done."/>
<npc x="917" y="-160" character="NPC" facing="left" speech="We'll keep the timetable quiet for now
until the news has time to sink in."/>
<npc x="889" y="-32" character="NPC" speech="We still have time to lie to them.
Tell them it's possible to fix things."/>
<npc x="941" y="-32" character="NPC" facing="left" speech="No. False hope will do no one any good."/>
<npc x="2453" y="-128" facing="left"/>
<npc x="2470" y="-128" facing="left"/>
<npc x="2484" y="-128" facing="left"/>
<npc x="2502" y="-128" facing="left"/>
<npc x="2520" y="-128" facing="left"/>
<goal x="2372" y="-208"/>
</contents>
</level>
;
public function Level(_arg1:String, _arg2:String, _arg3:String, _arg4:XML, _arg5:String=null, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0, _arg9:int=0){
this.name = _arg1;
this.levelTiles = _arg2;
this.levelRifts = _arg3;
this.levelXML = _arg4;
this.levelCoins = _arg5;
this.bronzeTime = _arg6;
this.silverTime = _arg7;
this.goldTime = _arg8;
this.totalCoins = _arg9;
}
}
}//package Data
Section 2
//Level_TxtLevel1 (Data.Level_TxtLevel1)
package Data {
import mx.core.*;
public class Level_TxtLevel1 extends ByteArrayAsset {
}
}//package Data
Section 3
//Level_TxtLevel1Rifts (Data.Level_TxtLevel1Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevel1Rifts extends ByteArrayAsset {
}
}//package Data
Section 4
//Level_TxtLevelF1 (Data.Level_TxtLevelF1)
package Data {
import mx.core.*;
public class Level_TxtLevelF1 extends ByteArrayAsset {
}
}//package Data
Section 5
//Level_TxtLevelF1Rifts (Data.Level_TxtLevelF1Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelF1Rifts extends ByteArrayAsset {
}
}//package Data
Section 6
//Level_TxtLevelF2 (Data.Level_TxtLevelF2)
package Data {
import mx.core.*;
public class Level_TxtLevelF2 extends ByteArrayAsset {
}
}//package Data
Section 7
//Level_TxtLevelF2Rifts (Data.Level_TxtLevelF2Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelF2Rifts extends ByteArrayAsset {
}
}//package Data
Section 8
//Level_TxtLevelF3 (Data.Level_TxtLevelF3)
package Data {
import mx.core.*;
public class Level_TxtLevelF3 extends ByteArrayAsset {
}
}//package Data
Section 9
//Level_TxtLevelF3Rifts (Data.Level_TxtLevelF3Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelF3Rifts extends ByteArrayAsset {
}
}//package Data
Section 10
//Level_TxtLevelM1 (Data.Level_TxtLevelM1)
package Data {
import mx.core.*;
public class Level_TxtLevelM1 extends ByteArrayAsset {
}
}//package Data
Section 11
//Level_TxtLevelM1Rifts (Data.Level_TxtLevelM1Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelM1Rifts extends ByteArrayAsset {
}
}//package Data
Section 12
//Level_TxtLevelM2 (Data.Level_TxtLevelM2)
package Data {
import mx.core.*;
public class Level_TxtLevelM2 extends ByteArrayAsset {
}
}//package Data
Section 13
//Level_TxtLevelM2Rifts (Data.Level_TxtLevelM2Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelM2Rifts extends ByteArrayAsset {
}
}//package Data
Section 14
//Level_TxtLevelM3 (Data.Level_TxtLevelM3)
package Data {
import mx.core.*;
public class Level_TxtLevelM3 extends ByteArrayAsset {
}
}//package Data
Section 15
//Level_TxtLevelM3Rifts (Data.Level_TxtLevelM3Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelM3Rifts extends ByteArrayAsset {
}
}//package Data
Section 16
//Level_TxtLevelN1 (Data.Level_TxtLevelN1)
package Data {
import mx.core.*;
public class Level_TxtLevelN1 extends ByteArrayAsset {
}
}//package Data
Section 17
//Level_TxtLevelN1Coins (Data.Level_TxtLevelN1Coins)
package Data {
import mx.core.*;
public class Level_TxtLevelN1Coins extends ByteArrayAsset {
}
}//package Data
Section 18
//Level_TxtLevelN1Rifts (Data.Level_TxtLevelN1Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelN1Rifts extends ByteArrayAsset {
}
}//package Data
Section 19
//Level_TxtLevelN2 (Data.Level_TxtLevelN2)
package Data {
import mx.core.*;
public class Level_TxtLevelN2 extends ByteArrayAsset {
}
}//package Data
Section 20
//Level_TxtLevelN2Coins (Data.Level_TxtLevelN2Coins)
package Data {
import mx.core.*;
public class Level_TxtLevelN2Coins extends ByteArrayAsset {
}
}//package Data
Section 21
//Level_TxtLevelN2Rifts (Data.Level_TxtLevelN2Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelN2Rifts extends ByteArrayAsset {
}
}//package Data
Section 22
//Level_TxtLevelN3 (Data.Level_TxtLevelN3)
package Data {
import mx.core.*;
public class Level_TxtLevelN3 extends ByteArrayAsset {
}
}//package Data
Section 23
//Level_TxtLevelN3Coins (Data.Level_TxtLevelN3Coins)
package Data {
import mx.core.*;
public class Level_TxtLevelN3Coins extends ByteArrayAsset {
}
}//package Data
Section 24
//Level_TxtLevelN3Rifts (Data.Level_TxtLevelN3Rifts)
package Data {
import mx.core.*;
public class Level_TxtLevelN3Rifts extends ByteArrayAsset {
}
}//package Data
Section 25
//Music (Data.Music)
package Data {
public class Music {
public static var MusicMom:Class = Music_MusicMom;
public static var MusicFuzor:Class = Music_MusicFuzor;
public static var MusicNaaij:Class = Music_MusicNaaij;
public static var MusicMenu:Class = Music_MusicMenu;
public static var MusicMell:Class = Music_MusicMell;
}
}//package Data
Section 26
//Music_MusicFuzor (Data.Music_MusicFuzor)
package Data {
import mx.core.*;
public class Music_MusicFuzor extends SoundAsset {
}
}//package Data
Section 27
//Music_MusicMell (Data.Music_MusicMell)
package Data {
import mx.core.*;
public class Music_MusicMell extends SoundAsset {
}
}//package Data
Section 28
//Music_MusicMenu (Data.Music_MusicMenu)
package Data {
import mx.core.*;
public class Music_MusicMenu extends SoundAsset {
}
}//package Data
Section 29
//Music_MusicMom (Data.Music_MusicMom)
package Data {
import mx.core.*;
public class Music_MusicMom extends SoundAsset {
}
}//package Data
Section 30
//Music_MusicNaaij (Data.Music_MusicNaaij)
package Data {
import mx.core.*;
public class Music_MusicNaaij extends SoundAsset {
}
}//package Data
Section 31
//LevelButton (Interface.LevelButton)
package Interface {
import flash.events.*;
import Data.*;
import org.flixel.*;
import states.*;
public class LevelButton extends FlxSprite {
private var level:Level;
private var _initialized:Boolean;
private static var SprBabies:Class = LevelButton_SprBabies;
public function LevelButton(_arg1:int, _arg2:int, _arg3:int, _arg4:Level, _arg5:String=null){
super(_arg1, _arg2);
this.loadGraphic(SprBabies, true);
this.level = _arg4;
this.addAnimation("anim", [_arg3], 0, false);
this.play("anim");
if (_arg5 != null){
if (BabiesDream.save.read((_arg5 + "Score")) == null){
this.kill();
};
};
}
private function onMouseUp(_arg1:MouseEvent):void{
if (((((!(exists)) || (!(visible)))) || (!((FlxG.state is MenuState))))){
return;
};
if (overlapsPoint((FlxG.mouse.x + ((1 - scrollFactor.x) * FlxG.scroll.x)), (FlxG.mouse.y + ((1 - scrollFactor.y) * FlxG.scroll.y)))){
loadLevel();
};
}
override public function update():void{
if (!_initialized){
if (FlxG.state == null){
return;
};
if (FlxG.state.parent == null){
return;
};
if (FlxG.state.parent.stage == null){
return;
};
FlxG.state.parent.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_initialized = true;
};
if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
this.alpha = 1;
} else {
this.alpha = 0.75;
};
super.update();
}
private function loadLevel():void{
PlayState.level = level;
FlxG.switchState(PlayState);
}
}
}//package Interface
Section 32
//LevelButton_SprBabies (Interface.LevelButton_SprBabies)
package Interface {
import mx.core.*;
public class LevelButton_SprBabies extends BitmapAsset {
}
}//package Interface
Section 33
//ScoreCard (Interface.ScoreCard)
package Interface {
import Data.*;
import org.flixel.*;
public class ScoreCard extends FlxLayer {
private static var SprSilver:Class = ScoreCard_SprSilver;
private static var SprGold:Class = ScoreCard_SprGold;
private static var SprBronze:Class = ScoreCard_SprBronze;
public function ScoreCard(_arg1:int, _arg2:int, _arg3:String, _arg4:Level){
var _local7:FlxSprite;
var _local8:FlxText;
super();
this.x = _arg1;
this.y = _arg2;
var _local5:* = (BabiesDream.save.read((_arg3 + "Score")) as Number);
var _local6 = "";
trace(((("SCORE FOR " + _arg4.name) + ": ") + _local5));
if (_local5 != null){
_local7 = new FlxSprite(0, 0);
_local7.createGraphic(1, 1, 0);
if (_arg4.levelXML.@character == "Naaij"){
if (_local5 >= _arg4.totalCoins){
_local7.loadGraphic(SprGold);
} else {
if (_local5 >= (_arg4.totalCoins * 0.75)){
_local7.loadGraphic(SprSilver);
} else {
if (_local5 >= (_arg4.totalCoins * 0.5)){
_local7.loadGraphic(SprBronze);
};
};
};
_local6 = _local5.toString();
} else {
if (_arg4.levelXML.@character == "Fuzor"){
if (_local5 <= _arg4.goldTime){
_local7.loadGraphic(SprGold);
} else {
if (_local5 <= _arg4.silverTime){
_local7.loadGraphic(SprSilver);
} else {
if (_local5 <= _arg4.bronzeTime){
_local7.loadGraphic(SprBronze);
};
};
};
_local6 = Number(_local5).toFixed(2);
};
};
this.add(_local7);
_local8 = new FlxText(20, 0, 50, _local6);
this.add(_local8);
};
}
}
}//package Interface
Section 34
//ScoreCard_SprBronze (Interface.ScoreCard_SprBronze)
package Interface {
import mx.core.*;
public class ScoreCard_SprBronze extends BitmapAsset {
}
}//package Interface
Section 35
//ScoreCard_SprGold (Interface.ScoreCard_SprGold)
package Interface {
import mx.core.*;
public class ScoreCard_SprGold extends BitmapAsset {
}
}//package Interface
Section 36
//ScoreCard_SprSilver (Interface.ScoreCard_SprSilver)
package Interface {
import mx.core.*;
public class ScoreCard_SprSilver extends BitmapAsset {
}
}//package Interface
Section 37
//TextBox (Interface.TextBox)
package Interface {
import org.flixel.*;
public class TextBox extends FlxLayer {
private var nexttext:FlxSprite;
private var flashCounter:int;
private var portraitFrame:FlxSprite;
private var portrait:FlxSprite;
private var textbox:FlxText;
private static const flashLength:int = 25;
private static var SprNPCPortrait:Class = TextBox_SprNPCPortrait;
private static var SprMellPortrait:Class = TextBox_SprMellPortrait;
private static var BGPortraitFrame:Class = TextBox_BGPortraitFrame;
private static var SprMotherPortrait:Class = TextBox_SprMotherPortrait;
private static var SprFuzorPortrait:Class = TextBox_SprFuzorPortrait;
private static var SprNaaijPortrait:Class = TextBox_SprNaaijPortrait;
private static var BGTextFrame:Class = TextBox_BGTextFrame;
private static var SprPressC:Class = TextBox_SprPressC;
public function TextBox(){
var _local1:FlxSprite = new FlxSprite(80, 160);
_local1.createGraphic(224, 64, 3137339392);
_local1.scrollFactor.x = 0;
_local1.scrollFactor.y = 0;
this.add(_local1);
var _local2:FlxSprite = new FlxSprite(80, 160);
_local2.loadGraphic(BGTextFrame);
_local2.scrollFactor.x = 0;
_local2.scrollFactor.y = 0;
this.add(_local2);
portrait = new FlxSprite(16, 160);
portrait.scrollFactor.x = 0;
portrait.scrollFactor.y = 0;
this.add(portrait);
portraitFrame = new FlxSprite(16, 160);
portraitFrame.loadGraphic(BGPortraitFrame);
portraitFrame.scrollFactor.x = 0;
portraitFrame.scrollFactor.y = 0;
this.add(portraitFrame);
textbox = new FlxText(85, 165, 214, "");
textbox.scrollFactor.x = 0;
textbox.scrollFactor.y = 0;
this.add(textbox);
nexttext = new FlxSprite(286, 208, SprPressC);
nexttext.scrollFactor.x = 0;
nexttext.scrollFactor.y = 0;
this.add(nexttext);
}
override public function update():void{
flashCounter++;
if (flashCounter >= flashLength){
nexttext.visible = !(nexttext.visible);
flashCounter = 0;
};
super.update();
}
public function setText(_arg1:String, _arg2:String):void{
textbox.text = _arg1;
if (_arg2 == null){
portrait.visible = false;
portraitFrame.visible = false;
} else {
if (_arg2 == "Naaij"){
portrait.loadGraphic(SprNaaijPortrait);
} else {
if (_arg2 == "Fuzor"){
portrait.loadGraphic(SprFuzorPortrait);
} else {
if (_arg2 == "Mell"){
portrait.loadGraphic(SprMellPortrait);
} else {
if (_arg2 == "Mom"){
portrait.loadGraphic(SprMotherPortrait);
} else {
portrait.loadGraphic(SprNPCPortrait);
};
};
};
};
portrait.visible = true;
portraitFrame.visible = true;
trace((_arg2 == "Mom"));
};
}
}
}//package Interface
Section 38
//TextBox_BGPortraitFrame (Interface.TextBox_BGPortraitFrame)
package Interface {
import mx.core.*;
public class TextBox_BGPortraitFrame extends BitmapAsset {
}
}//package Interface
Section 39
//TextBox_BGTextFrame (Interface.TextBox_BGTextFrame)
package Interface {
import mx.core.*;
public class TextBox_BGTextFrame extends BitmapAsset {
}
}//package Interface
Section 40
//TextBox_SprFuzorPortrait (Interface.TextBox_SprFuzorPortrait)
package Interface {
import mx.core.*;
public class TextBox_SprFuzorPortrait extends BitmapAsset {
}
}//package Interface
Section 41
//TextBox_SprMellPortrait (Interface.TextBox_SprMellPortrait)
package Interface {
import mx.core.*;
public class TextBox_SprMellPortrait extends BitmapAsset {
}
}//package Interface
Section 42
//TextBox_SprMotherPortrait (Interface.TextBox_SprMotherPortrait)
package Interface {
import mx.core.*;
public class TextBox_SprMotherPortrait extends BitmapAsset {
}
}//package Interface
Section 43
//TextBox_SprNaaijPortrait (Interface.TextBox_SprNaaijPortrait)
package Interface {
import mx.core.*;
public class TextBox_SprNaaijPortrait extends BitmapAsset {
}
}//package Interface
Section 44
//TextBox_SprNPCPortrait (Interface.TextBox_SprNPCPortrait)
package Interface {
import mx.core.*;
public class TextBox_SprNPCPortrait extends BitmapAsset {
}
}//package Interface
Section 45
//TextBox_SprPressC (Interface.TextBox_SprPressC)
package Interface {
import mx.core.*;
public class TextBox_SprPressC extends BitmapAsset {
}
}//package Interface
Section 46
//TextButton (Interface.TextButton)
package Interface {
import org.flixel.*;
public class TextButton extends FlxButton {
public function TextButton(_arg1:int, _arg2:int, _arg3:String, _arg4:Function, _arg5:int=75, _arg6:String="left", _arg7:uint=4288256409){
var _local8:FlxSprite = new FlxSprite();
_local8.createGraphic(_arg5, 10, 4278190080);
var _local9:FlxText = new FlxText(0, 0, _arg5, _arg3);
_local9.color = _arg7;
_local9.alignment = _arg6;
super(_arg1, _arg2, _arg4);
var _local10:FlxText = new FlxText(0, 0, _arg5, _arg3);
_local10.alignment = _arg6;
loadText(_local9, _local10);
loadGraphic(_local8);
}
}
}//package Interface
Section 47
//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 48
//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 49
//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 50
//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 51
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 52
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 53
//FlexVersion (mx.core.FlexVersion)
package mx.core {
import mx.resources.*;
public class FlexVersion {
public static const VERSION_2_0_1:uint = 33554433;
public static const CURRENT_VERSION:uint = 50331648;
public static const VERSION_3_0:uint = 50331648;
public static const VERSION_2_0:uint = 33554432;
public static const VERSION_ALREADY_READ:String = "versionAlreadyRead";
public static const VERSION_ALREADY_SET:String = "versionAlreadySet";
mx_internal static const VERSION:String = "3.0.0.0";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
mx_internal static function changeCompatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
_compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function set compatibilityVersion(_arg1:uint):void{
var _local2:String;
if (_arg1 == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ);
};
_compatibilityVersion = _arg1;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(_arg1:Function):void{
_compatibilityErrorFunction = _arg1;
}
public static function set compatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var _local1:uint = ((compatibilityVersion >> 24) & 0xFF);
var _local2:uint = ((compatibilityVersion >> 16) & 0xFF);
var _local3:uint = (compatibilityVersion & 0xFFFF);
return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString()));
}
}
}//package mx.core
Section 54
//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 55
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 56
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(_arg1:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 57
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.core
Section 58
//IContainer (mx.core.IContainer)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
import flash.media.*;
import flash.text.*;
public interface IContainer extends IUIComponent {
function set hitArea(_arg1:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(_arg1:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(_arg1:Boolean):void;
function set creatingContentPane(_arg1:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(_arg1:DisplayObject):int;
function set doubleClickEnabled(_arg1:Boolean):void;
function getObjectsUnderPoint(_arg1:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(_arg1:Boolean):void;
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(_arg1:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(_arg1:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(_arg1:Boolean):void;
function getChildAt(_arg1:int):DisplayObject;
function set soundTransform(_arg1:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(_arg1:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(_arg1:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(_arg1:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(_arg1:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(_arg1:Boolean):void;
function set buttonMode(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(_arg1:DisplayObject):DisplayObject;
function set tabIndex(_arg1:int):void;
function addChild(_arg1:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean;
}
}//package mx.core
Section 59
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 60
//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 61
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 62
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateSize():void;
function invalidateDisplayList():void;
function invalidateProperties():void;
}
}//package mx.core
Section 63
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 64
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 65
//IRectangularBorder (mx.core.IRectangularBorder)
package mx.core {
import flash.geom.*;
public interface IRectangularBorder extends IBorder {
function get backgroundImageBounds():Rectangle;
function get hasBackgroundImage():Boolean;
function set backgroundImageBounds(_arg1:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 66
//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 67
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(_arg1:Sprite):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function set isPopUp(_arg1:Boolean):void;
function get explicitMinHeight():Number;
function get percentWidth():Number;
function get isPopUp():Boolean;
function get owner():DisplayObjectContainer;
function get percentHeight():Number;
function get baselinePosition():Number;
function owns(_arg1:DisplayObject):Boolean;
function initialize():void;
function get maxWidth():Number;
function get minWidth():Number;
function getExplicitOrMeasuredWidth():Number;
function get explicitMaxWidth():Number;
function get explicitMaxHeight():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function set percentWidth(_arg1:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function set explicitWidth(_arg1:Number):void;
function set measuredMinHeight(_arg1:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(_arg1:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(_arg1:Number):void;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function set document(_arg1:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 68
//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 69
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.0.0.0";
private static var classMap:Object = {};
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class = classMap[_arg1];
if (!_local2){
throw (new Error((("No class registered for interface '" + _arg1) + "'.")));
};
return (_local2["getInstance"]());
}
}
}//package mx.core
Section 70
//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 71
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public static function set catchCallLaterExceptions(_arg1:Boolean):void{
_catchCallLaterExceptions = _arg1;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(_arg1:Boolean):void{
designTime = _arg1;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 72
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.0.0.0";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
this._module = _arg7;
}
public function get module():IModuleInfo{
if (_module){
return (_module);
};
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module));
}
}
}//package mx.events
Section 73
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.0.0.0";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 74
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.0.0.0";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 75
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.0.0.0";
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
var _local6:int = (leftShadow) ? leftShadow.width : 0;
var _local7:int = (rightShadow) ? rightShadow.width : 0;
var _local8:int = (topShadow) ? topShadow.height : 0;
var _local9:int = (bottomShadow) ? bottomShadow.height : 0;
var _local10:int = (_local6 + _local7);
var _local11:int = (_local8 + _local9);
var _local12:Number = ((_arg5 + _local11) / 2);
var _local13:Number = ((_arg4 + _local10) / 2);
var _local14:Matrix = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
var _local3:Shape = new FlexShape();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2);
var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6);
var _local9:Number = (_local7.left - _local8.left);
var _local10:Number = (_local8.right - _local7.right);
var _local11:Number = (_local7.top - _local8.top);
var _local12:Number = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
var _local13:Point = new Point(0, 0);
var _local14:Rectangle = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 76
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import mx.core.*;
import flash.display.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 77
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package mx.managers
Section 78
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.events.*;
import flash.display.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(_arg1:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.managers
Section 79
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function validateNow():void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function isInvalid():Boolean;
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
}
}//package mx.managers
Section 80
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function set processedDescriptors(_arg1:Boolean):void;
}
}//package mx.managers
Section 81
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function get toolTipChildren():IChildList;
function set focusPane(_arg1:Sprite):void;
function isTopLevel():Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function deactivate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(_arg1:int):void;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function get document():Object;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
}
}//package mx.managers
Section 82
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var bootstrapLoaderInfoURL:String;
}
}//package mx.managers
Section 83
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 84
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.0.0.0";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.display.*;
import mx.events.*;
import flash.net.*;
import flash.utils.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{
var _local3:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local3 = new ModuleEvent(ModuleEvent.PROGRESS);
_local3.bytesLoaded = info.size;
_local3.bytesTotal = info.size;
dispatchEvent(_local3);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_url.indexOf("published://") == 0){
return;
};
var _local3:URLRequest = new URLRequest(_url);
var _local4:LoaderContext = new LoaderContext();
_local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local4.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local4.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local3, _local4);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 85
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 86
//IResourceBundle (mx.resources.IResourceBundle)
package mx.resources {
public interface IResourceBundle {
function get content():Object;
function get locale():String;
function get bundleName():String;
}
}//package mx.resources
Section 87
//IResourceManager (mx.resources.IResourceManager)
package mx.resources {
import flash.events.*;
import flash.system.*;
public interface IResourceManager extends IEventDispatcher {
function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean;
function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class;
function getLocales():Array;
function removeResourceBundlesForLocale(_arg1:String):void;
function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle;
function get localeChain():Array;
function getInt(_arg1:String, _arg2:String, _arg3:String=null):int;
function update():void;
function set localeChain(_arg1:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(_arg1:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(_arg1:String):Array;
function removeResourceBundle(_arg1:String, _arg2:String):void;
function getObject(_arg1:String, _arg2:String, _arg3:String=null);
function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String;
function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void;
function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void;
function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 88
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 89
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle implements IResourceBundle {
mx_internal var _locale:String;
private var _content:Object;
mx_internal var _bundleName:String;
mx_internal static const VERSION:String = "3.0.0.0";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(_arg1:String=null, _arg2:String=null){
_content = {};
super();
mx_internal::_locale = _arg1;
mx_internal::_bundleName = _arg2;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(_arg1:String):String{
return (String(_getObject(_arg1)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String = _getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array = _getObject(_arg1).split(",");
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getObject(_arg1:String):Object{
return (_getObject(_arg1));
}
private function _getObject(_arg1:String):Object{
var _local2:Object = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(_arg1:String):Number{
return (Number(_getObject(_arg1)));
}
private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{
var _local3:Class;
if (_arg2.hasDefinition(_arg1)){
_local3 = (_arg2.getDefinition(_arg1) as Class);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:String;
var _local4:Class;
var _local5:Object;
var _local6:ResourceBundle;
if (!_arg2){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = (((mx_internal::locale + "$") + _arg1) + "_properties");
_local4 = getClassByName(_local3, _arg2);
if (!_local4){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, _arg2);
};
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, _arg2);
};
if (((!(_local4)) && (mx_internal::backupApplicationDomain))){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
};
};
if (_local4){
_local5 = new (_local4);
if ((_local5 is ResourceBundle)){
_local6 = ResourceBundle(_local5);
return (_local6);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 90
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.0.0.0";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
try {
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
} catch(e:Error) {
instance = new ResourceManagerImpl();
};
};
return (instance);
}
}
}//package mx.resources
Section 91
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import flash.utils.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.0.0.0";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
throw (new Error("unloadResourceModule() is not yet implemented."));
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 92
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import mx.styles.*;
import flash.display.*;
import mx.skins.*;
import mx.graphics.*;
import mx.utils.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.0.0.0";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = (bRoundedCorners) ? radius : 0;
radiusObj = {tl:radius, tr:radius, bl:_local9, br:_local9};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local10 = getStyle("highlightAlphas");
_local11 = (_local10) ? _local10[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local11, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 93
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import mx.styles.*;
import flash.display.*;
import mx.skins.*;
import mx.utils.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(_arg1:Object):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function registerEffects(_arg1:Array):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function getClassStyleDeclarations():Array{
return ([]);
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("focusBlendMode");
var _local4:Number = getStyle("focusAlpha");
var _local5:Number = getStyle("focusColor");
var _local6:Number = getStyle("cornerRadius");
var _local7:Number = getStyle("focusThickness");
var _local8:String = getStyle("focusRoundedCorners");
var _local9:Number = getStyle("themeColor");
var _local10:Number = _local5;
if (isNaN(_local10)){
_local10 = _local9;
};
var _local11:Graphics = graphics;
_local11.clear();
blendMode = _local3;
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 94
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.0.0.0";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 95
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import mx.styles.*;
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.0.0.0";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return ((_styleName) ? _styleName.getStyle(_arg1) : null);
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function get measuredHeight():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Object;
var _local12:Graphics = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
override public function get width():Number{
return (_width);
}
public function invalidateProperties():void{
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get styleName():Object{
return (_styleName);
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
public function invalidateSize():void{
}
public function validateProperties():void{
}
}
}//package mx.skins
Section 96
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import mx.styles.*;
import flash.system.*;
import flash.display.*;
import flash.geom.*;
import mx.resources.*;
import flash.net.*;
import flash.utils.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.0.0.0";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 97
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.managers.*;
import flash.utils.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.0.0.0";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
super();
if (_arg1){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = _arg1;
var target = _arg2;
var filterMap = _arg3;
var nodeAddedToChain:Boolean;
var originalChain:Object = chain;
if (filterMap){
chain = {};
};
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (filterMap){
if (nodeAddedToChain){
filteredChain = {};
filterObjectFactory = function ():void{
};
filterObjectFactory.prototype = originalChain;
filteredChain = new (filterObjectFactory);
for (i in chain) {
if (filterMap[i] != null){
filteredChain[filterMap[i]] = chain[i];
};
};
chain = filteredChain;
chain[FILTERMAP_PROP] = filterMap;
} else {
chain = originalChain;
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local7:int;
var _local8:Object;
var _local3:Object = getStyle(_arg1);
var _local4:Boolean;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
var _local5:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local6:int = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
var _local6:Object;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
_local5 = styleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local6 = _local4[FILTERMAP_PROP];
if (_local6){
if (_local6[_arg1] != null){
_local4[_local6[_arg1]] = _arg2;
};
} else {
_local4[_arg1] = _arg2;
};
};
}
}
}//package mx.styles
Section 98
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(_arg1:Object):void;
function styleChanged(_arg1:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 99
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function get className():String;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(_arg1:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function getStyle(_arg1:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 100
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function registerInheritingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(_arg1):Boolean;
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function set typeSelectorCache(_arg1:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(_arg1:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 101
//IStyleManager2 (mx.styles.IStyleManager2)
package mx.styles {
import flash.events.*;
import flash.system.*;
public interface IStyleManager2 extends IStyleManager {
function get selectors():Array;
function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
}
}//package mx.styles
Section 102
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 103
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.0.0.0";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function get selectors():Array{
return (impl.selectors);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 104
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.*;
import flash.utils.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.0.0.0";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 105
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "3.0.0.0";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number = ((_arg1 >> 16) & 0xFF);
var _local4:Number = ((_arg1 >> 8) & 0xFF);
var _local5:Number = (_arg1 & 0xFF);
var _local6:Number = ((_arg2 >> 16) & 0xFF);
var _local7:Number = ((_arg2 >> 8) & 0xFF);
var _local8:Number = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 106
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.0.0.0";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number = (_arg2 + _arg4);
var _local11:Number = (_arg3 + _arg5);
var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
var _local13:Number = (_arg9 * 0.292893218813453);
var _local14:Number = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 107
//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 108
//StringUtil (mx.utils.StringUtil)
package mx.utils {
public class StringUtil {
mx_internal static const VERSION:String = "3.0.0.0";
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
var _local3:int = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local4:Array;
if (_arg1 == null){
return ("");
};
var _local3:uint = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
var _local5:int;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 109
//FlxAnim (org.flixel.data.FlxAnim)
package org.flixel.data {
public class FlxAnim {
public var delay:Number;
public var frames:Array;
public var looped:Boolean;
public var name:String;
public function FlxAnim(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true){
name = _arg1;
delay = (1 / _arg3);
frames = _arg2;
looped = _arg4;
}
}
}//package org.flixel.data
Section 110
//FlxConsole (org.flixel.data.FlxConsole)
package org.flixel.data {
import flash.display.*;
import org.flixel.*;
import flash.text.*;
public class FlxConsole extends Sprite {
protected const MAX_CONSOLE_LINES:uint = 0x0100;
protected var _lines:Array;
protected var _text:TextField;
protected var _fpsUpdate:Boolean;
protected var _console:Sprite;
protected var _Y:Number;
protected var _curFPS:uint;
protected var _fps:Array;
protected var _bx:int;
protected var _by:int;
protected var _fpsDisplay:TextField;
protected var _YT:Number;
protected var _byt:int;
public function FlxConsole(_arg1:uint, _arg2:uint, _arg3:uint){
visible = false;
x = (_arg1 * _arg3);
_by = (_arg2 * _arg3);
_byt = (_by - (FlxG.height * _arg3));
_YT = (_Y = (y = _byt));
var _local4:Bitmap = new Bitmap(new BitmapData((FlxG.width * _arg3), (FlxG.height * _arg3), true, 2130706432));
addChild(_local4);
_fps = new Array(8);
_curFPS = 0;
_fpsUpdate = true;
_text = new TextField();
_text.width = _local4.width;
_text.height = _local4.height;
_text.multiline = true;
_text.wordWrap = true;
_text.embedFonts = true;
_text.antiAliasType = AntiAliasType.NORMAL;
_text.gridFitType = GridFitType.PIXEL;
_text.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF);
addChild(_text);
_fpsDisplay = new TextField();
_fpsDisplay.width = _local4.width;
_fpsDisplay.height = 20;
_fpsDisplay.multiline = true;
_fpsDisplay.wordWrap = true;
_fpsDisplay.embedFonts = true;
_fpsDisplay.antiAliasType = AntiAliasType.NORMAL;
_fpsDisplay.gridFitType = GridFitType.PIXEL;
_fpsDisplay.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, true, null, null, null, null, "right");
addChild(_fpsDisplay);
_lines = new Array();
}
public function log(_arg1:String):void{
var _local2:String;
var _local3:uint;
if (_arg1 == null){
_arg1 = "NULL";
};
trace(_arg1);
_lines.push(_arg1);
if (_lines.length > MAX_CONSOLE_LINES){
_lines.shift();
_local2 = "";
_local3 = 0;
while (_local3 < _lines.length) {
_local2 = (_local2 + (_lines[_local3] + "\n"));
_local3++;
};
_text.text = _local2;
} else {
_text.appendText((_arg1 + "\n"));
};
_text.scrollV = _text.height;
}
public function update():void{
var _local1:uint;
var _local2:uint;
if (visible){
_fps[_curFPS] = (1 / FlxG.elapsed);
if (++_curFPS >= _fps.length){
_curFPS = 0;
};
_fpsUpdate = !(_fpsUpdate);
if (_fpsUpdate){
_local1 = 0;
_local2 = 0;
while (_local2 < _fps.length) {
_local1 = (_local1 + _fps[_local2]);
_local2++;
};
_fpsDisplay.text = (Math.floor((_local1 / _fps.length)) + " fps");
};
};
if (_Y < _YT){
_Y = (_Y + ((FlxG.height * 10) * FlxG.elapsed));
} else {
if (_Y > _YT){
_Y = (_Y - ((FlxG.height * 10) * FlxG.elapsed));
};
};
if (_Y > _by){
_Y = _by;
} else {
if (_Y < _byt){
_Y = _byt;
visible = false;
};
};
y = Math.floor(_Y);
}
public function toggle():void{
if (_YT == _by){
_YT = _byt;
} else {
_YT = _by;
visible = true;
};
}
}
}//package org.flixel.data
Section 111
//FlxFactory (org.flixel.data.FlxFactory)
package org.flixel.data {
import flash.events.*;
import flash.display.*;
import org.flixel.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class FlxFactory extends MovieClip {
protected var className:String;
protected var bits:Array;
private var ImgBit:Class;
protected var bmpBar:Bitmap;
protected var Buffer:Sprite;
private var ImgBar:Class;
protected var myURL:String;
public function FlxFactory(){
var tmp:Bitmap;
var re:RegExp;
var fmt:TextFormat;
var txt:TextField;
ImgBar = FlxFactory_ImgBar;
ImgBit = FlxFactory_ImgBit;
super();
stop();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
try {
throw (new Error("Setting global debug flag..."));
} catch(e:Error) {
re = /\[.*:[0-9]+\]/;
FlxG.debug = re.test(e.getStackTrace());
};
if (((((!(FlxG.debug)) && (!((myURL == null))))) && ((myURL.length > 0)))){
tmp = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, true, 4294967295));
addChild(tmp);
fmt = new TextFormat();
fmt.color = 0;
fmt.size = 16;
fmt.align = "center";
fmt.bold = true;
txt = new TextField();
txt.width = (tmp.width - 16);
txt.height = (tmp.height - 16);
txt.y = 8;
txt.multiline = true;
txt.wordWrap = true;
txt.defaultTextFormat = fmt;
txt.text = (("Hi there! It looks like somebody copied this game without my permission. If you would like to play it at my site, just click anywhere, or copy-paste this URL into your browser.\n\n" + myURL) + "\n\nThanks, and have fun!");
addChild(txt);
txt.addEventListener(MouseEvent.CLICK, goToMyURL);
tmp.addEventListener(MouseEvent.CLICK, goToMyURL);
return;
};
Buffer = new Sprite();
Buffer.scaleX = 2;
Buffer.scaleY = 2;
addChild(Buffer);
bmpBar = new ImgBar();
bmpBar.x = (((stage.stageWidth / Buffer.scaleX) - bmpBar.width) / 2);
bmpBar.y = (((stage.stageHeight / Buffer.scaleY) - bmpBar.height) / 2);
Buffer.addChild(bmpBar);
bits = new Array();
var i:uint;
while (i < 9) {
tmp = new ImgBit();
tmp.visible = false;
tmp.x = ((bmpBar.x + 2) + (i * 3));
tmp.y = (bmpBar.y + 2);
bits.push(tmp);
Buffer.addChild(tmp);
i = (i + 1);
};
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function goToMyURL(_arg1:MouseEvent=null):void{
navigateToURL(new URLRequest(("http://" + myURL)));
}
protected function onEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:Class;
var _local4:Object;
var _local5:uint;
graphics.clear();
if (framesLoaded == totalFrames){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
nextFrame();
_local3 = Class(getDefinitionByName(className));
if (_local3){
_local4 = new (_local3);
addChild((_local4 as DisplayObject));
};
_local2 = (bits.length - 1);
while (_local2 >= 0) {
bits.pop();
_local2--;
};
removeChild(Buffer);
} else {
_local5 = ((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 10);
_local2 = 0;
while ((((_local2 < _local5)) && ((_local2 < bits.length)))) {
bits[_local2].visible = true;
_local2++;
};
};
}
}
}//package org.flixel.data
Section 112
//FlxFactory_ImgBar (org.flixel.data.FlxFactory_ImgBar)
package org.flixel.data {
import mx.core.*;
public class FlxFactory_ImgBar extends BitmapAsset {
}
}//package org.flixel.data
Section 113
//FlxFactory_ImgBit (org.flixel.data.FlxFactory_ImgBit)
package org.flixel.data {
import mx.core.*;
public class FlxFactory_ImgBit extends BitmapAsset {
}
}//package org.flixel.data
Section 114
//FlxFade (org.flixel.data.FlxFade)
package org.flixel.data {
import org.flixel.*;
public class FlxFade extends FlxSprite {
protected var _delay:Number;
protected var _helper:Number;
protected var _complete:Function;
public function FlxFade(){
createGraphic(FlxG.width, FlxG.height, 0, true);
scrollFactor.x = 0;
scrollFactor.y = 0;
visible = false;
}
public function restart(_arg1:uint=0, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (_arg2 == 0){
visible = false;
return;
};
if (((!(_arg4)) && (visible))){
return;
};
fill(_arg1);
_delay = _arg2;
_complete = _arg3;
_helper = 0;
alpha = 0;
visible = true;
}
override public function update():void{
if (((visible) && (!((alpha == 1))))){
_helper = (_helper + (FlxG.elapsed / _delay));
alpha = _helper;
if (alpha >= 1){
alpha = 1;
if (_complete != null){
_complete();
};
};
};
}
}
}//package org.flixel.data
Section 115
//FlxFlash (org.flixel.data.FlxFlash)
package org.flixel.data {
import org.flixel.*;
public class FlxFlash extends FlxSprite {
protected var _delay:Number;
protected var _helper:Number;
protected var _complete:Function;
public function FlxFlash(){
createGraphic(FlxG.width, FlxG.height, 0, true);
scrollFactor.x = 0;
scrollFactor.y = 0;
visible = false;
}
public function restart(_arg1:uint=4294967295, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (_arg2 == 0){
visible = false;
return;
};
if (((!(_arg4)) && (visible))){
return;
};
fill(_arg1);
_delay = _arg2;
_complete = _arg3;
_helper = 1;
alpha = 1;
visible = true;
}
override public function update():void{
if (visible){
_helper = (_helper - (FlxG.elapsed / _delay));
alpha = _helper;
if (alpha <= 0){
visible = false;
if (_complete != null){
_complete();
};
};
};
}
}
}//package org.flixel.data
Section 116
//FlxKeyboard (org.flixel.data.FlxKeyboard)
package org.flixel.data {
import flash.events.*;
public class FlxKeyboard {
protected const _t:uint = 0x0100;
public var RIGHT:Boolean;
public var LEFT:Boolean;
public var FOUR:Boolean;
public var TWO:Boolean;
public var CONTROL:Boolean;
public var A:Boolean;
public var B:Boolean;
public var C:Boolean;
public var D:Boolean;
public var E:Boolean;
public var ONE:Boolean;
public var G:Boolean;
public var H:Boolean;
public var I:Boolean;
public var J:Boolean;
public var K:Boolean;
public var F:Boolean;
public var N:Boolean;
public var O:Boolean;
public var Q:Boolean;
public var R:Boolean;
public var S:Boolean;
public var T:Boolean;
public var ESC:Boolean;
public var MINUS:Boolean;
public var Y:Boolean;
public var L:Boolean;
public var Z:Boolean;
public var QUOTE:Boolean;
public var V:Boolean;
public var X:Boolean;
public var P:Boolean;
public var SHIFT:Boolean;
public var SLASH:Boolean;
public var U:Boolean;
public var EIGHT:Boolean;
public var W:Boolean;
public var M:Boolean;
public var THREE:Boolean;
public var SEMICOLON:Boolean;
public var CAPSLOCK:Boolean;
protected var _lookup:Object;
public var PLUS:Boolean;
protected var _map:Array;
public var ZERO:Boolean;
public var DOWN:Boolean;
public var F1:Boolean;
public var F2:Boolean;
public var F3:Boolean;
public var F4:Boolean;
public var F5:Boolean;
public var F6:Boolean;
public var F7:Boolean;
public var NINE:Boolean;
public var F9:Boolean;
public var ALT:Boolean;
public var F8:Boolean;
public var DELETE:Boolean;
public var LBRACKET:Boolean;
public var UP:Boolean;
public var ENTER:Boolean;
public var FIVE:Boolean;
public var SIX:Boolean;
public var COMMA:Boolean;
public var PERIOD:Boolean;
public var BACKSLASH:Boolean;
public var F10:Boolean;
public var F11:Boolean;
public var F12:Boolean;
public var SEVEN:Boolean;
public var SPACE:Boolean;
public var RBRACKET:Boolean;
public function FlxKeyboard(){
var _local1:uint;
_lookup = new Object();
_map = new Array(_t);
_local1 = 65;
while (_local1 <= 90) {
addKey(String.fromCharCode(_local1), _local1);
_local1++;
};
_local1 = 48;
var _temp1 = _local1;
_local1 = (_local1 + 1);
addKey("ZERO", _temp1);
var _temp2 = _local1;
_local1 = (_local1 + 1);
addKey("ONE", _temp2);
var _temp3 = _local1;
_local1 = (_local1 + 1);
addKey("TWO", _temp3);
var _temp4 = _local1;
_local1 = (_local1 + 1);
addKey("THREE", _temp4);
var _temp5 = _local1;
_local1 = (_local1 + 1);
addKey("FOUR", _temp5);
var _temp6 = _local1;
_local1 = (_local1 + 1);
addKey("FIVE", _temp6);
var _temp7 = _local1;
_local1 = (_local1 + 1);
addKey("SIX", _temp7);
var _temp8 = _local1;
_local1 = (_local1 + 1);
addKey("SEVEN", _temp8);
var _temp9 = _local1;
_local1 = (_local1 + 1);
addKey("EIGHT", _temp9);
var _temp10 = _local1;
_local1 = (_local1 + 1);
addKey("NINE", _temp10);
_local1 = 1;
while (_local1 <= 12) {
addKey(("F" + _local1), (111 + _local1));
_local1++;
};
addKey("ESC", 27);
addKey("MINUS", 189);
addKey("PLUS", 187);
addKey("DELETE", 8);
addKey("LBRACKET", 219);
addKey("RBRACKET", 221);
addKey("BACKSLASH", 220);
addKey("CAPSLOCK", 20);
addKey("SEMICOLON", 186);
addKey("QUOTE", 222);
addKey("ENTER", 13);
addKey("SHIFT", 16);
addKey("COMMA", 188);
addKey("PERIOD", 190);
addKey("SLASH", 191);
addKey("CONTROL", 17);
addKey("ALT", 18);
addKey("SPACE", 32);
addKey("UP", 38);
addKey("DOWN", 40);
addKey("LEFT", 37);
addKey("RIGHT", 39);
}
public function handleKeyUp(_arg1:KeyboardEvent):void{
var _local2:Object = _map[_arg1.keyCode];
if (_local2 == null){
return;
};
if (_local2.current > 0){
_local2.current = -1;
} else {
_local2.current = 0;
};
this[_local2.name] = false;
}
public function pressed(_arg1:String):Boolean{
return (this[_arg1]);
}
public function justReleased(_arg1:String):Boolean{
return ((_map[_lookup[_arg1]].current == -1));
}
public function handleKeyDown(_arg1:KeyboardEvent):void{
var _local2:Object = _map[_arg1.keyCode];
if (_local2 == null){
return;
};
if (_local2.current > 0){
_local2.current = 1;
} else {
_local2.current = 2;
};
this[_local2.name] = true;
}
public function reset():void{
var _local2:Object;
var _local1:uint;
while (_local1 < _t) {
if (_map[_local1] == null){
} else {
_local2 = _map[_local1];
this[_local2.name] = false;
_local2.current = 0;
_local2.last = 0;
};
_local1++;
};
}
public function justPressed(_arg1:String):Boolean{
return ((_map[_lookup[_arg1]].current == 2));
}
public function update():void{
var _local2:Object;
var _local1:uint;
while (_local1 < _t) {
if (_map[_local1] == null){
} else {
_local2 = _map[_local1];
if ((((_local2.last == -1)) && ((_local2.current == -1)))){
_local2.current = 0;
} else {
if ((((_local2.last == 2)) && ((_local2.current == 2)))){
_local2.current = 1;
};
};
_local2.last = _local2.current;
};
_local1++;
};
}
protected function addKey(_arg1:String, _arg2:uint):void{
_lookup[_arg1] = _arg2;
_map[_arg2] = {name:_arg1, current:0, last:0};
}
}
}//package org.flixel.data
Section 117
//FlxKong (org.flixel.data.FlxKong)
package org.flixel.data {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class FlxKong extends Sprite {
public var API;
public function init():void{
var _local1:Object = LoaderInfo(root.loaderInfo).parameters;
var _local2:String = ((_local1.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf"));
var _local3:URLRequest = new URLRequest(_local2);
var _local4:Loader = new Loader();
_local4.contentLoaderInfo.addEventListener(Event.COMPLETE, APILoaded);
_local4.load(_local3);
this.addChild(_local4);
}
private function APILoaded(_arg1:Event):void{
API = _arg1.target.content;
API.services.connect();
}
}
}//package org.flixel.data
Section 118
//FlxLogoPixel (org.flixel.data.FlxLogoPixel)
package org.flixel.data {
import flash.display.*;
public class FlxLogoPixel extends Sprite {
private var _curLayer:uint;
private var _layers:Array;
public function FlxLogoPixel(_arg1:int, _arg2:int, _arg3:uint, _arg4:uint, _arg5:uint){
x = _arg1;
y = _arg2;
_layers = new Array();
var _local6:Array = new Array(4294901760, 4278255360, 4278190335, 4294967040, 4278255615);
_layers.push(addChild(new Bitmap(new BitmapData(_arg3, _arg3, true, _arg5))));
var _local7:uint;
while (_local7 < _local6.length) {
_layers.push(addChild(new Bitmap(new BitmapData(_arg3, _arg3, true, _local6[_arg4]))));
++_arg4;
if (_arg4 >= _local6.length){
_arg4 = 0;
};
_local7++;
};
_curLayer = (_layers.length - 1);
}
public function update():void{
if (_curLayer == 0){
return;
};
if (_layers[_curLayer].alpha >= 0.1){
_layers[_curLayer].alpha = (_layers[_curLayer].alpha - 0.1);
} else {
_layers[_curLayer].alpha = 0;
_curLayer--;
};
}
}
}//package org.flixel.data
Section 119
//FlxMouse (org.flixel.data.FlxMouse)
package org.flixel.data {
import flash.events.*;
public class FlxMouse {
protected var _last:int;
public var x:int;
public var y:int;
protected var _current:int;
public function FlxMouse(){
x = 0;
y = 0;
_current = 0;
_last = 0;
}
public function justReleased():Boolean{
return ((_current == -1));
}
public function pressed():Boolean{
return ((_current > 0));
}
public function handleMouseUp(_arg1:MouseEvent):void{
if (_current > 0){
_current = -1;
} else {
_current = 0;
};
}
public function update(_arg1:int, _arg2:int):void{
x = _arg1;
y = _arg2;
if ((((_last == -1)) && ((_current == -1)))){
_current = 0;
} else {
if ((((_last == 2)) && ((_last == 2)))){
_current = 1;
};
};
_last = _current;
}
public function reset():void{
_current = 0;
_last = 0;
}
public function justPressed():Boolean{
return ((_current == 2));
}
public function handleMouseDown(_arg1:MouseEvent):void{
if (_current > 0){
_current = 1;
} else {
_current = 2;
};
}
}
}//package org.flixel.data
Section 120
//FlxPanel (org.flixel.data.FlxPanel)
package org.flixel.data {
import org.flixel.*;
import flash.ui.*;
public class FlxPanel extends FlxCore {
private var _close:FlxButton;
private var _digg:FlxButton;
private var _gameTitle:String;
private var _closed:Boolean;
private var _payPalID:String;
private var _donate:FlxButton;
private var ImgClose:Class;
private var _topBar:FlxSprite;
private var _ty:Number;
private var _caption:FlxText;
private var _initialized:Boolean;
private var _twitter:FlxButton;
private var _delicious:FlxButton;
private var _stumble:FlxButton;
private var ImgDelicious:Class;
private var ImgTwitter:Class;
private var _mainBar:FlxSprite;
private var _gameURL:String;
private var ImgStumble:Class;
private var ImgReddit:Class;
private var ImgDigg:Class;
private var _bottomBar:FlxSprite;
private var _payPalAmount:Number;
private var _s:Number;
private var ImgDonate:Class;
private var _reddit:FlxButton;
public function FlxPanel(){
ImgDonate = FlxPanel_ImgDonate;
ImgStumble = FlxPanel_ImgStumble;
ImgDigg = FlxPanel_ImgDigg;
ImgReddit = FlxPanel_ImgReddit;
ImgDelicious = FlxPanel_ImgDelicious;
ImgTwitter = FlxPanel_ImgTwitter;
ImgClose = FlxPanel_ImgClose;
super();
y = -21;
_ty = y;
_closed = false;
_initialized = false;
_topBar = new FlxSprite();
_topBar.createGraphic(FlxG.width, 1, 2147483647);
_topBar.scrollFactor.x = 0;
_topBar.scrollFactor.y = 0;
_mainBar = new FlxSprite();
_mainBar.createGraphic(FlxG.width, 19, 2130706432);
_mainBar.scrollFactor.x = 0;
_mainBar.scrollFactor.y = 0;
_bottomBar = new FlxSprite();
_bottomBar.createGraphic(FlxG.width, 1, 2147483647);
_bottomBar.scrollFactor.x = 0;
_bottomBar.scrollFactor.y = 0;
_donate = new FlxButton(3, 0, onDonate);
_donate.loadGraphic(new FlxSprite(0, 0, ImgDonate));
_donate.scrollFactor.x = 0;
_donate.scrollFactor.y = 0;
_stumble = new FlxButton(((((((FlxG.width / 2) - 6) - 13) - 6) - 13) - 6), 0, onStumble);
_stumble.loadGraphic(new FlxSprite(0, 0, ImgStumble));
_stumble.scrollFactor.x = 0;
_stumble.scrollFactor.y = 0;
_digg = new FlxButton(((((FlxG.width / 2) - 6) - 13) - 6), 0, onDigg);
_digg.loadGraphic(new FlxSprite(0, 0, ImgDigg));
_digg.scrollFactor.x = 0;
_digg.scrollFactor.y = 0;
_reddit = new FlxButton(((FlxG.width / 2) - 6), 0, onReddit);
_reddit.loadGraphic(new FlxSprite(0, 0, ImgReddit));
_reddit.scrollFactor.x = 0;
_reddit.scrollFactor.y = 0;
_delicious = new FlxButton((((FlxG.width / 2) + 7) + 6), 0, onDelicious);
_delicious.loadGraphic(new FlxSprite(0, 0, ImgDelicious));
_delicious.scrollFactor.x = 0;
_delicious.scrollFactor.y = 0;
_twitter = new FlxButton((((((FlxG.width / 2) + 7) + 6) + 12) + 6), 0, onTwitter);
_twitter.loadGraphic(new FlxSprite(0, 0, ImgTwitter));
_twitter.scrollFactor.x = 0;
_twitter.scrollFactor.y = 0;
_caption = new FlxText((FlxG.width / 2), 0, ((FlxG.width / 2) - 19), "");
_caption.alignment = "right";
_caption.scrollFactor.x = 0;
_caption.scrollFactor.y = 0;
_close = new FlxButton((FlxG.width - 16), 0, onClose);
_close.loadGraphic(new FlxSprite(0, 0, ImgClose));
_close.scrollFactor.x = 0;
_close.scrollFactor.y = 0;
hide();
_s = 50;
}
public function onDelicious():void{
FlxG.openURL(((("http://delicious.com/save?v=5&noui&jump=close&url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle)));
}
public function init(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:String):void{
_payPalID = _arg1;
if (_payPalID.length <= 0){
_donate.visible = false;
};
_payPalAmount = _arg2;
_gameTitle = _arg3;
_gameURL = _arg4;
_caption.text = _arg5;
_initialized = true;
}
public function onTwitter():void{
FlxG.openURL(("http://twitter.com/home?status=Playing" + encodeURIComponent((((" " + _gameTitle) + " - ") + _gameURL))));
}
public function show(_arg1:Boolean=true):void{
if (!_initialized){
FlxG.log("SUPPORT PANEL ERROR: Uninitialized.\nYou forgot to call FlxGame.setupSupportPanel()\nfrom your game constructor.");
return;
};
if (_closed){
return;
};
if (_arg1){
y = -21;
_ty = -1;
} else {
y = FlxG.height;
_ty = (FlxG.height - 20);
};
Mouse.show();
visible = true;
}
public function onStumble():void{
FlxG.openURL(("http://www.stumbleupon.com/submit?url=" + encodeURIComponent(_gameURL)));
}
override public function render():void{
if (!_initialized){
return;
};
if (_topBar.visible){
_topBar.render();
};
if (_mainBar.visible){
_mainBar.render();
};
if (_bottomBar.visible){
_bottomBar.render();
};
if (_donate.visible){
_donate.render();
};
if (_stumble.visible){
_stumble.render();
};
if (_digg.visible){
_digg.render();
};
if (_reddit.visible){
_reddit.render();
};
if (_delicious.visible){
_delicious.render();
};
if (_twitter.visible){
_twitter.render();
};
if (_caption.visible){
_caption.render();
};
if (_close.visible){
_close.render();
};
}
public function onDigg():void{
FlxG.openURL(((("http://digg.com/submit?url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle)));
}
public function onReddit():void{
FlxG.openURL(("http://www.reddit.com/submit?url=" + encodeURIComponent(_gameURL)));
}
public function onDonate():void{
FlxG.openURL(((((("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + encodeURIComponent(_payPalID)) + "&item_name=") + encodeURIComponent(((_gameTitle + " Contribution (") + _gameURL))) + ")¤cy_code=USD&amount=") + _payPalAmount));
}
override public function update():void{
if (!_initialized){
return;
};
if (_ty != y){
if (y < _ty){
y = (y + (FlxG.elapsed * _s));
if (y > _ty){
y = _ty;
};
} else {
y = (y - (FlxG.elapsed * _s));
if (y < _ty){
y = _ty;
};
};
};
if ((((y <= -21)) || ((y > FlxG.height)))){
visible = false;
};
_topBar.y = y;
_mainBar.y = (y + 1);
_bottomBar.y = (y + 20);
_donate.y = (y + 4);
_stumble.y = (y + 4);
_digg.y = (y + 4);
_reddit.y = (y + 4);
_delicious.y = (y + 5);
_twitter.y = (y + 4);
_caption.y = (y + 4);
_close.y = (y + 4);
if (_donate.active){
_donate.update();
};
if (_stumble.active){
_stumble.update();
};
if (_digg.active){
_digg.update();
};
if (_reddit.active){
_reddit.update();
};
if (_delicious.active){
_delicious.update();
};
if (_twitter.active){
_twitter.update();
};
if (_caption.active){
_caption.update();
};
if (_close.active){
_close.update();
};
}
public function hide():void{
if (y < 0){
_ty = -21;
} else {
_ty = FlxG.height;
};
Mouse.hide();
visible = false;
}
public function onClose():void{
_closed = true;
hide();
}
}
}//package org.flixel.data
Section 121
//FlxPanel_ImgClose (org.flixel.data.FlxPanel_ImgClose)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgClose extends BitmapAsset {
}
}//package org.flixel.data
Section 122
//FlxPanel_ImgDelicious (org.flixel.data.FlxPanel_ImgDelicious)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDelicious extends BitmapAsset {
}
}//package org.flixel.data
Section 123
//FlxPanel_ImgDigg (org.flixel.data.FlxPanel_ImgDigg)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDigg extends BitmapAsset {
}
}//package org.flixel.data
Section 124
//FlxPanel_ImgDonate (org.flixel.data.FlxPanel_ImgDonate)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDonate extends BitmapAsset {
}
}//package org.flixel.data
Section 125
//FlxPanel_ImgReddit (org.flixel.data.FlxPanel_ImgReddit)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgReddit extends BitmapAsset {
}
}//package org.flixel.data
Section 126
//FlxPanel_ImgStumble (org.flixel.data.FlxPanel_ImgStumble)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgStumble extends BitmapAsset {
}
}//package org.flixel.data
Section 127
//FlxPanel_ImgTwitter (org.flixel.data.FlxPanel_ImgTwitter)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgTwitter extends BitmapAsset {
}
}//package org.flixel.data
Section 128
//FlxPause (org.flixel.data.FlxPause)
package org.flixel.data {
import org.flixel.*;
public class FlxPause extends FlxLayer {
private var ImgKeyP:Class;
private var ImgKey0:Class;
private var ImgKeyPlus:Class;
private var ImgKeyMinus:Class;
public function FlxPause(){
var _local1:uint;
var _local2:uint;
ImgKeyMinus = FlxPause_ImgKeyMinus;
ImgKeyPlus = FlxPause_ImgKeyPlus;
ImgKey0 = FlxPause_ImgKey0;
ImgKeyP = FlxPause_ImgKeyP;
super();
scrollFactor.x = 0;
scrollFactor.y = 0;
_local1 = 80;
_local2 = 92;
x = ((FlxG.width - _local1) / 2);
y = ((FlxG.height - _local2) / 2);
add(new FlxSprite().createGraphic(_local1, _local2, 2852126720, true), true);
(add(new FlxText(0, 0, _local1, "this game is"), true) as FlxText).alignment = "center";
add(new FlxText(0, 10, _local1, "PAUSED").setFormat(null, 16, 0xFFFFFF, "center"), true);
add(new FlxSprite(4, 36, ImgKeyP), true);
add(new FlxText(16, 36, (_local1 - 16), "Pause Game"), true);
add(new FlxSprite(4, 50, ImgKey0), true);
add(new FlxText(16, 50, (_local1 - 16), "Mute Sound"), true);
add(new FlxSprite(4, 64, ImgKeyMinus), true);
add(new FlxText(16, 64, (_local1 - 16), "Sound Down"), true);
add(new FlxSprite(4, 78, ImgKeyPlus), true);
add(new FlxText(16, 78, (_local1 - 16), "Sound Up"), true);
}
}
}//package org.flixel.data
Section 129
//FlxPause_ImgKey0 (org.flixel.data.FlxPause_ImgKey0)
package org.flixel.data {
import mx.core.*;
public class FlxPause_ImgKey0 extends BitmapAsset {
}
}//package org.flixel.data
Section 130
//FlxPause_ImgKeyMinus (org.flixel.data.FlxPause_ImgKeyMinus)
package org.flixel.data {
import mx.core.*;
public class FlxPause_ImgKeyMinus extends BitmapAsset {
}
}//package org.flixel.data
Section 131
//FlxPause_ImgKeyP (org.flixel.data.FlxPause_ImgKeyP)
package org.flixel.data {
import mx.core.*;
public class FlxPause_ImgKeyP extends BitmapAsset {
}
}//package org.flixel.data
Section 132
//FlxPause_ImgKeyPlus (org.flixel.data.FlxPause_ImgKeyPlus)
package org.flixel.data {
import mx.core.*;
public class FlxPause_ImgKeyPlus extends BitmapAsset {
}
}//package org.flixel.data
Section 133
//FlxQuake (org.flixel.data.FlxQuake)
package org.flixel.data {
import org.flixel.*;
public class FlxQuake {
public var y:int;
protected var _length:Number;
protected var _timer:Number;
protected var _intensity:Number;
public var x:int;
protected var _zoom:uint;
public function FlxQuake(_arg1:uint){
_zoom = _arg1;
reset(0);
}
public function update():void{
if (_timer > 0){
_timer = (_timer + FlxG.elapsed);
if (_timer > _length){
_timer = 0;
x = 0;
y = 0;
} else {
x = (((((Math.random() * _intensity) * FlxG.width) * 2) - (_intensity * FlxG.width)) * _zoom);
y = (((((Math.random() * _intensity) * FlxG.height) * 2) - (_intensity * FlxG.height)) * _zoom);
};
};
}
public function reset(_arg1:Number, _arg2:Number=0.5):void{
x = 0;
y = 0;
_intensity = _arg1;
if (_intensity == 0){
_length = 0;
_timer = 0;
return;
};
_length = _arg2;
_timer = 0.01;
}
}
}//package org.flixel.data
Section 134
//FlxButton (org.flixel.FlxButton)
package org.flixel {
import flash.events.*;
import flash.geom.*;
public class FlxButton extends FlxCore {
protected var _onTO:Point;
protected var _initialized:Boolean;
protected var _pressed:Boolean;
protected var _onT:FlxText;
protected var _callback:Function;
protected var _off:FlxSprite;
protected var _onToggle:Boolean;
protected var _offTO:Point;
protected var _offT:FlxText;
protected var _on:FlxSprite;
public function FlxButton(_arg1:int, _arg2:int, _arg3:Function){
x = _arg1;
y = _arg2;
width = 100;
height = 10;
_off = new FlxSprite();
_off.createGraphic(width, height, 4286545791);
_on = new FlxSprite();
_off.createGraphic(width, height, 4294967295);
_callback = _arg3;
_onToggle = false;
_pressed = false;
updatePositions();
_initialized = false;
}
override public function destroy():void{
FlxG.state.parent.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
}
override public function update():void{
if (!_initialized){
if (FlxG.state == null){
return;
};
if (FlxG.state.parent == null){
return;
};
if (FlxG.state.parent.stage == null){
return;
};
FlxG.state.parent.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_initialized = true;
};
super.update();
if (((((!((_off == null))) && (_off.exists))) && (_off.active))){
_off.update();
};
if (((((!((_on == null))) && (_on.exists))) && (_on.active))){
_on.update();
};
if (_offT != null){
if (((((!((_offT == null))) && (_offT.exists))) && (_offT.active))){
_offT.update();
};
if (((((!((_onT == null))) && (_onT.exists))) && (_onT.active))){
_onT.update();
};
};
visibility(false);
if (_off.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
if (!FlxG.mouse.pressed()){
_pressed = false;
} else {
if (!_pressed){
_pressed = true;
if (!_initialized){
_callback();
};
};
};
visibility(!(_pressed));
};
if (_onToggle){
visibility(_off.visible);
};
updatePositions();
}
public function switchOn():void{
_onToggle = true;
}
protected function onMouseUp(_arg1:MouseEvent):void{
if (((((((!(exists)) || (!(visible)))) || (!(active)))) || (!(FlxG.mouse.justReleased())))){
return;
};
if (_off.overlapsPoint((FlxG.mouse.x + ((1 - scrollFactor.x) * FlxG.scroll.x)), (FlxG.mouse.y + ((1 - scrollFactor.y) * FlxG.scroll.y)))){
_callback();
};
}
protected function visibility(_arg1:Boolean):void{
if (_arg1){
_off.visible = false;
if (_offT != null){
_offT.visible = false;
};
_on.visible = true;
if (_onT != null){
_onT.visible = true;
};
} else {
_on.visible = false;
if (_onT != null){
_onT.visible = false;
};
_off.visible = true;
if (_offT != null){
_offT.visible = true;
};
};
}
override public function render():void{
super.render();
if (((((!((_off == null))) && (_off.exists))) && (_off.visible))){
_off.render();
};
if (((((!((_on == null))) && (_on.exists))) && (_on.visible))){
_on.render();
};
if (_offT != null){
if (((((!((_offT == null))) && (_offT.exists))) && (_offT.visible))){
_offT.render();
};
if (((((!((_onT == null))) && (_onT.exists))) && (_onT.visible))){
_onT.render();
};
};
}
public function switchOff():void{
_onToggle = false;
}
public function on():Boolean{
return (_onToggle);
}
protected function updatePositions():void{
_off.x = x;
_off.y = y;
if (_offT){
_offT.x = (_offTO.x + x);
_offT.y = (_offTO.y + y);
};
_on.x = x;
_on.y = y;
if (_onT){
_onT.x = (_onTO.x + x);
_onT.y = (_onTO.y + y);
};
}
public function loadGraphic(_arg1:FlxSprite, _arg2:FlxSprite=null):FlxButton{
_off = _arg1;
if (_arg2 == null){
_on = _off;
} else {
_on = _arg2;
};
width = _off.width;
height = _off.height;
_off.scrollFactor = scrollFactor;
_on.scrollFactor = scrollFactor;
updatePositions();
return (this);
}
public function loadText(_arg1:FlxText, _arg2:FlxText=null):FlxButton{
if (_arg1 != null){
_offT = _arg1;
};
if (_arg2 == null){
_onT = _offT;
} else {
_onT = _arg2;
};
if (_offT != null){
_offTO = new Point(_offT.x, _offT.y);
};
if (_onT != null){
_onTO = new Point(_onT.x, _onT.y);
};
_offT.scrollFactor = scrollFactor;
_onT.scrollFactor = scrollFactor;
updatePositions();
return (this);
}
}
}//package org.flixel
Section 135
//FlxCore (org.flixel.FlxCore)
package org.flixel {
import flash.geom.*;
public class FlxCore {
public var y:Number;
public var active:Boolean;
public var x:Number;
public var visible:Boolean;
protected var _flickerTimer:Number;
public var width:uint;
public var last:Point;
public var exists:Boolean;
public var height:uint;
public var dead:Boolean;
public var fixed:Boolean;
protected var _flicker:Boolean;
public var scrollFactor:Point;
public function FlxCore(){
exists = true;
active = true;
visible = true;
dead = false;
fixed = false;
width = 0;
height = 0;
x = 0;
y = 0;
last = new Point(x, y);
scrollFactor = new Point(1, 1);
_flicker = false;
_flickerTimer = -1;
}
public function onScreen():Boolean{
var _local1:Point = new Point();
getScreenXY(_local1);
if (((((((((_local1.x + width) < 0)) || ((_local1.x > FlxG.width)))) || (((_local1.y + height) < 0)))) || ((_local1.y > FlxG.height)))){
return (false);
};
return (true);
}
public function hitWall(_arg1:FlxCore=null):Boolean{
return (true);
}
public function collideArrayY(_arg1:Array):void{
var _local2:FlxCore;
if (((!(exists)) || (dead))){
return;
};
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
_local2 = _arg1[_local4];
if ((((((((_local2 === this)) || ((_local2 == null)))) || (!(_local2.exists)))) || (_local2.dead))){
} else {
collideY(_local2);
};
_local4++;
};
}
public function update():void{
last.x = x;
last.y = y;
if (flickering()){
if (_flickerTimer > 0){
_flickerTimer = (_flickerTimer - FlxG.elapsed);
if (_flickerTimer == 0){
_flickerTimer = -1;
};
};
if (_flickerTimer < 0){
flicker(-1);
} else {
_flicker = !(_flicker);
visible = !(_flicker);
};
};
}
public function reset(_arg1:Number, _arg2:Number):void{
exists = true;
active = true;
visible = true;
dead = false;
last.x = (x = _arg1);
last.y = (y = _arg2);
}
public function flicker(_arg1:Number=1):void{
_flickerTimer = _arg1;
if (_flickerTimer < 0){
_flicker = false;
visible = true;
};
}
public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
var _local4:Number = x;
var _local5:Number = y;
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
if ((((((((_arg1 <= _local4)) || ((_arg1 >= (_local4 + width))))) || ((_arg2 <= _local5)))) || ((_arg2 >= (_local5 + height))))){
return (false);
};
return (true);
}
public function collideX(_arg1:FlxCore):Boolean{
var _local2:Number;
var _local3:Rectangle = new Rectangle();
var _local4:Rectangle = new Rectangle();
if (_arg1.x > _arg1.last.x){
_local4.x = _arg1.last.x;
_local4.width = ((_arg1.x - _arg1.last.x) + _arg1.width);
} else {
_local4.x = _arg1.x;
_local4.width = ((_arg1.last.x - _arg1.x) + _arg1.width);
};
_local4.y = _arg1.last.y;
_local4.height = _arg1.height;
if (x > last.x){
_local3.x = last.x;
_local3.width = ((x - last.x) + width);
} else {
_local3.x = x;
_local3.width = ((last.x - x) + width);
};
_local3.y = last.y;
_local3.height = height;
if (((((((((_local4.x + _local4.width) <= _local3.x)) || ((_local4.x >= (_local3.x + _local3.width))))) || (((_local4.y + _local4.height) <= _local3.y)))) || ((_local4.y >= (_local3.y + _local3.height))))){
return (false);
};
var _local5:Number = (_arg1.x - _arg1.last.x);
var _local6:Number = (x - last.x);
var _local7:Boolean = (((_arg1.x < (x + width))) && (((_arg1.x + _arg1.width) > x)));
if ((((((((_local5 > 0)) && ((_local6 <= 0)))) || ((((_local5 >= 0)) && ((((_local5 > _local6)) && (_local7))))))) || ((((_local5 <= 0)) && ((((-(_local5) < -(_local6))) && (_local7))))))){
if (((fixed) && (!(_arg1.fixed)))){
if (_arg1.hitWall(this)){
_arg1.x = (x - _arg1.width);
return (true);
};
} else {
if (((!(fixed)) && (_arg1.fixed))){
if (hitWall(_arg1)){
x = (_arg1.x + _arg1.width);
return (true);
};
} else {
if (((_arg1.hitWall(this)) && (hitWall(_arg1)))){
_local2 = ((_local4.right - _local3.left) / 2);
_arg1.x = (_arg1.x - _local2);
x = (x + _local2);
return (true);
};
};
};
} else {
if ((((((((_local5 < 0)) && ((_local6 >= 0)))) || ((((_local5 >= 0)) && ((((_local5 < _local6)) && (_local7))))))) || ((((_local5 <= 0)) && ((((-(_local5) > -(_local6))) && (_local7))))))){
if (_local4.left < _local3.right){
if (((fixed) && (!(_arg1.fixed)))){
if (_arg1.hitWall(this)){
_arg1.x = (x + width);
return (true);
};
} else {
if (((!(fixed)) && (_arg1.fixed))){
if (hitWall(_arg1)){
x = (_arg1.x - width);
return (true);
};
} else {
if (((_arg1.hitWall(this)) && (hitWall(_arg1)))){
_local2 = ((_local3.right - _local4.left) / 2);
_arg1.x = (_arg1.x + _local2);
x = (x - _local2);
return (true);
};
};
};
};
};
};
return (false);
}
public function render():void{
}
public function kill():void{
exists = false;
dead = true;
}
public function collideY(_arg1:FlxCore):Boolean{
var _local2:Number;
var _local3:Rectangle = new Rectangle();
var _local4:Rectangle = new Rectangle();
if (_arg1.y > _arg1.last.y){
_local4.y = _arg1.last.y;
_local4.height = ((_arg1.y - _arg1.last.y) + _arg1.height);
} else {
_local4.y = _arg1.y;
_local4.height = ((_arg1.last.y - _arg1.y) + _arg1.height);
};
_local4.x = _arg1.x;
_local4.width = _arg1.width;
if (y > last.y){
_local3.y = last.y;
_local3.height = ((y - last.y) + height);
} else {
_local3.y = y;
_local3.height = ((last.y - y) + height);
};
_local3.x = x;
_local3.width = width;
if (((((((((_local4.x + _local4.width) <= _local3.x)) || ((_local4.x >= (_local3.x + _local3.width))))) || (((_local4.y + _local4.height) <= _local3.y)))) || ((_local4.y >= (_local3.y + _local3.height))))){
return (false);
};
var _local5:Number = (_arg1.y - _arg1.last.y);
var _local6:Number = (y - last.y);
var _local7:Boolean = (((_arg1.y < (y + height))) && (((_arg1.y + _arg1.height) > y)));
if ((((((((_local5 > 0)) && ((_local6 <= 0)))) || ((((_local5 >= 0)) && ((((_local5 > _local6)) && (_local7))))))) || ((((_local5 <= 0)) && ((((-(_local5) < -(_local6))) && (_local7))))))){
if (_local4.bottom > _local3.top){
if (((fixed) && (!(_arg1.fixed)))){
if (_arg1.hitFloor(this)){
_arg1.y = (y - _arg1.height);
return (true);
};
} else {
if (((!(fixed)) && (_arg1.fixed))){
if (hitCeiling(_arg1)){
y = (_arg1.y + _arg1.height);
return (true);
};
} else {
if (((_arg1.hitFloor(this)) && (hitCeiling(_arg1)))){
_local2 = ((_local4.bottom - _local3.top) / 2);
_arg1.y = (_arg1.y - _local2);
y = (y + _local2);
return (true);
};
};
};
};
} else {
if ((((((((_local5 < 0)) && ((_local6 >= 0)))) || ((((_local5 >= 0)) && ((((_local5 < _local6)) && (_local7))))))) || ((((_local5 <= 0)) && ((((-(_local5) > -(_local6))) && (_local7))))))){
if (_local4.top < _local3.bottom){
if (((fixed) && (!(_arg1.fixed)))){
if (_arg1.hitCeiling(this)){
_arg1.y = (y + height);
return (true);
};
} else {
if (((!(fixed)) && (_arg1.fixed))){
if (hitFloor(_arg1)){
y = (_arg1.y - height);
return (true);
};
} else {
if (((_arg1.hitCeiling(this)) && (hitFloor(_arg1)))){
_local2 = ((_local3.bottom - _local4.top) / 2);
_arg1.y = (_arg1.y + _local2);
y = (y - _local2);
return (true);
};
};
};
};
};
};
return (false);
}
public function getScreenXY(_arg1:Point):void{
_arg1.x = (Math.floor(x) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
_arg1.y = (Math.floor(y) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
}
public function hitFloor(_arg1:FlxCore=null):Boolean{
return (true);
}
public function hitCeiling(_arg1:FlxCore=null):Boolean{
return (true);
}
public function overlaps(_arg1:FlxCore):Boolean{
var _local2:Number = x;
var _local3:Number = y;
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local2 = (_local2 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local3 = (_local3 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
var _local4:Number = _arg1.x;
var _local5:Number = _arg1.y;
if (((!((_arg1.scrollFactor.x == 1))) || (!((_arg1.scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * _arg1.scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * _arg1.scrollFactor.y)));
};
if ((((((((_local4 <= (_local2 - _arg1.width))) || ((_local4 >= (_local2 + width))))) || ((_local5 <= (_local3 - _arg1.height))))) || ((_local5 >= (_local3 + height))))){
return (false);
};
return (true);
}
public function flickering():Boolean{
return ((_flickerTimer >= 0));
}
public function destroy():void{
}
public function collideArray(_arg1:Array):void{
var _local2:FlxCore;
if (((!(exists)) || (dead))){
return;
};
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
_local2 = _arg1[_local4];
if ((((((((_local2 === this)) || ((_local2 == null)))) || (!(_local2.exists)))) || (_local2.dead))){
} else {
collide(_local2);
};
_local4++;
};
}
public function collideArrayX(_arg1:Array):void{
var _local2:FlxCore;
if (((!(exists)) || (dead))){
return;
};
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
_local2 = _arg1[_local4];
if ((((((((_local2 === this)) || ((_local2 == null)))) || (!(_local2.exists)))) || (_local2.dead))){
} else {
collideX(_local2);
};
_local4++;
};
}
public function collide(_arg1:FlxCore):Boolean{
var _local2:Boolean = collideX(_arg1);
var _local3:Boolean = collideY(_arg1);
return (((_local2) || (_local3)));
}
}
}//package org.flixel
Section 136
//FlxG (org.flixel.FlxG)
package org.flixel {
import flash.display.*;
import flash.geom.*;
import org.flixel.data.*;
import flash.net.*;
public class FlxG {
protected static var ImgDefaultCursor:Class = FlxG_ImgDefaultCursor;
public static var kong:FlxKong;
public static var scores:Array;
public static var music:FlxSound;
public static var height:uint;
protected static var _volume:Number;
public static var buffer:BitmapData;
public static var sounds:Array;
protected static var _seed:Number;
public static var debug:Boolean;
public static var LIBRARY_MINOR_VERSION:uint = 47;
public static var LIBRARY_MAJOR_VERSION:uint = 1;
public static var levels:Array;
public static var elapsed:Number;
public static var save:int;
protected static var _cache:Object;
public static var level:int;
public static var state:FlxState;
public static var score:int;
public static var saves:Array;
protected static var _scrollTarget:Point;
public static var followTarget:FlxCore;
public static var mouse:FlxMouse;
public static var followLead:Point;
public static var LIBRARY_NAME:String = "flixel";
protected static var _originalSeed:Number;
public static var width:uint;
public static var followLerp:Number;
public static var scroll:Point;
protected static var _game:FlxGame;
public static var followMin:Point;
public static var followMax:Point;
public static var keys:FlxKeyboard;
protected static var _pause:Boolean;
protected static var _mute:Boolean;
public static function flash(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
_game._flash.restart(_arg1, _arg2, _arg3, _arg4);
}
public static function collideArrays(_arg1:Array, _arg2:Array):void{
var _local3:uint;
var _local4:uint;
var _local5:FlxCore;
var _local6:FlxCore;
var _local7:uint = _arg1.length;
var _local8:uint = _arg2.length;
if (_arg1 === _arg2){
_local3 = 0;
while (_local3 < _local7) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = (_local3 + 1);
while (_local4 < _local8) {
_local6 = _arg2[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collide(_local6);
};
_local4++;
};
};
_local3++;
};
} else {
_local3 = 0;
while (_local3 < _local7) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = 0;
while (_local4 < _local8) {
_local6 = _arg2[_local4];
if ((((((((_local5 === _local6)) || ((_local6 == null)))) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collide(_local6);
};
_local4++;
};
};
_local3++;
};
};
}
public static function get mute():Boolean{
return (_mute);
}
public static function get volume():Number{
return (_volume);
}
protected static function changeSounds():void{
if (((!((music == null))) && (music.active))){
music.updateTransform();
};
var _local1:uint = sounds.length;
var _local2:uint;
while (_local2 < _local1) {
if (sounds[_local2].active){
sounds[_local2].updateTransform();
};
_local2++;
};
}
static function doFollow():void{
if (followTarget != null){
if (((followTarget.exists) && (!(followTarget.dead)))){
_scrollTarget.x = (((width >> 1) - followTarget.x) - (followTarget.width >> 1));
_scrollTarget.y = (((height >> 1) - followTarget.y) - (followTarget.height >> 1));
if (((!((followLead == null))) && ((followTarget is FlxSprite)))){
_scrollTarget.x = (_scrollTarget.x - ((followTarget as FlxSprite).velocity.x * followLead.x));
_scrollTarget.y = (_scrollTarget.y - ((followTarget as FlxSprite).velocity.y * followLead.y));
};
};
scroll.x = (scroll.x + (((_scrollTarget.x - scroll.x) * followLerp) * FlxG.elapsed));
scroll.y = (scroll.y + (((_scrollTarget.y - scroll.y) * followLerp) * FlxG.elapsed));
if (followMin != null){
if (scroll.x > followMin.x){
scroll.x = followMin.x;
};
if (scroll.y > followMin.y){
scroll.y = followMin.y;
};
};
if (followMax != null){
if (scroll.x < followMax.x){
scroll.x = followMax.x;
};
if (scroll.y < followMax.y){
scroll.y = followMax.y;
};
};
};
}
public static function showSupportPanel(_arg1:Boolean=true):void{
_game._panel.show(_arg1);
}
public static function addBitmap(_arg1:Class, _arg2:Boolean=false):BitmapData{
var _local6:BitmapData;
var _local7:Matrix;
var _local3:Boolean;
var _local4:String = String(_arg1);
if ((((_cache[_local4] == undefined)) || ((_cache[_local4] == null)))){
_cache[_local4] = new (_arg1).bitmapData;
if (_arg2){
_local3 = true;
};
};
var _local5:BitmapData = _cache[_local4];
if (((((!(_local3)) && (_arg2))) && ((_local5.width == new (_arg1).bitmapData.width)))){
_local3 = true;
};
if (_local3){
_local6 = new BitmapData((_local5.width << 1), _local5.height, true, 0);
_local6.draw(_local5);
_local7 = new Matrix();
_local7.scale(-1, 1);
_local7.translate(_local6.width, 0);
_local6.draw(_local5, _local7);
_local5 = _local6;
};
return (_local5);
}
public static function getMuteValue():uint{
if (_mute){
return (0);
};
return (1);
}
public static function set mute(_arg1:Boolean):void{
_mute = _arg1;
changeSounds();
}
public static function play(_arg1:Class, _arg2:Number=1, _arg3:Boolean=false):FlxSound{
var _local4:uint;
var _local5:uint = sounds.length;
_local4 = 0;
while (_local4 < _local5) {
if (!sounds[_local4].active){
break;
};
_local4++;
};
if (sounds[_local4] == null){
sounds[_local4] = new FlxSound();
};
var _local6:FlxSound = sounds[_local4];
_local6.loadEmbedded(_arg1, _arg3);
_local6.volume = _arg2;
_local6.play();
return (_local6);
}
public static function getAngle(_arg1:Number, _arg2:Number):Number{
return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI));
}
public static function hideCursor():void{
if (_game._cursor == null){
return;
};
_game._buffer.removeChild(_game._cursor);
_game._cursor = null;
}
public static function set volume(_arg1:Number):void{
_volume = _arg1;
if (_volume < 0){
_volume = 0;
} else {
if (_volume > 1){
_volume = 1;
};
};
changeSounds();
}
static function setGameData(_arg1:FlxGame, _arg2:uint, _arg3:uint):void{
_game = _arg1;
_cache = new Object();
width = _arg2;
height = _arg3;
_mute = false;
_volume = 0.5;
sounds = new Array();
mouse = new FlxMouse();
keys = new FlxKeyboard();
unfollow();
FlxG.levels = new Array();
FlxG.scores = new Array();
level = 0;
score = 0;
seed = NaN;
kong = null;
pause = false;
}
public static function computeVelocity(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=10000):Number{
var _local5:Number;
if (_arg2 != 0){
_arg1 = (_arg1 + (_arg2 * FlxG.elapsed));
} else {
if (_arg3 != 0){
_local5 = (_arg3 * FlxG.elapsed);
if ((_arg1 - _local5) > 0){
_arg1 = (_arg1 - _local5);
} else {
if ((_arg1 + _local5) < 0){
_arg1 = (_arg1 + _local5);
} else {
_arg1 = 0;
};
};
};
};
if (((!((_arg1 == 0))) && (!((_arg4 == 10000))))){
if (_arg1 > _arg4){
_arg1 = _arg4;
} else {
if (_arg1 < -(_arg4)){
_arg1 = -(_arg4);
};
};
};
return (_arg1);
}
public static function mutate(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 + _arg2);
if (_arg1 > 1){
_arg1 = (_arg1 - int(_arg1));
};
return (_arg1);
}
public static function collideArraysX(_arg1:Array, _arg2:Array):void{
var _local3:uint;
var _local4:uint;
var _local5:FlxCore;
var _local6:FlxCore;
var _local7:uint = _arg1.length;
var _local8:uint = _arg2.length;
if (_arg1 === _arg2){
_local3 = 0;
while (_local3 < _local7) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = (_local3 + 1);
while (_local4 < _local8) {
_local6 = _arg2[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collideX(_local6);
};
_local4++;
};
};
_local3++;
};
} else {
_local3 = 0;
while (_local3 < _local7) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = 0;
while (_local4 < _local8) {
_local6 = _arg2[_local4];
if ((((((((_local5 === _local6)) || ((_local6 == null)))) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collideX(_local6);
};
_local4++;
};
};
_local3++;
};
};
}
public static function collideArraysY(_arg1:Array, _arg2:Array):void{
var _local3:uint;
var _local4:uint;
var _local5:FlxCore;
var _local6:FlxCore;
var _local7:uint = _arg1.length;
var _local8:uint = _arg2.length;
if (_arg1 === _arg2){
_local3 = 0;
while (_local3 < _local7) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = (_local3 + 1);
while (_local4 < _local8) {
_local6 = _arg2[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collideY(_local6);
};
_local4++;
};
};
_local3++;
};
} else {
_local3 = 0;
while (_local3 < _local7) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = 0;
while (_local4 < _local8) {
_local6 = _arg2[_local4];
if ((((((((_local5 === _local6)) || ((_local6 == null)))) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collideY(_local6);
};
_local4++;
};
};
_local3++;
};
};
}
public static function createBitmap(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean):BitmapData{
var _local7:uint;
var _local8:String;
var _local5:String = ((((_arg1 + "x") + _arg2) + ":") + _arg3);
var _local6:Boolean;
if (((((_arg4) && (!((_cache[_local8] == undefined))))) && (!((_cache[_local8] == null))))){
_local7 = 0;
do {
var _temp1 = _local7;
_local7 = (_local7 + 1);
_local8 = (_local5 + _temp1);
} while (((!((_cache[_local8] == undefined))) && (!((_cache[_local8] == null)))));
_local5 = _local8;
};
_cache[_local5] = new BitmapData(_arg1, _arg2, true, _arg3);
return (_cache[_local5]);
}
public static function playMusic(_arg1:Class, _arg2:Number=1):void{
if (music == null){
music = new FlxSound();
} else {
if (music.active){
music.stop();
};
};
music.loadEmbedded(_arg1, true);
music.volume = _arg2;
music.survive = true;
music.play();
}
public static function overlapArray(_arg1:Array, _arg2:FlxCore, _arg3:Function=null):void{
var _local4:FlxCore;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local5:uint = _arg1.length;
var _local6:uint;
while (_local6 < _local5) {
_local4 = _arg1[_local6];
if ((((((((_local4 === _arg2)) || ((_local4 == null)))) || (!(_local4.exists)))) || (_local4.dead))){
} else {
if (_local4.overlaps(_arg2)){
if (_arg3 != null){
_arg3(_local4, _arg2);
} else {
_local4.kill();
_arg2.kill();
};
};
};
_local6++;
};
}
public static function log(_arg1:Object):void{
_game._console.log(_arg1.toString());
}
public static function overlapArrays(_arg1:Array, _arg2:Array, _arg3:Function=null):void{
var _local4:uint;
var _local5:uint;
var _local6:FlxCore;
var _local7:FlxCore;
var _local8:uint = _arg1.length;
var _local9:uint = _arg2.length;
if (_arg1 === _arg2){
_local4 = 0;
while (_local4 < _local8) {
_local6 = _arg1[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5 = (_local4 + 1);
while (_local5 < _local9) {
_local7 = _arg2[_local5];
if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){
} else {
if (_local6.overlaps(_local7)){
if (_arg3 != null){
_arg3(_local6, _local7);
} else {
_local6.kill();
_local7.kill();
};
};
};
_local5++;
};
};
_local4++;
};
} else {
_local4 = 0;
while (_local4 < _arg1.length) {
_local6 = _arg1[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5 = 0;
while (_local5 < _arg2.length) {
_local7 = _arg2[_local5];
if ((((((((_local6 === _local7)) || ((_local7 == null)))) || (!(_local7.exists)))) || (_local7.dead))){
} else {
if (_local6.overlaps(_local7)){
if (_arg3 != null){
_arg3(_local6, _local7);
} else {
_local6.kill();
_local7.kill();
};
};
};
_local5++;
};
};
_local4++;
};
};
}
static function updateSounds():void{
if (((!((music == null))) && (music.active))){
music.update();
};
var _local1:uint = sounds.length;
var _local2:uint;
while (_local2 < _local1) {
if (sounds[_local2].active){
sounds[_local2].update();
};
_local2++;
};
}
public static function get seed():Number{
return (_originalSeed);
}
static function updateInput():void{
keys.update();
mouse.update((state.mouseX - scroll.x), (state.mouseY - scroll.y));
}
public static function stream(_arg1:String, _arg2:Number=1, _arg3:Boolean=false):FlxSound{
var _local4:uint;
var _local5:uint = sounds.length;
_local4 = 0;
while (_local4 < _local5) {
if (!sounds[_local4].active){
break;
};
_local4++;
};
if (sounds[_local4] == null){
sounds[_local4] = new FlxSound();
};
var _local6:FlxSound = sounds[_local4];
_local6.loadStream(_arg1, _arg3);
_local6.volume = _arg2;
_local6.play();
return (_local6);
}
static function unfollow():void{
followTarget = null;
followLead = null;
followLerp = 1;
followMin = null;
followMax = null;
scroll = new Point();
_scrollTarget = new Point();
}
public static function fade(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
_game._fade.restart(_arg1, _arg2, _arg3, _arg4);
}
protected static function playSounds():void{
if (((!((music == null))) && (music.active))){
music.play();
};
var _local1:uint = sounds.length;
var _local2:uint;
while (_local2 < _local1) {
if (sounds[_local2].active){
sounds[_local2].play();
};
_local2++;
};
}
public static function followAdjust(_arg1:Number=0, _arg2:Number=0):void{
followLead = new Point(_arg1, _arg2);
}
public static function follow(_arg1:FlxCore, _arg2:Number=1):void{
followTarget = _arg1;
followLerp = _arg2;
scroll.x = (_scrollTarget.x = (((width >> 1) - followTarget.x) - (followTarget.width >> 1)));
scroll.y = (_scrollTarget.y = (((height >> 1) - followTarget.y) - (followTarget.height >> 1)));
doFollow();
}
public static function showCursor(_arg1:Class=null):void{
if (_arg1 == null){
_game._cursor = (_game._buffer.addChild(new ImgDefaultCursor()) as Bitmap);
} else {
_game._cursor = (_game._buffer.addChild(new (_arg1)) as Bitmap);
};
}
public static function randomize(_arg1:Number):Number{
return ((((69621 * int((_arg1 * 2147483647))) % 2147483647) / 2147483647));
}
public static function getRandom(_arg1:Array):Object{
return (_arg1[int((FlxG.random() * _arg1.length))]);
}
public static function resetInput():void{
keys.reset();
mouse.reset();
}
public static function switchState(_arg1:Class):void{
_game.switchState(_arg1);
}
public static function getNonexist(_arg1:Array):FlxCore{
var _local2:uint = _arg1.length;
if (_local2 <= 0){
return (null);
};
var _local3:uint;
do {
if (!_arg1[_local3].exists){
return (_arg1[_local3]);
};
++_local3;
} while (_local3 < _local2);
return (null);
}
public static function random(_arg1:Boolean=true):Number{
var _local2:Number;
if (((_arg1) && (!(isNaN(_seed))))){
_local2 = randomize(_seed);
_seed = mutate(_seed, _local2);
return (_local2);
};
return (Math.random());
}
public static function openURL(_arg1:String):void{
navigateToURL(new URLRequest(_arg1), "_blank");
}
public static function collideArray(_arg1:Array, _arg2:FlxCore):void{
var _local3:FlxCore;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local4:uint = _arg1.length;
var _local5:uint;
while (_local5 < _local4) {
_local3 = _arg1[_local5];
if ((((((((_local3 === _arg2)) || ((_local3 == null)))) || (!(_local3.exists)))) || (_local3.dead))){
} else {
_local3.collide(_arg2);
};
_local5++;
};
}
public static function followBounds(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0):void{
followMin = new Point(-(_arg1), -(_arg2));
followMax = new Point((-(_arg3) + width), (-(_arg4) + height));
if (followMax.x > followMin.x){
followMax.x = followMin.x;
};
if (followMax.y > followMin.y){
followMax.y = followMin.y;
};
doFollow();
}
public static function quake(_arg1:Number, _arg2:Number=0.5):void{
_game._quake.reset(_arg1, _arg2);
}
protected static function pauseSounds():void{
if (((!((music == null))) && (music.active))){
music.pause();
};
var _local1:uint = sounds.length;
var _local2:uint;
while (_local2 < _local1) {
if (sounds[_local2].active){
sounds[_local2].pause();
};
_local2++;
};
}
public static function set seed(_arg1:Number):void{
_seed = _arg1;
_originalSeed = _seed;
}
static function destroySounds(_arg1:Boolean=false):void{
if (sounds == null){
return;
};
if (((!((music == null))) && (((_arg1) || (!(music.survive)))))){
music.destroy();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
if (((_arg1) || (!(sounds[_local3].survive)))){
sounds[_local3].destroy();
};
_local3++;
};
}
public static function set pause(_arg1:Boolean):void{
var _local2:Boolean = _pause;
_pause = _arg1;
if (_pause != _local2){
if (_pause){
_game.pauseGame();
pauseSounds();
} else {
_game.unpauseGame();
playSounds();
};
};
}
public static function hideSupportPanel():void{
_game._panel.hide();
}
public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Point{
var _local6:Number = ((-(_arg5) / 180) * Math.PI);
var _local7:Number = (_arg1 - _arg3);
var _local8:Number = (_arg4 - _arg2);
return (new Point(((_arg3 + (Math.cos(_local6) * _local7)) - (Math.sin(_local6) * _local8)), (_arg4 - ((Math.sin(_local6) * _local7) + (Math.cos(_local6) * _local8)))));
}
public static function get pause():Boolean{
return (_pause);
}
public static function collideArrayX(_arg1:Array, _arg2:FlxCore):void{
var _local3:FlxCore;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local4:uint = _arg1.length;
var _local5:uint;
while (_local5 < _local4) {
_local3 = _arg1[_local5];
if ((((((((_local3 === _arg2)) || ((_local3 == null)))) || (!(_local3.exists)))) || (_local3.dead))){
} else {
_local3.collideX(_arg2);
};
_local5++;
};
}
public static function collideArrayY(_arg1:Array, _arg2:FlxCore):void{
var _local3:FlxCore;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local4:uint = _arg1.length;
var _local5:uint;
while (_local5 < _local4) {
_local3 = _arg1[_local5];
if ((((((((_local3 === _arg2)) || ((_local3 == null)))) || (!(_local3.exists)))) || (_local3.dead))){
} else {
_local3.collideY(_arg2);
};
_local5++;
};
}
}
}//package org.flixel
Section 137
//FlxG_ImgDefaultCursor (org.flixel.FlxG_ImgDefaultCursor)
package org.flixel {
import mx.core.*;
public class FlxG_ImgDefaultCursor extends BitmapAsset {
}
}//package org.flixel
Section 138
//FlxGame (org.flixel.FlxGame)
package org.flixel {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import org.flixel.data.*;
import flash.utils.*;
import flash.ui.*;
public class FlxGame extends Sprite {
const MAX_ELAPSED:Number = 0.0333;
var _bmpFront:Bitmap;
protected var SndFlixel:Class;
var _logoTimer:Number;
var _curState:FlxState;
var _panel:FlxPanel;
var _console:FlxConsole;
protected var SndBeep:Class;
var _logoFade:Bitmap;
var _created:Boolean;
var _zoom:uint;
var _gameXOffset:int;
var _elapsed:Number;
var _flipped:Boolean;
var _total:uint;
var _soundTrayBars:Array;
protected var useDefaultHotKeys:Boolean;
protected var junk:String;// = "FlxGame_junk"
var _helpStrings:Array;
var _bmpBack:Bitmap;
var _iState:Class;
protected var showLogo:Boolean;
var _paused:Boolean;
var _quake:FlxQuake;
var _gameYOffset:int;
var _buffer:Sprite;
var _f:Array;
var _fSound:Class;
var _fc:uint;
var _soundTray:Sprite;
var _frame:Class;
var _flash:FlxFlash;
var _logoComplete:Boolean;
var _r:Rectangle;
var _poweredBy:Bitmap;
var _cursor:Bitmap;
protected var pause:FlxLayer;
protected var ImgPoweredBy:Class;
var _fade:FlxFade;
var _soundTrayTimer:Number;
public function FlxGame(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=2){
ImgPoweredBy = FlxGame_ImgPoweredBy;
SndBeep = FlxGame_SndBeep;
SndFlixel = FlxGame_SndFlixel;
super();
Mouse.hide();
_zoom = _arg4;
FlxState.bgColor = 4278190080;
FlxG.setGameData(this, _arg1, _arg2);
_elapsed = 0;
_total = 0;
pause = new FlxPause();
_quake = new FlxQuake(_zoom);
_flash = new FlxFlash();
_fade = new FlxFade();
_curState = null;
_iState = _arg3;
_helpStrings = new Array();
_helpStrings.push("Button 1");
_helpStrings.push("Button 2");
_helpStrings.push("Mouse");
_helpStrings.push("Move");
_panel = new FlxPanel();
useDefaultHotKeys = true;
showLogo = true;
_f = null;
_fc = 4294967295;
_fSound = SndFlixel;
_frame = null;
_gameXOffset = 0;
_gameYOffset = 0;
_paused = false;
_created = false;
_logoComplete = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
function unpauseGame():void{
if (!_panel.visible){
Mouse.hide();
};
FlxG.resetInput();
_paused = false;
stage.frameRate = 90;
}
protected function setupSupportPanel(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:String):void{
_panel.init(_arg1, _arg2, _arg3, _arg4, _arg5);
}
protected function onFocusLost(_arg1:Event=null):void{
if (_logoComplete){
FlxG.pause = true;
};
}
function pauseGame():void{
if (((!((x == 0))) || (!((y == 0))))){
x = 0;
y = 0;
};
if (!_flipped){
_bmpBack.bitmapData.copyPixels(_bmpFront.bitmapData, _r, new Point(0, 0));
} else {
_bmpFront.bitmapData.copyPixels(_bmpBack.bitmapData, _r, new Point(0, 0));
};
Mouse.show();
_paused = true;
stage.frameRate = 10;
}
protected function onFocus(_arg1:Event=null):void{
if (FlxG.pause){
FlxG.pause = false;
};
}
protected function onKeyUp(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:String;
if (_arg1.keyCode == 192){
_console.toggle();
return;
};
if (useDefaultHotKeys){
_local2 = _arg1.keyCode;
_local3 = String.fromCharCode(_arg1.charCode);
switch (_local2){
case 48:
FlxG.mute = !(FlxG.mute);
showSoundTray();
return;
case 189:
FlxG.mute = false;
FlxG.volume = (FlxG.volume - 0.1);
showSoundTray();
return;
case 187:
FlxG.mute = false;
FlxG.volume = (FlxG.volume + 0.1);
showSoundTray();
return;
case 80:
FlxG.pause = !(FlxG.pause);
default:
break;
};
};
FlxG.keys.handleKeyUp(_arg1);
}
protected function help(_arg1:String=null, _arg2:String=null, _arg3:String=null, _arg4:String=null):void{
if (_arg1 != null){
_helpStrings[0] = _arg1;
};
if (_arg2 != null){
_helpStrings[1] = _arg2;
};
if (_arg3 != null){
_helpStrings[2] = _arg3;
};
if (_arg4 != null){
_helpStrings[3] = _arg4;
};
}
function switchState(_arg1:Class):void{
_panel.hide();
FlxG.unfollow();
FlxG.keys.reset();
FlxG.mouse.reset();
FlxG.hideCursor();
FlxG.destroySounds();
_flash.restart(0, 0);
_fade.restart(0, 0);
_quake.reset(0);
_buffer.x = 0;
_buffer.y = 0;
var _local2:FlxState = new (_arg1);
_buffer.addChild(_local2);
if (_curState != null){
_buffer.swapChildren(_local2, _curState);
_buffer.removeChild(_curState);
_curState.destroy();
};
_curState = _local2;
}
protected function onKeyDown(_arg1:KeyboardEvent):void{
FlxG.keys.handleKeyDown(_arg1);
}
protected function onEnterFrame(_arg1:Event):void{
var _local2:uint;
var _local4:Bitmap;
var _local5:uint;
var _local6:uint;
var _local7:int;
var _local8:int;
var _local9:ColorTransform;
var _local10:String;
var _local11:String;
var _local12:TextField;
var _local13:uint;
var _local14:uint;
var _local15:Bitmap;
var _local3:uint = getTimer();
_elapsed = ((_local3 - _total) / 1000);
_total = _local3;
FlxG.elapsed = _elapsed;
if (FlxG.elapsed > MAX_ELAPSED){
FlxG.elapsed = MAX_ELAPSED;
};
if (_logoComplete){
_panel.update();
_console.update();
if (_soundTrayTimer > 0){
_soundTrayTimer = (_soundTrayTimer - _elapsed);
} else {
if (_soundTray.y > -(_soundTray.height)){
_soundTray.y = (_soundTray.y - ((_elapsed * FlxG.height) * 2));
if (_soundTray.y < -(_soundTray.height)){
_soundTray.visible = false;
};
};
};
FlxG.updateInput();
if (_cursor != null){
_cursor.x = (FlxG.mouse.x + FlxG.scroll.x);
_cursor.y = (FlxG.mouse.y + FlxG.scroll.y);
};
FlxG.updateSounds();
if (_paused){
pause.update();
if (_flipped){
FlxG.buffer.copyPixels(_bmpFront.bitmapData, _r, new Point(0, 0));
} else {
FlxG.buffer.copyPixels(_bmpBack.bitmapData, _r, new Point(0, 0));
};
pause.render();
} else {
if (_flipped){
FlxG.buffer = _bmpFront.bitmapData;
} else {
FlxG.buffer = _bmpBack.bitmapData;
};
FlxState.screen.unsafeBind(FlxG.buffer);
_curState.preProcess();
FlxG.doFollow();
_curState.update();
_flash.update();
_fade.update();
_quake.update();
_buffer.x = _quake.x;
_buffer.y = _quake.y;
_curState.render();
_flash.render();
_fade.render();
_panel.render();
_curState.postProcess();
_bmpBack.visible = !((_bmpFront.visible = _flipped));
_flipped = !(_flipped);
};
} else {
if (_created){
if (!showLogo){
_logoComplete = true;
FlxG.switchState(_iState);
} else {
if (_f == null){
_f = new Array();
_local5 = 1;
if (FlxG.height > 200){
_local5 = 2;
};
_local6 = (32 * _local5);
_local7 = (((FlxG.height * _zoom) / 2) - (_local6 * 2));
_local8 = (((FlxG.width * _zoom) / 2) - _local6);
_f.push((addChild(new FlxLogoPixel((_local8 + _local6), _local7, _local6, 0, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local8, (_local7 + _local6), _local6, 1, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local8, (_local7 + (_local6 * 2)), _local6, 2, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel((_local8 + _local6), (_local7 + (_local6 * 2)), _local6, 3, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local8, (_local7 + (_local6 * 3)), _local6, 4, _fc)) as FlxLogoPixel));
_poweredBy = new ImgPoweredBy();
_poweredBy.scaleX = _local5;
_poweredBy.scaleY = _local5;
_poweredBy.x = (((FlxG.width * _zoom) / 2) - (_poweredBy.width / 2));
_poweredBy.y = ((_local7 + (_local6 * 4)) + 16);
_local9 = new ColorTransform();
_local9.color = _fc;
_poweredBy.bitmapData.colorTransform(new Rectangle(0, 0, _poweredBy.width, _poweredBy.height), _local9);
addChild(_poweredBy);
_logoFade = (addChild(new Bitmap(new BitmapData((FlxG.width * _zoom), (FlxG.height * _zoom), true, 4278190080))) as Bitmap);
_logoFade.x = (_gameXOffset * _zoom);
_logoFade.y = (_gameYOffset * _zoom);
if (_fSound != null){
FlxG.play(_fSound, 0.35);
};
};
_logoTimer = (_logoTimer + _elapsed);
_local2 = 0;
while (_local2 < _f.length) {
_f[_local2].update();
_local2++;
};
if (_logoFade.alpha > 0){
_logoFade.alpha = (_logoFade.alpha - (_elapsed * 0.5));
};
if (_logoTimer > 2){
removeChild(_poweredBy);
_local2 = 0;
while (_local2 < _f.length) {
removeChild(_f[_local2]);
_local2++;
};
_f.length = 0;
removeChild(_logoFade);
FlxG.switchState(_iState);
_logoComplete = true;
};
};
} else {
if (root != null){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = 90;
_buffer = new Sprite();
_buffer.scaleX = _zoom;
_buffer.scaleY = _zoom;
addChild(_buffer);
_bmpBack = new Bitmap(new BitmapData(FlxG.width, FlxG.height, true, FlxState.bgColor));
_bmpBack.x = _gameXOffset;
_bmpBack.y = _gameYOffset;
_buffer.addChild(_bmpBack);
_bmpFront = new Bitmap(new BitmapData(_bmpBack.width, _bmpBack.height, true, FlxState.bgColor));
_bmpFront.x = _bmpBack.x;
_bmpFront.y = _bmpBack.y;
_buffer.addChild(_bmpFront);
_flipped = false;
_r = new Rectangle(0, 0, _bmpFront.width, _bmpFront.height);
_console = new FlxConsole(_gameXOffset, _gameYOffset, _zoom);
addChild(_console);
_local10 = ((((FlxG.LIBRARY_NAME + " v") + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION);
if (FlxG.debug){
_local10 = (_local10 + " [debug]");
} else {
_local10 = (_local10 + " [release]");
};
_local11 = "";
_local2 = 0;
while (_local2 < (_local10.length + 32)) {
_local11 = (_local11 + "-");
_local2++;
};
FlxG.log(_local10);
FlxG.log(_local11);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
stage.addEventListener(Event.DEACTIVATE, onFocusLost);
stage.addEventListener(Event.ACTIVATE, onFocus);
_soundTray = new Sprite();
_soundTray.visible = false;
_soundTray.scaleX = 2;
_soundTray.scaleY = 2;
_local4 = new Bitmap(new BitmapData(80, 30, true, 2130706432));
_soundTray.x = (((_gameXOffset + (FlxG.width / 2)) * _zoom) - ((_local4.width / 2) * _soundTray.scaleX));
_soundTray.addChild(_local4);
_local12 = new TextField();
_local12.width = _local4.width;
_local12.height = _local4.height;
_local12.multiline = true;
_local12.wordWrap = true;
_local12.selectable = false;
_local12.embedFonts = true;
_local12.antiAliasType = AntiAliasType.NORMAL;
_local12.gridFitType = GridFitType.PIXEL;
_local12.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center");
_soundTray.addChild(_local12);
_local12.text = "VOLUME";
_local12.y = 16;
_local13 = 10;
_local14 = 14;
_soundTrayBars = new Array();
_local2 = 0;
while (_local2 < 10) {
_local4 = new Bitmap(new BitmapData(4, (_local2 + 1), false, 0xFFFFFF));
_local4.x = _local13;
_local4.y = _local14;
_soundTrayBars.push(_soundTray.addChild(_local4));
_local13 = (_local13 + 6);
_local14--;
_local2++;
};
addChild(_soundTray);
if (_frame != null){
_local15 = new _frame();
_local15.scaleX = _zoom;
_local15.scaleY = _zoom;
addChild(_local15);
};
_created = true;
_logoTimer = 0;
};
};
};
}
protected function setLogoFX(_arg1:Number, _arg2:Class=null):FlxGame{
_fc = _arg1;
if (_arg2 != null){
_fSound = _arg2;
};
return (this);
}
protected function onMouseUp(_arg1:MouseEvent):void{
FlxG.mouse.handleMouseUp(_arg1);
}
protected function onMouseDown(_arg1:MouseEvent):void{
FlxG.mouse.handleMouseDown(_arg1);
}
public function showSoundTray():void{
FlxG.play(SndBeep);
_soundTrayTimer = 1;
_soundTray.y = (_gameYOffset * _zoom);
_soundTray.visible = true;
var _local1:uint = Math.round((FlxG.volume * 10));
if (FlxG.mute){
_local1 = 0;
};
var _local2:uint;
while (_local2 < _soundTrayBars.length) {
if (_local2 < _local1){
_soundTrayBars[_local2].alpha = 1;
} else {
_soundTrayBars[_local2].alpha = 0.5;
};
_local2++;
};
}
protected function addFrame(_arg1:Class, _arg2:uint, _arg3:uint):FlxGame{
_frame = _arg1;
_gameXOffset = _arg2;
_gameYOffset = _arg3;
return (this);
}
}
}//package org.flixel
Section 139
//FlxGame_ImgPoweredBy (org.flixel.FlxGame_ImgPoweredBy)
package org.flixel {
import mx.core.*;
public class FlxGame_ImgPoweredBy extends BitmapAsset {
}
}//package org.flixel
Section 140
//FlxGame_junk (org.flixel.FlxGame_junk)
package org.flixel {
import mx.core.*;
public class FlxGame_junk extends FontAsset {
}
}//package org.flixel
Section 141
//FlxGame_SndBeep (org.flixel.FlxGame_SndBeep)
package org.flixel {
import mx.core.*;
public class FlxGame_SndBeep extends SoundAsset {
}
}//package org.flixel
Section 142
//FlxGame_SndFlixel (org.flixel.FlxGame_SndFlixel)
package org.flixel {
import mx.core.*;
public class FlxGame_SndFlixel extends SoundAsset {
}
}//package org.flixel
Section 143
//FlxLayer (org.flixel.FlxLayer)
package org.flixel {
public class FlxLayer extends FlxCore {
protected var _children:Array;
public function FlxLayer(){
_children = new Array();
}
public function add(_arg1:FlxCore, _arg2:Boolean=false):FlxCore{
_children.push(_arg1);
_arg1.x = (_arg1.x + x);
_arg1.y = (_arg1.y + y);
if (_arg2){
_arg1.scrollFactor = scrollFactor;
};
return (_arg1);
}
override public function render():void{
super.render();
var _local1:uint = _children.length;
var _local2:uint;
while (_local2 < _local1) {
if (((((!((_children[_local2] == null))) && (_children[_local2].exists))) && (_children[_local2].visible))){
_children[_local2].render();
};
_local2++;
};
}
override public function update():void{
var _local1:Number;
var _local2:Number;
super.update();
var _local3:Boolean;
if (((!((x == last.x))) || (!((y == last.y))))){
_local3 = true;
_local1 = (x - last.x);
_local2 = (y - last.y);
};
var _local4:uint = _children.length;
var _local5:uint;
while (_local5 < _local4) {
if (((!((_children[_local5] == null))) && (_children[_local5].exists))){
if (_local3){
_children[_local5].x = (_children[_local5].x + _local1);
_children[_local5].y = (_children[_local5].y + _local2);
};
if (_children[_local5].active){
_children[_local5].update();
};
};
_local5++;
};
}
override public function destroy():void{
super.destroy();
var _local1:uint = _children.length;
var _local2:uint;
while (_local2 < _local1) {
_children[_local2].destroy();
_local2++;
};
_children.length = 0;
}
public function children():Array{
return (_children);
}
}
}//package org.flixel
Section 144
//FlxSave (org.flixel.FlxSave)
package org.flixel {
import flash.net.*;
public class FlxSave {
protected var _so:SharedObject;
public var data:Object;
public var name:String;
public function FlxSave(_arg1:String){
name = _arg1;
_so = SharedObject.getLocal(name, "/");
data = _so.data;
}
public function read(_arg1:String):Object{
return (data[_arg1]);
}
public function forceSave():void{
_so.flush();
}
public function erase():void{
_so.clear();
forceSave();
}
public function write(_arg1:String, _arg2:Object):void{
data[_arg1] = _arg2;
forceSave();
}
}
}//package org.flixel
Section 145
//FlxSound (org.flixel.FlxSound)
package org.flixel {
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
public class FlxSound extends FlxCore {
protected var _volume:Number;
protected var _channel:SoundChannel;
protected var _fadeInTimer:Number;
protected var _position:Number;
protected var _sound:Sound;
protected var _fadeOutTotal:Number;
protected var _fadeOutTimer:Number;
protected var _fadeInTotal:Number;
protected var _pauseOnFadeOut:Boolean;
protected var _pan:Boolean;
protected var _looped:Boolean;
protected var _volumeAdjust:Number;
protected var _transform:SoundTransform;
protected var _init:Boolean;
protected var _radius:Number;
public var survive:Boolean;
protected var _core:FlxCore;
public function FlxSound(){
_transform = new SoundTransform();
init();
}
public function fadeOut(_arg1:Number, _arg2:Boolean=false):void{
_pauseOnFadeOut = _arg2;
_fadeInTimer = 0;
_fadeOutTimer = _arg1;
_fadeOutTotal = _fadeOutTimer;
}
public function stop():void{
_position = 0;
if (_channel != null){
_channel.stop();
stopped();
};
}
public function loadStream(_arg1:String, _arg2:Boolean=false):FlxSound{
stop();
init();
_sound = new Sound(new URLRequest(_arg1));
_looped = _arg2;
updateTransform();
active = true;
return (this);
}
public function loadEmbedded(_arg1:Class, _arg2:Boolean=false):FlxSound{
stop();
init();
_sound = new (_arg1);
_looped = _arg2;
updateTransform();
active = true;
return (this);
}
protected function stopped(_arg1:Event=null):void{
if (!_looped){
_channel.removeEventListener(Event.SOUND_COMPLETE, stopped);
} else {
_channel.removeEventListener(Event.SOUND_COMPLETE, looped);
};
_channel = null;
active = false;
}
override public function update():void{
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_position != 0){
return;
};
super.update();
var _local1:Number = 1;
var _local2:Number = 1;
if (_core != null){
_local3 = new Point();
_local4 = new Point();
_core.getScreenXY(_local3);
getScreenXY(_local4);
_local5 = (_local3.x - _local4.x);
_local6 = (_local3.y - _local4.y);
_local1 = ((_radius - Math.sqrt(((_local5 * _local5) + (_local6 * _local6)))) / _radius);
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
if (_pan){
_local7 = (-(_local5) / _radius);
if (_local7 < -1){
_local7 = -1;
} else {
if (_local7 > 1){
_local7 = 1;
};
};
_transform.pan = _local7;
};
};
if (_fadeOutTimer > 0){
_fadeOutTimer = (_fadeOutTimer - FlxG.elapsed);
if (_fadeOutTimer <= 0){
if (_pauseOnFadeOut){
pause();
} else {
stop();
};
};
_local2 = (_fadeOutTimer / _fadeOutTotal);
if (_local2 < 0){
_local2 = 0;
};
} else {
if (_fadeInTimer > 0){
_fadeInTimer = (_fadeInTimer - FlxG.elapsed);
_local2 = (_fadeInTimer / _fadeOutTotal);
if (_local2 < 0){
_local2 = 0;
};
_local2 = (1 - _local2);
};
};
_volumeAdjust = (_local1 * _local2);
updateTransform();
}
public function fadeIn(_arg1:Number):void{
_fadeOutTimer = 0;
_fadeInTimer = _arg1;
_fadeInTotal = _fadeInTimer;
play();
}
protected function looped(_arg1:Event=null):void{
if (_channel == null){
return;
};
_channel.removeEventListener(Event.SOUND_COMPLETE, looped);
_channel = null;
play();
}
public function get volume():Number{
return (_volume);
}
function updateTransform():void{
_transform.volume = (((FlxG.getMuteValue() * FlxG.volume) * _volume) * _volumeAdjust);
if (_channel != null){
_channel.soundTransform = _transform;
};
}
override public function destroy():void{
if (active){
stop();
};
}
public function play():void{
if (_position < 0){
return;
};
if (_looped){
if (_position == 0){
if (_channel == null){
_channel = _sound.play(0, 9999, _transform);
};
} else {
_channel = _sound.play(_position, 0, _transform);
_channel.addEventListener(Event.SOUND_COMPLETE, looped);
};
} else {
if (_position == 0){
if (_channel == null){
_channel = _sound.play(0, 0, _transform);
_channel.addEventListener(Event.SOUND_COMPLETE, stopped);
};
} else {
_channel = _sound.play(_position, 0, _transform);
};
};
_position = 0;
}
public function pause():void{
if (_channel == null){
_position = -1;
return;
};
_position = _channel.position;
_channel.stop();
if (_looped){
while (_position >= _sound.length) {
_position = (_position - _sound.length);
};
};
_channel = null;
}
public function set volume(_arg1:Number):void{
_volume = _arg1;
if (_volume < 0){
_volume = 0;
} else {
if (_volume > 1){
_volume = 1;
};
};
updateTransform();
}
protected function init():void{
_transform.pan = 0;
_sound = null;
_position = 0;
_volume = 1;
_volumeAdjust = 1;
_looped = false;
_core = null;
_radius = 0;
_pan = false;
_fadeOutTimer = 0;
_fadeOutTotal = 0;
_pauseOnFadeOut = false;
_fadeInTimer = 0;
_fadeInTotal = 0;
active = false;
visible = false;
dead = true;
}
public function proximity(_arg1:Number, _arg2:Number, _arg3:FlxCore, _arg4:Number, _arg5:Boolean=true):FlxSound{
x = _arg1;
y = _arg2;
_core = _arg3;
_radius = _arg4;
_pan = _arg5;
return (this);
}
}
}//package org.flixel
Section 146
//FlxSprite (org.flixel.FlxSprite)
package org.flixel {
import flash.display.*;
import flash.geom.*;
import org.flixel.data.*;
public class FlxSprite extends FlxCore {
protected var _facing:uint;
protected var _caf:uint;
protected var _animations:Array;
protected var _ct:ColorTransform;
public var origin:Point;
protected var _curAnim:FlxAnim;
public var drag:Point;
public var angularDrag:Number;
protected var _flipped:uint;
public var scale:Point;
public var blend:String;
public var thrust:Number;
public var health:Number;
protected var _alpha:Number;
public var maxVelocity:Point;
protected var _color:uint;
protected var _curFrame:uint;
public var finished:Boolean;
protected var _frameTimer:Number;
public var acceleration:Point;
public var angularAcceleration:Number;
public var offset:Point;
protected var _r2:Rectangle;
protected var _callback:Function;
protected var _framePixels:BitmapData;
protected var _pixels:BitmapData;
public var angle:Number;
public var maxThrust:Number;
public var velocity:Point;
public var maxAngular:Number;
public var angularVelocity:Number;
protected var _bh:uint;
protected var _p:Point;
public var antialiasing:Boolean;
protected var _mtx:Matrix;
protected var _r:Rectangle;
protected var _bw:uint;
protected static const _pZero:Point = new Point();
public static const LEFT:uint = 0;
public static const DOWN:uint = 3;
public static const UP:uint = 2;
public static const RIGHT:uint = 1;
public function FlxSprite(_arg1:int=0, _arg2:int=0, _arg3:Class=null){
last.x = (x = _arg1);
last.y = (y = _arg2);
_p = new Point();
_r = new Rectangle();
_r2 = new Rectangle();
origin = new Point();
if (_arg3 == null){
createGraphic(8, 8);
} else {
loadGraphic(_arg3);
};
offset = new Point();
velocity = new Point();
acceleration = new Point();
drag = new Point();
maxVelocity = new Point(10000, 10000);
angle = 0;
angularVelocity = 0;
angularAcceleration = 0;
angularDrag = 0;
maxAngular = 10000;
thrust = 0;
scale = new Point(1, 1);
_alpha = 1;
_color = 0xFFFFFF;
blend = null;
antialiasing = false;
finished = false;
_facing = RIGHT;
_animations = new Array();
_flipped = 0;
_curAnim = null;
_curFrame = 0;
_caf = 0;
_frameTimer = 0;
_mtx = new Matrix();
health = 1;
_callback = null;
}
function unsafeBind(_arg1:BitmapData):void{
_pixels = (_framePixels = _arg1);
}
public function hurt(_arg1:Number):void{
if ((health = (health - _arg1)) <= 0){
kill();
};
}
protected function calcFrame():void{
var _local1:uint = (_caf * _bw);
var _local2:uint;
var _local3:uint = (_flipped) ? _flipped : _pixels.width;
if (_local1 >= _local3){
_local2 = (uint((_local1 / _local3)) * _bh);
_local1 = (_local1 % _local3);
};
if (((_flipped) && ((_facing == LEFT)))){
_local1 = (((_flipped << 1) - _local1) - _bw);
};
_r.x = _local1;
_r.y = _local2;
_framePixels.copyPixels(_pixels, _r, _pZero);
_r.x = (_r.y = 0);
if (_ct != null){
_framePixels.colorTransform(_r, _ct);
};
if (_callback != null){
_callback(_curAnim.name, _curFrame, _caf);
};
}
public function loadGraphic(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:Boolean=false):FlxSprite{
_pixels = FlxG.addBitmap(_arg1, _arg3);
if (_arg3){
_flipped = (_pixels.width >> 1);
} else {
_flipped = 0;
};
if (_arg4 == 0){
if (_arg2){
_arg4 = _pixels.height;
} else {
_arg4 = _pixels.width;
};
};
width = (_bw = _arg4);
if (_arg5 == 0){
if (_arg2){
_arg5 = width;
} else {
_arg5 = _pixels.height;
};
};
height = (_bh = _arg5);
resetHelpers();
return (this);
}
override public function hitFloor(_arg1:FlxCore=null):Boolean{
velocity.y = 0;
return (true);
}
public function play(_arg1:String, _arg2:Boolean=false):void{
if (((((!(_arg2)) && (!((_curAnim == null))))) && ((_arg1 == _curAnim.name)))){
return;
};
_curFrame = 0;
_caf = 0;
_frameTimer = 0;
var _local3:uint = _animations.length;
var _local4:uint;
while (_local4 < _local3) {
if (_animations[_local4].name == _arg1){
finished = false;
_curAnim = _animations[_local4];
_caf = _curAnim.frames[_curFrame];
calcFrame();
return;
};
_local4++;
};
}
protected function resetHelpers():void{
_r.x = 0;
_r.y = 0;
_r.width = _bw;
_r.height = _bh;
_r2.x = 0;
_r2.y = 0;
_r2.width = _pixels.width;
_r2.height = _pixels.height;
if ((((((_framePixels == null)) || (!((_framePixels.width == width))))) || (!((_framePixels.height == height))))){
_framePixels = new BitmapData(width, height);
};
origin.x = (_bw / 2);
origin.y = (_bh / 2);
_framePixels.copyPixels(_pixels, _r, _pZero);
}
public function draw(_arg1:FlxSprite, _arg2:int=0, _arg3:int=0):void{
var _local4:BitmapData = _arg1._framePixels;
if ((((((((_arg1.angle == 0)) && ((_arg1.scale.x == 1)))) && ((_arg1.scale.y == 1)))) && ((_arg1.blend == null)))){
_p.x = _arg2;
_p.y = _arg3;
_r2.width = _local4.width;
_r2.height = _local4.height;
_pixels.copyPixels(_local4, _r2, _p, null, null, true);
_r2.width = _pixels.width;
_r2.height = _pixels.height;
calcFrame();
return;
};
_mtx.identity();
_mtx.translate(-(_arg1.origin.x), -(_arg1.origin.y));
_mtx.scale(_arg1.scale.x, _arg1.scale.y);
if (_arg1.angle != 0){
_mtx.rotate(((Math.PI * 2) * (_arg1.angle / 360)));
};
_mtx.translate((_arg2 + _arg1.origin.x), (_arg3 + _arg1.origin.y));
_pixels.draw(_local4, _mtx, null, _arg1.blend, null, _arg1.antialiasing);
calcFrame();
}
public function createGraphic(_arg1:uint, _arg2:uint, _arg3:uint=4294967295, _arg4:Boolean=false):FlxSprite{
_pixels = FlxG.createBitmap(_arg1, _arg2, _arg3, _arg4);
width = (_bw = _pixels.width);
height = (_bh = _pixels.height);
resetHelpers();
return (this);
}
public function addAnimationCallback(_arg1:Function):void{
_callback = _arg1;
}
public function onEmit():void{
}
public function set pixels(_arg1:BitmapData):void{
_pixels = _arg1;
width = (_bw = _pixels.width);
height = (_bh = _pixels.height);
resetHelpers();
}
public function specificFrame(_arg1:uint):void{
_curAnim = null;
_caf = _arg1;
calcFrame();
}
public function get alpha():Number{
return (_alpha);
}
public function get color():uint{
return (_color);
}
public function randomFrame():void{
_curAnim = null;
_caf = int((FlxG.random() * (_pixels.width / _bw)));
calcFrame();
}
public function fill(_arg1:uint):void{
_pixels.fillRect(_r2, _arg1);
calcFrame();
}
override public function render():void{
if (!visible){
return;
};
getScreenXY(_p);
if ((((((((angle == 0)) && ((scale.x == 1)))) && ((scale.y == 1)))) && ((blend == null)))){
FlxG.buffer.copyPixels(_framePixels, _r, _p, null, null, true);
return;
};
_mtx.identity();
_mtx.translate(-(origin.x), -(origin.y));
_mtx.scale(scale.x, scale.y);
if (angle != 0){
_mtx.rotate(((Math.PI * 2) * (angle / 360)));
};
_mtx.translate((_p.x + origin.x), (_p.y + origin.y));
FlxG.buffer.draw(_framePixels, _mtx, null, blend, null, antialiasing);
}
override public function hitCeiling(_arg1:FlxCore=null):Boolean{
velocity.y = 0;
return (true);
}
public function get pixels():BitmapData{
return (_pixels);
}
public function set facing(_arg1:uint):void{
var _local2 = !((_facing == _arg1));
_facing = _arg1;
if (_local2){
calcFrame();
};
}
public function set alpha(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
};
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 == _alpha){
return;
};
_alpha = _arg1;
if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){
_ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha);
} else {
_ct = null;
};
calcFrame();
}
public function set color(_arg1:uint):void{
_arg1 = (_arg1 & 0xFFFFFF);
if (_color == _arg1){
return;
};
_color = _arg1;
if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){
_ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha);
} else {
_ct = null;
};
calcFrame();
}
override public function update():void{
var _local1:Point;
var _local2:Point;
var _local3:Number;
super.update();
if (!active){
return;
};
if (((((!((_curAnim == null))) && ((_curAnim.delay > 0)))) && (((_curAnim.looped) || (!(finished)))))){
_frameTimer = (_frameTimer + FlxG.elapsed);
if (_frameTimer > _curAnim.delay){
_frameTimer = (_frameTimer - _curAnim.delay);
if (_curFrame == (_curAnim.frames.length - 1)){
if (_curAnim.looped){
_curFrame = 0;
};
finished = true;
} else {
_curFrame++;
};
_caf = _curAnim.frames[_curFrame];
calcFrame();
};
};
angle = (angle + ((angularVelocity = FlxG.computeVelocity(angularVelocity, angularAcceleration, angularDrag, maxAngular)) * FlxG.elapsed));
if (thrust != 0){
_local1 = FlxG.rotatePoint(-(thrust), 0, 0, 0, angle);
_local2 = FlxG.rotatePoint(-(maxThrust), 0, 0, 0, angle);
_local3 = Math.abs(_local2.x);
if (_local3 > Math.abs(_local2.y)){
_local2.y = _local3;
} else {
_local3 = Math.abs(_local2.y);
};
maxVelocity.x = Math.abs(_local3);
maxVelocity.y = Math.abs(_local3);
} else {
_local1 = _pZero;
};
x = (x + ((velocity.x = FlxG.computeVelocity(velocity.x, (acceleration.x + _local1.x), drag.x, maxVelocity.x)) * FlxG.elapsed));
y = (y + ((velocity.y = FlxG.computeVelocity(velocity.y, (acceleration.y + _local1.y), drag.y, maxVelocity.y)) * FlxG.elapsed));
}
public function get facing():uint{
return (_facing);
}
override public function getScreenXY(_arg1:Point):void{
_arg1.x = (Math.floor((x - offset.x)) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
_arg1.y = (Math.floor((y - offset.y)) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
}
public function addAnimation(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true):void{
_animations.push(new FlxAnim(_arg1, _arg2, _arg3, _arg4));
}
override public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
var _local4:Number = x;
var _local5:Number = y;
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
if (_arg3){
return (_framePixels.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - _local4), (_arg2 - _local5))));
};
if ((((((((_arg1 <= _local4)) || ((_arg1 >= (_local4 + width))))) || ((_arg2 <= _local5)))) || ((_arg2 >= (_local5 + height))))){
return (false);
};
return (true);
}
override public function hitWall(_arg1:FlxCore=null):Boolean{
velocity.x = 0;
return (true);
}
}
}//package org.flixel
Section 147
//FlxState (org.flixel.FlxState)
package org.flixel {
import flash.display.*;
public class FlxState extends Sprite {
protected var _layer:FlxLayer;
public static var screen:FlxSprite;
public static var bgColor:uint;
public function FlxState(){
_layer = new FlxLayer();
FlxG.state = this;
if (screen == null){
screen = new FlxSprite();
screen.createGraphic(FlxG.width, FlxG.height, 0, true);
screen.origin.x = (screen.origin.y = 0);
screen.antialiasing = true;
};
}
public function add(_arg1:FlxCore):FlxCore{
return (_layer.add(_arg1));
}
public function render():void{
_layer.render();
}
public function update():void{
_layer.update();
}
public function destroy():void{
_layer.destroy();
}
public function preProcess():void{
screen.fill(bgColor);
}
public function postProcess():void{
}
}
}//package org.flixel
Section 148
//FlxText (org.flixel.FlxText)
package org.flixel {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class FlxText extends FlxSprite {
protected var _regen:Boolean;
protected var _tf:TextField;
public function FlxText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:String=null){
if (_arg4 == null){
_arg4 = "";
};
_tf = new TextField();
_tf.width = _arg3;
_tf.height = 1;
_tf.embedFonts = true;
_tf.selectable = false;
_tf.sharpness = 100;
_tf.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF);
_tf.text = _arg4;
super(_arg1, _arg2);
createGraphic(_arg3, 1);
_regen = true;
calcFrame();
}
public function get size():Number{
return ((_tf.defaultTextFormat.size as Number));
}
public function get alignment():String{
return (_tf.defaultTextFormat.align);
}
public function set alignment(_arg1:String):void{
var _local2:TextFormat = dtfCopy();
_local2.align = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
calcFrame();
}
public function set size(_arg1:Number):void{
var _local2:TextFormat = dtfCopy();
_local2.size = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
_regen = true;
calcFrame();
}
protected function dtfCopy():TextFormat{
var _local1:TextFormat = _tf.defaultTextFormat;
return (new TextFormat(_local1.font, _local1.size, _local1.color, _local1.bold, _local1.italic, _local1.underline, _local1.url, _local1.target, _local1.align));
}
public function get text():String{
return (_tf.text);
}
public function get font():String{
return (_tf.defaultTextFormat.font);
}
override protected function calcFrame():void{
var _local2:uint;
var _local3:uint;
if ((((((_tf == null)) || ((_tf.text == null)))) || ((_tf.text.length <= 0)))){
_framePixels.fillRect(_r, 0);
return;
};
if (_regen){
_local2 = _tf.numLines;
height = 0;
_local3 = 0;
while (_local3 < _local2) {
height = (height + _tf.getLineMetrics(_local3).height);
_local3++;
};
height = (height + 4);
_framePixels = new BitmapData(width, height, true, 0);
_bh = height;
_tf.height = height;
_r = new Rectangle(0, 0, width, height);
_regen = false;
} else {
_framePixels.fillRect(_r, 0);
};
var _local1:TextFormat = _tf.defaultTextFormat;
_mtx.identity();
if ((((_local1.align == "center")) && ((_tf.numLines == 1)))){
_tf.setTextFormat(new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, "left"));
_mtx.translate(Math.floor(((width - _tf.getLineMetrics(0).width) / 2)), 0);
};
_framePixels.draw(_tf, _mtx, _ct);
_tf.setTextFormat(new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, _local1.align));
}
public function setFormat(_arg1:String=null, _arg2:Number=8, _arg3:uint=0xFFFFFF, _arg4:String=null):FlxText{
if (_arg1 == null){
_arg1 = "";
};
var _local5:TextFormat = dtfCopy();
_local5.font = _arg1;
_local5.size = _arg2;
_local5.align = _arg4;
_tf.defaultTextFormat = _local5;
_tf.setTextFormat(_local5);
_regen = true;
color = _arg3;
calcFrame();
return (this);
}
public function set text(_arg1:String):void{
_tf.text = _arg1;
_regen = true;
calcFrame();
}
public function set font(_arg1:String):void{
var _local2:TextFormat = dtfCopy();
_local2.font = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
_regen = true;
calcFrame();
}
}
}//package org.flixel
Section 149
//FlxTilemap (org.flixel.FlxTilemap)
package org.flixel {
import flash.display.*;
import flash.geom.*;
public class FlxTilemap extends FlxCore {
public var startingIndex:uint;
protected var _screenRows:uint;
protected var _data:Array;
protected var _pixels:BitmapData;
protected var _block:FlxCore;
protected var _callbacks:Array;
protected var _rects:Array;
public var totalTiles:uint;
protected var _screenCols:uint;
public var drawIndex:uint;
public var auto:uint;
protected var _p:Point;
protected var _tileSize:uint;
public var heightInTiles:uint;
public var widthInTiles:uint;
public var collideIndex:uint;
public static const ALT:uint = 2;
public static const AUTO:uint = 1;
public static const OFF:uint = 0;
public static var ImgAutoAlt:Class = FlxTilemap_ImgAutoAlt;
public static var ImgAuto:Class = FlxTilemap_ImgAuto;
public function FlxTilemap(){
auto = OFF;
collideIndex = 1;
startingIndex = 0;
drawIndex = 1;
widthInTiles = 0;
heightInTiles = 0;
totalTiles = 0;
_data = new Array();
_p = new Point();
_tileSize = 0;
_rects = null;
_pixels = null;
_block = new FlxCore();
_block.width = (_block.height = 0);
_block.fixed = true;
_callbacks = new Array();
}
public function overlapsWithMargin(_arg1:FlxCore, _arg2:int=0):Boolean{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint = Math.floor(((_arg1.x - x) / _tileSize));
var _local8:uint = Math.floor(((_arg1.y - y) / _tileSize));
var _local9:uint = (Math.ceil((_arg1.width / _tileSize)) + 1);
var _local10:uint = (Math.ceil((_arg1.height / _tileSize)) + 1);
var _local11:uint;
while (_local11 < _local10) {
if ((((_local11 < 0)) || ((_local11 >= heightInTiles)))){
break;
};
_local4 = (((_local8 + _local11) * widthInTiles) + _local7);
_local3 = 0;
while (_local3 < _local9) {
if ((((_local3 < 0)) || ((_local3 >= widthInTiles)))){
break;
};
_local6 = _data[(_local4 + _local3)];
if (_local6 >= collideIndex){
if (((_arg1.y + _arg1.height) - _arg2) < (y + ((_local8 + _local11) * _tileSize))){
} else {
if (((_arg1.x + _arg1.width) - _arg2) < (x + ((_local7 + _local3) * _tileSize))){
} else {
if ((_arg1.y + _arg2) > (y + (((_local8 + _local11) + 1) * _tileSize))){
} else {
if ((_arg1.x + _arg2) > (x + (((_local7 + _local3) + 1) * _tileSize))){
} else {
return (true);
};
};
};
};
};
_local3++;
};
_local11++;
};
return (false);
}
public function setTileByIndex(_arg1:uint, _arg2:uint):void{
var _local3:uint;
_data[_arg1] = _arg2;
if (auto == OFF){
updateTile(_arg1);
return;
};
var _local4:int = (int((_arg1 / widthInTiles)) - 1);
var _local5:int = (_local4 + 3);
var _local6:int = ((_arg1 % widthInTiles) - 1);
var _local7:int = (_local6 + 3);
while (_local4 < _local5) {
_local6 = (_local7 - 3);
while (_local6 < _local7) {
if ((((((((_local4 >= 0)) && ((_local4 < heightInTiles)))) && ((_local6 >= 0)))) && ((_local6 < widthInTiles)))){
_local3 = ((_local4 * widthInTiles) + _local6);
autoTile(_local3);
updateTile(_local3);
};
_local6++;
};
_local4++;
};
}
public function getTile(_arg1:uint, _arg2:uint):uint{
return (_data[((_arg2 * widthInTiles) + _arg1)]);
}
public function setCallback(_arg1:uint, _arg2:Function, _arg3:uint=1):void{
if (_arg3 <= 0){
return;
};
var _local4:uint = _arg1;
while (_local4 < (_arg1 + _arg3)) {
_callbacks[_local4] = _arg2;
_local4++;
};
}
public function loadMap(_arg1:String, _arg2:Class, _arg3:uint=0):FlxTilemap{
var _local4:uint;
var _local5:Array;
var _local8:uint;
var _local6:Array = _arg1.split("\n");
heightInTiles = _local6.length;
var _local7:uint;
while (_local7 < heightInTiles) {
_local5 = _local6[_local7].split(",");
if (_local5.length <= 1){
heightInTiles--;
} else {
if (widthInTiles == 0){
widthInTiles = _local5.length;
};
_local4 = 0;
while (_local4 < widthInTiles) {
_data.push(uint(_local5[_local4]));
_local4++;
};
};
_local7++;
};
totalTiles = (widthInTiles * heightInTiles);
if (auto > OFF){
collideIndex = (startingIndex = (drawIndex = 1));
_local8 = 0;
while (_local8 < totalTiles) {
autoTile(_local8);
_local8++;
};
};
_tileSize = _arg3;
_pixels = FlxG.addBitmap(_arg2);
if (_tileSize == 0){
_tileSize = _pixels.height;
};
_rects = new Array(totalTiles);
_local8 = 0;
while (_local8 < totalTiles) {
updateTile(_local8);
_local8++;
};
width = (widthInTiles * _tileSize);
height = (heightInTiles * _tileSize);
trace(width, height);
_block.width = (_block.height = _tileSize);
_screenRows = (Math.ceil((FlxG.height / _tileSize)) + 1);
if (_screenRows > heightInTiles){
_screenRows = heightInTiles;
};
_screenCols = (Math.ceil((FlxG.width / _tileSize)) + 1);
if (_screenCols > widthInTiles){
_screenCols = widthInTiles;
};
return (this);
}
protected function updateTile(_arg1:uint):void{
if (_data[_arg1] < drawIndex){
_rects[_arg1] = null;
return;
};
var _local2:uint = ((_data[_arg1] - startingIndex) * _tileSize);
var _local3:uint;
if (_local2 >= _pixels.width){
_local3 = (uint((_local2 / _pixels.width)) * _tileSize);
_local2 = (_local2 % _pixels.width);
};
_rects[_arg1] = new Rectangle(_local2, _local3, _tileSize, _tileSize);
}
override public function render():void{
var _local5:uint;
var _local6:uint;
super.render();
getScreenXY(_p);
var _local1:int = Math.floor((-(_p.x) / _tileSize));
var _local2:int = Math.floor((-(_p.y) / _tileSize));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > (widthInTiles - _screenCols)){
_local1 = (widthInTiles - _screenCols);
};
if (_local2 < 0){
_local2 = 0;
};
if (_local2 > (heightInTiles - _screenRows)){
_local2 = (heightInTiles - _screenRows);
};
var _local3:int = ((_local2 * widthInTiles) + _local1);
_p.x = (_p.x + (_local1 * _tileSize));
_p.y = (_p.y + (_local2 * _tileSize));
var _local4:int = _p.x;
var _local7:uint;
while (_local7 < _screenRows) {
_local6 = _local3;
_local5 = 0;
while (_local5 < _screenCols) {
if (_rects[_local6] != null){
FlxG.buffer.copyPixels(_pixels, _rects[_local6], _p, null, null, true);
};
_local6++;
_p.x = (_p.x + _tileSize);
_local5++;
};
_local3 = (_local3 + widthInTiles);
_p.x = _local4;
_p.y = (_p.y + _tileSize);
_local7++;
};
}
public function setTile(_arg1:uint, _arg2:uint, _arg3:uint):void{
setTileByIndex(((_arg2 * widthInTiles) + _arg1), _arg3);
}
public function follow():void{
FlxG.followBounds(x, y, width, height);
}
protected function autoTile(_arg1:uint):void{
if (_data[_arg1] == 0){
return;
};
_data[_arg1] = 0;
if (((((_arg1 - widthInTiles) < 0)) || ((_data[(_arg1 - widthInTiles)] > 0)))){
_data[_arg1] = (_data[_arg1] + 1);
};
if (((((_arg1 % widthInTiles) >= (widthInTiles - 1))) || ((_data[(_arg1 + 1)] > 0)))){
_data[_arg1] = (_data[_arg1] + 2);
};
if (((((_arg1 + widthInTiles) >= totalTiles)) || ((_data[(_arg1 + widthInTiles)] > 0)))){
_data[_arg1] = (_data[_arg1] + 4);
};
if (((((_arg1 % widthInTiles) <= 0)) || ((_data[(_arg1 - 1)] > 0)))){
_data[_arg1] = (_data[_arg1] + 8);
};
if ((((auto == ALT)) && ((_data[_arg1] == 15)))){
if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) - 1)] <= 0)))){
_data[_arg1] = 1;
};
if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) - 1)] <= 0)))){
_data[_arg1] = 2;
};
if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) + 1)] <= 0)))){
_data[_arg1] = 4;
};
if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) + 1)] <= 0)))){
_data[_arg1] = 8;
};
};
_data[_arg1] = (_data[_arg1] + 1);
}
override public function collide(_arg1:FlxCore):Boolean{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Array = new Array();
var _local7:int = Math.floor(((_arg1.x - x) / _tileSize));
var _local8:int = Math.floor(((_arg1.y - y) / _tileSize));
var _local9:uint = (Math.ceil((_arg1.width / _tileSize)) + 1);
var _local10:uint = (Math.ceil((_arg1.height / _tileSize)) + 1);
var _local11:uint;
while (_local11 < _local10) {
if (_local11 < 0){
} else {
if (_local11 >= heightInTiles){
break;
};
_local3 = (((_local8 + _local11) * widthInTiles) + _local7);
_local2 = 0;
while (_local2 < _local9) {
if (_local2 < 0){
} else {
if (_local2 >= widthInTiles){
break;
};
_local5 = _data[(_local3 + _local2)];
if (_local5 >= collideIndex){
_local6.push({x:(x + ((_local7 + _local2) * _tileSize)), y:(y + ((_local8 + _local11) * _tileSize)), data:_local5});
};
};
_local2++;
};
};
_local11++;
};
var _local12:uint = _local6.length;
var _local13:Boolean;
_local4 = 0;
while (_local4 < _local12) {
_block.last.x = (_block.x = _local6[_local4].x);
_block.last.y = (_block.y = _local6[_local4].y);
if (_block.collideX(_arg1)){
_local3 = _local6[_local4].data;
if (_callbacks[_local3] != null){
var _local15 = _callbacks;
_local15[_local3](_arg1, (_block.x / _tileSize), (_block.y / _tileSize), _local3);
};
_local13 = true;
};
_local4++;
};
var _local14:Boolean;
_local4 = 0;
while (_local4 < _local12) {
_block.last.x = (_block.x = _local6[_local4].x);
_block.last.y = (_block.y = _local6[_local4].y);
if (_block.collideY(_arg1)){
_local3 = _local6[_local4].data;
if (_callbacks[_local3] != null){
_local15 = _callbacks;
_local15[_local3](_arg1, (_block.x / _tileSize), (_block.y / _tileSize), _local3);
};
_local14 = true;
};
_local4++;
};
return (((_local13) || (_local14)));
}
public static function arrayToCSV(_arg1:Array, _arg2:int):String{
var _local3:uint;
var _local4:uint;
var _local5:String;
var _local6:int = (_arg1.length / _arg2);
_local3 = 0;
while (_local3 < _local6) {
_local4 = 0;
while (_local4 < _arg2) {
if (_local4 == 0){
if (_local3 == 0){
_local5 = (_local5 + _arg1[0]);
} else {
_local5 = (_local5 + ("\n" + _arg1[(_local3 * _arg2)]));
};
} else {
_local5 = (_local5 + (", " + _arg1[((_local3 * _arg2) + _local4)]));
};
_local4++;
};
_local3++;
};
return (_local5);
}
public static function pngToCSV(_arg1:Class, _arg2:Boolean=false, _arg3:uint=1):String{
var _local4:Bitmap;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:String;
var _local12:Bitmap;
var _local13:Matrix;
if (_arg3 <= 1){
_local4 = new (_arg1);
} else {
_local12 = new (_arg1);
_local4 = new Bitmap(new BitmapData((_local12.width * _arg3), (_local12.height * _arg3)));
_local13 = new Matrix();
_local13.scale(_arg3, _arg3);
_local4.bitmapData.draw(_local12, _local13);
};
var _local5:BitmapData = _local4.bitmapData;
var _local10:uint = _local4.width;
var _local11:uint = _local4.height;
_local6 = 0;
while (_local6 < _local11) {
_local7 = 0;
while (_local7 < _local10) {
_local8 = _local5.getPixel(_local7, _local6);
if (((((_arg2) && ((_local8 > 0)))) || (((!(_arg2)) && ((_local8 == 0)))))){
_local8 = 1;
} else {
_local8 = 0;
};
if (_local7 == 0){
if (_local6 == 0){
_local9 = (_local9 + _local8);
} else {
_local9 = (_local9 + ("\n" + _local8));
};
} else {
_local9 = (_local9 + (", " + _local8));
};
_local7++;
};
_local6++;
};
return (_local9);
}
}
}//package org.flixel
Section 150
//FlxTilemap_ImgAuto (org.flixel.FlxTilemap_ImgAuto)
package org.flixel {
import mx.core.*;
public class FlxTilemap_ImgAuto extends BitmapAsset {
}
}//package org.flixel
Section 151
//FlxTilemap_ImgAutoAlt (org.flixel.FlxTilemap_ImgAutoAlt)
package org.flixel {
import mx.core.*;
public class FlxTilemap_ImgAutoAlt extends BitmapAsset {
}
}//package org.flixel
Section 152
//CreditsState (states.CreditsState)
package states {
import org.flixel.*;
public class CreditsState extends FlxState {
public function CreditsState(){
FlxG.showCursor(BabiesDream.SprCursor);
var _local1:FlxText = new FlxText(8, 8, FlxG.width, "babies dream of dead worlds \n\nwas created by Gregory Weir (ludusnovus.net) \n\nwas licensed by Armor Games \n\nwas supported by Melissa Avery \n\nwas developed in Adobe Flash, Flixel, and FlashDevelop \n\nwas drawn with the GIMP \n\nwas laid out with Flan \n\nwas made noisy with sfxr and Audacity \n\nwas scored by Michael Sandler, K. M.Krebs, and mystified \n\nwas tested by Melissa Avery and Michael Crosby");
this.add(_local1);
var _local2:FlxSprite = new FlxSprite();
_local2.createGraphic(50, 10, 4278190080);
var _local3:FlxText = new FlxText(0, 0, 50, "back");
_local3.color = 0x999999;
var _local4:FlxButton = new FlxButton(4, (FlxG.height - 15), onHelpClick);
_local4.loadText(_local3, new FlxText(0, 0, 50, "back"));
_local4.loadGraphic(_local2);
this.add(_local4);
}
private function onHelpClick():void{
FlxG.switchState(MenuState);
}
}
}//package states
Section 153
//HelpState (states.HelpState)
package states {
import org.flixel.*;
import Interface.*;
public class HelpState extends FlxState {
public function HelpState(){
FlxG.showCursor(BabiesDream.SprCursor);
var _local1:FlxText = new FlxText(8, 8, FlxG.width, "Controls: \n\nLEFT, RIGHT: move horizontally \n\nUP, DOWN: apply midair force \n\nX: jump \n\nC: talk, read \n\nESC: return to menu \n\n0, +, -: change sound volume \n\nP: pause");
this.add(_local1);
var _local2:TextButton = new TextButton(4, (FlxG.height - 15), "back", onBackClick);
this.add(_local2);
}
private function onBackClick():void{
FlxG.switchState(MenuState);
}
}
}//package states
Section 154
//IntroState (states.IntroState)
package states {
import flash.events.*;
import flash.display.*;
import Data.*;
import org.flixel.*;
import flash.net.*;
import flash.ui.*;
public class IntroState extends FlxState {
private var nextText:FlxText;
private var logoFading:Boolean;// = false
private var currLine:int;// = 0
private var readyForNextLine:Boolean;// = true
private var holdCount:Number;// = 0
private var skipButton:FlxButton;
private var logoDone:Boolean;// = false
private var SprLogo:Class;
private var logo:Sprite;
private var currText:FlxText;
private static const HOLD_LENGTH:int = 1;
public function IntroState(){
SprLogo = IntroState_SprLogo;
super();
currText = new FlxText(10, 0, 300);
currText.alpha = 0;
this.add(currText);
nextText = new FlxText(10, 0, 300);
nextText.alpha = 0;
this.add(nextText);
FlxG.showCursor(BabiesDream.SprCursor);
skipButton = new FlxButton(290, 220, onClickSkip);
var defText:FlxText = new FlxText(0, 0, 50, "skip");
defText.color = 0x999999;
skipButton.loadText(defText, new FlxText(0, 0, 50, "skip"));
var skipGraphic:FlxSprite = new FlxSprite();
skipGraphic.createGraphic(50, 20, 4278190080);
skipButton.loadGraphic(skipGraphic);
this.add(skipButton);
logo = new Sprite();
logo.cacheAsBitmap = true;
logo.addChild(new SprLogo());
logo.x = ((FlxG.width - logo.width) / 2);
logo.y = ((FlxG.height - logo.height) / 2);
logo.buttonMode = true;
logo.addEventListener(MouseEvent.ROLL_OVER, function (_arg1:MouseEvent):void{
Mouse.show();
});
logo.addEventListener(MouseEvent.ROLL_OUT, function (_arg1:MouseEvent):void{
Mouse.hide();
});
logo.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://armorgames.com"), "_blank");
});
logo.alpha = 0;
this.addChild(logo);
BabiesDream.currMusic = Music.MusicMenu;
FlxG.playMusic(Music.MusicMenu);
}
override public function update():void{
var _local1:FlxText;
super.update();
if (!logoDone){
if (!logoFading){
logo.alpha = (logo.alpha + 0.005);
if (logo.alpha >= 1){
logoFading = true;
};
} else {
logo.alpha = (logo.alpha - 0.005);
if (logo.alpha <= 0){
logoDone = true;
logo.visible = false;
};
};
} else {
if (readyForNextLine){
getNextText();
} else {
if ((((currText.alpha > 0)) || ((nextText.alpha < 1)))){
currText.alpha = (currText.alpha - 0.005);
nextText.alpha = (nextText.alpha + 0.005);
} else {
if (holdCount < HOLD_LENGTH){
holdCount = (holdCount + FlxG.elapsed);
} else {
_local1 = nextText;
nextText = currText;
currText = _local1;
holdCount = 0;
currLine++;
readyForNextLine = true;
};
};
};
};
}
private function showText(_arg1:String, _arg2:uint, _arg3:int):void{
nextText.text = _arg1;
nextText.color = _arg2;
nextText.y = _arg3;
readyForNextLine = false;
}
private function onClickSkip():void{
nextState();
}
private function nextState():void{
FlxG.switchState(MenuState);
}
private function getNextText():void{
switch (currLine){
case 0:
showText("Look at him, darling. He's dreaming.", 4294954188, 75);
break;
case 1:
showText("But he's just a baby. What does he have to dream about?", 4291611903, 150);
break;
case 2:
showText("Being in the womb? He won't remember the dreams when \nhe grows up.", 4294954188, 75);
break;
case 3:
showText("They have no memory yet. They don't know what this \nworld is.", 4291611903, 150);
break;
case 4:
showText("I wonder what we dreamed of when we were babies?", 4294954188, 75);
break;
case 5:
showText("", 4294954188, 75);
break;
default:
nextState();
break;
};
}
}
}//package states
Section 155
//IntroState_SprLogo (states.IntroState_SprLogo)
package states {
import mx.core.*;
public class IntroState_SprLogo extends BitmapAsset {
}
}//package states
Section 156
//MenuState (states.MenuState)
package states {
import flash.display.*;
import Data.*;
import org.flixel.*;
import flash.net.*;
import Interface.*;
public class MenuState extends FlxState {
private var helpButton:FlxButton;
private var creditsButton:FlxButton;
public static var SprArmorLogo:Class = MenuState_SprArmorLogo;
public function MenuState(){
var _local3:Bitmap;
super();
var _local1:FlxText = new FlxText(0, 2, FlxG.width, "babies dream of dead worlds");
_local1.alignment = "center";
this.add(_local1);
var _local2:TextButton = new TextButton(0, (FlxG.height - 30), "by gregory weir", onBylineClick, FlxG.width, "center", 4291611852);
this.add(_local2);
FlxG.showCursor(BabiesDream.SprCursor);
this.add(new LevelButton(((FlxG.width / 2) - 16), 16, 0, Level.Level1));
this.add(new LevelButton(((FlxG.width / 2) - 80), 64, 1, Level.LevelF1, "T"));
this.add(new LevelButton(((FlxG.width / 2) - 80), 112, 2, Level.LevelF2, "F1"));
this.add(new LevelButton(((FlxG.width / 2) - 80), 160, 3, Level.LevelF3, "F2"));
this.add(new ScoreCard(8, 72, "F1", Level.LevelF1));
this.add(new ScoreCard(8, 120, "F2", Level.LevelF2));
this.add(new ScoreCard(8, 168, "F3", Level.LevelF3));
this.add(new LevelButton(((FlxG.width / 2) + 48), 64, 4, Level.LevelN1, "T"));
this.add(new LevelButton(((FlxG.width / 2) + 48), 112, 5, Level.LevelN2, "N1"));
this.add(new LevelButton(((FlxG.width / 2) + 48), 160, 6, Level.LevelN3, "N2"));
this.add(new ScoreCard(((FlxG.width / 2) + 88), 72, "N1", Level.LevelN1));
this.add(new ScoreCard(((FlxG.width / 2) + 88), 120, "N2", Level.LevelN2));
this.add(new ScoreCard(((FlxG.width / 2) + 88), 168, "N3", Level.LevelN3));
this.add(new LevelButton(((FlxG.width / 2) - 16), 64, 7, Level.LevelM1, "T"));
this.add(new LevelButton(((FlxG.width / 2) - 16), 112, 8, Level.LevelM2, "M1"));
this.add(new LevelButton(((FlxG.width / 2) - 16), 160, 9, Level.LevelM3, "M2"));
FlxG.flash(4278190080);
helpButton = new TextButton(4, (FlxG.height - 15), "help", onHelpClick);
this.add(helpButton);
creditsButton = new TextButton((FlxG.width - 40), (FlxG.height - 15), "credits", onCreditsClick);
this.add(creditsButton);
this.add(new TextButton((FlxG.width - 190), (FlxG.height - 15), "more games", onMoreGamesClick));
if (BabiesDream.currMusic != Music.MusicMenu){
BabiesDream.currMusic = Music.MusicMenu;
FlxG.playMusic(Music.MusicMenu);
};
_local3 = new SprArmorLogo();
_local3.scaleX = 0.5;
_local3.scaleY = 0.5;
_local3.x = (FlxG.width - _local3.width);
_local3.y = ((FlxG.height - 15) - _local3.height);
this.addChild(_local3);
}
private function onMoreGamesClick():void{
navigateToURL(new URLRequest("http://armorgames.com"), "_blank");
}
private function onCreditsClick():void{
FlxG.switchState(CreditsState);
}
private function onBylineClick():void{
navigateToURL(new URLRequest("http://ludusnovus.net"), "_blank");
}
private function onHelpClick():void{
FlxG.switchState(HelpState);
}
}
}//package states
Section 157
//MenuState_SprArmorLogo (states.MenuState_SprArmorLogo)
package states {
import mx.core.*;
public class MenuState_SprArmorLogo extends BitmapAsset {
}
}//package states
Section 158
//PlayState (states.PlayState)
package states {
import Data.*;
import WorldObjects.*;
import org.flixel.*;
import Interface.*;
public class PlayState extends FlxState {
private var goals:Array;
private var portals:Array;
private var _helper:FlxSprite;
private var coins:Array;
private var signs:Array;
private var NPCs:Array;
private var textBox:TextBox;
private var player:Player;
private var totalCoins:uint;// = 0
private var sky:FlxSprite;
private var riftTilemap:FlxTilemap;
private var introSpeech:Array;
private var elapsedTime:Number;// = 0
private var currMode:int;// = 0
private var collectedCoins:uint;// = 0
private var tilemap:FlxTilemap;
private var score:FlxText;
private static const MODE_PLAY:int = 0;
private static const MODE_READ:int = 1;
public static var level:Level;
private static var BGRiftsTilemap:Class = PlayState_BGRiftsTilemap;
private static var BGTilemap:Class = PlayState_BGTilemap;
private static var SndPortal:Class = PlayState_SndPortal;
private static var BGSky:Class = PlayState_BGSky;
public function PlayState(){
var _local2:Class;
portals = new Array();
signs = new Array();
NPCs = new Array();
goals = new Array();
coins = new Array();
introSpeech = new Array();
super();
var _local1:FlxSprite = new FlxSprite(0, 0);
_local1.createGraphic(FlxG.width, FlxG.height, 4292214218);
_local1.scrollFactor.x = 0;
_local1.scrollFactor.y = 0;
this.add(_local1);
sky = new FlxSprite();
sky.loadGraphic(BGSky);
sky.scrollFactor.x = 0;
sky.y = (-(sky.height) * 0.5);
this.add(sky);
riftTilemap = new FlxTilemap();
riftTilemap.loadMap(level.levelRifts, BGRiftsTilemap);
riftTilemap.collideIndex = 1;
riftTilemap.y = (-(riftTilemap.height) / 2);
tilemap = new FlxTilemap();
tilemap.loadMap(level.levelTiles, BGTilemap);
tilemap.collideIndex = 5;
tilemap.y = (-(tilemap.height) / 2);
trace(tilemap.height);
populateLevel(level.levelXML);
player = new Player(level.levelXML.@startx, level.levelXML.@starty, level.levelXML.@character);
this.add(player);
FlxG.follow(player, 10);
this.add(tilemap);
this.add(riftTilemap);
textBox = new TextBox();
this.add(textBox);
loadIntro(level.levelXML);
if (introSpeech.length > 0){
currMode = MODE_READ;
nextIntroSpeech();
};
if ((((level.levelXML.@character == "Naaij")) || ((level.levelXML.@character == "Fuzor")))){
score = new FlxText(275, 4, 40);
score.color = 4278190080;
score.scrollFactor.x = 0;
score.scrollFactor.y = 0;
this.add(score);
};
if (level.levelXML.@character == "Fuzor"){
_local2 = Music.MusicFuzor;
} else {
if (level.levelXML.@character == "Naaij"){
_local2 = Music.MusicNaaij;
} else {
if (level.levelXML.@character == "Mell"){
_local2 = Music.MusicMell;
} else {
_local2 = Music.MusicMom;
};
};
};
if (_local2 != null){
BabiesDream.currMusic = _local2;
FlxG.playMusic(_local2);
};
_helper = new FlxSprite();
_helper.createGraphic(FlxG.width, FlxG.height, 4278190080, true);
FlxG.flash(4278190080);
}
private function touchGoal(_arg1:Goal, _arg2:Player):void{
FlxG.fade(4278190080, 2, onFadeOutComplete);
_arg2.active = false;
}
private function activateNPC(_arg1:NPC, _arg2:Player):void{
textBox.setText(_arg1.speech, _arg1.character);
textBox.visible = true;
currMode = MODE_READ;
}
private function nextIntroSpeech():void{
textBox.setText(introSpeech[0].speech, introSpeech[0].character);
textBox.visible = true;
introSpeech.splice(0, 1);
}
private function enterRift():void{
var _local2:Portal;
var _local1:Portal = portals[0];
for each (_local2 in portals) {
if ((((_local2.x >= _local1.x)) && ((_local2.x <= player.x)))){
_local1 = _local2;
};
};
if (_local2 != null){
player.x = _local1.x;
player.y = _local1.y;
player.teleport();
FlxG.flash(4290445499, 1, null, true);
FlxG.quake(0.02);
FlxG.play(SndPortal);
};
}
override public function update():void{
if (FlxG.keys.justPressed("ESC")){
FlxG.switchState(MenuState);
};
if (currMode == MODE_PLAY){
if (player.active){
elapsedTime = (elapsedTime + FlxG.elapsed);
};
tilemap.collideArray(NPCs);
tilemap.collide(player);
if (player.x < tilemap.x){
player.x = tilemap.x;
};
if (player.y < tilemap.y){
player.y = tilemap.y;
};
if (player.x > ((tilemap.x + tilemap.width) - player.width)){
player.x = ((tilemap.x + tilemap.width) - player.width);
};
if (player.y > ((tilemap.y + tilemap.height) - player.height)){
player.y = ((tilemap.y + tilemap.height) - player.height);
};
if (riftTilemap.overlapsWithMargin(player, 8)){
enterRift();
};
sky.y = ((-(sky.height) * 0.5) + (player.y * 0.25));
super.update();
FlxG.overlapArray(goals, player, touchGoal);
FlxG.overlapArray(coins, player, touchCoin);
if (FlxG.keys.justPressed("C")){
FlxG.overlapArray(signs, player, activateSign);
FlxG.overlapArray(NPCs, player, activateNPC);
};
if ((((level.levelXML.@character == "Naaij")) || ((level.levelXML.@character == "Fuzor")))){
updateScore();
};
} else {
if (currMode == MODE_READ){
if (FlxG.keys.justPressed("C")){
if (introSpeech.length > 0){
nextIntroSpeech();
} else {
textBox.visible = false;
currMode = MODE_PLAY;
};
};
textBox.update();
};
};
}
private function activateSign(_arg1:Sign, _arg2:Player):void{
textBox.setText(_arg1.text, null);
textBox.visible = true;
currMode = MODE_READ;
}
private function updateScore():void{
if (level.levelXML.@character == "Fuzor"){
score.text = (elapsedTime.toFixed(2) + "s");
};
if (level.levelXML.@character == "Naaij"){
score.text = ((collectedCoins + "/") + totalCoins);
};
}
private function loadIntro(_arg1:XML):void{
var _local2:XML;
for each (_local2 in _arg1.intro.*) {
introSpeech.push({character:_local2.@character, speech:_local2.@speech});
};
}
override public function postProcess():void{
if (Math.abs(player.velocity.y) > 250){
_helper.alpha = (Math.abs(player.velocity.y) / 1250);
screen.draw(_helper);
};
_helper.draw(screen);
}
private function touchCoin(_arg1:Coin, _arg2:Player):void{
_arg1.getCollected();
collectedCoins++;
}
private function populateCoins():void{
var _local3:uint;
var _local4:Array;
var _local1:int;
var _local2:int;
var _local5:Array = level.levelCoins.split("\n");
_local2 = _local5.length;
var _local6:uint;
while (_local6 < _local2) {
_local4 = _local5[_local6].split(",");
if (_local4.length <= 1){
_local2--;
} else {
if (_local1 == 0){
_local1 = _local4.length;
};
_local3 = 0;
while (_local3 < _local1) {
if (uint(_local4[_local3]) == 1){
coins.push(this.add(new Coin((((_local3 * 32) + 8) + tilemap.x), (((_local6 * 32) + 8) + tilemap.y))));
totalCoins++;
};
_local3++;
};
};
_local6++;
};
}
private function populateLevel(_arg1:XML):void{
var _local2:XML;
for each (_local2 in _arg1.contents.*) {
if (_local2.name() == "portal"){
portals.push(this.add(new Portal(_local2.@x, _local2.@y)));
} else {
if (_local2.name() == "sign"){
signs.push(this.add(new Sign(_local2.@x, _local2.@y, _local2.@text)));
} else {
if (_local2.name() == "npc"){
if (_local2.@facing == "left"){
NPCs.push(this.add(new NPC(_local2.@x, _local2.@y, _local2.@speech, _local2.@character, true)));
} else {
NPCs.push(this.add(new NPC(_local2.@x, _local2.@y, _local2.@speech, _local2.@character)));
};
} else {
if (_local2.name() == "goal"){
goals.push(this.add(new Goal(_local2.@x, _local2.@y)));
};
};
};
};
};
if (level.levelCoins != null){
populateCoins();
};
}
private function onFadeOutComplete():void{
var _local1:* = BabiesDream.save.read((level.name + "Score"));
if (level.levelXML.@character == "Naaij"){
if ((((_local1 == null)) || ((collectedCoins > _local1)))){
BabiesDream.save.write((level.name + "Score"), collectedCoins);
};
} else {
if (level.levelXML.@character == "Fuzor"){
if ((((_local1 == null)) || ((elapsedTime < _local1)))){
BabiesDream.save.write((level.name + "Score"), elapsedTime);
};
trace((((((("Saved score for " + level.name) + ": ") + BabiesDream.save.read((level.name + "Score"))) + " (") + elapsedTime) + ")"));
} else {
BabiesDream.save.write((level.name + "Score"), "DONE");
};
};
FlxG.switchState(MenuState);
}
}
}//package states
Section 159
//PlayState_BGRiftsTilemap (states.PlayState_BGRiftsTilemap)
package states {
import mx.core.*;
public class PlayState_BGRiftsTilemap extends BitmapAsset {
}
}//package states
Section 160
//PlayState_BGSky (states.PlayState_BGSky)
package states {
import mx.core.*;
public class PlayState_BGSky extends BitmapAsset {
}
}//package states
Section 161
//PlayState_BGTilemap (states.PlayState_BGTilemap)
package states {
import mx.core.*;
public class PlayState_BGTilemap extends BitmapAsset {
}
}//package states
Section 162
//PlayState_SndPortal (states.PlayState_SndPortal)
package states {
import mx.core.*;
public class PlayState_SndPortal extends SoundAsset {
}
}//package states
Section 163
//Coin (WorldObjects.Coin)
package WorldObjects {
import org.flixel.*;
public class Coin extends WorldObject {
private static var SndCoin:Class = Coin_SndCoin;
private static var SprCoin:Class = Coin_SprCoin;
public function Coin(_arg1:int, _arg2:int){
super(SprCoin, _arg1, _arg2, true);
this.addAnimation("spin", [0, 1, 2, 3], 10);
this.play("spin");
}
public function getCollected():void{
FlxG.play(SndCoin);
kill();
}
}
}//package WorldObjects
Section 164
//Coin_SndCoin (WorldObjects.Coin_SndCoin)
package WorldObjects {
import mx.core.*;
public class Coin_SndCoin extends SoundAsset {
}
}//package WorldObjects
Section 165
//Coin_SprCoin (WorldObjects.Coin_SprCoin)
package WorldObjects {
import mx.core.*;
public class Coin_SprCoin extends BitmapAsset {
}
}//package WorldObjects
Section 166
//Goal (WorldObjects.Goal)
package WorldObjects {
public class Goal extends WorldObject {
private var position:int;// = 0
private var hoverDir:int;// = 2
private var hoverTimer:int;// = 0
private static const hoverFreq:int = 25;
private static var SprSilverRod:Class = Goal_SprSilverRod;
public function Goal(_arg1:int, _arg2:int){
super(SprSilverRod, _arg1, _arg2);
}
override public function update():void{
hoverTimer++;
if (hoverTimer >= hoverFreq){
hoverTimer = 0;
if (hoverDir == UP){
y--;
position--;
if (position == -1){
hoverDir = DOWN;
};
} else {
y++;
position++;
if (position == 1){
hoverDir = UP;
};
};
};
super.update();
}
}
}//package WorldObjects
Section 167
//Goal_SprSilverRod (WorldObjects.Goal_SprSilverRod)
package WorldObjects {
import mx.core.*;
public class Goal_SprSilverRod extends BitmapAsset {
}
}//package WorldObjects
Section 168
//NPC (WorldObjects.NPC)
package WorldObjects {
public class NPC extends PhysicsObject {
public var character:String;
public var speech:String;
private static var SprMotherNPC:Class = NPC_SprMotherNPC;
private static var SprNPC:Class = NPC_SprNPC;
public function NPC(_arg1:int, _arg2:int, _arg3:String, _arg4:String, _arg5:Boolean=false){
var _local6:Class;
if (_arg4.toLowerCase() == "mom"){
_local6 = SprMotherNPC;
} else {
_local6 = SprNPC;
};
super(_local6, _arg1, _arg2, true);
if (_arg5){
scale.x = -1;
};
this.speech = _arg3;
this.character = _arg4;
verticalDragCoeff = 0;
addAnimation("idle", [0, 1, 2, 3], 5, true);
play("idle");
}
override public function update():void{
super.update();
if (y > -16){
this.scale.y = -1;
} else {
this.scale.y = 1;
};
}
}
}//package WorldObjects
Section 169
//NPC_SprMotherNPC (WorldObjects.NPC_SprMotherNPC)
package WorldObjects {
import mx.core.*;
public class NPC_SprMotherNPC extends BitmapAsset {
}
}//package WorldObjects
Section 170
//NPC_SprNPC (WorldObjects.NPC_SprNPC)
package WorldObjects {
import mx.core.*;
public class NPC_SprNPC extends BitmapAsset {
}
}//package WorldObjects
Section 171
//PhysicsObject (WorldObjects.PhysicsObject)
package WorldObjects {
import org.flixel.*;
public class PhysicsObject extends WorldObject {
protected var verticalDragCoeff:Number;// = 0.005
public static const introvectiveConstant:Number = 62;
public function PhysicsObject(_arg1:Class=null, _arg2:int=0, _arg3:int=0, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:uint=0, _arg7:uint=0, _arg8:uint=4294967295, _arg9:Boolean=false){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg9);
}
override public function update():void{
var _local1:Number = (FlxG.elapsed * 60);
var _local2:int = (this.y + (this.height / 2));
this.acceleration.y = (introvectiveConstant * Math.sqrt(Math.abs(_local2)));
if (_local2 > 0){
this.acceleration.y = -(this.acceleration.y);
};
super.update();
this.velocity.y = (this.velocity.y - ((this.velocity.y * verticalDragCoeff) * _local1));
}
}
}//package WorldObjects
Section 172
//Player (WorldObjects.Player)
package WorldObjects {
import org.flixel.*;
public class Player extends PhysicsObject {
private var onGround:Boolean;
private var moveSpeed:int;
private static const jumpSpeed:int = 250;
private static const vertMoveAccel:int = 5;
private static const fuzorHorizMoveSpeed:int = 250;
private static const horizMoveSpeed:int = 125;
public static var SprNaaij:Class = Player_SprNaaij;
public static var SprMell:Class = Player_SprMell;
public static var SprMother:Class = Player_SprMother;
public static var SprFuzor:Class = Player_SprFuzor;
public function Player(_arg1:int, _arg2:int, _arg3:String){
var _local4:Class;
if (_arg3.toLowerCase() == "mom"){
_local4 = SprMother;
} else {
if (_arg3.toLowerCase() == "fuzor"){
_local4 = SprFuzor;
} else {
if (_arg3.toLowerCase() == "naaij"){
_local4 = SprNaaij;
} else {
if (_arg3.toLowerCase() == "mell"){
_local4 = SprMell;
};
};
};
};
super(_local4, _arg1, _arg2, true, false);
this.width = 24;
this.offset.x = 4;
if (_local4 == SprFuzor){
moveSpeed = fuzorHorizMoveSpeed;
} else {
moveSpeed = horizMoveSpeed;
};
addAnimation("standRightUp", [0], 0, false);
addAnimation("walkRightUp", [0, 1, 2, 3], 10, true);
addAnimation("standLeftUp", [7], 0, false);
addAnimation("walkLeftUp", [4, 5, 6, 7], 10, true);
addAnimation("standRightDown", [8], 0, false);
addAnimation("walkRightDown", [8, 9, 10, 11], 10, true);
addAnimation("standLeftDown", [15], 0, false);
addAnimation("walkLeftDown", [12, 13, 14, 15], 10, true);
addAnimation("floatRight", [16], 0, false);
addAnimation("flyRight", [16, 17, 18, 19], 10, true);
addAnimation("floatLeft", [23], 0, false);
addAnimation("flyLeft", [20, 21, 22, 23], 10, true);
}
override public function hitFloor(_arg1:FlxCore=null):Boolean{
if (centerY < 0){
onGround = true;
};
return (super.hitFloor(_arg1));
}
public function teleport():void{
onGround = false;
}
private function get centerY():int{
return ((y + 16));
}
override public function update():void{
if (velocity.y != 0){
onGround = false;
};
var _local1:Number = (FlxG.elapsed * 80);
if (((FlxG.keys.UP) && (!(onGround)))){
velocity.y = (velocity.y - (vertMoveAccel * _local1));
};
if (((FlxG.keys.DOWN) && (!(onGround)))){
velocity.y = (velocity.y + (vertMoveAccel * _local1));
};
if (((FlxG.keys.RIGHT) && (!(FlxG.keys.LEFT)))){
velocity.x = moveSpeed;
this.facing = RIGHT;
if (onGround){
if (centerY <= 0){
this.play("walkRightUp");
} else {
this.play("walkRightDown");
};
};
} else {
if (((!(FlxG.keys.RIGHT)) && (FlxG.keys.LEFT))){
velocity.x = -(moveSpeed);
this.facing = LEFT;
if (onGround){
if (centerY <= 0){
this.play("walkLeftUp");
} else {
this.play("walkLeftDown");
};
};
} else {
velocity.x = 0;
if (onGround){
if (this.facing == RIGHT){
if (centerY <= 0){
this.play("standRightUp");
} else {
this.play("standRightDown");
};
} else {
if (centerY <= 0){
this.play("standLeftUp");
} else {
this.play("standLeftDown");
};
};
};
};
};
if (((onGround) && (FlxG.keys.justPressed("X")))){
if (centerY > 0){
velocity.y = jumpSpeed;
} else {
velocity.y = -(jumpSpeed);
};
};
if (!onGround){
if (((((((FlxG.keys.LEFT) || (FlxG.keys.RIGHT))) || (FlxG.keys.UP))) || (FlxG.keys.DOWN))){
if (this.facing == RIGHT){
this.play("flyRight");
} else {
this.play("flyLeft");
};
} else {
if (this.facing == RIGHT){
this.play("floatRight");
} else {
this.play("floatLeft");
};
};
};
if (FlxG.keys.justPressed("L")){
trace(((this.x + ", ") + this.y));
};
super.update();
}
override public function hitCeiling(_arg1:FlxCore=null):Boolean{
if (centerY > 0){
onGround = true;
};
return (super.hitCeiling(_arg1));
}
}
}//package WorldObjects
Section 173
//Player_SprFuzor (WorldObjects.Player_SprFuzor)
package WorldObjects {
import mx.core.*;
public class Player_SprFuzor extends BitmapAsset {
}
}//package WorldObjects
Section 174
//Player_SprMell (WorldObjects.Player_SprMell)
package WorldObjects {
import mx.core.*;
public class Player_SprMell extends BitmapAsset {
}
}//package WorldObjects
Section 175
//Player_SprMother (WorldObjects.Player_SprMother)
package WorldObjects {
import mx.core.*;
public class Player_SprMother extends BitmapAsset {
}
}//package WorldObjects
Section 176
//Player_SprNaaij (WorldObjects.Player_SprNaaij)
package WorldObjects {
import mx.core.*;
public class Player_SprNaaij extends BitmapAsset {
}
}//package WorldObjects
Section 177
//Portal (WorldObjects.Portal)
package WorldObjects {
public class Portal extends WorldObject {
private static var SprPortal:Class = Portal_SprPortal;
public function Portal(_arg1:int, _arg2:int){
super(SprPortal, _arg1, _arg2, true, false);
this.addAnimation("portal", [0, 1, 2, 3], 10, true);
this.play("portal");
}
}
}//package WorldObjects
Section 178
//Portal_SprPortal (WorldObjects.Portal_SprPortal)
package WorldObjects {
import mx.core.*;
public class Portal_SprPortal extends BitmapAsset {
}
}//package WorldObjects
Section 179
//Sign (WorldObjects.Sign)
package WorldObjects {
public class Sign extends WorldObject {
public var text:String;
private static var SprSign:Class = Sign_SprSign;
public function Sign(_arg1:int, _arg2:int, _arg3:String){
super(SprSign, _arg1, _arg2);
this.text = _arg3;
}
}
}//package WorldObjects
Section 180
//Sign_SprSign (WorldObjects.Sign_SprSign)
package WorldObjects {
import mx.core.*;
public class Sign_SprSign extends BitmapAsset {
}
}//package WorldObjects
Section 181
//WorldObject (WorldObjects.WorldObject)
package WorldObjects {
import org.flixel.*;
public class WorldObject extends FlxSprite {
public function WorldObject(_arg1:Class=null, _arg2:int=0, _arg3:int=0, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:uint=0, _arg7:uint=0, _arg8:Boolean=false){
super(_arg2, _arg3);
this.loadGraphic(_arg1, _arg4, _arg5, _arg6, _arg7, _arg8);
}
}
}//package WorldObjects
Section 182
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 183
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 184
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 185
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropdown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.shadowDirection = "center";
this.fontWeight = "normal";
this.dropShadowEnabled = true;
this.leading = 0;
this.backgroundColor = 0xFFFFFF;
this.shadowDistance = 1;
this.cornerRadius = 0;
this.borderThickness = 0;
this.paddingLeft = 5;
this.paddingRight = 5;
};
};
}
}
}//package
Section 186
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 187
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.backgroundColor = 0xFFFFFF;
this.borderThickness = 0;
};
};
}
}
}//package
Section 188
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.borderStyle = "errorTipRight";
this.paddingTop = 4;
this.borderColor = 13510953;
this.color = 0xFFFFFF;
this.fontSize = 9;
this.shadowColor = 0;
this.paddingLeft = 4;
this.paddingBottom = 4;
this.paddingRight = 4;
};
};
}
}
}//package
Section 189
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fillColor = 0xFFFFFF;
this.kerning = false;
this.iconColor = 0x111111;
this.textRollOverColor = 2831164;
this.horizontalAlign = "left";
this.shadowCapColor = 14015965;
this.backgroundAlpha = 1;
this.filled = true;
this.textDecoration = "none";
this.roundedBottomCorners = true;
this.fontThickness = 0;
this.focusBlendMode = "normal";
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.horizontalGap = 8;
this.borderCapColor = 9542041;
this.buttonColor = 7305079;
this.indentation = 17;
this.selectionDisabledColor = 0xDDDDDD;
this.closeDuration = 250;
this.embedFonts = false;
this.paddingTop = 0;
this.letterSpacing = 0;
this.focusAlpha = 0.4;
this.bevel = true;
this.fontSize = 10;
this.shadowColor = 0xEEEEEE;
this.borderAlpha = 1;
this.paddingLeft = 0;
this.fontWeight = "normal";
this.indicatorGap = 14;
this.focusSkin = HaloFocusRect;
this.dropShadowEnabled = false;
this.leading = 2;
this.borderSkin = HaloBorder;
this.fontSharpness = 0;
this.modalTransparencyDuration = 100;
this.borderThickness = 1;
this.backgroundSize = "auto";
this.borderStyle = "inset";
this.borderColor = 12040892;
this.fontAntiAliasType = "advanced";
this.errorColor = 0xFF0000;
this.shadowDistance = 2;
this.horizontalGridLineColor = 0xF7F7F7;
this.stroked = false;
this.modalTransparencyColor = 0xDDDDDD;
this.cornerRadius = 0;
this.verticalAlign = "top";
this.textIndent = 0;
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.verticalGridLineColor = 14015965;
this.themeColor = 40447;
this.version = "3.0.0";
this.shadowDirection = "center";
this.modalTransparency = 0.5;
this.repeatInterval = 35;
this.openDuration = 250;
this.textAlign = "left";
this.fontFamily = "Verdana";
this.textSelectedColor = 2831164;
this.paddingBottom = 0;
this.strokeWidth = 1;
this.fontGridFitType = "pixel";
this.horizontalGridLines = false;
this.useRollOver = true;
this.verticalGridLines = true;
this.repeatDelay = 500;
this.fontStyle = "normal";
this.dropShadowColor = 0;
this.focusThickness = 2;
this.verticalGap = 6;
this.disabledColor = 11187123;
this.paddingRight = 0;
this.focusRoundedCorners = "tl tr bl br";
this.borderSides = "left top right bottom";
this.disabledIconColor = 0x999999;
this.modalTransparencyBlur = 3;
this.color = 734012;
this.selectionDuration = 250;
this.highlightAlphas = [0.3, 0];
};
};
}
}
}//package
Section 190
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 191
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 192
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".linkButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.paddingLeft = 2;
this.paddingBottom = 2;
this.paddingRight = 2;
};
};
}
}
}//package
Section 193
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderColor = 0xFFFFFF;
this.backgroundColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderAlpha = 1;
};
};
}
}
}//package
Section 194
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.backgroundColor = 0xFFFFFF;
this.backgroundImage = "";
this.horizontalAlign = "left";
this.paddingLeft = 0;
this.paddingBottom = 0;
this.paddingRight = 0;
};
};
}
}
}//package
Section 195
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".popUpMenu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.textAlign = "left";
};
};
}
}
}//package
Section 196
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 197
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderStyle = "inset";
this.borderColor = 14015965;
this.highlightColor = 12897484;
this.backgroundColor = 0xFFFFFF;
this.shadowCapColor = 14015965;
this.shadowColor = 14015965;
this.paddingLeft = 5;
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.paddingRight = 5;
};
};
}
}
}//package
Section 198
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 199
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 200
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0xFFFFFF;
this.textAlign = "center";
};
};
}
}
}//package
Section 201
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 202
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 203
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 204
//BabiesDream (BabiesDream)
package {
import flash.events.*;
import org.flixel.*;
import states.*;
public class BabiesDream extends FlxGame {
public static var currMusic:Class;
public static var SprCursor:Class = BabiesDream_SprCursor;
public static var save:FlxSave = new FlxSave("BabiesDream");
public function BabiesDream():void{
super(320, 240, IntroState, 2);
useDefaultHotKeys = true;
setLogoFX(4294967295);
this.addEventListener(Event.ADDED_TO_STAGE, onAdded);
help("Jump", "Nothing", "Nothing", "Move");
}
private function onAdded(_arg1:Event):void{
var _local4:String;
var _local5:String;
var _local6:int;
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
var _local2:Array = new Array("armorgames.com");
var _local3:Boolean;
if (_local2.length > 0){
_local3 = false;
_local4 = stage.loaderInfo.url.split("/")[2];
for (_local5 in _local2) {
_local6 = _local4.toLowerCase().indexOf(_local2[_local5]);
if ((((_local6 > -1)) && ((_local6 == (_local4.length - _local2[_local5].length))))){
_local3 = true;
break;
};
};
};
if (!_local3){
this.alpha = 0;
};
}
}
}//package
Section 205
//BabiesDream_SprCursor (BabiesDream_SprCursor)
package {
import mx.core.*;
public class BabiesDream_SprCursor extends BitmapAsset {
}
}//package
Section 206
//en_US$core_properties (en_US$core_properties)
package {
import mx.resources.*;
public class en_US$core_properties extends ResourceBundle {
public function en_US$core_properties(){
super("en_US", "core");
}
override protected function getContent():Object{
var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."};
return (_local1);
}
}
}//package
Section 207
//en_US$skins_properties (en_US$skins_properties)
package {
import mx.resources.*;
public class en_US$skins_properties extends ResourceBundle {
public function en_US$skins_properties(){
super("en_US", "skins");
}
override protected function getContent():Object{
var _local1:Object = {notLoaded:"Unable to load '{0}'."};
return (_local1);
}
}
}//package
Section 208
//en_US$styles_properties (en_US$styles_properties)
package {
import mx.resources.*;
public class en_US$styles_properties extends ResourceBundle {
public function en_US$styles_properties(){
super("en_US", "styles");
}
override protected function getContent():Object{
var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."};
return (_local1);
}
}
}//package
Section 209
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import org.flixel.data.*;
import flash.utils.*;
public class Preloader extends FlxFactory {
private var playButton:Sprite;
public function Preloader():void{
className = "BabiesDream";
super();
playButton = new Sprite();
playButton.mouseChildren = false;
playButton.buttonMode = true;
var _local1:TextField = new TextField();
_local1.defaultTextFormat = new TextFormat("system", 24, 0xFFFFFF);
_local1.embedFonts = true;
_local1.text = "PLAY";
_local1.width = _local1.textWidth;
_local1.height = _local1.textHeight;
playButton.addChild(_local1);
playButton.x = ((640 - playButton.width) / 2);
playButton.y = 375;
playButton.visible = false;
this.addChild(playButton);
}
override protected function onEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:uint;
graphics.clear();
if (framesLoaded == totalFrames){
_local2 = 0;
while (_local2 < bits.length) {
bits[_local2].visible = true;
_local2++;
};
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
playButton.visible = true;
playButton.addEventListener(MouseEvent.CLICK, onPlayClicked);
nextFrame();
} else {
_local3 = ((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 10);
_local2 = 0;
while ((((_local2 < _local3)) && ((_local2 < bits.length)))) {
bits[_local2].visible = true;
_local2++;
};
};
}
private function onPlayClicked(_arg1:MouseEvent):void{
onEnterFramePostAd(null);
}
private function onEnterFramePostAd(_arg1:Event):void{
var _local2:int;
var _local4:Object;
this.removeChild(playButton);
var _local3:Class = Class(getDefinitionByName(className));
if (_local3){
_local4 = new (_local3);
addChild((_local4 as DisplayObject));
};
_local2 = (bits.length - 1);
while (_local2 >= 0) {
bits.pop();
_local2--;
};
removeChild(Buffer);
}
}
}//package