STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228114
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/29595848?noj=FRM29595848-9DC" width="1" height="1"></div>

kingdom-of-the-wind.swf

This is the info page for
Flash #114683

(Click the ID number above for more basic data on this flash file.)


Text
Create Rider Units
(engine unit)
(shotcut: 1)

<p align="right"><font face="Verdana" size="8" color="#ffcc00" letterSpacing="0.000000" kerning="1">5 mana</font></p>

Create Copter
(engine unit)
(shotcut: 2)

Create Eagle Warrior
(animal unit)
(shotcut: 3)

Create Panzer
(engine unit)
(shotcut: 4)

Create Dragon
(animal unit)
(shotcut: 5)

Create Ice Turret
(shotcut: Q)

Create Fire Turret
(shotcut: W)

Create Thunder Turret
(shotcut: E)

Upgrade units range
(shotcut: A)

Upgrade units health
(shotcut: S)

Upgrade units level
(shotcut: D)

Upgrade units attack level
(shotcut: F)

Upgrade units defense level
(shotcut: G)

Upgrade Max Manapool
(shotcut: Z)

Repair Castle
(1 mana for 10 health)
(shotcut: X)

Heal all units
(shotcut: C)

Cast Special Attack
(shotcut: V)

hundreds

of

online

games

awesome

VISIT

sponsored by

Please visit our sponsor
Link will be in new window

developed by

Kingdom Of The Wind

Play

<p align="center"></p>

<p align="center"></p>

<p align="center"></p>

<p align="center"></p>

<p align="center"><font face="Charlemagne Std" size="12" color="#ffcc00" letterSpacing="0.000000" kerning="1">Enemy Wave</font></p>

<p align="right"><font face="Verdana" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

Click here to select
unit that will
be created
or
press [1]
for shortcut

Now click one
of these mark to select
the position of new unit
or
you can move icon
using right or left arrow
and then press [space]

While waiting
move cursor up or down
to see around the castle
up and down arrow
can be used for this purpose

Or
you can see enemy
strength on each
side from this meter

AND
you MAY need to
upgrade your troops
skills

or
launch
special attack

effects volume

music volume

graphic quality

Continue

Continue

New Game

New Game

Add Game To Your Site

Add Game To Your Site

Play More Games

Play More Games

Credit

Credit

Instructions

About Kingdom of the Wind Gameplay
Your goal as a Southern Wind Warrior leader is to defend your last Wind Castle for 8
days before help comes from another Wind Tribe. Create units and turrets from the
creation area on the right panel and choose their first stand so they'll be able to
defend your castle.
Repair your castle by using the repair option from the upgrade tab on the right
panel. Unit upgrades like range, attack, defense, level and Special attack can also be
cast in this area.
At the end of each day, you will receive experience points that can be used to
upgrade your castle with new turrets and units.  You can only do this at the end of
each day so manage your experience points wisely.

G
a
m
e
P
l
a
y

Shortcuts

Shortcuts

Shortcuts

Units

Units

Units

EXP

EXP

EXP

Battle

Battle

Battle

Upgrade

Upgrade

Upgrade

GamePlay

GamePlay

GamePlay

Here is some shortcuts for the gameplay

1 : Create rider units
2 : Create copter units
3 : Create eagle warrior
4 : Create panzer units
5 : Create red dragon
Q : Create ice turret
W : Create fire turret
E : Create thunder turret

Creating units and turrets

A : Upgrade units range
S : Upgrade units health
D : Upgrade units level
F : Upgrade units attack
G : Upgrade units defense
Z : Increase Manapool
X : Repair castle
C : Heal existing units
V : Perform special attack

Upgrading and repairing

I : Show/hide upgrade panel
O : Show/hide create panel
P : Show option panel and pause game
[esc] : hide option panel and resume game
cancel unit/turret creation

Miscellaneous functions

S
h
o
r
t
c
u
t
s

How to Create Units
Select which unit or turret will be created, then select their position. Use mouse to
click on the unit or turret icon on the right panel, and move it to one of the plus
signs that appear. Or with keyboard shortcuts, select the unit or turret with the
shortcut keys described on the "SHORTCUTS" page, and select their new position
using right or left arrows, and press [space] to place your unit position
You will automatically generate mana as time progresses. This maximum can be
increased by either purchasing an upgrade with experience between levels, or using
mana within a level to boost your total limit. You also gain mana from killing
opponents; stronger enemies will give you more mana.

U
n
i
t
s

What is EXP for?
You can gain EXP by killing enemies, create units and turrets. You can use your
earned EXP in the Upgrade Menu to purchase new skills and upgrade existing ones.
Choose your upgrades wisely, as you cannot reset your decisions! You can replay
previous battle to make your EXP grow. If you quit battle you wouldn’t earn any
EXP. If you die at battle you only learn half of your EXP.

E
X
P

How to Win the Battle
The goal of this game is to complete each day by surviving the enemy onslaught,
while sending your own forces to destroy them. Each day will continue until the
time that is shown on the Enemy Wave bar is full.
While your opponent may have the advantage of superior numbers, your castle can
be equipped with powerful turrets. You can build Ice turrets, Fire turrets, and
Thunder turrets that are strong enough to defend your castle.

B
a
t
t
l
e

How to Upgrade during Battle
There are some temporary upgrades during battle that can increase your unit’s
ability, your mana pool, or to repair your castle from damage. These upgrades are
available on the right panel in the upgrade areas.
Unit upgrade is used to increase a newly created unit’s range, level, health, attack,
or defense, so that they will be more powerful than before. Of course these upgrades
cost mana.
Mana pool upgrade is used to increase your mana limit and regeneration speed, so
that you will receive more mana as time progresses. This upgrade costs mana too.
Healing is used to heal all present units and Repair is used to reduce the castle’s
damage.

U
p
g
r
a
d
e

Continue

Continue

Level Select

Day  #1

Day  #2

Day  #3

Day  #4

Day  #5

Day  #6

Day  #7

Day  #8

Play

Play

Load

Load

Save

Save

Play More Games

Play More Games

Upgrade

Upgrade

Statistics

Statistics

Instructions

Instructions

Day 1:
It's you, the Lost Eagle of Wind Warriors
that has been chosen to be the one to
finish this long war against evil.
Defend our Castle, so they won't be able
to destroy our last stand.
Hint: Save your mana for mana pool upgrade.
More mana, more troops.

Day 2:

It flies, it is red, and it is attacking. Big
Red Bats have come to show their
strength.
Make sure that we have our army
prepared before they come to the field.
Hint: You need to train your units faster than
before.

Day 3:

Half of the Panzer troops have changed
their side sir. This is bad because they
already know our strength.
And also they have changed their color.
Do we already have our Panzer troop
sir?
Hint: More mana at the start of battle is
needed, unless you can regenerate it faster.

Day 4:

Ever thought about Flying Knights?
Here come the real ones without horses.
And yes, they have their swords and
wings of course.
Hint: You need to unlock turrets. The bigger
it is the better.

Day 5:

Each day feels longer than before. Do
you realize that?
Today, their Dragon army is coming to
the battlefield. You must prepare your
Dragon.
Hint: Repair your castle quickly as your
enemy hurts it.

Day 6:

Nothing special, unless they are getting
stronger by the day. Are they upgrading
their troops? Have you upgraded your
troops?
And of course, today’s battle will take
longer than yesterday’s.

Day 7:

It seems that our troop morale is coming
down as time progresses.
We need more and more upgrades for our
troops, don't we?

Day 8: Final Battle

Here comes the Ultimate Evil, daring to
challenge your defense.
Do whatever it takes to defend your
very castle. Or die with honor as a Wind
Warrior.

Main Menu

Main Menu

Click here to upgrade
your skills

Saving Game

Your progress has been
saved

Loading Game

Your progress has been
loaded

Cannot load game progress
Create new game ?

Upgrades

experience point :

<p align="right"><font face="Palatino Linotype" size="17" color="#000000" letterSpacing="0.000000" kerning="1">0</font></p>

Insufficient experience point

Maximum upgrade reached

<p align="right"><font face="Franklin Gothic Medium" size="10" color="#ffcc00" letterSpacing="0.000000" kerning="1">0</font></p>

exp.

upgrades castle level

upgrades ice turret level

upgrades fire turret level

upgrades thunder turret level

upgrades rider level

upgrades copter level

upgrades eagle level

upgrades panzer level

upgrades dragon level

faster unit create time

faster turrets create time

faster mana regeneration
time

increase initial mana

unlock castle

unlock ice turret

unlock fire turret

unlock thunder turret

unlock rider

unlock copter

unlock eagle

unlock panzer

unlock dragon

unlock faster unit create time

unlock faster turrets
create time

unlock faster mana
regeneration time

unlock greater initial mana

Statistics

Cancel

Cancel

Experience gained
Experience spent
Enemy killed
Unit built
Unit lost
Turret built
Turret lost
Mana earned
Mana spent

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

<p align="right"><font face="Charlemagne Std" size="16" color="#000000" letterSpacing="1.000000" kerning="1">0</font></p>

Loading Game

Game result

Result

Evil ultimate killed

Evil knight killed

Evil panzer killed

Big bat killed

Evil copter killed

Small bat killed

Dragon created

Panzer created

Eagle created

Copter created

Rider created

Ice turret created

Evil dragon killed

Fire turret created

Thunder turret
created

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

Experience earned

<p align="right"><font face="Palatino Linotype" size="16" color="#990000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

Your castle has down with the dust
Try again and get your honor back

Retry

Retry

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="16" color="#990000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

x   7 XP

x   6 XP

x   5 XP

x   4 XP

x   3 XP

x   2 XP

x   1 XP

x 2.5 XP

x    2 XP

x 1.5 XP

x    1 XP

x 0.5 XP

x    3 XP

x    4 XP

(= total XP/2)

Congratulations for beating down all enemies
Progress to the next level

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="14" color="#000000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

<p align="right"><font face="Palatino Linotype" size="16" color="#990000" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

Congratulations for beating down all enemies
You are definitely a wind warrior
Wanna beat the scores ?

Credits

Musics
Fierce Battle by Evil-Dog
-.sOuNdWaVeS.- by digital-musician
Entering the Stronghold by Denny Schneidemesser (Danman87)
all musics taken from Newgrounds.com
Project Manager
Rudy Sudarto
Programmer
Andi Eko Suryono
Illustrator  & Animator
Firmansyah

ActionScript [AS3]

Section 1
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent) package com.kongregate.as3.client.events { import flash.events.*; public class KongregateEvent extends Event { public static const COMPLETE:String = "component_api_available"; public function KongregateEvent(_arg1:String){ super(_arg1); } } }//package com.kongregate.as3.client.events
Section 2
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService) package com.kongregate.as3.client.services { import flash.events.*; public class AbstractShadowService extends EventDispatcher { protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{ trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4)); } } }//package com.kongregate.as3.client.services
Section 3
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow) package com.kongregate.as3.client.services { public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices { private var mode:String; public function HighScoreServiceShadow(){ mode = ""; } public function submit(_arg1:Number, _arg2:String=null):void{ alert("IHighScoreServices", "submit", arguments); } public function connect():Boolean{ alert("IKongregateServices", "connect"); return (true); } public function requestList(_arg1:Function):void{ alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]")); _arg1({success:false}); } public function setMode(_arg1:String):void{ alert("IHighScoreServices", "setMode", arguments); this.mode = _arg1; } } }//package com.kongregate.as3.client.services
Section 4
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices) package com.kongregate.as3.client.services { public interface IHighScoreServices { function setMode(_arg1:String):void; function submit(_arg1:Number, _arg2:String=null):void; function requestList(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 5
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices) package com.kongregate.as3.client.services { import flash.events.*; public interface IKongregateServices extends IEventDispatcher { function getPlayerInfo(_arg1:Function):void; function connect(_arg1:Number=-1):Boolean; } }//package com.kongregate.as3.client.services
Section 6
//IStatServices (com.kongregate.as3.client.services.IStatServices) package com.kongregate.as3.client.services { public interface IStatServices { function submitArray(_arg1:Array):void; function submit(_arg1:String, _arg2:Number):void; } }//package com.kongregate.as3.client.services
Section 7
//IUserServices (com.kongregate.as3.client.services.IUserServices) package com.kongregate.as3.client.services { public interface IUserServices { function getName():String; function getPlayerInfo(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 8
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow) package com.kongregate.as3.client.services { public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices { public function getName():String{ alert("IKongregateServices", "getName"); return ("Guest"); } public function connect(_arg1:Number=-1):Boolean{ alert("IKongregateServices", "connect", arguments); return (true); } public function getPlayerInfo(_arg1:Function):void{ alert("IKongregateServices", "getPlayerInfo"); _arg1(new Object()); } } }//package com.kongregate.as3.client.services
Section 9
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow) package com.kongregate.as3.client.services { public class StatServiceShadow extends AbstractShadowService implements IStatServices { public function submitArray(_arg1:Array):void{ alert("IStatServices", "submitArray", arguments); } public function submit(_arg1:String, _arg2:Number):void{ alert("IStatServices", "submitStat", arguments); } } }//package com.kongregate.as3.client.services
Section 10
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow) package com.kongregate.as3.client.services { public class UserServiceShadow extends AbstractShadowService implements IUserServices { public function getName():String{ alert("UserService", "getName"); return ("Guest"); } public function getPlayerInfo(_arg1:Function):void{ alert("UserService", "getPlayerInfo"); _arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""}); } } }//package com.kongregate.as3.client.services
Section 11
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; public interface IAPIBootstrap { function init(_arg1:Event=null, _arg2:Stage=null):void; function hideLog():void; function showLog(_arg1:int=0):void; } }//package com.kongregate.as3.client
Section 12
//KongregateAPI (com.kongregate.as3.client.KongregateAPI) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; import com.kongregate.as3.client.events.*; import com.kongregate.as3.client.services.*; import flash.utils.*; import flash.net.*; import flash.system.*; import flash.errors.*; public class KongregateAPI extends Sprite { private const VERSION:Number = 1; private var loader:Loader; private var loadedDomain:ApplicationDomain; private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices"; private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices"; private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices"; private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices"; private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf"; private static var _connected:Boolean; private static var kUser:IUserServices; private static var _loaded:Boolean; private static var kServices:IKongregateServices; private static var kScores:IHighScoreServices; private static var mInstance:KongregateAPI; private static var kStats:IStatServices; private static var kAPI:IAPIBootstrap; public function KongregateAPI(){ if (mInstance != null){ throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access.")); }; mInstance = this; this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } public function get loaded():Boolean{ return (_loaded); } public function get connected():Boolean{ return (_connected); } private function alertConnected(_arg1:TimerEvent=null):void{ var _local2:KongregateEvent; var _local3:Boolean; _local2 = new KongregateEvent(KongregateEvent.COMPLETE); _local3 = this.dispatchEvent(_local2); } private function init(_arg1:Event):void{ var _local2:Object; var _local3:String; var _local4:URLRequest; var _local5:LoaderContext; this.removeEventListener(Event.ADDED_TO_STAGE, init); _loaded = false; _connected = false; _local2 = LoaderInfo(root.loaderInfo).parameters; _local3 = _local2.api_path; if (_local3 == null){ trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded."); createShadowServices(); return; }; Security.allowDomain("*.kongregate.com"); Security.allowDomain("kongregatetrunk.com"); _local4 = new URLRequest(_local3); _local5 = new LoaderContext(false); _local5.applicationDomain = ApplicationDomain.currentDomain; _local5.securityDomain = SecurityDomain.currentDomain; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); loader.load(_local4, _local5); } public function get api():IAPIBootstrap{ return (kAPI); } private function loadComplete(_arg1:Event):void{ getServices(); } public function get scores():IHighScoreServices{ return (kScores); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ throw (new IOError(("API file not found. " + _arg1))); } public function get services():IKongregateServices{ return (kServices); } public function get stats():IStatServices{ return (kStats); } private function createShadowServices():void{ var _local1:Timer; trace(">>> Kongregate Shadow Services instantiated for local development.."); kServices = new KongregateServiceShadow(); kScores = new HighScoreServiceShadow(); kStats = new StatServiceShadow(); kUser = new UserServiceShadow(); _local1 = new Timer(200, 1); _local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected); _local1.start(); _connected = true; } public function get user():IUserServices{ return (kUser); } private function getServices():void{ var _local1:ApplicationDomain; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = ApplicationDomain.currentDomain; kAPI = IAPIBootstrap(loader.getChildAt(0)); this.addChild(loader); _local2 = _local1.getDefinition(CLASS_SERVICES); trace(_local2); kServices = _local2.getInstance(); _local3 = _local1.getDefinition(CLASS_SCORES); kScores = _local3.getInstance(); _local4 = _local1.getDefinition(CLASS_STATS); kStats = _local4.getInstance(); _local5 = _local1.getDefinition(CLASS_USER); kUser = _local5.getInstance(); kServices.connect(VERSION); _loaded = true; _connected = true; alertConnected(); } public static function getInstance():KongregateAPI{ if (!mInstance){ throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it.")); }; return (mInstance); } } }//package com.kongregate.as3.client
Section 13
//BaseButton (fl.controls.BaseButton) package fl.controls { import flash.events.*; import flash.display.*; import fl.core.*; import flash.utils.*; import fl.events.*; public class BaseButton extends UIComponent { protected var _selected:Boolean;// = false private var unlockedMouseState:String; protected var pressTimer:Timer; protected var mouseState:String; protected var background:DisplayObject; private var _mouseStateLocked:Boolean;// = false protected var _autoRepeat:Boolean;// = false private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35}; public function BaseButton(){ _selected = false; _autoRepeat = false; _mouseStateLocked = false; super(); buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true); } protected function endPress():void{ pressTimer.reset(); } public function set mouseStateLocked(_arg1:Boolean):void{ _mouseStateLocked = _arg1; if (_arg1 == false){ setMouseState(unlockedMouseState); } else { unlockedMouseState = mouseState; }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function get selected():Boolean{ return (_selected); } protected function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_DOWN){ setMouseState("down"); startPress(); } else { if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){ setMouseState("over"); endPress(); } else { if (_arg1.type == MouseEvent.ROLL_OUT){ setMouseState("up"); endPress(); }; }; }; } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } protected function buttonDown(_arg1:TimerEvent):void{ if (!_autoRepeat){ endPress(); return; }; if (pressTimer.currentCount == 1){ pressTimer.delay = Number(getStyleValue("repeatInterval")); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } public function set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function setupMouseEvents():void{ addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true); } protected function drawLayout():void{ background.width = width; background.height = height; } protected function drawBackground():void{ var _local1:String; var _local2:DisplayObject; _local1 = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); _local2 = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 14
//Button (fl.controls.Button) package fl.controls { import flash.display.*; import fl.core.*; import fl.managers.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var emphasizedBorder:DisplayObject; protected var _emphasized:Boolean;// = false private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function Button(){ _emphasized = false; super(); } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; var _local3:*; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("emphasizedPadding")); if ((((_local2 < 0)) || (!(_emphasized)))){ _local2 = 0; }; _local3 = getStyleValue("focusRectPadding"); _local3 = ((_local3)==null) ? 2 : _local3; _local3 = (_local3 + _local2); uiFocusRect.x = -(_local3); uiFocusRect.y = -(_local3); uiFocusRect.width = (width + (_local3 * 2)); uiFocusRect.height = (height + (_local3 * 2)); }; } public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local1:Object; var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; _local1 = getStyleValue("emphasizedSkin"); if (_local1 != null){ emphasizedBorder = getDisplayObjectInstance(_local1); }; if (emphasizedBorder != null){ addChildAt(emphasizedBorder, 0); _local2 = Number(getStyleValue("emphasizedPadding")); emphasizedBorder.x = (emphasizedBorder.y = -(_local2)); emphasizedBorder.width = (width + (_local2 * 2)); emphasizedBorder.height = (height + (_local2 * 2)); }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles)); } } }//package fl.controls
Section 15
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement) package fl.controls { public class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package fl.controls
Section 16
//LabelButton (fl.controls.LabelButton) package fl.controls { import flash.events.*; import flash.display.*; import fl.core.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.ui.*; public class LabelButton extends BaseButton implements IFocusManagerComponent { protected var _labelPlacement:String;// = "right" protected var _toggle:Boolean;// = false protected var icon:DisplayObject; protected var oldMouseState:String; protected var mode:String;// = "center" public var textField:TextField; protected var _label:String;// = "Label" private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function LabelButton(){ _labelPlacement = ButtonLabelPlacement.RIGHT; _toggle = false; _label = "Label"; mode = "center"; super(); } protected function toggleSelected(_arg1:MouseEvent):void{ selected = !(selected); dispatchEvent(new Event(Event.CHANGE, true)); } public function get labelPlacement():String{ return (_labelPlacement); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (oldMouseState == null){ oldMouseState = mouseState; }; setMouseState("down"); startPress(); }; } protected function setEmbedFont(){ var _local1:Object; _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ setMouseState(oldMouseState); oldMouseState = null; endPress(); dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } override public function get selected():Boolean{ return ((_toggle) ? _selected : false); } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidate(InvalidationType.SIZE); } public function set toggle(_arg1:Boolean):void{ if (((!(_arg1)) && (super.selected))){ selected = false; }; _toggle = _arg1; if (_toggle){ addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true); } else { removeEventListener(MouseEvent.CLICK, toggleSelected); }; invalidate(InvalidationType.STATE); } public function get label():String{ return (_label); } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_toggle){ invalidate(InvalidationType.STATE); }; } override protected function draw():void{ if (textField.text != _label){ label = _label; }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); drawIcon(); drawTextFormat(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } public function get toggle():Boolean{ return (_toggle); } override protected function configUI():void{ super.configUI(); textField = new TextField(); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; addChild(textField); } override protected function drawLayout():void{ var _local1:Number; var _local2:String; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local1 = Number(getStyleValue("textPadding")); _local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement; textField.height = (textField.textHeight + 4); _local3 = (textField.textWidth + 4); _local4 = (textField.textHeight + 4); _local5 = ((icon)==null) ? 0 : (icon.width + _local1); _local6 = ((icon)==null) ? 0 : (icon.height + _local1); textField.visible = (label.length > 0); if (icon != null){ icon.x = Math.round(((width - icon.width) / 2)); icon.y = Math.round(((height - icon.height) / 2)); }; if (textField.visible == false){ textField.width = 0; textField.height = 0; } else { if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){ _local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1)))); if ((height - 2) > _local4){ _local8 = _local4; } else { _local8 = (height - 2); }; _local3 = _local7; textField.width = _local3; _local4 = _local8; textField.height = _local4; textField.x = Math.round(((width - _local3) / 2)); textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0)); if (icon != null){ icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1)); }; } else { _local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1)))); _local3 = _local7; textField.width = _local3; textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0)); textField.y = Math.round(((height - textField.height) / 2)); if (icon != null){ icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1)); }; }; }; super.drawLayout(); } override protected function initializeAccessibility():void{ if (LabelButton.createAccessibilityImplementation != null){ LabelButton.createAccessibilityImplementation(this); }; } protected function drawIcon():void{ var _local1:DisplayObject; var _local2:String; var _local3:Object; _local1 = icon; _local2 = (enabled) ? mouseState : "disabled"; if (selected){ _local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1)); }; _local2 = (_local2 + "Icon"); _local3 = getStyleValue(_local2); if (_local3 == null){ _local3 = getStyleValue("icon"); }; if (_local3 != null){ icon = getDisplayObjectInstance(_local3); }; if (icon != null){ addChildAt(icon, 1); }; if (((!((_local1 == null))) && (!((_local1 == icon))))){ removeChild(_local1); }; } public function set label(_arg1:String):void{ _label = _arg1; if (textField.text != _label){ textField.text = _label; dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE)); }; invalidate(InvalidationType.SIZE); invalidate(InvalidationType.STYLES); } protected function drawTextFormat():void{ var _local1:Object; var _local2:TextFormat; var _local3:TextFormat; _local1 = UIComponent.getStyleDefinition(); _local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); _local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition())); } } }//package fl.controls
Section 17
//Slider (fl.controls.Slider) package fl.controls { import flash.events.*; import flash.display.*; import fl.core.*; import fl.managers.*; import fl.events.*; import flash.ui.*; public class Slider extends UIComponent implements IFocusManagerComponent { protected var _direction:String; protected var _liveDragging:Boolean;// = false protected var _value:Number;// = 0 protected var _snapInterval:Number;// = 0 protected var _minimum:Number;// = 0 protected var _maximum:Number;// = 10 protected var track:BaseButton; protected var _tickInterval:Number;// = 0 protected var tickContainer:Sprite; protected var thumb:BaseButton; protected static const TICK_STYLES:Object = {upSkin:"tickSkin"}; protected static const TRACK_STYLES:Object = {upSkin:"sliderTrackSkin", overSkin:"sliderTrackSkin", downSkin:"sliderTrackSkin", disabledSkin:"sliderTrackDisabledSkin"}; protected static const THUMB_STYLES:Object = {upSkin:"thumbUpSkin", overSkin:"thumbOverSkin", downSkin:"thumbDownSkin", disabledSkin:"thumbDisabledSkin"}; protected static var defaultStyles:Object = {thumbUpSkin:"SliderThumb_upSkin", thumbOverSkin:"SliderThumb_overSkin", thumbDownSkin:"SliderThumb_downSkin", thumbDisabledSkin:"SliderThumb_disabledSkin", sliderTrackSkin:"SliderTrack_skin", sliderTrackDisabledSkin:"SliderTrack_disabledSkin", tickSkin:"SliderTick_skin", focusRectSkin:null, focusRectPadding:null}; public function Slider(){ _direction = SliderDirection.HORIZONTAL; _minimum = 0; _maximum = 10; _value = 0; _tickInterval = 0; _snapInterval = 0; _liveDragging = false; super(); setStyles(); } public function get minimum():Number{ return (_minimum); } public function set minimum(_arg1:Number):void{ _minimum = _arg1; this.value = Math.max(_arg1, this.value); invalidate(InvalidationType.DATA); } public function get maximum():Number{ return (_maximum); } protected function positionThumb():void{ thumb.x = ((((_direction)==SliderDirection.VERTICAL) ? ((maximum - minimum) - value) : (value - minimum) / (maximum - minimum)) * _width); } protected function clearTicks():void{ if (((!(tickContainer)) || (!(tickContainer.parent)))){ return; }; removeChild(tickContainer); } protected function onTrackClick(_arg1:MouseEvent):void{ calculateValue(track.mouseX, InteractionInputType.MOUSE, SliderEventClickTarget.TRACK); if (!liveDragging){ dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE)); }; } public function set maximum(_arg1:Number):void{ _maximum = _arg1; this.value = Math.min(_arg1, this.value); invalidate(InvalidationType.DATA); } public function get liveDragging():Boolean{ return (_liveDragging); } protected function doDrag(_arg1:MouseEvent):void{ var _local2:Number; var _local3:Number; _local2 = (_width / snapInterval); _local3 = track.mouseX; calculateValue(_local3, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB); dispatchEvent(new SliderEvent(SliderEvent.THUMB_DRAG, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE)); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:uint; var _local3:Number; var _local4:Boolean; if (!enabled){ return; }; _local2 = ((snapInterval)>0) ? snapInterval : 1; _local4 = (direction == SliderDirection.HORIZONTAL); if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local4))))){ _local3 = (value - _local2); } else { if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local4))))){ _local3 = (value + _local2); } else { if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local4))))){ _local3 = minimum; } else { if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local4))))){ _local3 = maximum; }; }; }; }; if (!isNaN(_local3)){ _arg1.stopPropagation(); doSetValue(_local3, InteractionInputType.KEYBOARD, null, _arg1.keyCode); }; } override public function set enabled(_arg1:Boolean):void{ if (enabled == _arg1){ return; }; super.enabled = _arg1; track.enabled = (thumb.enabled = _arg1); } protected function thumbPressHandler(_arg1:MouseEvent):void{ stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true); dispatchEvent(new SliderEvent(SliderEvent.THUMB_PRESS, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB)); } public function get snapInterval():Number{ return (_snapInterval); } protected function thumbReleaseHandler(_arg1:MouseEvent):void{ stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler); dispatchEvent(new SliderEvent(SliderEvent.THUMB_RELEASE, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB)); dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE)); } public function set liveDragging(_arg1:Boolean):void{ _liveDragging = _arg1; } public function set value(_arg1:Number):void{ doSetValue(_arg1); } public function set direction(_arg1:String):void{ var _local2:Boolean; _direction = _arg1; _local2 = (_direction == SliderDirection.VERTICAL); if (isLivePreview){ if (_local2){ setScaleY(-1); y = track.height; } else { setScaleY(1); y = 0; }; positionThumb(); return; }; if (((_local2) && (componentInspectorSetting))){ if ((rotation % 90) == 0){ setScaleY(-1); }; }; if (!componentInspectorSetting){ rotation = (_local2) ? 90 : 0; }; } public function set tickInterval(_arg1:Number):void{ _tickInterval = _arg1; invalidate(InvalidationType.SIZE); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES)){ setStyles(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ track.setSize(_width, track.height); track.drawNow(); thumb.drawNow(); }; if (tickInterval > 0){ drawTicks(); } else { clearTicks(); }; positionThumb(); super.draw(); } override protected function configUI():void{ super.configUI(); thumb = new BaseButton(); thumb.setSize(13, 13); thumb.autoRepeat = false; addChild(thumb); thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true); track = new BaseButton(); track.move(0, 0); track.setSize(80, 4); track.autoRepeat = false; track.useHandCursor = false; track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true); addChildAt(track, 0); } public function set snapInterval(_arg1:Number):void{ _snapInterval = _arg1; } public function get value():Number{ return (_value); } public function get direction():String{ return (_direction); } public function get tickInterval():Number{ return (_tickInterval); } override public function setSize(_arg1:Number, _arg2:Number):void{ if ((((_direction == SliderDirection.VERTICAL)) && (!(isLivePreview)))){ super.setSize(_arg2, _arg1); } else { super.setSize(_arg1, _arg2); }; invalidate(InvalidationType.SIZE); } protected function drawTicks():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:uint; var _local5:DisplayObject; clearTicks(); tickContainer = new Sprite(); _local1 = ((maximum)<1) ? (tickInterval / 100) : tickInterval; _local2 = ((maximum - minimum) / _local1); _local3 = (_width / _local2); _local4 = 0; while (_local4 <= _local2) { _local5 = getDisplayObjectInstance(getStyleValue("tickSkin")); _local5.x = (_local3 * _local4); _local5.y = ((track.y - _local5.height) - 2); tickContainer.addChild(_local5); _local4++; }; addChild(tickContainer); } protected function calculateValue(_arg1:Number, _arg2:String, _arg3:String, _arg4:int=undefined):void{ var _local5:Number; _local5 = ((_arg1 / _width) * (maximum - minimum)); if (_direction == SliderDirection.VERTICAL){ _local5 = (maximum - _local5); } else { _local5 = (minimum + _local5); }; doSetValue(_local5, _arg2, _arg3, _arg4); } protected function getPrecision(_arg1:Number):Number{ var _local2:String; _local2 = _arg1.toString(); if (_local2.indexOf(".") == -1){ return (0); }; return (_local2.split(".").pop().length); } protected function doSetValue(_arg1:Number, _arg2:String=null, _arg3:String=null, _arg4:int=undefined):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; _local5 = _value; if (((!((_snapInterval == 0))) && (!((_snapInterval == 1))))){ _local6 = Math.pow(10, getPrecision(snapInterval)); _local7 = (_snapInterval * _local6); _local8 = Math.round((_arg1 * _local6)); _local9 = (Math.round((_local8 / _local7)) * _local7); _arg1 = (_local9 / _local6); _value = Math.max(minimum, Math.min(maximum, _arg1)); } else { _value = Math.max(minimum, Math.min(maximum, Math.round(_arg1))); }; if (((!((_local5 == _value))) && (((((liveDragging) && (!((_arg3 == null))))) || ((_arg2 == InteractionInputType.KEYBOARD)))))){ dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, _arg3, _arg2, _arg4)); }; positionThumb(); } protected function setStyles():void{ copyStylesToChild(thumb, THUMB_STYLES); copyStylesToChild(track, TRACK_STYLES); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 18
//SliderDirection (fl.controls.SliderDirection) package fl.controls { public class SliderDirection { public static var HORIZONTAL:String = "horizontal"; public static var VERTICAL:String = "vertical"; } }//package fl.controls
Section 19
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 20
//InvalidationType (fl.core.InvalidationType) package fl.core { public class InvalidationType { public static const SIZE:String = "size"; public static const ALL:String = "all"; public static const DATA:String = "data"; public static const SCROLL:String = "scroll"; public static const STATE:String = "state"; public static const STYLES:String = "styles"; public static const SELECTED:String = "selected"; public static const RENDERER_STYLES:String = "rendererStyles"; } }//package fl.core
Section 21
//UIComponent (fl.core.UIComponent) package fl.core { import flash.events.*; import flash.display.*; import fl.managers.*; import flash.utils.*; import fl.events.*; import flash.system.*; import flash.text.*; public class UIComponent extends Sprite { protected var _enabled:Boolean;// = true private var _mouseFocusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var _oldIMEMode:String;// = null protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var uiFocusRect:DisplayObject; protected var _width:Number; public var version:String;// = "3.0.0.15" protected var isFocused:Boolean;// = false protected var callLaterMethods:Dictionary; private var _focusEnabled:Boolean;// = true private var tempText:TextField; protected var invalidateFlag:Boolean;// = false protected var _inspector:Boolean;// = false protected var sharedStyles:Object; protected var invalidHash:Object; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var instanceStyles:Object; protected var _x:Number; protected var _y:Number; public static var inCallLaterPhase:Boolean = false; private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)}; public static var createAccessibilityImplementation:Function; private static var focusManagers:Dictionary = new Dictionary(false); public function UIComponent(){ version = "3.0.0.15"; isLivePreview = false; invalidateFlag = false; _enabled = true; isFocused = false; _focusEnabled = true; _mouseFocusEnabled = true; _imeMode = null; _oldIMEMode = null; errorCaught = false; _inspector = false; super(); instanceStyles = {}; sharedStyles = {}; invalidHash = {}; callLaterMethods = new Dictionary(); StyleManager.registerInstance(this); configUI(); invalidate(InvalidationType.ALL); tabEnabled = (this is IFocusManagerComponent); focusRect = false; if (tabEnabled){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; initializeFocusManager(); addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true); } public function drawFocus(_arg1:Boolean):void{ var _local2:Number; isFocused = _arg1; if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){ removeChild(uiFocusRect); uiFocusRect = null; }; if (_arg1){ uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite); if (uiFocusRect == null){ return; }; _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = -(_local2); uiFocusRect.y = -(_local2); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); addChildAt(uiFocusRect, 0); }; } private function callLaterDispatcher(_arg1:Event):void{ var _local2:Dictionary; var _local3:Object; if (_arg1.type == Event.ADDED_TO_STAGE){ removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher); stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); return; }; _arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher); if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); return; }; inCallLaterPhase = true; _local2 = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } override public function get scaleX():Number{ return ((width / startWidth)); } override public function get scaleY():Number{ return ((height / startHeight)); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus((_arg1.target as DisplayObject))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); isFocused = true; }; }; } public function setStyle(_arg1:String, _arg2:Object):void{ if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; instanceStyles[_arg1] = _arg2; invalidate(InvalidationType.STYLES); } override public function get visible():Boolean{ return (super.visible); } public function get componentInspectorSetting():Boolean{ return (_inspector); } override public function get x():Number{ return ((isNaN(_x)) ? super.x : _x); } override public function get y():Number{ return ((isNaN(_y)) ? super.y : _y); } protected function setIMEMode(_arg1:Boolean){ var enabled = _arg1; if (_imeMode != null){ if (enabled){ IME.enabled = true; _oldIMEMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(("IME mode not supported: " + _imeMode))); }; } else { if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _oldIMEMode; }; IME.enabled = false; }; }; } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } public function setSharedStyle(_arg1:String, _arg2:Object):void{ if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; sharedStyles[_arg1] = _arg2; if (instanceStyles[_arg1] == null){ invalidate(InvalidationType.STYLES); }; } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } override public function set scaleX(_arg1:Number):void{ setSize((startWidth * _arg1), height); } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } override public function set scaleY(_arg1:Number):void{ setSize(width, (startHeight * _arg1)); } protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{ var classDef:Object; var skin = _arg1; classDef = null; if ((skin is Class)){ return ((new (skin) as DisplayObject)); }; if ((skin is DisplayObject)){ (skin as DisplayObject).x = 0; (skin as DisplayObject).y = 0; return ((skin as DisplayObject)); }; try { classDef = getDefinitionByName(skin.toString()); } catch(e:Error) { try { classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object); } catch(e:Error) { }; }; if (classDef == null){ return (null); }; return ((new (classDef) as DisplayObject)); } protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{ var _local3:String; for (_local3 in _arg2) { _arg1.setStyle(_local3, getStyleValue(_arg2[_local3])); }; } protected function beforeComponentParameters():void{ } protected function callLater(_arg1:Function):void{ if (inCallLaterPhase){ return; }; callLaterMethods[_arg1] = true; if (stage != null){ stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); } else { addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); }; } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } override public function set visible(_arg1:Boolean):void{ var _local2:String; if (super.visible == _arg1){ return; }; super.visible = _arg1; _local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } protected function hookAccessibility(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, hookAccessibility); initializeAccessibility(); } public function set componentInspectorSetting(_arg1:Boolean):void{ _inspector = _arg1; if (_inspector){ beforeComponentParameters(); } else { afterComponentParameters(); }; } override public function set x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } override public function set y(_arg1:Number):void{ move(_x, _arg1); } protected function checkLivePreview():Boolean{ var className:String; if (parent == null){ return (false); }; try { className = getQualifiedClassName(parent); } catch(e:Error) { }; return ((className == "fl.livepreview::LivePreviewParent")); } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus((_arg1.target as DisplayObject))){ drawFocus(false); isFocused = false; }; } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } public function getFocus():InteractiveObject{ if (stage){ return (stage.focus); }; return (null); } protected function validate():void{ invalidHash = {}; } override public function get height():Number{ return (_height); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } public function get enabled():Boolean{ return (_enabled); } protected function getScaleX():Number{ return (super.scaleX); } protected function getScaleY():Number{ return (super.scaleY); } public function get focusEnabled():Boolean{ return (_focusEnabled); } protected function afterComponentParameters():void{ } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } protected function configUI():void{ var _local1:Number; var _local2:Number; var _local3:Number; isLivePreview = checkLivePreview(); _local1 = rotation; rotation = 0; _local2 = super.width; _local3 = super.height; var _local4 = 1; super.scaleY = _local4; super.scaleX = _local4; setSize(_local2, _local3); move(super.x, super.y); rotation = _local1; startWidth = _local2; startHeight = _local3; if (numChildren > 0){ removeChildAt(0); }; } protected function setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } public function set focusManager(_arg1:IFocusManager):void{ UIComponent.focusManagers[this] = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } protected function isInvalid(_arg1:String, ... _args):Boolean{ if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){ return (true); }; while (_args.length > 0) { if (invalidHash[_args.pop()]){ return (true); }; }; return (false); } public function setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject; _local1 = this; while (_local1) { if (UIComponent.focusManagers[_local1] != null){ return (IFocusManager(UIComponent.focusManagers[_local1])); }; _local1 = _local1.parent; }; return (null); } override public function get width():Number{ return (_width); } public function move(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; super.x = Math.round(_arg1); super.y = Math.round(_arg2); dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); } public function validateNow():void{ invalidate(InvalidationType.ALL, false); draw(); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local2:Object; var _local3:uint; var _local4:uint; var _local5:Object; var _local6:String; _local2 = {}; _local3 = _args.length; _local4 = 0; while (_local4 < _local3) { _local5 = _args[_local4]; for (_local6 in _local5) { if (_local2[_local6] != null){ } else { _local2[_local6] = _args[_local4][_local6]; }; }; _local4++; }; return (_local2); } } }//package fl.core
Section 22
//ComponentEvent (fl.events.ComponentEvent) package fl.events { import flash.events.*; public class ComponentEvent extends Event { public static const HIDE:String = "hide"; public static const BUTTON_DOWN:String = "buttonDown"; public static const MOVE:String = "move"; public static const RESIZE:String = "resize"; public static const ENTER:String = "enter"; public static const LABEL_CHANGE:String = "labelChange"; public static const SHOW:String = "show"; public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("ComponentEvent", "type", "bubbles", "cancelable")); } override public function clone():Event{ return (new ComponentEvent(type, bubbles, cancelable)); } } }//package fl.events
Section 23
//InteractionInputType (fl.events.InteractionInputType) package fl.events { public class InteractionInputType { public static const MOUSE:String = "mouse"; public static const KEYBOARD:String = "keyboard"; } }//package fl.events
Section 24
//SliderEvent (fl.events.SliderEvent) package fl.events { import flash.events.*; public class SliderEvent extends Event { protected var _triggerEvent:String; protected var _keyCode:Number; protected var _value:Number; protected var _clickTarget:String; public static const CHANGE:String = "change"; public static const THUMB_PRESS:String = "thumbPress"; public static const THUMB_DRAG:String = "thumbDrag"; public static const THUMB_RELEASE:String = "thumbRelease"; public function SliderEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:int=0){ _value = _arg2; _keyCode = _arg5; _triggerEvent = _arg4; _clickTarget = _arg3; super(_arg1); } public function get clickTarget():String{ return (_clickTarget); } override public function clone():Event{ return (new SliderEvent(type, _value, _clickTarget, _triggerEvent, _keyCode)); } override public function toString():String{ return (formatToString("SliderEvent", "type", "value", "bubbles", "cancelable", "keyCode", "triggerEvent", "clickTarget")); } public function get triggerEvent():String{ return (_triggerEvent); } public function get value():Number{ return (_value); } public function get keyCode():Number{ return (_keyCode); } } }//package fl.events
Section 25
//SliderEventClickTarget (fl.events.SliderEventClickTarget) package fl.events { public class SliderEventClickTarget { public static const TRACK:String = "track"; public static const THUMB:String = "thumb"; } }//package fl.events
Section 26
//FocusManager (fl.managers.FocusManager) package fl.managers { import flash.events.*; import flash.display.*; import fl.controls.*; import fl.core.*; import flash.utils.*; import flash.text.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ activated = false; calculateCandidates = true; _showFocusIndicator = true; _defaultButtonEnabled = true; super(); focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local5:int; var _local6:int; var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; _local5 = focusableCandidates.length; _local6 = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; _local2 = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject; _local2 = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } private function tabChildrenChangeHandler(_arg1:Event):void{ var _local2:DisplayObjectContainer; if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; _local2 = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } public function getFocus():InteractiveObject{ var _local1:InteractiveObject; _local1 = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; var _local3:TextField; var _local4:SimpleButton; _local2 = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } public function set defaultButton(_arg1:Button):void{ var _local2:Button; _local2 = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ var _local2:InteractiveObject; if (!hasFocusableObjects()){ return; }; _local2 = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int; var _local3:int; _local2 = focusableCandidates.length; _local3 = 0; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local3:DisplayObject; var _local4:InteractiveObject; _local3 = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local3:String; var _local4:String; var _local5:int; var _local6:String; var _local7:String; var _local8:String; var _local9:DisplayObject; var _local10:DisplayObject; _local3 = ""; _local4 = ""; _local8 = "0000"; _local9 = DisplayObject(_arg1); _local10 = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local2:DisplayObject; var _local3:String; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; _local2 = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; _local4 = getIndexOfFocusedObject(_local2); _local5 = false; _local6 = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; _local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:InteractiveObject; if (_arg1.isDefaultPrevented()){ return; }; _local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; _local2 = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; var _local3:Button; _local2 = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ var _local2:InteractiveObject; var _local3:Boolean; calculateCandidates = true; _local2 = InteractiveObject(_arg1.target); _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } } }//package fl.managers
Section 27
//IFocusManager (fl.managers.IFocusManager) package fl.managers { import flash.display.*; import fl.controls.*; public interface IFocusManager { function getFocus():InteractiveObject; function deactivate():void; function set defaultButton(_arg1:Button):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function get nextTabIndex():int; function get defaultButton():Button; function get showFocusIndicator():Boolean; function setFocus(_arg1:InteractiveObject):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function hideFocus():void; function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject; function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject; } }//package fl.managers
Section 28
//IFocusManagerComponent (fl.managers.IFocusManagerComponent) package fl.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 fl.managers
Section 29
//IFocusManagerGroup (fl.managers.IFocusManagerGroup) package fl.managers { public interface IFocusManagerGroup { function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; function get groupName():String; function get selected():Boolean; } }//package fl.managers
Section 30
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.utils.*; import flash.text.*; public class StyleManager { private var globalStyles:Object; private var classToDefaultStylesDict:Dictionary; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToInstancesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class; var _local5:Object; _local4 = getClassDef(_arg1); _local5 = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local2:StyleManager; var _local3:Class; var _local4:Object; var _local5:String; _local2 = getInstance(); _local3 = getClassDef(_arg1); _local4 = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local3:Dictionary; var _local4:Object; var _local5:UIComponent; _local3 = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local2:Dictionary; var _local3:Object; _local2 = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var inst:StyleManager; var classDef:Class; var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; inst = getInstance(); classDef = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; inst.classToStylesDict[classDef] = {}; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class; var _local4:StyleManager; var _local5:Object; _local3 = getClassDef(_arg1); _local4 = getInstance(); _local5 = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object; _local3 = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 31
//ag_intro_mc_114 (windkingdom_armor_fla.ag_intro_mc_114) package windkingdom_armor_fla { import flash.display.*; public dynamic class ag_intro_mc_114 extends MovieClip { public function ag_intro_mc_114(){ addFrameScript(0, frame1, 217, frame218); } function frame218(){ stop(); } function frame1(){ gotoAndPlay(2); } } }//package windkingdom_armor_fla
Section 32
//armor_promo_3 (windkingdom_armor_fla.armor_promo_3) package windkingdom_armor_fla { import flash.display.*; public dynamic class armor_promo_3 extends MovieClip { public function armor_promo_3(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package windkingdom_armor_fla
Section 33
//btupgradecastle_154 (windkingdom_armor_fla.btupgradecastle_154) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradecastle_154 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 34
//btupgradecopter_157 (windkingdom_armor_fla.btupgradecopter_157) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradecopter_157 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 35
//btupgradedragon_160 (windkingdom_armor_fla.btupgradedragon_160) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradedragon_160 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 36
//btupgradeeagle_158 (windkingdom_armor_fla.btupgradeeagle_158) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradeeagle_158 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 37
//btupgradefireturret_162 (windkingdom_armor_fla.btupgradefireturret_162) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradefireturret_162 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 38
//btupgradeiceturret_161 (windkingdom_armor_fla.btupgradeiceturret_161) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradeiceturret_161 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 39
//btupgradeinitialmanabank_167 (windkingdom_armor_fla.btupgradeinitialmanabank_167) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradeinitialmanabank_167 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 40
//btupgrademanaregeneratetime_166 (windkingdom_armor_fla.btupgrademanaregeneratetime_166) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgrademanaregeneratetime_166 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 41
//btupgradepanzer_159 (windkingdom_armor_fla.btupgradepanzer_159) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradepanzer_159 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 42
//btupgraderider_156 (windkingdom_armor_fla.btupgraderider_156) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgraderider_156 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 43
//btupgradethunderturret_163 (windkingdom_armor_fla.btupgradethunderturret_163) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradethunderturret_163 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 44
//btupgradeturretcreatetime_165 (windkingdom_armor_fla.btupgradeturretcreatetime_165) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradeturretcreatetime_165 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 45
//btupgradeunitcreatetime_164 (windkingdom_armor_fla.btupgradeunitcreatetime_164) package windkingdom_armor_fla { import flash.display.*; public dynamic class btupgradeunitcreatetime_164 extends MovieClip { public var locker:MovieClip; } }//package windkingdom_armor_fla
Section 46
//health_89 (windkingdom_armor_fla.health_89) package windkingdom_armor_fla { import flash.display.*; public dynamic class health_89 extends MovieClip { public function health_89(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package windkingdom_armor_fla
Section 47
//iconspecialattack_67 (windkingdom_armor_fla.iconspecialattack_67) package windkingdom_armor_fla { import flash.display.*; public dynamic class iconspecialattack_67 extends MovieClip { public var powermeter:MovieClip; } }//package windkingdom_armor_fla
Section 48
//instructionnotes_125 (windkingdom_armor_fla.instructionnotes_125) package windkingdom_armor_fla { import flash.display.*; public dynamic class instructionnotes_125 extends MovieClip { public var btunits:SimpleButton; public var btgameplay:SimpleButton; public var btbattle:SimpleButton; public var btupgrade:SimpleButton; public var btexp:SimpleButton; public var btshortcuts:SimpleButton; public function instructionnotes_125(){ addFrameScript(0, frame1, 10, frame11, 20, frame21, 30, frame31, 40, frame41, 50, frame51); } function frame1(){ stop(); } function frame21(){ stop(); } function frame11(){ stop(); } function frame31(){ stop(); } function frame41(){ stop(); } function frame51(){ stop(); } } }//package windkingdom_armor_fla
Section 49
//lv1_21 (windkingdom_armor_fla.lv1_21) package windkingdom_armor_fla { import flash.display.*; public dynamic class lv1_21 extends MovieClip { public var c1:MovieClip; public var c2:MovieClip; public function lv1_21(){ addFrameScript(0, frame1, 20, frame21); } function frame1(){ stop(); } function frame21(){ gotoAndPlay(2); } } }//package windkingdom_armor_fla
Section 50
//lv2_30 (windkingdom_armor_fla.lv2_30) package windkingdom_armor_fla { import flash.display.*; public dynamic class lv2_30 extends MovieClip { public var c1:MovieClip; public var c3:MovieClip; public var c2:MovieClip; public function lv2_30(){ addFrameScript(0, frame1, 20, frame21); } function frame1(){ stop(); } function frame21(){ gotoAndPlay(2); } } }//package windkingdom_armor_fla
Section 51
//lv3_32 (windkingdom_armor_fla.lv3_32) package windkingdom_armor_fla { import flash.display.*; public dynamic class lv3_32 extends MovieClip { public var c1:MovieClip; public var c3:MovieClip; public var c4:MovieClip; public var c5:MovieClip; public var c2:MovieClip; public function lv3_32(){ addFrameScript(0, frame1, 20, frame21); } function frame21(){ gotoAndPlay(2); } function frame1(){ stop(); } } }//package windkingdom_armor_fla
Section 52
//MainTimeline (windkingdom_armor_fla.MainTimeline) package windkingdom_armor_fla { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.media.*; import flash.system.*; import flash.text.*; import flash.ui.*; import flash.errors.*; import adobe.utils.*; import flash.accessibility.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public var upgradewarning:MovieClip; public var tutorial_mc:MovieClip; public var btupgradedragon:MovieClip; public var result:MovieClip; public var btupgradecopter:MovieClip; public var btarmor:SimpleButton; public var btloadgame:SimpleButton; public var addGameURL:URLRequest; public var btupgradeturretcreatetime:MovieClip; public var btupgradeunitcreatetime:MovieClip; public var soundMgr; public var btplay:SimpleButton; public var playbtn:SimpleButton; public var ep:TextField; public var btupgrademanaregeneratetime:MovieClip; public var btupgradeeagle:MovieClip; public var armorbtn:SimpleButton; public var gameData; public var gameMgr; public var btplaymore:SimpleButton; public var btmainmenu:SimpleButton; public var btupgradeiceturret:MovieClip; public var btstatistics:SimpleButton; public var btinstructions:SimpleButton; public var btupgradecastle:MovieClip; public var unlocked; public var obj; public var moreGameURL:URLRequest; public var artbtn:MovieClip; public var myMenu; public var btupgradepanzer:MovieClip; public var btupgraderider:MovieClip; public var locker; public var skipmochibot; public var btsavegame:SimpleButton; public var btcancel:SimpleButton; public var mc_armor:MovieClip; public var btday3:SimpleButton; public var btday4:SimpleButton; public var btday5:SimpleButton; public var btday7:SimpleButton; public var btday8:SimpleButton; public var btday6:SimpleButton; public var btday1:SimpleButton; public var btday2:SimpleButton; public var btupgradeinitialmanabank:MovieClip; public var item2:ContextMenuItem; public var btaddgame:SimpleButton; public var levelnote:MovieClip; public var instructionnote:MovieClip; public var btupgrade:SimpleButton; public var btupgradethunderturret:MovieClip; public var mcpreloader:MovieClip; public var selectedLevel; public var adsbtn:MovieClip; public var btupgradefireturret:MovieClip; public var item1:ContextMenuItem; public var txt1:TextField; public var txt2:TextField; public var txt3:TextField; public var txt5:TextField; public var txt8:TextField; public var txt9:TextField; public var txt6:TextField; public var txt7:TextField; public var btcredit:SimpleButton; public var txt4:TextField; public var panelnote:MovieClip; public function MainTimeline(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 7, frame8, 9, frame10, 13, frame14, 23, frame24, 33, frame34, 43, frame44, 53, frame54, 63, frame64, 73, frame74, 83, frame84, 93, frame94, 103, frame104, 113, frame114, 123, frame124, 134, frame135); } public function goCredit(_arg1=null){ gotoAndPlay("credits"); } public function startUpgradeListeners(){ btupgradecastle.addEventListener(MouseEvent.CLICK, upgradeCastleClick); btupgradeiceturret.addEventListener(MouseEvent.CLICK, upgradeIceTurretClick); btupgradefireturret.addEventListener(MouseEvent.CLICK, upgradeFireTurretClick); btupgradethunderturret.addEventListener(MouseEvent.CLICK, upgradeThunderTurretClick); btupgraderider.addEventListener(MouseEvent.CLICK, upgradeRiderClick); btupgradecopter.addEventListener(MouseEvent.CLICK, upgradeCopterClick); btupgradeeagle.addEventListener(MouseEvent.CLICK, upgradeEagleClick); btupgradepanzer.addEventListener(MouseEvent.CLICK, upgradePanzerClick); btupgradedragon.addEventListener(MouseEvent.CLICK, upgradeDragonClick); btupgradeunitcreatetime.addEventListener(MouseEvent.CLICK, upgradeUnitCreateTimeClick); btupgradeturretcreatetime.addEventListener(MouseEvent.CLICK, upgradeTurretCreateTimeClick); btupgrademanaregeneratetime.addEventListener(MouseEvent.CLICK, upgradeManaRegenerateTimeClick); btupgradeinitialmanabank.addEventListener(MouseEvent.CLICK, upgradeInitialManaBankClick); btupgradecastle.addEventListener(MouseEvent.MOUSE_OVER, upgradeCastleOver); btupgradeiceturret.addEventListener(MouseEvent.MOUSE_OVER, upgradeIceTurretOver); btupgradefireturret.addEventListener(MouseEvent.MOUSE_OVER, upgradeFireTurretOver); btupgradethunderturret.addEventListener(MouseEvent.MOUSE_OVER, upgradeThunderTurretOver); btupgraderider.addEventListener(MouseEvent.MOUSE_OVER, upgradeRiderOver); btupgradecopter.addEventListener(MouseEvent.MOUSE_OVER, upgradeCopterOver); btupgradeeagle.addEventListener(MouseEvent.MOUSE_OVER, upgradeEagleOver); btupgradepanzer.addEventListener(MouseEvent.MOUSE_OVER, upgradePanzerOver); btupgradedragon.addEventListener(MouseEvent.MOUSE_OVER, upgradeDragonOver); btupgradeunitcreatetime.addEventListener(MouseEvent.MOUSE_OVER, upgradeUnitCreateTimeOver); btupgradeturretcreatetime.addEventListener(MouseEvent.MOUSE_OVER, upgradeTurretCreateTimeOver); btupgrademanaregeneratetime.addEventListener(MouseEvent.MOUSE_OVER, upgradeManaRegenerateTimeOver); btupgradeinitialmanabank.addEventListener(MouseEvent.MOUSE_OVER, upgradeInitialManaBankOver); btupgradecastle.addEventListener(MouseEvent.MOUSE_OUT, upgradeCastleOut); btupgradeiceturret.addEventListener(MouseEvent.MOUSE_OUT, upgradeIceTurretOut); btupgradefireturret.addEventListener(MouseEvent.MOUSE_OUT, upgradeFireTurretOut); btupgradethunderturret.addEventListener(MouseEvent.MOUSE_OUT, upgradeThunderTurretOut); btupgraderider.addEventListener(MouseEvent.MOUSE_OUT, upgradeRiderOut); btupgradecopter.addEventListener(MouseEvent.MOUSE_OUT, upgradeCopterOut); btupgradeeagle.addEventListener(MouseEvent.MOUSE_OUT, upgradeEagleOut); btupgradepanzer.addEventListener(MouseEvent.MOUSE_OUT, upgradePanzerOut); btupgradedragon.addEventListener(MouseEvent.MOUSE_OUT, upgradeDragonOut); btupgradeunitcreatetime.addEventListener(MouseEvent.MOUSE_OUT, upgradeUnitCreateTimeOut); btupgradeturretcreatetime.addEventListener(MouseEvent.MOUSE_OUT, upgradeTurretCreateTimeOut); btupgrademanaregeneratetime.addEventListener(MouseEvent.MOUSE_OUT, upgradeManaRegenerateTimeOut); btupgradeinitialmanabank.addEventListener(MouseEvent.MOUSE_OUT, upgradeInitialManaBankOut); } public function upgradeFireTurretOver(_arg1=null){ showNote("fireturret"); } public function gotoArt(_arg1=null){ navigateToURL(new URLRequest("http://www.artlogicgames.com"), "_blank"); } public function upgradeIceTurretOver(_arg1=null){ showNote("iceturret"); } public function upgradeThunderTurretOut(_arg1=null){ hideNote(); } public function upgradePanzerOver(_arg1=null){ showNote("panzer"); } public function goSaveGame(_arg1=null){ gotoAndPlay("savegame"); } public function upgradeManaRegenerateTimeOver(_arg1=null){ showNote("manaregeneratetime"); } public function refreshButtons(){ ep.text = String(Math.floor(gameData.experienceTotal)); btupgradecastle.gotoAndStop((gameData.castleLevel + 1)); btupgradeiceturret.gotoAndStop((gameData.turretsLevel[0] + 1)); btupgradefireturret.gotoAndStop((gameData.turretsLevel[1] + 1)); btupgradethunderturret.gotoAndStop((gameData.turretsLevel[2] + 1)); btupgraderider.gotoAndStop((gameData.unitsLevel[0] + 1)); btupgradecopter.gotoAndStop((gameData.unitsLevel[1] + 1)); btupgradeeagle.gotoAndStop((gameData.unitsLevel[2] + 1)); btupgradepanzer.gotoAndStop((gameData.unitsLevel[3] + 1)); btupgradedragon.gotoAndStop((gameData.unitsLevel[4] + 1)); btupgradeunitcreatetime.gotoAndStop(gameData.unitsCreationTimerLevel); btupgradeturretcreatetime.gotoAndStop(gameData.turretsCreationTimerLevel); btupgrademanaregeneratetime.gotoAndStop(gameData.manaRegenerationLevel); btupgradeinitialmanabank.gotoAndStop(gameData.manaCountLevel); } public function upgradeIceTurretClick(_arg1=null){ if (gameData.isTurretsLevelUpgradable("iceturret")){ gameData.increaseTurretsLevel("iceturret"); refreshButtons(); showNote("iceturret"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function removeLevelListener(){ } public function upgradeIceTurretOut(_arg1=null){ hideNote(); } public function upgradeThunderTurretClick(_arg1=null){ if (gameData.isTurretsLevelUpgradable("thunderturret")){ gameData.increaseTurretsLevel("thunderturret"); refreshButtons(); showNote("thunderturret"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function upgradeInitialManaBankOver(_arg1=null){ showNote("initialmanabank"); } public function upgradeUnitCreateTimeOver(_arg1=null){ showNote("unitcreatetime"); } public function showResults(){ result.txt1.text = gameData.levelUnitsBuilt[4]; result.txt2.text = gameData.levelUnitsBuilt[3]; result.txt3.text = gameData.levelUnitsBuilt[2]; result.txt4.text = gameData.levelUnitsBuilt[1]; result.txt5.text = gameData.levelUnitsBuilt[0]; result.txt6.text = gameData.levelTurretsBuilt[0]; result.txt7.text = gameData.levelTurretsBuilt[1]; result.txt8.text = gameData.levelTurretsBuilt[2]; result.txt9.text = gameData.levelEnemyKilled[6]; result.txt10.text = gameData.levelEnemyKilled[5]; result.txt11.text = gameData.levelEnemyKilled[4]; result.txt12.text = gameData.levelEnemyKilled[3]; result.txt13.text = gameData.levelEnemyKilled[2]; result.txt14.text = gameData.levelEnemyKilled[1]; result.txt15.text = gameData.levelEnemyKilled[0]; result.txt16.text = Math.floor(gameData.levelExperience); } function frame10(){ soundMgr.playBGM("cover"); btplay.addEventListener(MouseEvent.CLICK, goNewGame); btplaymore.addEventListener(MouseEvent.CLICK, playMoreGames); btaddgame.addEventListener(MouseEvent.CLICK, addGames); btloadgame.addEventListener(MouseEvent.CLICK, goLoadGame); btcredit.addEventListener(MouseEvent.CLICK, goCredit); btarmor.addEventListener(MouseEvent.CLICK, gotoArmor); stop(); } function frame14(){ soundMgr.playBGM("intro"); btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); instructionnote.btgameplay.addEventListener(MouseEvent.CLICK, showInstruction1); instructionnote.btshortcuts.addEventListener(MouseEvent.CLICK, showInstruction2); instructionnote.btunits.addEventListener(MouseEvent.CLICK, showInstruction3); instructionnote.btexp.addEventListener(MouseEvent.CLICK, showInstruction4); instructionnote.btbattle.addEventListener(MouseEvent.CLICK, showInstruction5); instructionnote.btupgrade.addEventListener(MouseEvent.CLICK, showInstruction6); showInstructionNote(1); stop(); } public function upgradeFireTurretOut(_arg1=null){ hideNote(); } public function hideNote(){ panelnote.visible = false; panelnote.gotoAndStop(1); } function frame3(){ mc_armor.addEventListener(MouseEvent.CLICK, gotoArmor); stage.addEventListener(Event.ENTER_FRAME, FinishLogo); stop(); } function frame4(){ if (!unlocked){ gotoAndStop("locked"); }; } function frame5(){ if (!unlocked){ gotoAndStop("locked"); }; } public function upgradeEagleOver(_arg1=null){ showNote("eagle"); } public function upgradeRiderClick(_arg1=null){ if (gameData.isUnitsLevelUpgradable("rider")){ gameData.increaseUnitsLevel("rider"); refreshButtons(); showNote("rider"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } function frame1(){ locker = new SiteLock(stage); skipmochibot = locker.checkSite(); unlocked = true; if (!skipmochibot){ trace("mochibot is tracking..."); MochiBot.track(this, "f0660fdb"); }; stage.scaleMode = "noScale"; myMenu = new ContextMenu(); myMenu.hideBuiltInItems(); item1 = new ContextMenuItem("armorgames.com"); item1.separatorBefore = true; item1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, gotoArmor); myMenu.customItems.push(item1); item2 = new ContextMenuItem("artlogicgames.com"); item2.separatorBefore = true; item2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, gotoArt); myMenu.customItems.push(item2); obj = stage.getChildAt(0); obj.contextMenu = myMenu; mcpreloader.stop(); stage.addEventListener(Event.ENTER_FRAME, updatePreloader); armorbtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoArmor); adsbtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoAds); artbtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoArt); stop(); } public function gotoAds(_arg1=null):void{ navigateToURL(new URLRequest("http://www.armorgames.com/?gamereferral=kingdomofthewind"), "_blank"); } function frame6(){ if (!unlocked){ gotoAndStop("locked"); }; moreGameURL = new URLRequest("http://www.armorgames.com/?gamereferral=kingdomofthewind"); addGameURL = new URLRequest("http://armorgames.com/free-website-games?gamereferral=kingdomofthewind"); selectedLevel = 1; gameData = new GameData(this, selectedLevel); soundMgr = new SoundManager(); soundMgr.playBGM("cover"); btplay.addEventListener(MouseEvent.CLICK, goNewGame); btplaymore.addEventListener(MouseEvent.CLICK, playMoreGames); btaddgame.addEventListener(MouseEvent.CLICK, addGames); btloadgame.addEventListener(MouseEvent.CLICK, goLoadGame); btcredit.addEventListener(MouseEvent.CLICK, goCredit); btarmor.addEventListener(MouseEvent.CLICK, gotoArmor); stop(); } function frame2(){ playbtn.addEventListener(MouseEvent.MOUSE_DOWN, goto3); stop(); } function frame24(){ soundMgr.playBGM("intro"); if (btday1){ btday1.addEventListener(MouseEvent.CLICK, day1Selected); }; if (btday2){ btday2.addEventListener(MouseEvent.CLICK, day2Selected); }; if (btday3){ btday3.addEventListener(MouseEvent.CLICK, day3Selected); }; if (btday4){ btday4.addEventListener(MouseEvent.CLICK, day4Selected); }; if (btday5){ btday5.addEventListener(MouseEvent.CLICK, day5Selected); }; if (btday6){ btday6.addEventListener(MouseEvent.CLICK, day6Selected); }; if (btday7){ btday7.addEventListener(MouseEvent.CLICK, day7Selected); }; if (btday8){ btday8.addEventListener(MouseEvent.CLICK, day8Selected); }; if (btday1){ btday1.visible = gameData.unlockedLevel[0]; }; if (btday2){ btday2.visible = gameData.unlockedLevel[1]; }; if (btday3){ btday3.visible = gameData.unlockedLevel[2]; }; if (btday4){ btday4.visible = gameData.unlockedLevel[3]; }; if (btday5){ btday5.visible = gameData.unlockedLevel[4]; }; if (btday6){ btday6.visible = gameData.unlockedLevel[5]; }; if (btday7){ btday7.visible = gameData.unlockedLevel[6]; }; if (btday8){ btday8.visible = gameData.unlockedLevel[7]; }; if (btplay){ btplay.addEventListener(MouseEvent.CLICK, startGame); }; if (btplaymore){ btplaymore.addEventListener(MouseEvent.CLICK, playMoreGames); }; if (btsavegame){ btsavegame.addEventListener(MouseEvent.CLICK, saveGame); }; if (btloadgame){ btloadgame.addEventListener(MouseEvent.CLICK, goLoadGame); }; if (btinstructions){ btinstructions.addEventListener(MouseEvent.CLICK, openInstructions); }; if (btstatistics){ btstatistics.addEventListener(MouseEvent.CLICK, openStatistics); }; if (btupgrade){ btupgrade.addEventListener(MouseEvent.CLICK, openUpgrade); }; if (btmainmenu){ btmainmenu.addEventListener(MouseEvent.CLICK, backToMain); }; switch (selectedLevel){ case 8: day8Selected(); break; case 7: day7Selected(); break; case 6: day6Selected(); break; case 5: day5Selected(); break; case 4: day4Selected(); break; case 3: day3Selected(); break; case 2: day2Selected(); break; case 1: default: day1Selected(); break; }; if (gameData.isSkillTutorial()){ tutorial_mc.gotoAndPlay(2); }; stop(); } public function upgradeInitialManaBankOut(_arg1=null){ hideNote(); } public function openUpgrade(_arg1){ removeLevelListener(); gotoAndPlay("upgrade"); } public function showNote(_arg1){ switch (_arg1){ case "castle": panelnote.x = btupgradecastle.x; panelnote.y = btupgradecastle.y; panelnote.gotoAndStop(2); panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(0))); panelnote.visible = true; break; case "iceturret": panelnote.x = btupgradeiceturret.x; panelnote.y = btupgradeiceturret.y; panelnote.gotoAndStop(3); if (!gameData.unlockedTurrets[0]){ panelnote.gotoAndStop((3 + 13)); }; panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(1))); panelnote.visible = true; break; case "fireturret": panelnote.x = btupgradefireturret.x; panelnote.y = btupgradefireturret.y; panelnote.gotoAndStop(4); if (!gameData.unlockedTurrets[1]){ panelnote.gotoAndStop((4 + 13)); }; panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(2))); panelnote.visible = true; break; case "thunderturret": panelnote.x = btupgradethunderturret.x; panelnote.y = btupgradethunderturret.y; panelnote.gotoAndStop(5); if (!gameData.unlockedTurrets[2]){ panelnote.gotoAndStop((5 + 13)); }; panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(3))); panelnote.visible = true; break; case "rider": panelnote.x = btupgraderider.x; panelnote.y = btupgraderider.y; panelnote.gotoAndStop(6); if (!gameData.unlockedUnits[0]){ panelnote.gotoAndStop((6 + 13)); }; panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(4))); panelnote.visible = true; break; case "copter": panelnote.x = btupgradecopter.x; panelnote.y = btupgradecopter.y; panelnote.gotoAndStop(7); if (!gameData.unlockedUnits[1]){ panelnote.gotoAndStop((7 + 13)); }; panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(5))); panelnote.visible = true; break; case "eagle": panelnote.x = btupgradeeagle.x; panelnote.y = btupgradeeagle.y; panelnote.gotoAndStop(8); if (!gameData.unlockedUnits[2]){ panelnote.gotoAndStop((8 + 13)); }; panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(6))); panelnote.visible = true; break; case "panzer": panelnote.x = btupgradepanzer.x; panelnote.y = btupgradepanzer.y; panelnote.gotoAndStop(9); if (!gameData.unlockedUnits[3]){ panelnote.gotoAndStop((9 + 13)); }; panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(7))); panelnote.visible = true; break; case "dragon": panelnote.x = btupgradedragon.x; panelnote.y = btupgradedragon.y; panelnote.gotoAndStop(10); if (!gameData.unlockedUnits[4]){ panelnote.gotoAndStop((10 + 13)); }; panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(8))); panelnote.visible = true; break; case "unitcreatetime": panelnote.x = btupgradeunitcreatetime.x; panelnote.y = btupgradeunitcreatetime.y; panelnote.gotoAndStop(11); panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(9))); panelnote.visible = true; break; case "turretcreatetime": panelnote.x = btupgradeturretcreatetime.x; panelnote.y = btupgradeturretcreatetime.y; panelnote.gotoAndStop(12); panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(10))); panelnote.visible = true; break; case "manaregeneratetime": panelnote.x = btupgrademanaregeneratetime.x; panelnote.y = btupgrademanaregeneratetime.y; panelnote.gotoAndStop(13); panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(11))); panelnote.visible = true; break; case "initialmanabank": panelnote.x = btupgradeinitialmanabank.x; panelnote.y = btupgradeinitialmanabank.y; panelnote.gotoAndStop(14); panelnote.ep.text = String(Math.ceil(gameData.getExperiencePrice(12))); panelnote.visible = true; break; }; if (panelnote.ep.text == "NaN"){ panelnote.ep.text = "~"; }; } public function backToMain(_arg1=null){ gotoAndStop("menuselect"); } function frame34(){ soundMgr.playBGM("intro"); doSaveGame(); btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); stop(); } function frame8(){ gotoAndPlay("levelselect"); } public function upgradeFireTurretClick(_arg1=null){ if (gameData.isTurretsLevelUpgradable("fireturret")){ gameData.increaseTurretsLevel("fireturret"); refreshButtons(); showNote("fireturret"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function addGames(_arg1=null){ navigateToURL(addGameURL, "_blank"); } function frame44(){ soundMgr.playBGM("intro"); btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); stop(); } public function upgradeRiderOut(_arg1=null){ hideNote(); } public function doSaveGame(){ gameData.saveData(); gameData.submitStat(); } public function upgradeUnitCreateTimeOut(_arg1=null){ hideNote(); } public function upgradeDragonOver(_arg1=null){ showNote("dragon"); } function frame54(){ soundMgr.playBGM("intro"); btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); stop(); } public function day2Selected(_arg1=null){ selectedLevel = 2; gameData.changeGameLevel(selectedLevel); levelnote.gotoAndStop(2); } public function day4Selected(_arg1=null){ selectedLevel = 4; gameData.changeGameLevel(selectedLevel); levelnote.gotoAndStop(4); } public function day6Selected(_arg1=null){ selectedLevel = 6; gameData.changeGameLevel(selectedLevel); levelnote.gotoAndStop(6); } public function day8Selected(_arg1=null){ selectedLevel = 8; gameData.changeGameLevel(selectedLevel); levelnote.gotoAndStop(8); } public function upgradeCastleOut(_arg1=null){ hideNote(); } public function upgradeEagleOut(_arg1=null){ hideNote(); } public function endUpgradePage(_arg1){ stopUpgradeListeners(); goLevelSelect(); } public function showInstruction5(_arg1){ showInstructionNote("battle"); } public function showInstructionNote(_arg1){ instructionnote.gotoAndStop(_arg1); } public function showInstruction3(_arg1){ showInstructionNote("units"); } public function openStatistics(_arg1){ removeLevelListener(); gotoAndPlay("statistics"); } public function saveGame(_arg1){ removeLevelListener(); gotoAndPlay("savegame"); } public function FinishLogo(_arg1=null){ if (mc_armor.currentFrame == mc_armor.totalFrames){ stage.removeEventListener(Event.ENTER_FRAME, FinishLogo); play(); }; } public function goLoadGame(_arg1=null){ if (gameData.loadData()){ gotoAndPlay("loadgame"); selectedLevel = gameData.selectedLevel; } else { gotoAndPlay("unloadgame"); selectedLevel = gameData.selectedLevel; }; } public function showInstruction2(_arg1){ showInstructionNote("shortcuts"); } public function showInstruction4(_arg1){ showInstructionNote("exp"); } function frame84(){ soundMgr.playBGM("stage"); stage.focus = this; gameMgr = new GameManager(this, gameData, soundMgr); stop(); } public function upgradeThunderTurretOver(_arg1=null){ showNote("thunderturret"); } public function upgradeEagleClick(_arg1=null){ if (gameData.isUnitsLevelUpgradable("eagle")){ gameData.increaseUnitsLevel("eagle"); refreshButtons(); showNote("eagle"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function openInstructions(_arg1){ removeLevelListener(); gotoAndPlay("instructions"); } public function showInstruction6(_arg1){ showInstructionNote("upgrade"); } public function upgradeCopterOut(_arg1=null){ hideNote(); } public function upgradeManaRegenerateTimeOut(_arg1=null){ hideNote(); } public function showInstruction1(_arg1){ showInstructionNote("gameplay"); } public function upgradePanzerClick(_arg1=null){ if (gameData.isUnitsLevelUpgradable("panzer")){ gameData.increaseUnitsLevel("panzer"); refreshButtons(); showNote("panzer"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function goto3(_arg1:MouseEvent):void{ gotoAndStop(3); } function frame74(){ soundMgr.playBGM("intro"); btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); txt1.text = String(Math.floor((gameData.experienceTotal + gameData.experienceSpent))); txt2.text = String(Math.floor(gameData.experienceSpent)); txt3.text = String(Math.floor(gameData.countEnemyKilled())); txt4.text = String(Math.floor(gameData.countUnitsBuilt())); txt5.text = String(Math.floor(gameData.countUnitsLost())); txt6.text = String(Math.floor(gameData.countTurretsBuilt())); txt7.text = String(Math.floor(gameData.countTurretsLost())); txt8.text = String(Math.floor(gameData.manaGained)); txt9.text = String(Math.floor(gameData.manaSpent)); stop(); } public function upgradeUnitCreateTimeClick(_arg1=null){ if (gameData.isUnitsCreationTimerLevelUpgradable()){ gameData.increaseUnitsCreationTimerLevel(); refreshButtons(); showNote("unitcreatetime"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function upgradeTurretCreateTimeClick(_arg1=null){ if (gameData.isTurretsCreationTimerLevelUpgradable()){ gameData.increaseTurretsCreationTimerLevel(); refreshButtons(); showNote("turretcreatetime"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function upgradeCastleOver(_arg1=null){ showNote("castle"); } public function upgradePanzerOut(_arg1=null){ hideNote(); } public function upgradeManaRegenerateTimeClick(_arg1=null){ if (gameData.isManaRegenerationLevelUpgradable()){ gameData.increaseManaRegenerationLevel(); refreshButtons(); showNote("manaregeneratetime"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } function frame94(){ soundMgr.playBGM("intro"); btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); gameData.levelExperience = 0; showResults(); stop(); } public function upgradeDragonClick(_arg1=null){ if (gameData.isUnitsLevelUpgradable("dragon")){ gameData.increaseUnitsLevel("dragon"); refreshButtons(); showNote("dragon"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function startGame(_arg1){ removeLevelListener(); gotoAndPlay("gameplay"); } public function upgradeDragonOut(_arg1=null){ hideNote(); } public function goLevelSelect(_arg1=null){ gotoAndPlay("leveljumper"); } public function gotoArmor(_arg1=null):void{ navigateToURL(new URLRequest("http://www.armorgames.com/?gamereferral=kingdomofthewind"), "_blank"); } public function playMoreGames(_arg1=null){ navigateToURL(moreGameURL, "_blank"); } function frame104(){ soundMgr.playBGM("intro"); btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); showResults(); stop(); } function frame124(){ soundMgr.playBGM("intro"); selectedLevel = 1; btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); showResults(); stop(); } function frame64(){ soundMgr.playBGM("intro"); btcancel.addEventListener(MouseEvent.CLICK, endUpgradePage); refreshButtons(); startUpgradeListeners(); stop(); } public function goNewGame(_arg1=null){ gameData.resetData(); selectedLevel = 1; gotoAndPlay("levelselect"); } public function updatePreloader(_arg1:Event):void{ var _local2:Number; _local2 = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100); if (_local2 < 100){ mcpreloader.gotoAndStop(int(_local2)); } else { mcpreloader.gotoAndStop(mcpreloader.totalFrames); stage.removeEventListener(Event.ENTER_FRAME, updatePreloader); gotoAndStop(2); }; } public function upgradeCopterClick(_arg1=null){ if (gameData.isUnitsLevelUpgradable("copter")){ gameData.increaseUnitsLevel("copter"); refreshButtons(); showNote("copter"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function upgradeRiderOver(_arg1=null){ showNote("rider"); } public function stopUpgradeListeners(){ btupgradecastle.removeEventListener(MouseEvent.CLICK, upgradeCastleClick); btupgradeiceturret.removeEventListener(MouseEvent.CLICK, upgradeIceTurretClick); btupgradefireturret.removeEventListener(MouseEvent.CLICK, upgradeFireTurretClick); btupgradethunderturret.removeEventListener(MouseEvent.CLICK, upgradeThunderTurretClick); btupgraderider.removeEventListener(MouseEvent.CLICK, upgradeRiderClick); btupgradecopter.removeEventListener(MouseEvent.CLICK, upgradeCopterClick); btupgradeeagle.removeEventListener(MouseEvent.CLICK, upgradeEagleClick); btupgradepanzer.removeEventListener(MouseEvent.CLICK, upgradePanzerClick); btupgradedragon.removeEventListener(MouseEvent.CLICK, upgradeDragonClick); btupgradeunitcreatetime.removeEventListener(MouseEvent.CLICK, upgradeUnitCreateTimeClick); btupgradeturretcreatetime.removeEventListener(MouseEvent.CLICK, upgradeTurretCreateTimeClick); btupgrademanaregeneratetime.removeEventListener(MouseEvent.CLICK, upgradeManaRegenerateTimeClick); btupgradeinitialmanabank.removeEventListener(MouseEvent.CLICK, upgradeInitialManaBankClick); btupgradecastle.removeEventListener(MouseEvent.MOUSE_OVER, upgradeCastleOver); btupgradeiceturret.removeEventListener(MouseEvent.MOUSE_OVER, upgradeIceTurretOver); btupgradefireturret.removeEventListener(MouseEvent.MOUSE_OVER, upgradeFireTurretOver); btupgradethunderturret.removeEventListener(MouseEvent.MOUSE_OVER, upgradeThunderTurretOver); btupgraderider.removeEventListener(MouseEvent.MOUSE_OVER, upgradeRiderOver); btupgradecopter.removeEventListener(MouseEvent.MOUSE_OVER, upgradeCopterOver); btupgradeeagle.removeEventListener(MouseEvent.MOUSE_OVER, upgradeEagleOver); btupgradepanzer.removeEventListener(MouseEvent.MOUSE_OVER, upgradePanzerOver); btupgradedragon.removeEventListener(MouseEvent.MOUSE_OVER, upgradeDragonOver); btupgradeunitcreatetime.removeEventListener(MouseEvent.MOUSE_OVER, upgradeUnitCreateTimeOver); btupgradeturretcreatetime.removeEventListener(MouseEvent.MOUSE_OVER, upgradeTurretCreateTimeOver); btupgrademanaregeneratetime.removeEventListener(MouseEvent.MOUSE_OVER, upgradeManaRegenerateTimeOver); btupgradeinitialmanabank.removeEventListener(MouseEvent.MOUSE_OVER, upgradeInitialManaBankOver); btupgradecastle.removeEventListener(MouseEvent.MOUSE_OUT, upgradeCastleOut); btupgradeiceturret.removeEventListener(MouseEvent.MOUSE_OUT, upgradeIceTurretOut); btupgradefireturret.removeEventListener(MouseEvent.MOUSE_OUT, upgradeFireTurretOut); btupgradethunderturret.removeEventListener(MouseEvent.MOUSE_OUT, upgradeThunderTurretOut); btupgraderider.removeEventListener(MouseEvent.MOUSE_OUT, upgradeRiderOut); btupgradecopter.removeEventListener(MouseEvent.MOUSE_OUT, upgradeCopterOut); btupgradeeagle.removeEventListener(MouseEvent.MOUSE_OUT, upgradeEagleOut); btupgradepanzer.removeEventListener(MouseEvent.MOUSE_OUT, upgradePanzerOut); btupgradedragon.removeEventListener(MouseEvent.MOUSE_OUT, upgradeDragonOut); btupgradeunitcreatetime.removeEventListener(MouseEvent.MOUSE_OUT, upgradeUnitCreateTimeOut); btupgradeturretcreatetime.removeEventListener(MouseEvent.MOUSE_OUT, upgradeTurretCreateTimeOut); btupgrademanaregeneratetime.removeEventListener(MouseEvent.MOUSE_OUT, upgradeManaRegenerateTimeOut); btupgradeinitialmanabank.removeEventListener(MouseEvent.MOUSE_OUT, upgradeInitialManaBankOut); } public function upgradeCastleClick(_arg1=null){ if (gameData.isCastleLevelUpgradable()){ gameData.increaseCastleLevel(); refreshButtons(); showNote("castle"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } function frame114(){ soundMgr.playBGM("intro"); if (selectedLevel == 8){ gameData.gameCompleted = 8; gotoAndPlay("ultimatewin"); } else { gameData.gameCompleted = selectedLevel; selectedLevel++; }; btcancel.addEventListener(MouseEvent.CLICK, goLevelSelect); showResults(); stop(); } public function day1Selected(_arg1=null){ selectedLevel = 1; gameData.changeGameLevel(selectedLevel); levelnote.gotoAndStop(1); } public function upgradeInitialManaBankClick(_arg1=null){ if (gameData.isManaCountLevelUpgradable()){ gameData.increaseManaCountLevel(); refreshButtons(); showNote("initialmanabank"); } else { if (panelnote.ep.text != "~"){ upgradewarning.gotoAndPlay("insufficient"); } else { upgradewarning.gotoAndPlay("maximum"); }; }; } public function day7Selected(_arg1=null){ selectedLevel = 7; gameData.changeGameLevel(selectedLevel); levelnote.gotoAndStop(7); } public function day3Selected(_arg1=null){ selectedLevel = 3; gameData.changeGameLevel(selectedLevel); levelnote.gotoAndStop(3); } public function day5Selected(_arg1=null){ selectedLevel = 5; gameData.changeGameLevel(selectedLevel); levelnote.gotoAndStop(5); } function frame135(){ soundMgr.playBGM("intro"); btcancel.addEventListener(MouseEvent.CLICK, backToMain); stop(); } public function upgradeTurretCreateTimeOut(_arg1=null){ hideNote(); } public function upgradeCopterOver(_arg1=null){ showNote("copter"); } public function upgradeTurretCreateTimeOver(_arg1=null){ showNote("turretcreatetime"); } } }//package windkingdom_armor_fla
Section 53
//mc_preload_dumper_11 (windkingdom_armor_fla.mc_preload_dumper_11) package windkingdom_armor_fla { import flash.display.*; public dynamic class mc_preload_dumper_11 extends MovieClip { public function mc_preload_dumper_11(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package windkingdom_armor_fla
Section 54
//mc_redsplashfxcopy_26 (windkingdom_armor_fla.mc_redsplashfxcopy_26) package windkingdom_armor_fla { import flash.display.*; public dynamic class mc_redsplashfxcopy_26 extends MovieClip { public function mc_redsplashfxcopy_26(){ addFrameScript(9, frame10); } function frame10(){ gotoAndPlay(1); } } }//package windkingdom_armor_fla
Section 55
//mc_tutorialskills_150 (windkingdom_armor_fla.mc_tutorialskills_150) package windkingdom_armor_fla { import flash.display.*; public dynamic class mc_tutorialskills_150 extends MovieClip { public function mc_tutorialskills_150(){ addFrameScript(0, frame1, 60, frame61); } function frame1(){ stop(); } function frame61(){ stop(); } } }//package windkingdom_armor_fla
Section 56
//mcpreloaderBar_9 (windkingdom_armor_fla.mcpreloaderBar_9) package windkingdom_armor_fla { import flash.display.*; public dynamic class mcpreloaderBar_9 extends MovieClip { public function mcpreloaderBar_9(){ addFrameScript(100, frame101); } function frame101(){ stop(); } } }//package windkingdom_armor_fla
Section 57
//panelnote_168 (windkingdom_armor_fla.panelnote_168) package windkingdom_armor_fla { import flash.display.*; import flash.text.*; public dynamic class panelnote_168 extends MovieClip { public var ep:TextField; } }//package windkingdom_armor_fla
Section 58
//result_173 (windkingdom_armor_fla.result_173) package windkingdom_armor_fla { import flash.display.*; import flash.text.*; public dynamic class result_173 extends MovieClip { public var txt12:TextField; public var txt11:TextField; public var txt14:TextField; public var txt13:TextField; public var txt10:TextField; public var txt15:TextField; public var txt16:TextField; public var txt1:TextField; public var txt2:TextField; public var txt3:TextField; public var txt5:TextField; public var txt9:TextField; public var txt6:TextField; public var txt7:TextField; public var txt8:TextField; public var txt4:TextField; } }//package windkingdom_armor_fla
Section 59
//result_loose_172 (windkingdom_armor_fla.result_loose_172) package windkingdom_armor_fla { import flash.display.*; import flash.text.*; public dynamic class result_loose_172 extends MovieClip { public var txt12:TextField; public var txt11:TextField; public var txt14:TextField; public var txt13:TextField; public var txt10:TextField; public var txt15:TextField; public var txt16:TextField; public var txt1:TextField; public var txt2:TextField; public var txt3:TextField; public var txt5:TextField; public var txt9:TextField; public var txt6:TextField; public var txt7:TextField; public var txt8:TextField; public var txt4:TextField; } }//package windkingdom_armor_fla
Section 60
//result_quit_170 (windkingdom_armor_fla.result_quit_170) package windkingdom_armor_fla { import flash.display.*; import flash.text.*; public dynamic class result_quit_170 extends MovieClip { public var txt12:TextField; public var txt11:TextField; public var txt14:TextField; public var txt13:TextField; public var txt10:TextField; public var txt15:TextField; public var txt16:TextField; public var txt1:TextField; public var txt2:TextField; public var txt3:TextField; public var txt5:TextField; public var txt9:TextField; public var txt6:TextField; public var txt7:TextField; public var txt8:TextField; public var txt4:TextField; } }//package windkingdom_armor_fla
Section 61
//rightnote_88 (windkingdom_armor_fla.rightnote_88) package windkingdom_armor_fla { import flash.display.*; import flash.text.*; public dynamic class rightnote_88 extends MovieClip { public var txt1:TextField; public var txt2:TextField; public var txt3:TextField; public function rightnote_88(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package windkingdom_armor_fla
Section 62
//upgradewarning_151 (windkingdom_armor_fla.upgradewarning_151) package windkingdom_armor_fla { import flash.display.*; public dynamic class upgradewarning_151 extends MovieClip { public function upgradewarning_151(){ addFrameScript(0, frame1, 29, frame30, 58, frame59); } function frame1(){ stop(); } function frame30(){ gotoAndStop(1); } function frame59(){ gotoAndStop(1); } } }//package windkingdom_armor_fla
Section 63
//background1 (background1) package { import flash.display.*; public dynamic class background1 extends MovieClip { } }//package
Section 64
//BaseAIClip (BaseAIClip) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.geom.*; public class BaseAIClip extends MovieClip { private var attackingcounter;// = 0 private var healthbar; public var attack; public var defense; public var health; public var speed; public var typeInt; public var d1:MovieClip; private var dx; private var stopX; private var stopY; private var dy; public var splashSign; public var maxhealth; public var selectedSign; public var repairer:MovieClip; private var bullet; public var power; public var castle:MovieClip; public var attackrate; public var type; public var range; private var flipable; private var bulletfx; public var sceneContainer; public var weapontype; public var side; public var myParent; public var attacktype; public var target; private var createtime; public var cost; private var attackingspeed; private var maincastle; public var status; private var attacktimer; public function BaseAIClip(){ attackingcounter = 0; super(); } public function destroy(){ if (bullet){ sceneContainer.removeChild(bullet); bullet = null; }; this.removeEventListener(MouseEvent.CLICK, selectionHandler); } private function moveDown(){ if (this.y < 800){ dy = (1000 / this.width); this.y = (this.y + dy); } else { this.gotoAndStop("destroyed"); if (type == "castle"){ myParent.gameState = "stopplayerloose"; myParent.stopGame(); }; }; } private function selectionHandler(_arg1){ myParent.showObjectStatus(this); if (side == "enemy"){ myParent.setEnemyTarget(this); }; } private function attackMove(){ switch (weapontype){ case "sword": if (attackingcounter < 15){ if (this.currentLabel != "attack"){ this.gotoAndPlay("attack"); }; target.reduceHealth(((power * attack) / 15)); attackingcounter++; if (attackingcounter == 15){ attackingcounter = 0; status = "closing"; }; }; break; case "thunderbullet": if (attacktimer > 0){ if (!bullet){ bullet = new mc_thunder(); bullet.x = this.x; bullet.y = this.y; sceneContainer.addChild(bullet); bullet.gotoAndPlay(((Math.floor((Math.random() * 3)) * 2) + 1)); }; if (!bulletfx){ bulletfx = new mc_electricsplashfx(); bulletfx.x = this.x; bulletfx.y = this.y; sceneContainer.addChild(bulletfx); bulletfx.gotoAndPlay(((Math.floor((Math.random() * 5)) * 2) + 1)); }; bullet.rotation = 0; bullet.width = (getDistance(target) + 10); bullet.rotation = (180 - getAngle(target)); bulletfx.x = target.x; bulletfx.y = target.y; bulletfx.width = target.width; bulletfx.height = target.width; target.reduceHealth(((power * attack) * 0.05)); attacktimer--; if ((((((((attacktimer == 0)) || (!(target)))) || ((target.status == "destroyed")))) || ((target.health == 0)))){ attacktimer = 0; status = "closing"; }; } else { attacktimer = 0; status = "closing"; }; if (((((((!(target)) || ((getDistance(target) > range)))) || ((target.status == "destroyed")))) || ((target.health == 0)))){ attacktimer = attackrate; }; break; default: break; }; } private function getClosestPawn2(_arg1="player"):MovieClip{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; if (_arg1 == "player"){ _local6 = myParent.unitArray; } else { _local6 = myParent.enemyArray; }; if (_local6.length > 0){ _local5 = _local6[0]; _local4 = getDistance(_local5); _local2 = 0; while (_local2 < _local6.length) { _local3 = getDistance(_local6[_local2]); if (_local3 < _local4){ _local5 = _local6[_local2]; _local4 = _local3; }; _local2++; }; } else { _local5 = null; }; return (_local5); } public function initType(_arg1, _arg2, _arg3){ myParent = _arg1; sceneContainer = myParent.sceneContainer; attacktimer = 0; bullet = null; createtime = getTimer(); if (_arg2 != "castle"){ castle = myParent.castle; } else { castle = null; }; switch (_arg2){ case "castle": side = "player"; type = "castle"; weapontype = "icebullet"; cost = 0; speed = 0; health = _arg3.castleHealth; power = _arg3.castlePower; attack = _arg3.castleAttack; defense = _arg3.castleDefense; range = _arg3.castleRange; attackrate = 30; flipable = false; stopX = this.x; stopY = this.y; break; case "iceturret": side = "player"; type = "turret"; typeInt = 0; weapontype = "frozenbullet"; cost = 0; speed = 0; health = _arg3.turretsHealth[0]; power = _arg3.turretsPower[0]; attack = _arg3.turretsAttack[0]; defense = _arg3.turretsDefense[0]; range = _arg3.turretsRange[0]; attackrate = 30; flipable = false; stopX = this.x; stopY = this.y; break; case "fireturret": side = "player"; type = "turret"; typeInt = 1; weapontype = "firebullet"; cost = 0; speed = 0; health = _arg3.turretsHealth[1]; power = _arg3.turretsPower[1]; attack = _arg3.turretsAttack[1]; defense = _arg3.turretsDefense[1]; range = _arg3.turretsRange[1]; attackrate = 30; flipable = false; stopX = this.x; stopY = this.y; break; case "thunderturret": side = "player"; type = "turret"; typeInt = 2; attacktype = "meelee"; weapontype = "thunderbullet"; cost = 0; speed = 0; health = _arg3.turretsHealth[2]; power = _arg3.turretsPower[2]; attack = _arg3.turretsAttack[2]; defense = _arg3.turretsDefense[2]; range = _arg3.turretsRange[2]; attackrate = 30; flipable = false; stopX = this.x; stopY = this.y; break; case "dragon": side = "player"; type = "dragon"; typeInt = 4; weapontype = "icebullet"; cost = 0; speed = 2; health = _arg3.unitsHealth[4]; power = _arg3.unitsPower[4]; attack = _arg3.unitsAttack[4]; defense = _arg3.unitsDefense[4]; range = _arg3.unitsRange[4]; attackrate = 30; flipable = false; break; case "panzer": side = "player"; type = "panzer"; typeInt = 3; weapontype = "cannonbullet"; cost = 0; speed = 2; health = _arg3.unitsHealth[3]; power = _arg3.unitsPower[3]; attack = _arg3.unitsAttack[3]; defense = _arg3.unitsDefense[3]; range = _arg3.unitsRange[3]; attackrate = 30; flipable = false; break; case "eagle": side = "player"; type = "eagle"; typeInt = 2; weapontype = "icebullet"; cost = 0; speed = 2; health = _arg3.unitsHealth[2]; power = _arg3.unitsPower[2]; attack = _arg3.unitsAttack[2]; defense = _arg3.unitsDefense[2]; range = _arg3.unitsRange[2]; attackrate = 30; flipable = false; break; case "copter": side = "player"; type = "copter"; typeInt = 1; weapontype = "cannonbullet"; cost = 0; speed = 2; health = _arg3.unitsHealth[1]; power = _arg3.unitsPower[1]; attack = _arg3.unitsAttack[1]; defense = _arg3.unitsDefense[1]; range = _arg3.unitsRange[1]; attackrate = 30; flipable = false; break; case "rider": side = "player"; type = "rider"; typeInt = 0; weapontype = "icebullet"; cost = 0; speed = 2; health = _arg3.unitsHealth[0]; power = _arg3.unitsPower[0]; attack = _arg3.unitsAttack[0]; defense = _arg3.unitsDefense[0]; range = _arg3.unitsRange[0]; attackrate = 30; flipable = false; break; case "evilultimate": side = "enemy"; type = "evilultimate"; typeInt = 6; weapontype = "firebullet"; cost = _arg3.enemyCost[6]; speed = 3; health = _arg3.enemyHealth[6]; power = _arg3.enemyPower[6]; attack = _arg3.enemyAttack[6]; defense = _arg3.enemyDefense[6]; range = _arg3.enemyRange[6]; attackrate = 30; flipable = true; break; case "evildragon": side = "enemy"; type = "evildragon"; typeInt = 5; weapontype = "firebullet"; cost = _arg3.enemyCost[5]; speed = 3; health = _arg3.enemyHealth[5]; power = _arg3.enemyPower[5]; attack = _arg3.enemyAttack[5]; defense = _arg3.enemyDefense[5]; range = _arg3.enemyRange[5]; attackrate = 30; flipable = true; break; case "evilknight": side = "enemy"; type = "evilknight"; typeInt = 4; attacktype = "meelee"; weapontype = "sword"; cost = _arg3.enemyCost[4]; speed = 3; health = _arg3.enemyHealth[4]; power = _arg3.enemyPower[4]; attack = _arg3.enemyAttack[4]; defense = _arg3.enemyDefense[4]; range = _arg3.enemyRange[4]; attackrate = 60; attackingspeed = 15; flipable = false; break; case "evilpanzer": side = "enemy"; type = "evilpanzer"; typeInt = 3; weapontype = "cannonbullet"; cost = _arg3.enemyCost[3]; speed = 3; health = _arg3.enemyHealth[3]; power = _arg3.enemyPower[3]; attack = _arg3.enemyAttack[3]; defense = _arg3.enemyDefense[3]; range = _arg3.enemyRange[3]; attackrate = 30; flipable = true; break; case "bigbat": side = "enemy"; type = "bigbat"; typeInt = 2; weapontype = "firebullet"; cost = _arg3.enemyCost[2]; speed = 2.5; health = _arg3.enemyHealth[2]; power = _arg3.enemyPower[2]; attack = _arg3.enemyAttack[2]; defense = _arg3.enemyDefense[2]; range = _arg3.enemyRange[2]; attackrate = 30; flipable = false; break; case "evilcopter": side = "enemy"; type = "evilcopter"; typeInt = 1; weapontype = "cannonbullet"; cost = _arg3.enemyCost[1]; speed = 2.5; health = _arg3.enemyHealth[1]; power = _arg3.enemyPower[1]; attack = _arg3.enemyAttack[1]; defense = _arg3.enemyDefense[1]; range = _arg3.enemyRange[1]; attackrate = 30; flipable = true; break; case "smallbat": default: side = "enemy"; type = "smallbat"; typeInt = 0; weapontype = "icebullet"; cost = _arg3.enemyCost[0]; speed = 2; health = _arg3.enemyHealth[0]; power = _arg3.enemyPower[0]; attack = _arg3.enemyAttack[0]; defense = _arg3.enemyDefense[0]; range = _arg3.enemyRange[0]; attackrate = 30; flipable = false; break; }; maxhealth = health; selectedSign = new mc_selected(); selectedSign.x = 0; selectedSign.y = 0; selectedSign.width = this.width; selectedSign.height = this.width; selectedSign.visible = false; this.addChild(selectedSign); splashSign = new mc_splashfx(); splashSign.x = 0; splashSign.x = 0; splashSign.y = 0; splashSign.width = this.width; splashSign.height = this.width; healthbar = new mc_healthbar(); healthbar.x = 0; switch (type){ case "turret": case "castle": healthbar.y = 30; break; default: healthbar.y = 10; break; }; healthbar.gotoAndStop(Math.floor(((health / maxhealth) * 100))); if (type != "castle"){ this.addChild(splashSign); this.addChild(healthbar); }; if (side == "enemy"){ detectAllyHit(); if (this.x < 275){ this.scaleX = (this.scaleX * -1); }; target = getClosestPawn("player"); if (target){ status = "closing"; } else { status = "idle"; }; } else { if (speed > 0){ detectAllyHit(); if (this.x < 275){ this.scaleX = (this.scaleX * -1); }; target = getClosestPawn("enemy"); if (target){ status = "closing"; } else { status = "idle"; }; }; }; this.addEventListener(MouseEvent.CLICK, selectionHandler); } public function resetHealth(){ health = maxhealth; healthbar.gotoAndStop(Math.floor(((health / maxhealth) * 100))); } public function setTarget(_arg1){ if (status != "destroyed"){ if (getDistance(_arg1) <= range){ target = _arg1; status = "attacking"; if (bullet){ sceneContainer.removeChild(bullet); }; bullet = null; if (bulletfx){ sceneContainer.removeChild(bulletfx); }; bulletfx = null; }; }; } public function moveClip(){ var _local1:*; if (bullet){ sceneContainer.removeChild(bullet); }; bullet = null; if (bulletfx){ sceneContainer.removeChild(bulletfx); }; bulletfx = null; if (((!((status == "destroyed"))) && (this.visible))){ if (((((!(target)) || ((getDistance(target) > (range * 1.5))))) || ((target.status == "destroyed")))){ findTarget(); }; } else { target = null; }; if (target){ setSkin(); if (getDistance(target) < range){ if (attacktype == "meelee"){ if (status != "attackmove"){ status = "attackmove"; attackingcounter = 0; attacktimer = attackrate; }; } else { status = "attacking"; }; } else { if (getDistance(target) <= (1.5 * range)){ status = "closing"; } else { if (side == "player"){ status = "idle"; } else { status = "closing"; }; }; }; } else { if (((!((status == "destroyed"))) && (this.visible))){ status = "idle"; }; }; switch (status){ case "destroyed": moveDown(); break; case "idle": idleMove(); break; case "attacking": attackTarget(); break; case "attackmove": attackMove(); break; case "fallback": closeCastle(); break; case "closing": default: closeTarget(); break; }; detectAllyHit(); } private function findTarget(){ var _local1:*; if (side == "player"){ if (((((myParent.selectedObject) && ((myParent.selectedObject.side == "enemy")))) && ((getDistance(myParent.selectedObject) <= range)))){ target = myParent.selectedObject; } else { _local1 = getClosestPawn("enemy"); if (_local1){ status = "closing"; target = _local1; } else { status = "idle"; }; }; } else { _local1 = getClosestPawn("player"); if (_local1){ status = "closing"; target = _local1; } else { status = "idle"; }; }; } private function setSkin(){ if (speed > 0){ if (this.scaleX > 0){ if (target.x > this.x){ this.scaleX = (this.scaleX * -1); }; } else { if (target.x < this.x){ this.scaleX = (this.scaleX * -1); }; }; if (flipable){ if (target.y < this.y){ if (this.currentLabel != "faceup"){ this.gotoAndPlay("faceup"); }; } else { if (this.currentLabel != "facedown"){ this.gotoAndPlay("facedown"); }; }; }; }; } private function closeCastle(){ var _local1:*; var _local2:*; _local1 = getTimer(); if (((castle) && ((speed > 0)))){ if ((dy * dy) > ((dx * dx) / 8)){ if (this.y > castle.y){ this.y = (this.y - speed); } else { if (this.y < castle.y){ this.y = (this.y + speed); }; }; } else { if (this.x > castle.x){ this.x = (this.x - speed); } else { if (this.x < castle.x){ this.x = (this.x + speed); }; }; }; }; detectOutScreen(); } public function getAngle(_arg1):Number{ dx = (this.x - _arg1.x); dy = (_arg1.y - this.y); return (((Math.atan2(dy, dx) * 180) / Math.PI)); } private function getClosestPawn(_arg1="player"):MovieClip{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; _local3 = null; _local5 = null; _local2 = 0; while (_local2 < sceneContainer.numChildren) { _local3 = sceneContainer.getChildAt(_local2); if (((((((!((_local3 == this))) && (!((_local3.type == "bullet"))))) && (!((_local3.status == "destroyed"))))) && (_local3.visible))){ if (_local3.side == _arg1){ if (!_local5){ _local5 = _local3; _local6 = getDistance(_local5); } else { _local4 = getDistance(_local3); if (_local6 > _local4){ _local5 = _local3; _local6 = _local4; }; }; }; }; _local2++; }; return (_local5); } private function detectAllyHit(){ var _local1:*; _local1 = getClosestPawn(side); if (((_local1) && (_local1.hitTestObject(this)))){ if ((((_local1.type == "castle")) || ((_local1.type == "turret")))){ (_local1 == null); }; } else { _local1 = null; }; if (_local1){ if (side == "enemy"){ if (this.y < _local1.y){ this.y = (this.y - speed); }; } else { if (this.y > _local1.y){ this.y = (this.y + speed); }; }; if (this.x > _local1.x){ this.x = (this.x + (speed / 2)); } else { this.x = (this.x - (speed / 2)); }; detectOutScreen(); }; } public function reduceHealth(_arg1){ var _local2:*; _local2 = (((_arg1 * power) * defense) / 200); if (_local2 >= (_arg1 * 0.9)){ health = (health - (_arg1 / 10)); } else { health = (health - (_arg1 - _local2)); }; healthbar.gotoAndStop(Math.floor(((health / maxhealth) * 100))); if (type == "castle"){ myParent.showHealth(); myParent.setDistortTimer(Math.ceil((_arg1 / 8))); }; if (health <= 0){ health = 0; status = "destroyed"; if (bullet){ sceneContainer.removeChild(bullet); bullet = null; if (bulletfx){ sceneContainer.removeChild(bulletfx); }; bulletfx = null; }; if (type == "castle"){ myParent.gameState = "gameover"; this.gotoAndPlay((this.currentFrame + 3)); }; }; } private function getDistance(_arg1):Number{ if (_arg1){ dx = (this.x - _arg1.x); dy = (_arg1.y - this.y); return (Math.sqrt(((dx * dx) + (dy * dy)))); }; return (0); } private function closeTarget(){ var _local1:*; var _local2:*; _local1 = getTimer(); if (bullet){ attacktimer = 0; status = "closing"; sceneContainer.removeChild(bullet); bullet = null; }; if (speed > 0){ if (side == "enemy"){ if ((dy * dy) > ((dx * dx) / 8)){ if (this.y > target.y){ this.y = (this.y - speed); } else { if (this.y < target.y){ this.y = (this.y + speed); }; }; } else { if (this.x > target.x){ this.x = (this.x - speed); } else { if (this.x < target.x){ this.x = (this.x + speed); }; }; }; } else { if (getDistance(target) > (range - 20)){ if ((dy * dy) > ((dx * dx) / 8)){ if (this.y > target.y){ this.y = (this.y - speed); } else { if (this.y < target.y){ this.y = (this.y + speed); }; }; } else { if (this.x > target.x){ this.x = (this.x - speed); } else { if (this.x < target.x){ this.x = (this.x + speed); }; }; }; }; }; detectOutScreen(); } else { this.y = (stopY + (Math.sin((((_local1 - createtime) / 3000) * Math.PI)) * 5)); }; } private function idleMove(){ var _local1:*; var _local2:*; _local1 = getTimer(); if (bullet){ attacktimer = 0; status = "closing"; sceneContainer.removeChild(bullet); bullet = null; }; if (speed == 0){ this.y = (stopY + (Math.sin((((_local1 - createtime) / 3000) * Math.PI)) * 5)); } else { if (side == "player"){ if (this.y > (myParent.castle.y + 25)){ this.y = (this.y - speed); } else { (this.y < (myParent.castle.y - 25)); }; this.y = (this.y + speed); } else { this.y = (this.y + (Math.sin((((_local1 - createtime) / 3000) * Math.PI)) / 10)); }; }; } private function attackTarget(){ var _local1:*; var _local2:*; var _local3:*; _local2 = getTimer(); _local3 = getDistance(target); if (speed > 0){ if (_local3 < (range / 2)){ if (this.x > target.x){ this.x = (this.x + speed); } else { this.x = (this.x - speed); }; if (this.y > target.y){ this.y = (this.y + speed); } else { this.y = (this.y - speed); }; }; detectOutScreen(); } else { this.y = (stopY + (Math.sin((((_local2 - createtime) / 3000) * Math.PI)) * 5)); }; if (((((target) && ((_local3 <= range)))) && (!((this.status == "destroyed"))))){ if (attacktimer == 0){ attacktimer = attackrate; switch (type){ case "castle": if (target.x > 275){ myParent.createBullet(new Point((this.x + 50), (this.y - 60)), target, side, weapontype, (power * attack)); } else { myParent.createBullet(new Point((this.x - 50), (this.y - 60)), target, side, weapontype, (power * attack)); }; break; default: myParent.createBullet(this, target, side, weapontype, (power * attack)); break; }; } else { attacktimer--; }; }; } private function detectOutScreen(){ if (this.y < 0){ this.y = (this.y + speed); }; if (this.y > 700){ this.y = (this.y - speed); }; if (this.x < 0){ this.x = (this.x + speed); }; if (this.x > 550){ this.x = (this.x - speed); }; } } }//package
Section 65
//BaseBulletClip (BaseBulletClip) package { import flash.display.*; public class BaseBulletClip extends MovieClip { private var distance; private var startX; private var startY; public var side; public var destroyable; public var speed; private var sceneContainer; private var myParent; public var damage; public var type; private var dr; public var subtype; private var dx; private var dy; public function destroy(){ } public function initType(_arg1, _arg2, _arg3, _arg4, _arg5=0){ myParent = _arg1; sceneContainer = myParent.sceneContainer; subtype = _arg3; type = "bullet"; side = _arg2; distance = _arg5; startX = this.x; startY = this.y; switch (_arg3){ default: damage = _arg4; speed = 10; destroyable = true; break; }; if (_arg5 > 0){ if (Math.abs(this.rotation) < 90){ this.rotation = (this.rotation - 45); dr = (((-45 * speed) / distance) * 2); } else { this.rotation = (this.rotation + 45); dr = (((45 * speed) / distance) * 2); }; }; dx = (speed * Math.cos(((this.rotation / 180) * Math.PI))); dy = (speed * Math.sin(((this.rotation / 180) * Math.PI))); } private function getDistance():Number{ var _local1:*; var _local2:*; _local1 = (this.x - startX); _local2 = (startY - this.y); return (Math.sqrt(((_local1 * _local1) + (_local2 * _local2)))); } public function moveClip(){ if (distance > 0){ if ((((dy > 0)) && ((Math.abs(dx) < 2)))){ dx = 0; dy = speed; } else { this.rotation = (this.rotation - dr); dx = (speed * Math.cos(((this.rotation / 180) * Math.PI))); dy = (speed * Math.sin(((this.rotation / 180) * Math.PI))); }; }; this.x = (this.x - dx); this.y = (this.y + dy); } } }//package
Section 66
//BaseSound (BaseSound) package { import flash.events.*; import flash.utils.*; import flash.media.*; public class BaseSound extends Sound { private var sndTransform:SoundTransform; private var sndFadeOut:Boolean; private var sndFadeIn:Boolean; private var sndPosTime:Number; private var loop:Boolean; private var sndObj:Sound; private var sndChannel:SoundChannel; private var sndTimer:Timer; private var sndVolume:Number; private var sndPan:Number; public function BaseSound(){ sndObj = this; sndChannel = null; sndTransform = null; sndVolume = 1; sndPan = 0; sndPosTime = 0; sndFadeIn = false; sndFadeOut = false; loop = false; sndTimer = new Timer(50); sndTimer.addEventListener(TimerEvent.TIMER, sndTimerHandler); sndTimer.start(); } public function setVolume(_arg1:Number):void{ var _local2:SoundTransform; sndVolume = _arg1; if (sndChannel){ _local2 = sndChannel.soundTransform; _local2.volume = sndVolume; sndChannel.soundTransform = _local2; }; } public function stopSound():void{ if (sndChannel){ sndChannel.stop(); sndChannel.removeEventListener(Event.SOUND_COMPLETE, sound_loop); loop = false; }; } public function fadeOut(_arg1:Boolean):void{ sndFadeOut = true; sndFadeIn = false; if (_arg1){ setVolume(1); }; } public function pauseSound():void{ if (sndChannel){ sndPosTime = sndChannel.position; sndChannel.stop(); sndChannel.removeEventListener(Event.SOUND_COMPLETE, sound_loop); }; } public function playSound():void{ stopSound(); sndChannel = sndObj.play(); setVolume(sndVolume); setPan(sndPan); } public function fadeIn(_arg1:Boolean):void{ sndFadeIn = true; sndFadeOut = false; if (_arg1){ setVolume(0); }; } private function sndTimerHandler(_arg1:TimerEvent):void{ if (((sndFadeIn) && (sndFadeOut))){ sndFadeIn = false; sndFadeOut = false; setVolume(1); }; if (sndFadeIn){ sndVolume = (sndVolume + 0.01); if (sndVolume > 1){ setVolume(1); sndFadeIn = false; } else { setVolume(sndVolume); }; }; if (sndFadeOut){ sndVolume = (sndVolume - 0.01); if (sndVolume < 0){ setVolume(0); sndFadeOut = false; } else { setVolume(sndVolume); }; }; } public function setPan(_arg1:Number):void{ var _local2:SoundTransform; sndPan = _arg1; if (sndChannel){ _local2 = sndChannel.soundTransform; _local2.pan = sndPan; sndChannel.soundTransform = _local2; }; } public function resumeSound():void{ stopSound(); sndChannel = sndObj.play(sndPosTime); if (loop){ sndChannel.addEventListener(Event.SOUND_COMPLETE, sound_loop); }; setVolume(sndVolume); setPan(sndPan); } private function sound_loop(_arg1:Event){ sndChannel = sndObj.play(); setVolume(sndVolume); setPan(sndPan); sndChannel.addEventListener(Event.SOUND_COMPLETE, sound_loop); } public function playSoundLoop():void{ stopSound(); sndChannel = sndObj.play(); sndChannel.addEventListener(Event.SOUND_COMPLETE, sound_loop); setVolume(sndVolume); setPan(sndPan); loop = true; } } }//package
Section 67
//bgmcover (bgmcover) package { public dynamic class bgmcover extends BaseSound { } }//package
Section 68
//bgmintro (bgmintro) package { public dynamic class bgmintro extends BaseSound { } }//package
Section 69
//bgmstage (bgmstage) package { public dynamic class bgmstage extends BaseSound { } }//package
Section 70
//btno (btno) package { import flash.display.*; public dynamic class btno extends SimpleButton { } }//package
Section 71
//EffectContainer (EffectContainer) package { import flash.display.*; public class EffectContainer extends Sprite { private var particlesArray:Array; public function EffectContainer(){ particlesArray = new Array(); super(); } public function createParticle(_arg1, _arg2, _arg3){ var _local4:*; var _local5:*; _local5 = Math.random(); switch (_arg3){ case "specialattack": _local4 = new mc_specialfx(); break; case "cannonbullet": if (_local5 < 0.4){ _local4 = new mc_cannonblow1(); } else { if (_local5 < 0.7){ _local4 = new mc_cannonblow2(); } else { _local4 = new mc_cannonblow3(); }; }; break; case "firebullet": _local4 = new mc_redsplashfx(); break; case "icebullet": default: _local4 = new mc_bluesplashfx(); break; }; _local4.x = _arg1; _local4.y = _arg2; this.addChild(_local4); particlesArray.push(_local4); } public function moveClip(){ var _local1:*; _local1 = (particlesArray.length - 1); while (_local1 >= 0) { if (particlesArray[_local1].currentFrame == particlesArray[_local1].totalFrames){ this.removeChild(particlesArray[_local1]); particlesArray.splice(_local1, 1); } else { particlesArray[_local1].play(); }; _local1--; }; } } }//package
Section 72
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 73
//GameData (GameData) package { import com.kongregate.as3.client.events.*; import com.kongregate.as3.client.*; import flash.net.*; public class GameData { public var enemyInitialRange:Array; public var enemyInitialAttack:Array; public var enemyInitialDefense:Array; public var levelExperience:Number;// = 0 public var levelUnitsLost:Array; public var experienceTotal:Number;// = 0 public var maxManaCount:Number;// = 0 public var enemyInitialHealth:Array; public var levelEnemyKilled:Array; public var manaBankLevel;// = 1 public var initialManaCount:Number;// = 0 public var enemyKilled:Array; public var enemyHealth:Array; public var castleDefense:Number;// = 0 public var levelManaGained:Number;// = 0 public var experienceSpent:Number;// = 0 private var GAME_COMPLETED;// = 0 public var energyRegeneration:Number;// = 0.0277777777777778 private var BEST_MANA_EARN;// = 0 public var levelManaSpent:Number;// = 0 public var initialTurretsCreationTimer:int;// = 150 public var unlockedUnits:Array; public var unitsBuilt:Array; public var enemyStartTimerScenario:Array; public var enemyPower:Array; public var levelTurretsBuilt:Array; public var unlockedLevel:Array; public var unlockedEnemy:Array; public var turretsCreationTimerLevel:int;// = 1 public var unitsCreationTimer:Array; public var gameCompleted;// = 0 public var enemyLevelScenario:Array; public var castleInitialAttack:Number;// = 7 public var enemyRange:Array; public var unitsAttack:Array; public var castleInitialHealth:Number;// = 750 public var unitsHealth:Array; public var turretsBuilt:Array; public var turretsInitialDefense:Array; public var initialManaRegeneration:Number;// = 0.0166666666666667 public var initialUnitsCreationTimer:Array; public var enemyLevel:Array; public var unitsPower:Array; public var turretsCreationTimer:int;// = 0 public var turretsTimerPrice:Array; public var castlePower:Number;// = 0 public var levelUnitsBuilt:Array; public var manaRegenerationPrice:Array; public var enemyCreationTimer:Array; private var kongregateServiceLoaded:Boolean;// = false private var BEST_EXP_EARN;// = 0 public var unitsLevelFactor:Array; public var manaCount:Number;// = 0 public var unitsRange:Array; private var BEST_ENEMY_KILL;// = 0 public var unlockedEnemyScenario:Array; public var unitsPrice:Array; public var unlockedTurrets:Array; public var manaCountPrice:Array; public var levelTurretsLost:Array; public var castleRange:Number;// = 0 public var gameLengthScenario:Array; public var unitsInitialPower:Array; public var castlePrice:Array; public var manaRegenerationLevel:int;// = 1 public var unitsLost:Array; public var castleInitialPower:Number;// = 4 public var turretsDefense:Array; public var turretsPower:Array; public var turretsInitialPower:Array; public var turretsLost:Array; public var unitsCreationTimerLevel:int;// = 1 public var enemyTimerScenario:Array; public var unitsLevel:Array; public var tutorialShowed;// = false public var manaCountLevel:int;// = 1 public var castleAttack:Number;// = 0 public var energyCount:Number;// = 0 public var unitsInitialRange:Array; public var experience:Number;// = 0 public var castleLevel:int;// = 1 public var manaSpent:Number;// = 0 public var initialMaxManaCount:Number;// = 20 public var castleInitialRange:Number;// = 300 public var manaRegeneration:Number;// = 0 public var castleInitialDefense:Number;// = 6 public var enemyCost:Array; private var saveLabel;// = "WindKingdomTrial" public var turretsRange:Array; public var castleHealth:Number;// = 0 public var turretsInitialRange:Array; public var unitsInitialAttack:Array; private var BEST_TURRETS_BUILT;// = 0 public var turretsPrice:Array; public var manaGained:Number;// = 0 public var unitsInitialHealth:Array; private var BEST_UNITS_BUILT;// = 0 public var enemyDefense:Array; public var castleRepairTimer;// = 10 public var selectedLevel:int;// = 1 public var unitsInitialDefense:Array; public var turretsAttack:Array; public var turretsLevel:Array; public var enemyInitialPower:Array; public var unitsDefense:Array; public var unitsTimerPrice:Array; public var levelExperienceTotal:Array; public var turretsHealth:Array; private var kongregate:KongregateAPI; public var unitsCost:Array; public var turretsInitialAttack:Array; public var turretsCost:Array; public var enemyAttack:Array; public var turretsInitialHealth:Array; public function GameData(_arg1, _arg2=1){ saveLabel = "WindKingdomTrial"; unlockedLevel = new Array(true, false, false, false, false, false, false, false); experience = 0; manaRegenerationLevel = 1; manaCountLevel = 1; manaBankLevel = 1; initialManaRegeneration = (1 / 60); initialMaxManaCount = 20; initialManaCount = 0; unitsCreationTimerLevel = 1; initialUnitsCreationTimer = new Array(90, 150, 210, 270, 330); turretsCreationTimerLevel = 1; initialTurretsCreationTimer = 150; castleLevel = 1; castleRepairTimer = 10; castleInitialRange = 300; castleInitialHealth = 750; castleInitialPower = 4; castleInitialAttack = 7; castleInitialDefense = 6; unlockedTurrets = new Array(false, false, false); turretsLevel = new Array(0, 0, 0); turretsCost = new Array(150, 200, 250); turretsInitialRange = new Array(250, 300, 250); turretsInitialHealth = new Array(600, 900, 1200); turretsInitialPower = new Array(5, 6, 7); turretsInitialAttack = new Array(4, 4, 4); turretsInitialDefense = new Array(9, 9, 9); unlockedUnits = new Array(true, true, false, false, false); unitsLevel = new Array(1, 1, 0, 0, 0); unitsCost = new Array(5, 25, 50, 100, 250); unitsInitialRange = new Array(200, 200, 200, 200, 200); unitsInitialHealth = new Array(100, 300, 500, 800, 1200); unitsInitialPower = new Array(2, 5, 7, 10, 13); unitsInitialAttack = new Array(7, 7, 6, 5, 5); unitsInitialDefense = new Array(5, 5, 6, 7, 7); unlockedEnemy = new Array(true, true, true, false, false, false, false); enemyLevel = new Array(1, 1, 1, 1, 1, 1, 1); enemyCost = new Array(5, 25, 50, 200, 400, 700, 1000); enemyInitialRange = new Array(200, 200, 200, 200, 50, 200, 200); enemyInitialHealth = new Array(100, 200, 400, 700, 1000, 1400, 1800); enemyInitialPower = new Array(1, 3, 6, 9, 11, 13, 14); enemyInitialAttack = new Array(7, 7, 6, 5, 5, 7, 9); enemyInitialDefense = new Array(5, 5, 6, 7, 7, 8, 9); energyRegeneration = ((100 / 120) / 30); energyCount = 0; maxManaCount = 0; manaCount = 0; manaRegeneration = 0; selectedLevel = 1; castleRange = 0; castleHealth = 0; castlePower = 0; castleAttack = 0; castleDefense = 0; turretsCreationTimer = 0; turretsRange = new Array(0, 0, 0); turretsHealth = new Array(0, 0, 0); turretsPower = new Array(0, 0, 0); turretsAttack = new Array(0, 0, 0); turretsDefense = new Array(0, 0, 0); unitsLevelFactor = new Array(0, 0, 0, 0, 0); unitsCreationTimer = new Array(0, 0, 0, 0, 0); unitsRange = new Array(0, 0, 0, 0, 0); unitsHealth = new Array(0, 0, 0, 0, 0); unitsPower = new Array(0, 0, 0, 0, 0); unitsAttack = new Array(0, 0, 0, 0, 0); unitsDefense = new Array(0, 0, 0, 0, 0); enemyCreationTimer = new Array(0, 0, 0, 0, 0, 0, 0); enemyRange = new Array(0, 0, 0, 0, 0, 0, 0); enemyHealth = new Array(0, 0, 0, 0, 0, 0, 0); enemyPower = new Array(0, 0, 0, 0, 0, 0, 0); enemyAttack = new Array(0, 0, 0, 0, 0, 0, 0); enemyDefense = new Array(0, 0, 0, 0, 0, 0, 0); gameLengthScenario = new Array(180000, 240000, 300000, 360000, 420000, 480000, 540000, 600000); unlockedEnemyScenario = new Array([true, true, false, false, false, false, false], [true, true, true, false, false, false, false], [true, true, true, true, false, false, false], [true, true, true, true, true, false, false], [true, true, true, true, true, false, false], [true, true, true, true, true, true, false], [true, true, true, true, true, true, false], [true, true, true, true, true, true, true]); enemyStartTimerScenario = new Array([15, 2400, 99999, 99999, 99999, 99999, 99999], [15, 2400, 3600, 99999, 99999, 99999, 99999], [0, 1200, 2400, 3600, 99999, 99999, 99999], [0, 1200, 2400, 3600, 4800, 99999, 99999], [0, 600, 1200, 3600, 4800, 7200, 99999], [0, 600, 1200, 3600, 4800, 5400, 99999], [0, 300, 600, 1200, 3000, 4800, 99999], [0, 300, 600, 1200, 3000, 4800, 7200]); enemyTimerScenario = new Array([210, 365, 9999, 9999, 9999, 9999, 9999], [150, 245, 365, 9999, 9999, 9999, 9999], [300, 365, 455, 755, 9999, 9999, 9999], [300, 365, 455, 755, 815, 9999, 9999], [300, 365, 455, 755, 815, 9999, 9999], [300, 365, 455, 545, 755, 815, 9999], [300, 365, 455, 545, 755, 815, 9999], [300, 365, 455, 545, 755, 815, 905]); enemyLevelScenario = new Array([1, 1, 1, 1, 1, 1, 1], [2, 1, 1, 1, 1, 1, 1], [3, 2, 1, 1, 1, 1, 1], [3, 3, 2, 1, 1, 1, 1], [3, 3, 3, 2, 1, 1, 1], [3, 3, 3, 3, 2, 1, 1], [3, 3, 3, 3, 3, 2, 1], [3, 3, 3, 3, 3, 3, 1]); castlePrice = new Array(0, 100, 500); unitsPrice = new Array([0, 25, 50], [0, 50, 75], [50, 75, 100], [75, 150, 200], [250, 400, 600]); turretsPrice = new Array([25, 100, 250], [50, 125, 300], [75, 175, 400]); manaRegenerationPrice = new Array(25, 50, 100, 500); manaCountPrice = new Array(50, 125, 200, 350); unitsTimerPrice = new Array(25, 50, 100, 175); turretsTimerPrice = new Array(25, 50, 100, 175); levelExperience = 0; levelEnemyKilled = new Array(0, 0, 0, 0, 0, 0, 0); levelUnitsBuilt = new Array(0, 0, 0, 0, 0); levelUnitsLost = new Array(0, 0, 0, 0, 0); levelTurretsBuilt = new Array(0, 0, 0); levelTurretsLost = new Array(0, 0, 0); levelManaGained = 0; levelManaSpent = 0; levelExperienceTotal = new Array(0, 0, 0, 0, 0, 0, 0, 0); experienceTotal = 0; experienceSpent = 0; enemyKilled = new Array(0, 0, 0, 0, 0, 0, 0); unitsBuilt = new Array(0, 0, 0, 0, 0); unitsLost = new Array(0, 0, 0, 0, 0); turretsBuilt = new Array(0, 0, 0); turretsLost = new Array(0, 0, 0); manaGained = 0; manaSpent = 0; gameCompleted = 0; tutorialShowed = false; kongregateServiceLoaded = false; BEST_ENEMY_KILL = 0; BEST_UNITS_BUILT = 0; BEST_TURRETS_BUILT = 0; BEST_EXP_EARN = 0; BEST_MANA_EARN = 0; GAME_COMPLETED = 0; super(); initKongregateAPI(_arg1); selectedLevel = 1; recalculateManaCount(); recalculateManaRegeneration(); recalculateTurretsCreationTimer(); recalculateUnitsCreationTimer(); recalculateCastleData(); recalculateTurretsData(); recalculateUnitsData(); recalculateEnemyData(); } public function addTurretsBuilt(_arg1){ var _local2 = levelTurretsBuilt; var _local3 = _arg1; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; levelExperience = (levelExperience + (_arg1 + 2)); } public function decreaseMana(_arg1){ manaCount = (manaCount - _arg1); if (manaCount < 0){ manaCount = 0; }; levelManaSpent = (levelManaSpent + _arg1); } public function isDragonCreatable():Boolean{ return (((unlockedUnits[4]) && ((manaCount >= unitsCost[4])))); } private function recalculateTurretsCreationTimer(){ turretsCreationTimer = (initialTurretsCreationTimer - (10 * turretsCreationTimerLevel)); } public function isHealingEnable():Boolean{ return ((manaCount >= (maxManaCount / 2))); } public function increaseManaRegenerationLevel(){ if (manaRegenerationLevel < 5){ experienceTotal = (experienceTotal - manaRegenerationPrice[(manaRegenerationLevel - 1)]); experienceSpent = (experienceSpent + manaRegenerationPrice[(manaRegenerationLevel - 1)]); manaRegenerationLevel++; recalculateManaRegeneration(); }; } public function getSpecialAttackDamage():Number{ return ((castleLevel * 100)); } private function recalculateManaRegeneration(){ var _local1:*; var _local2:*; manaRegeneration = initialManaRegeneration; _local2 = 1; _local1 = 2; while (_local1 <= manaRegenerationLevel) { _local2 = (_local2 * 2); _local1++; }; manaRegeneration = (manaRegeneration * _local2); _local2 = 1; _local1 = 2; while (_local1 <= manaBankLevel) { _local2 = (_local2 * 1.5); _local1++; }; manaRegeneration = (manaRegeneration * _local2); } public function increaseUnitsPowerFactor(){ if (unitsLevelFactor[2] < 4){ manaCount = (manaCount - (20 * Math.pow((unitsLevelFactor[2] + 1), 3))); var _local1 = unitsLevelFactor; var _local2 = 2; var _local3 = (_local1[_local2] + 1); _local1[_local2] = _local3; recalculateUnitsData(); }; } public function isManaCountLevelUpgradable():Boolean{ var _local1:*; _local1 = false; if (manaCountLevel < 5){ _local1 = (experienceTotal >= manaCountPrice[(manaCountLevel - 1)]); } else { _local1 = false; }; return (_local1); } private function recalculateMaxManaCount(){ var _local1:*; var _local2:*; maxManaCount = initialMaxManaCount; _local2 = 1; _local1 = 2; while (_local1 <= manaCountLevel) { _local2 = (_local2 * 3); _local1++; }; maxManaCount = (initialMaxManaCount * _local2); _local2 = 1; _local1 = 2; while (_local1 <= manaBankLevel) { _local2 = (_local2 * 2); _local1++; }; maxManaCount = (maxManaCount * _local2); } public function increaseManaCountLevel(){ if (manaCountLevel < 5){ experienceTotal = (experienceTotal - manaCountPrice[(manaCountLevel - 1)]); experienceSpent = (experienceSpent + manaCountPrice[(manaCountLevel - 1)]); manaCountLevel++; recalculateMaxManaCount(); }; } public function increaseTurretsCreationTimerLevel(){ if (turretsCreationTimerLevel < 5){ experienceTotal = (experienceTotal - turretsTimerPrice[(turretsCreationTimerLevel - 1)]); experienceSpent = (experienceSpent + turretsTimerPrice[(turretsCreationTimerLevel - 1)]); turretsCreationTimerLevel++; recalculateTurretsCreationTimer(); }; } public function isIceTurretsCreatable():Boolean{ return (((unlockedTurrets[0]) && ((manaCount >= turretsCost[0])))); } public function isTurretsCreationTimerLevelUpgradable():Boolean{ var _local1:*; _local1 = false; if (turretsCreationTimerLevel < 5){ _local1 = (experienceTotal >= turretsTimerPrice[(turretsCreationTimerLevel - 1)]); } else { _local1 = false; }; return (_local1); } public function increaseUnitsDefenseFactor(){ if (unitsLevelFactor[4] < 4){ manaCount = (manaCount - (15 * Math.pow((unitsLevelFactor[4] + 1), 3))); var _local1 = unitsLevelFactor; var _local2 = 4; var _local3 = (_local1[_local2] + 1); _local1[_local2] = _local3; recalculateUnitsData(); }; } public function increaseUnitsRangeFactor(){ if (unitsLevelFactor[0] < 4){ manaCount = (manaCount - (10 * Math.pow((unitsLevelFactor[0] + 1), 3))); var _local1 = unitsLevelFactor; var _local2:int; var _local3 = (_local1[_local2] + 1); _local1[_local2] = _local3; recalculateUnitsData(); }; } public function isTurretsCreatable(_arg1):Boolean{ return (((unlockedTurrets[_arg1]) && ((manaCount >= turretsCost[_arg1])))); } private function recalculateUnitsData(){ var _local1:*; var _local2:Number; var _local3:Number; _local2 = 1; _local3 = 1; _local1 = 0; while (_local1 < 5) { switch (unitsLevel[_local1]){ case 3: _local3 = (1.05 * 1.05); _local2 = (1.1 * 1.1); break; case 2: _local3 = 1.05; _local2 = 1.1; break; case 1: default: _local3 = 1; _local2 = 1; break; }; unitsRange[_local1] = ((unitsInitialRange[_local1] * _local2) + (unitsLevelFactor[0] * 5)); unitsHealth[_local1] = ((unitsInitialHealth[_local1] * _local2) + (unitsLevelFactor[1] * 100)); unitsPower[_local1] = ((unitsInitialPower[_local1] * _local3) + unitsLevelFactor[2]); unitsAttack[_local1] = ((unitsInitialAttack[_local1] * _local2) + unitsLevelFactor[3]); unitsDefense[_local1] = ((unitsInitialDefense[_local1] * _local2) + unitsLevelFactor[4]); _local1++; }; } public function isUnitsCreatable(_arg1):Boolean{ return (((unlockedUnits[_arg1]) && ((manaCount >= unitsCost[_arg1])))); } private function recalculateUnitsCreationTimer(){ var _local1:*; _local1 = 0; while (_local1 < 5) { unitsCreationTimer[_local1] = (initialUnitsCreationTimer[_local1] - (10 * unitsCreationTimerLevel)); _local1++; }; } public function isManaRegenerationLevelUpgradable():Boolean{ var _local1:*; _local1 = false; if (manaRegenerationLevel < 5){ _local1 = (experienceTotal >= manaRegenerationPrice[(manaRegenerationLevel - 1)]); } else { _local1 = false; }; return (_local1); } public function isManaBankUpgradable():Boolean{ return ((manaCount >= (maxManaCount / 2))); } public function submitStat(){ BEST_ENEMY_KILL = Math.floor(countEnemyKilled()); BEST_UNITS_BUILT = Math.floor(countUnitsBuilt()); BEST_TURRETS_BUILT = Math.floor(countTurretsBuilt()); BEST_EXP_EARN = Math.floor((experienceTotal + experienceSpent)); BEST_MANA_EARN = Math.floor(manaGained); GAME_COMPLETED = Math.floor(gameCompleted); if (((kongregate) && (kongregateServiceLoaded))){ kongregate.stats.submit("BEST_ENEMY_KILL", BEST_ENEMY_KILL); kongregate.stats.submit("BEST_UNITS_BUILT", BEST_UNITS_BUILT); kongregate.stats.submit("BEST_TURRETS_BUILT", BEST_TURRETS_BUILT); kongregate.stats.submit("BEST_EXP_EARN", BEST_EXP_EARN); kongregate.stats.submit("BEST_MANA_EARN", BEST_MANA_EARN); kongregate.stats.submit("GAME_COMPLETED", GAME_COMPLETED); }; } public function isDefenseUpgradable():Boolean{ return ((((manaCount >= (15 * Math.pow((unitsLevelFactor[4] + 1), 3)))) && ((unitsLevelFactor[4] < 3)))); } public function increaseUnitsAttackFactor(){ if (unitsLevelFactor[3] < 4){ manaCount = (manaCount - (15 * Math.pow((unitsLevelFactor[3] + 1), 3))); var _local1 = unitsLevelFactor; var _local2 = 3; var _local3 = (_local1[_local2] + 1); _local1[_local2] = _local3; recalculateUnitsData(); }; } public function isPowerUpgradable():Boolean{ return ((((manaCount >= (20 * Math.pow((unitsLevelFactor[2] + 1), 3)))) && ((unitsLevelFactor[2] < 3)))); } public function isTutorialOn():Boolean{ if ((((selectedLevel == 1)) && ((enemyKilled[0] == 0)))){ return (true); }; return (false); } public function isTurretsLevelUpgradable(_arg1="iceturrets"):Boolean{ var _local2:*; var _local3:*; _local3 = false; switch (_arg1){ case "thunderturret": _local2 = 2; break; case "fireturret": _local2 = 1; break; case "iceturret": default: _local2 = 0; break; }; if (turretsLevel[_local2] < 3){ _local3 = (experienceTotal >= turretsPrice[_local2][turretsLevel[_local2]]); } else { _local3 = false; }; return (_local3); } public function increaseUnitsCreationTimerLevel(){ if (unitsCreationTimerLevel < 5){ experienceTotal = (experienceTotal - unitsTimerPrice[(unitsCreationTimerLevel - 1)]); experienceSpent = (experienceSpent + unitsTimerPrice[(unitsCreationTimerLevel - 1)]); unitsCreationTimerLevel++; recalculateUnitsCreationTimer(); }; } public function addEnemyKilled(_arg1){ var _local2 = levelEnemyKilled; var _local3 = _arg1; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; levelExperience = (levelExperience + (_arg1 + 1)); } public function countUnitsBuilt():Number{ var _local1:*; var _local2:*; _local1 = 0; _local2 = 0; while (_local2 < 5) { _local1 = (_local1 + unitsBuilt[_local2]); _local2++; }; return (_local1); } public function resetLevelExperience(){ levelExperience = (levelExperience / 2); } public function saveData(){ var _local1:SharedObject; _local1 = SharedObject.getLocal(saveLabel); _local1.data.unlockedLevel = unlockedLevel; _local1.data.selectedLevel = selectedLevel; _local1.data.experience = experience; _local1.data.manaRegenerationLevel = manaRegenerationLevel; _local1.data.manaCountLevel = manaCountLevel; _local1.data.unitsCreationTimerLevel = unitsCreationTimerLevel; _local1.data.turretsCreationTimerLevel = turretsCreationTimerLevel; _local1.data.castleLevel = castleLevel; _local1.data.unlockedTurrets = unlockedTurrets; _local1.data.turretsLevel = turretsLevel; _local1.data.unlockedUnits = unlockedUnits; _local1.data.unitsLevel = unitsLevel; _local1.data.levelExperienceTotal = levelExperienceTotal; _local1.data.experienceTotal = experienceTotal; _local1.data.experienceSpent = experienceSpent; _local1.data.enemyKilled = enemyKilled; _local1.data.unitsBuilt = unitsBuilt; _local1.data.unitsLost = unitsLost; _local1.data.turretsBuilt = turretsBuilt; _local1.data.turretsLost = turretsLost; _local1.data.manaGained = manaGained; _local1.data.manaSpent = manaSpent; _local1.data.gameCompleted = gameCompleted; _local1.data.tutorialShowed = tutorialShowed; _local1.flush(); } public function checkData():Boolean{ var _local1:SharedObject; _local1 = SharedObject.getLocal(saveLabel); if (_local1.size == 0){ return (false); }; return (true); } public function countTurretsLost():Number{ var _local1:*; var _local2:*; _local1 = 0; _local2 = 0; while (_local2 < 3) { _local1 = (_local1 + turretsLost[_local2]); _local2++; }; return (_local1); } private function resetLevelData(){ var _local1:*; energyCount = 0; manaBankLevel = 1; levelExperience = 0; levelManaGained = 0; levelManaSpent = 0; _local1 = 0; while (_local1 < levelEnemyKilled.length) { levelEnemyKilled[_local1] = 0; _local1++; }; _local1 = 0; while (_local1 < levelUnitsBuilt.length) { levelUnitsBuilt[_local1] = 0; levelUnitsLost[_local1] = 0; _local1++; }; _local1 = 0; while (_local1 < levelTurretsBuilt.length) { levelTurretsBuilt[_local1] = 0; levelTurretsLost[_local1] = 0; _local1++; }; _local1 = 0; while (_local1 < 5) { unitsLevelFactor[_local1] = 0; _local1++; }; } public function isRangeUpgradable():Boolean{ return ((((manaCount >= (10 * Math.pow((unitsLevelFactor[0] + 1), 3)))) && ((unitsLevelFactor[0] < 3)))); } public function changeGameLevel(_arg1=1){ selectedLevel = _arg1; resetLevelData(); recalculateEnemyData(); recalculateManaRegeneration(); recalculateMaxManaCount(); recalculateManaCount(); recalculateTurretsCreationTimer(); recalculateUnitsCreationTimer(); recalculateCastleData(); recalculateTurretsData(); recalculateUnitsData(); recalculateEnemyData(); } public function countUnitsLost():Number{ var _local1:*; var _local2:*; _local1 = 0; _local2 = 0; while (_local2 < 5) { _local1 = (_local1 + unitsLost[_local2]); _local2++; }; return (_local1); } public function isHealthUpgradable():Boolean{ return ((((manaCount >= (20 * Math.pow((unitsLevelFactor[1] + 1), 3)))) && ((unitsLevelFactor[1] < 3)))); } public function isPanzerCreatable():Boolean{ return (((unlockedUnits[3]) && ((manaCount >= unitsCost[3])))); } private function initKongregateAPI(_arg1){ kongregate = new KongregateAPI(); _arg1.addChild(kongregate); kongregate.addEventListener(KongregateEvent.COMPLETE, serviceLoaded); } private function serviceLoaded(_arg1:KongregateEvent):void{ kongregate.services.connect(); kongregateServiceLoaded = true; } public function isRepairable(_arg1, _arg2):Boolean{ return ((((manaCount >= 1)) && ((_arg1 < _arg2)))); } private function recalculateTurretsData(){ var _local1:*; var _local2:Number; var _local3:Number; var _local4:Number; _local2 = 1; _local3 = 1; _local4 = 1; _local1 = 0; while (_local1 < 3) { switch (turretsLevel[_local1]){ case 3: _local4 = ((1 * 75) * 75); _local3 = (1.75 * 1.75); _local2 = (1.2 * 1.2); break; case 2: _local4 = (1 * 75); _local3 = 1.75; _local2 = 1.2; break; case 1: default: _local4 = 1; _local3 = 1; _local2 = 1; break; }; turretsRange[_local1] = (turretsInitialRange[_local1] * _local2); turretsHealth[_local1] = (turretsInitialHealth[_local1] * _local4); turretsPower[_local1] = (turretsInitialPower[_local1] * _local3); turretsAttack[_local1] = (turretsInitialAttack[_local1] * _local2); turretsDefense[_local1] = (turretsInitialDefense[_local1] * _local2); _local1++; }; } public function increaseTurretsLevel(_arg1="iceturret"){ var _local2:*; switch (_arg1){ case "thunderturret": _local2 = 2; break; case "fireturret": _local2 = 1; break; case "iceturret": default: _local2 = 0; break; }; experienceTotal = (experienceTotal - turretsPrice[_local2][turretsLevel[_local2]]); experienceSpent = (experienceSpent + turretsPrice[_local2][turretsLevel[_local2]]); unlockedTurrets[_local2] = true; if (turretsLevel[_local2] < 3){ var _local3 = turretsLevel; var _local4 = _local2; var _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; }; recalculateTurretsData(); } public function isCopterCreatable():Boolean{ return (((unlockedUnits[1]) && ((manaCount >= unitsCost[1])))); } public function increaseUnitsLevel(_arg1="rider"){ var _local2:*; switch (_arg1){ case "dragon": _local2 = 4; break; case "panzer": _local2 = 3; break; case "eagle": _local2 = 2; break; case "copter": _local2 = 1; break; case "rider": default: _local2 = 0; break; }; experienceTotal = (experienceTotal - unitsPrice[_local2][unitsLevel[_local2]]); experienceSpent = (experienceSpent + unitsPrice[_local2][unitsLevel[_local2]]); unlockedUnits[_local2] = true; if (unitsLevel[_local2] < 3){ var _local3 = unitsLevel; var _local4 = _local2; var _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; }; recalculateUnitsData(); } public function isUnitsCreationTimerLevelUpgradable():Boolean{ var _local1:*; _local1 = false; if (unitsCreationTimerLevel < 5){ _local1 = (experienceTotal >= unitsTimerPrice[(unitsCreationTimerLevel - 1)]); } else { _local1 = false; }; return (_local1); } public function countTurretsBuilt():Number{ var _local1:*; var _local2:*; _local1 = 0; _local2 = 0; while (_local2 < 3) { _local1 = (_local1 + turretsBuilt[_local2]); _local2++; }; return (_local1); } public function isEagleCreatable():Boolean{ return (((unlockedUnits[2]) && ((manaCount >= unitsCost[2])))); } public function increaseManaBank(){ if (manaCount >= (maxManaCount / 2)){ manaCount = (manaCount - (maxManaCount / 2)); manaBankLevel++; recalculateMaxManaCount(); recalculateManaRegeneration(); }; } public function countEnemyKilled():Number{ var _local1:*; var _local2:*; _local1 = 0; _local2 = 0; while (_local2 < 7) { _local1 = (_local1 + enemyKilled[_local2]); _local2++; }; return (_local1); } public function addUnitsLost(_arg1){ var _local2 = levelUnitsLost; var _local3 = _arg1; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; } public function isThunderTurretsCreatable():Boolean{ return (((unlockedTurrets[2]) && ((manaCount >= turretsCost[2])))); } public function resetData(){ unlockedLevel = null; unlockedTurrets = null; turretsLevel = null; unlockedUnits = null; unitsLevel = null; levelExperienceTotal = null; enemyKilled = null; unitsBuilt = null; unitsLost = null; turretsBuilt = null; turretsLost = null; unlockedLevel = new Array(true, false, false, false, false, false, false, false); selectedLevel = 1; experience = 0; manaRegenerationLevel = 1; manaCountLevel = 1; unitsCreationTimerLevel = 1; turretsCreationTimerLevel = 1; castleLevel = 1; unlockedTurrets = new Array(false, false, false); turretsLevel = new Array(0, 0, 0); unlockedUnits = new Array(true, true, false, false, false); unitsLevel = new Array(1, 1, 0, 0, 0); levelExperienceTotal = new Array(0, 0, 0, 0, 0, 0, 0, 0); experienceTotal = 0; experienceSpent = 0; enemyKilled = new Array(0, 0, 0, 0, 0, 0, 0); unitsBuilt = new Array(0, 0, 0, 0, 0); unitsLost = new Array(0, 0, 0, 0, 0); turretsBuilt = new Array(0, 0, 0); turretsLost = new Array(0, 0, 0); manaGained = 0; manaSpent = 0; gameCompleted = 0; tutorialShowed = false; } public function increaseMana(_arg1){ manaCount = (manaCount + _arg1); if (manaCount > maxManaCount){ manaCount = maxManaCount; }; levelManaGained = (levelManaGained + _arg1); } private function recalculateManaCount(){ manaCount = (maxManaCount / 2); } public function loadData():Boolean{ var _local1:SharedObject; _local1 = SharedObject.getLocal(saveLabel); if (_local1.size == 0){ _local1.data.unlockedLevel = unlockedLevel; _local1.data.selectedLevel = selectedLevel; _local1.data.experience = experience; _local1.data.manaRegenerationLevel = manaRegenerationLevel; _local1.data.manaCountLevel = manaCountLevel; _local1.data.unitsCreationTimerLevel = unitsCreationTimerLevel; _local1.data.turretsCreationTimerLevel = turretsCreationTimerLevel; _local1.data.castleLevel = castleLevel; _local1.data.unlockedTurrets = unlockedTurrets; _local1.data.turretsLevel = turretsLevel; _local1.data.unlockedUnits = unlockedUnits; _local1.data.unitsLevel = unitsLevel; _local1.data.levelExperienceTotal = levelExperienceTotal; _local1.data.experienceTotal = experienceTotal; _local1.data.experienceSpent = experienceSpent; _local1.data.enemyKilled = enemyKilled; _local1.data.unitsBuilt = unitsBuilt; _local1.data.unitsLost = unitsLost; _local1.data.turretsBuilt = turretsBuilt; _local1.data.turretsLost = turretsLost; _local1.data.manaGained = manaGained; _local1.data.manaSpent = manaSpent; _local1.data.gameCompleted = gameCompleted; _local1.data.tutorialShowed = tutorialShowed; _local1.flush(); }; if (_local1.data.unlockedLevel){ unlockedLevel = _local1.data.unlockedLevel; selectedLevel = _local1.data.selectedLevel; experience = _local1.data.experience; manaRegenerationLevel = _local1.data.manaRegenerationLevel; manaCountLevel = _local1.data.manaCountLevel; unitsCreationTimerLevel = _local1.data.unitsCreationTimerLevel; turretsCreationTimerLevel = _local1.data.turretsCreationTimerLevel; castleLevel = _local1.data.castleLevel; unlockedTurrets = _local1.data.unlockedTurrets; turretsLevel = _local1.data.turretsLevel; unlockedUnits = _local1.data.unlockedUnits; unitsLevel = _local1.data.unitsLevel; levelExperienceTotal = _local1.data.levelExperienceTotal; experienceTotal = _local1.data.experienceTotal; experienceSpent = _local1.data.experienceSpent; enemyKilled = _local1.data.enemyKilled; unitsBuilt = _local1.data.unitsBuilt; unitsLost = _local1.data.unitsLost; turretsBuilt = _local1.data.turretsBuilt; turretsLost = _local1.data.turretsLost; manaGained = _local1.data.manaGained; manaSpent = _local1.data.manaSpent; gameCompleted = _local1.data.gameCompleted; tutorialShowed = _local1.data.tutorialShowed; }; if (enemyKilled[0] > 0){ return (true); }; return (false); } public function isSpecialAttackEnable():Boolean{ return ((energyCount >= 100)); } private function recalculateCastleData(){ var _local1:*; var _local2:Number; var _local3:Number; var _local4:Number; _local2 = 1; _local3 = 1; _local4 = 1; switch (castleLevel){ case 3: _local4 = ((1 * 2) * 2); _local3 = (1.75 * 1.75); _local2 = (1.2 * 1.2); break; case 2: _local4 = (1 * 2); _local3 = 1.75; _local2 = 1.2; break; case 1: default: _local4 = 1; _local3 = 1; _local2 = 1; break; }; castleRange = (castleInitialRange * _local2); castleHealth = (castleInitialHealth * _local2); castlePower = (castleInitialPower * _local3); castleAttack = (castleInitialAttack * _local2); castleDefense = (castleInitialDefense * _local2); } public function isFireTurretsCreatable():Boolean{ return (((unlockedTurrets[1]) && ((manaCount >= turretsCost[1])))); } public function isUnitsLevelUpgradable(_arg1="rider"):Boolean{ var _local2:*; var _local3:*; _local3 = false; switch (_arg1){ case "dragon": _local2 = 4; break; case "panzer": _local2 = 3; break; case "eagle": _local2 = 2; break; case "copter": _local2 = 1; break; case "rider": default: _local2 = 0; break; }; if (unitsLevel[_local2] < 3){ _local3 = (experienceTotal >= unitsPrice[_local2][unitsLevel[_local2]]); } else { _local3 = false; }; return (_local3); } public function isSkillTutorial():Boolean{ if ((((((selectedLevel == 2)) && ((enemyKilled[2] == 0)))) && (!(tutorialShowed)))){ tutorialShowed = true; return (true); }; return (false); } public function increaseUnitsHealthFactor(){ if (unitsLevelFactor[1] < 4){ manaCount = (manaCount - (20 * Math.pow((unitsLevelFactor[1] + 1), 3))); var _local1 = unitsLevelFactor; var _local2 = 1; var _local3 = (_local1[_local2] + 1); _local1[_local2] = _local3; recalculateUnitsData(); }; } public function increaseCastleLevel(){ if (castleLevel < 3){ experienceTotal = (experienceTotal - castlePrice[castleLevel]); experienceSpent = (experienceSpent + castlePrice[castleLevel]); castleLevel++; recalculateCastleData(); }; } public function isCastleLevelUpgradable():Boolean{ var _local1:*; _local1 = false; if (castleLevel < 3){ _local1 = (experienceTotal >= castlePrice[castleLevel]); } else { _local1 = false; }; return (_local1); } public function getExperiencePrice(_arg1=0):Number{ switch (_arg1){ case 12: return (manaCountPrice[(manaCountLevel - 1)]); case 11: return (manaRegenerationPrice[(manaRegenerationLevel - 1)]); case 10: return (turretsTimerPrice[(turretsCreationTimerLevel - 1)]); case 9: return (unitsTimerPrice[(unitsCreationTimerLevel - 1)]); case 8: return (unitsPrice[4][unitsLevel[4]]); case 7: return (unitsPrice[3][unitsLevel[3]]); case 6: return (unitsPrice[2][unitsLevel[2]]); case 5: return (unitsPrice[1][unitsLevel[1]]); case 4: return (unitsPrice[0][unitsLevel[0]]); case 3: return (turretsPrice[2][turretsLevel[2]]); case 2: return (turretsPrice[1][turretsLevel[1]]); case 1: return (turretsPrice[0][turretsLevel[0]]); case 0: default: return (castlePrice[castleLevel]); }; } public function commitLevelData(){ var _local1:*; experienceTotal = (experienceTotal + levelExperience); manaGained = (manaGained + levelManaGained); manaSpent = (manaSpent + levelManaSpent); _local1 = 0; while (_local1 < enemyKilled.length) { enemyKilled[_local1] = (enemyKilled[_local1] + levelEnemyKilled[_local1]); _local1++; }; _local1 = 0; while (_local1 < unitsBuilt.length) { unitsBuilt[_local1] = (unitsBuilt[_local1] + levelUnitsBuilt[_local1]); unitsLost[_local1] = (unitsLost[_local1] + levelUnitsLost[_local1]); _local1++; }; _local1 = 0; while (_local1 < turretsBuilt.length) { turretsBuilt[_local1] = (turretsBuilt[_local1] + levelTurretsBuilt[_local1]); turretsLost[_local1] = (turretsLost[_local1] + levelTurretsLost[_local1]); _local1++; }; } public function addUnitsBuilt(_arg1){ var _local2 = levelUnitsBuilt; var _local3 = _arg1; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; levelExperience = (levelExperience + ((_arg1 + 1) / 2)); } public function isRiderCreatable():Boolean{ return (((unlockedUnits[0]) && ((manaCount >= unitsCost[0])))); } public function addTurretsLost(_arg1){ var _local2 = levelTurretsLost; var _local3 = _arg1; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; levelExperience = (levelExperience + ((_arg1 + 1) / 4)); } public function isAttackUpgradable():Boolean{ return ((((manaCount >= (15 * Math.pow((unitsLevelFactor[3] + 1), 3)))) && ((unitsLevelFactor[3] < 3)))); } private function recalculateEnemyData(){ var _local1:*; var _local2:Number; var _local3:Number; _local2 = 1; _local3 = 1; _local1 = 0; while (_local1 < 7) { enemyLevel[_local1] = enemyLevelScenario[(selectedLevel - 1)][_local1]; enemyCreationTimer[_local1] = enemyTimerScenario[(selectedLevel - 1)][_local1]; unlockedEnemy[_local1] = unlockedEnemyScenario[(selectedLevel - 1)][_local1]; _local1++; }; _local1 = 0; while (_local1 < 7) { switch (enemyLevel[_local1]){ case 3: _local3 = (1.1 * 1.1); _local2 = (1.1 * 1.1); break; case 2: _local3 = 1.1; _local2 = 1.1; break; case 1: default: _local3 = 1; _local2 = 1; break; }; enemyRange[_local1] = (enemyInitialRange[_local1] * _local2); enemyHealth[_local1] = (enemyInitialHealth[_local1] * _local2); enemyPower[_local1] = (enemyInitialPower[_local1] * _local3); enemyAttack[_local1] = (enemyInitialAttack[_local1] * _local2); enemyDefense[_local1] = (enemyInitialDefense[_local1] * _local2); _local1++; }; } } }//package
Section 74
//GameManager (GameManager) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.ui.*; public class GameManager { private var unitCreator;// = null private var panelNote; private var panelConfirm; private var turretBuildTimerInit; private var scrollingDown;// = false private var scroller;// = null private var rightPower; private var creatingEnemy;// = true private var turretCreateProgress; private var timecount; private var unitQueueArray; public var bulletArray; public var gameStartTime; private var turretBuildTimer; private var unitQueueTimerInit:int;// = 0 public var soundMgr; private var coverContainer; private var bg1;// = null private var repairingCastle;// = false private var creatorPos;// = 0 private var enemyTimer; public var gamePausedTime; public var gameData; private var levelPanel; private var createContainer; private var maxUnitQueue:int;// = 6 public var castle;// = null private var stageRoot; private var moreGameURL:URLRequest; private var turretCreator;// = null public var startPausedTime; public var unitArray; private var repairingTimer;// = 0 private var leftPower; private var distortingValue:Number;// = 0 public var turretArray; public var sceneContainer; private var unitQueueTimer; private var specialAttackTimer;// = 0 private var scrollerContainer; private var scrollingUp;// = false private var panelTutorial; private var maxDistort;// = 10 private var tparser; private var panelOption; private var rightEnemyPower; private var unitCreatorEnable; public var enemyArray; public var selectedObject;// = null private var bgContainer; public var gameState; private var framecount; private var turretCreatorEnable; private var fxContainer; private var leftEnemyPower; private var menuContainer; private var unitCreateProgress; public function GameManager(_arg1, _arg2, _arg3){ tparser = new TimeParser(); sceneContainer = new Sprite(); fxContainer = new EffectContainer(); bgContainer = new Sprite(); createContainer = new mc_turretlayer(); scrollerContainer = new Sprite(); menuContainer = new Sprite(); coverContainer = new mc_cover(); bg1 = null; scroller = null; levelPanel = new mc_levelpanel(); panelOption = new paneloption(); panelConfirm = new panelconfirm(); panelNote = new mc_levelnote(); panelTutorial = new mc_tutorial(); unitCreateProgress = new mc_progress(); turretCreateProgress = new Array(new mc_progress(), new mc_progress(), new mc_progress(), new mc_progress()); moreGameURL = new URLRequest("http://www.armorgames.com/?gamereferral=kingdomofthewind"); unitCreator = null; turretCreator = null; castle = null; enemyArray = new Array(); bulletArray = new Array(); unitArray = new Array(); turretArray = new Array(null, null, null, null); selectedObject = null; maxUnitQueue = 6; unitQueueArray = new Array(); unitQueueTimer = new Array(); unitQueueTimerInit = 0; unitCreatorEnable = new Array(true, true, true, true, true); turretBuildTimer = new Array(0, 0, 0, 0); turretBuildTimerInit = new Array(0, 0, 0, 0); turretCreatorEnable = new Array(true, true, true); creatorPos = 0; specialAttackTimer = 0; scrollingUp = false; scrollingDown = false; repairingCastle = false; repairingTimer = 0; creatingEnemy = true; enemyTimer = new Array(30, 0, 0, 0, 0, 0, 0); distortingValue = 0; maxDistort = 10; super(); gameData = _arg2; soundMgr = _arg3; stageRoot = _arg1; stageRoot.addChild(bgContainer); stageRoot.addChild(sceneContainer); stageRoot.addChild(fxContainer); stageRoot.addChild(scrollerContainer); stageRoot.addChild(createContainer); stageRoot.addChild(menuContainer); stageRoot.addChild(coverContainer); bgContainer.scaleX = 1; bgContainer.scaleY = 1; sceneContainer.scaleX = 0.955; sceneContainer.scaleY = 0.955; fxContainer.scaleX = 0.955; fxContainer.scaleY = 0.955; createContainer.scaleX = 0.955; createContainer.scaleY = 0.955; scrollerContainer.scaleX = 0.955; scrollerContainer.scaleY = 0.955; menuContainer.scaleX = 0.955; menuContainer.scaleY = 0.955; menuContainer.addChild(levelPanel); menuContainer.addChild(panelOption); menuContainer.addChild(panelConfirm); menuContainer.addChild(panelNote); menuContainer.addChild(panelTutorial); panelOption.Init(274, 335, 274, 845); panelConfirm.Init(265, 225, 265, -275); panelNote.Init(2, 462, 2, 900); if (gameData.isTutorialOn()){ panelTutorial.gotoAndStop(2); }; createBackground(); createUnitCreator(); createTurretCreator(); createScroller(); createProgress(); startGame(); } private function startUpgradeRange(_arg1=null){ if (gameData.isRangeUpgradable()){ gameData.increaseUnitsRangeFactor(); }; showNote(9); } private function stopUpgradePowerNote(_arg1=null){ hideNote(); } public function decreaseMana(_arg1){ gameData.decreaseMana(_arg1); levelPanel.manalevel.gotoAndStop(Math.floor(((gameData.manaCount / gameData.maxManaCount) * 100))); levelPanel.manapoint.text = ((Math.floor(gameData.manaCount) + "/") + Math.floor(gameData.maxManaCount)); } private function endCurrentLevel(_arg1=null){ if (panelConfirm.panelShow){ hideConfirmPanel(); }; if (panelOption.panelShow){ hideOptionPanel(); }; gameState = "stopbyrequest"; stopGame(); } private function startCopterCreator(_arg1=null){ if ((((levelPanel.iconcopter.currentFrame == 1)) && (unitCreatorEnable[1]))){ startUnitCreator(2); }; } private function stopSpecialAttackNote(_arg1=null){ hideNote(); } private function startThunderTurretCreator(_arg1=null){ if ((((levelPanel.iconthunderturret.currentFrame == 1)) && (turretCreatorEnable[2]))){ startTurretCreator(3); }; } private function destroyTurrets(){ var _local1:*; var _local2:*; _local1 = 0; while (_local1 < turretArray.length) { _local2 = turretArray[_local1]; if (_local2){ if (sceneContainer.contains(_local2)){ sceneContainer.removeChild(_local2); }; _local2.destroy(); turretArray[_local1] = null; turretBuildTimer[_local1] = 0; _local2 = null; }; _local1++; }; } private function toggleGamePause(_arg1=null){ var _local2:*; if (gameState == "pause"){ hideOptionPanel(); gameState = "play"; _local2 = 0; while (_local2 < bulletArray.length) { bulletArray[_local2].play(); _local2++; }; gamePausedTime = (gamePausedTime + (getTimer() - startPausedTime)); } else { if (gameState == "play"){ showOptionPanel(); gameState = "pause"; _local2 = 0; while (_local2 < bulletArray.length) { bulletArray[_local2].stop(); _local2++; }; startPausedTime = getTimer(); } else { if (panelOption.panelShow){ hideOptionPanel(); _local2 = 0; while (_local2 < bulletArray.length) { bulletArray[_local2].play(); _local2++; }; } else { showOptionPanel(); _local2 = 0; while (_local2 < bulletArray.length) { bulletArray[_local2].stop(); _local2++; }; }; }; }; } private function stopEagleNote(_arg1=null){ hideNote(); } private function queueUnit(_arg1, _arg2, _arg3){ var _local4:*; var _local5:*; switch (_arg1){ case "dragon": _local4 = new mc_dragon(); _local5 = 4; break; case "panzer": _local4 = new mc_panzer(); _local5 = 3; break; case "eagle": _local4 = new mc_eagle(); _local5 = 2; break; case "copter": _local4 = new mc_copter(); _local5 = 1; break; case "rider": default: _local4 = new mc_rider(); _local5 = 0; break; }; if (gameData.isUnitsCreatable(_local5)){ _local4.x = _arg2; _local4.y = _arg3; _local4.initType(this, _arg1, gameData); unitQueueArray.push(_local4); unitQueueTimer.push(gameData.unitsCreationTimer[_local5]); decreaseMana(gameData.unitsCost[_local5]); gameData.addUnitsBuilt(_local5); }; if (gameData.isTutorialOn()){ if (panelTutorial.currentFrame == 3){ panelTutorial.gotoAndPlay(4); }; }; } private function stopUpgradeRangeNote(_arg1=null){ hideNote(); } private function startUpgradeAttack(_arg1=null){ if (gameData.isAttackUpgradable()){ gameData.increaseUnitsAttackFactor(); }; showNote(12); } private function startFireTurretCreator(_arg1=null){ if ((((levelPanel.iconfireturret.currentFrame == 1)) && (turretCreatorEnable[1]))){ startTurretCreator(2); }; } private function startUnitCreator(_arg1=1){ if (unitCreator){ if (unitQueueArray.length < maxUnitQueue){ creatorPos = 0; unitCreator.visible = true; unitCreator.gotoAndStop(_arg1); unitCreator.x = scroller.btcreateunitleft.x; unitCreator.y = scroller.btcreateunitleft.y; scroller.btcreateunitleft.visible = true; scroller.btcreateunitright.visible = true; scroller.btcreateunitleft.addEventListener(MouseEvent.CLICK, createUnitLeft); scroller.btcreateunitright.addEventListener(MouseEvent.CLICK, createUnitRight); stageRoot.addEventListener(MouseEvent.MOUSE_MOVE, moveUnitCreator); }; }; if (turretCreator.visible){ stopTurretCreator(); }; if (gameData.isTutorialOn()){ if (panelTutorial.currentFrame == 2){ panelTutorial.gotoAndStop(3); }; }; } private function stopDragonNote(_arg1=null){ hideNote(); } private function startHealerNote(_arg1=null){ showNote(16); } private function stopUpgradeDefenseNote(_arg1=null){ hideNote(); } private function stopTurretCreator(){ if (((turretCreator) && (turretCreator.visible))){ if (createContainer.btcreateturret1.visible){ createContainer.btcreateturret1.visible = false; createContainer.btcreateturret1.removeEventListener(MouseEvent.CLICK, createTurret1); }; if (createContainer.btcreateturret2.visible){ createContainer.btcreateturret2.visible = false; createContainer.btcreateturret2.removeEventListener(MouseEvent.CLICK, createTurret2); }; if (createContainer.btcreateturret3.visible){ createContainer.btcreateturret3.visible = false; createContainer.btcreateturret3.removeEventListener(MouseEvent.CLICK, createTurret3); }; if (createContainer.btcreateturret4.visible){ createContainer.btcreateturret4.visible = false; createContainer.btcreateturret4.removeEventListener(MouseEvent.CLICK, createTurret4); }; turretCreator.visible = false; stageRoot.removeEventListener(MouseEvent.MOUSE_MOVE, moveUnitCreator); }; } private function startUpgradeManaNote(_arg1=null){ showNote(14); } private function hideNote(){ levelPanel.rightnote2.visible = false; levelPanel.rightnote.visible = true; } private function startUpgradeHealth(_arg1=null){ if (gameData.isHealthUpgradable()){ gameData.increaseUnitsHealthFactor(); }; showNote(10); } private function destroyBullets(){ var _local1:*; var _local2:*; _local1 = (bulletArray.length - 1); while (_local1 >= 0) { _local2 = bulletArray[_local1]; if (sceneContainer.contains(_local2)){ sceneContainer.removeChild(_local2); }; _local2.destroy(); bulletArray.splice(_local1, 1); _local2 = null; _local1--; }; } private function stopListeners(){ stageRoot.root.removeEventListener(Event.ENTER_FRAME, frameEnterHandler); stageRoot.root.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressHandler); stageRoot.root.removeEventListener(KeyboardEvent.KEY_UP, keyReleaseHandler); scroller.upscroller.removeEventListener(MouseEvent.MOUSE_OVER, setScrollingUp); scroller.upscroller.removeEventListener(MouseEvent.MOUSE_OUT, resetScrollingUp); scroller.downscroller.removeEventListener(MouseEvent.MOUSE_OVER, setScrollingDown); scroller.downscroller.removeEventListener(MouseEvent.MOUSE_OUT, resetScrollingDown); levelPanel.btquitlevel.removeEventListener(MouseEvent.CLICK, endCurrentLevel); levelPanel.btplaymore.removeEventListener(MouseEvent.CLICK, playMoreGames); levelPanel.btoption.removeEventListener(MouseEvent.CLICK, toggleGamePause); levelPanel.iconrider.removeEventListener(MouseEvent.CLICK, startRiderCreator); levelPanel.iconcopter.removeEventListener(MouseEvent.CLICK, startCopterCreator); levelPanel.iconeagle.removeEventListener(MouseEvent.CLICK, startEagleCreator); levelPanel.iconpanzer.removeEventListener(MouseEvent.CLICK, startPanzerCreator); levelPanel.icondragon.removeEventListener(MouseEvent.CLICK, startDragonCreator); levelPanel.iconiceturret.removeEventListener(MouseEvent.CLICK, startIceTurretCreator); levelPanel.iconfireturret.removeEventListener(MouseEvent.CLICK, startFireTurretCreator); levelPanel.iconthunderturret.removeEventListener(MouseEvent.CLICK, startThunderTurretCreator); levelPanel.iconupgraderange.removeEventListener(MouseEvent.CLICK, startUpgradeRange); levelPanel.iconupgradehealth.removeEventListener(MouseEvent.CLICK, startUpgradeHealth); levelPanel.iconupgradepower.removeEventListener(MouseEvent.CLICK, startUpgradePower); levelPanel.iconupgradeattack.removeEventListener(MouseEvent.CLICK, startUpgradeAttack); levelPanel.iconupgradedefense.removeEventListener(MouseEvent.CLICK, startUpgradeDefense); levelPanel.iconupgrademana.removeEventListener(MouseEvent.CLICK, startUpgradeMana); levelPanel.iconrepair.removeEventListener(MouseEvent.CLICK, startRepairer); levelPanel.iconheal.removeEventListener(MouseEvent.CLICK, startHealer); levelPanel.iconspecialattack.removeEventListener(MouseEvent.CLICK, startSpecialAttack); levelPanel.iconrider.removeEventListener(MouseEvent.MOUSE_OVER, startRiderNote); levelPanel.iconcopter.removeEventListener(MouseEvent.MOUSE_OVER, startCopterNote); levelPanel.iconeagle.removeEventListener(MouseEvent.MOUSE_OVER, startEagleNote); levelPanel.iconpanzer.removeEventListener(MouseEvent.MOUSE_OVER, startPanzerNote); levelPanel.icondragon.removeEventListener(MouseEvent.MOUSE_OVER, startDragonNote); levelPanel.iconiceturret.removeEventListener(MouseEvent.MOUSE_OVER, startIceTurretNote); levelPanel.iconfireturret.removeEventListener(MouseEvent.MOUSE_OVER, startFireTurretNote); levelPanel.iconthunderturret.removeEventListener(MouseEvent.MOUSE_OVER, startThunderTurretNote); levelPanel.iconupgraderange.removeEventListener(MouseEvent.MOUSE_OVER, startUpgradeRangeNote); levelPanel.iconupgradehealth.removeEventListener(MouseEvent.MOUSE_OVER, startUpgradeHealthNote); levelPanel.iconupgradepower.removeEventListener(MouseEvent.MOUSE_OVER, startUpgradePowerNote); levelPanel.iconupgradeattack.removeEventListener(MouseEvent.MOUSE_OVER, startUpgradeAttackNote); levelPanel.iconupgradedefense.removeEventListener(MouseEvent.MOUSE_OVER, startUpgradeDefenseNote); levelPanel.iconupgrademana.removeEventListener(MouseEvent.MOUSE_OVER, startUpgradeManaNote); levelPanel.iconrepair.removeEventListener(MouseEvent.MOUSE_OVER, startRepairerNote); levelPanel.iconheal.removeEventListener(MouseEvent.MOUSE_OVER, startHealerNote); levelPanel.iconspecialattack.removeEventListener(MouseEvent.MOUSE_OVER, startSpecialAttackNote); levelPanel.iconrider.removeEventListener(MouseEvent.MOUSE_OUT, stopRiderNote); levelPanel.iconcopter.removeEventListener(MouseEvent.MOUSE_OUT, stopCopterNote); levelPanel.iconeagle.removeEventListener(MouseEvent.MOUSE_OUT, stopEagleNote); levelPanel.iconpanzer.removeEventListener(MouseEvent.MOUSE_OUT, stopPanzerNote); levelPanel.icondragon.removeEventListener(MouseEvent.MOUSE_OUT, stopDragonNote); levelPanel.iconiceturret.removeEventListener(MouseEvent.MOUSE_OUT, stopIceTurretNote); levelPanel.iconfireturret.removeEventListener(MouseEvent.MOUSE_OUT, stopFireTurretNote); levelPanel.iconthunderturret.removeEventListener(MouseEvent.MOUSE_OUT, stopThunderTurretNote); levelPanel.iconupgraderange.removeEventListener(MouseEvent.MOUSE_OUT, stopUpgradeRangeNote); levelPanel.iconupgradehealth.removeEventListener(MouseEvent.MOUSE_OUT, stopUpgradeHealthNote); levelPanel.iconupgradepower.removeEventListener(MouseEvent.MOUSE_OUT, stopUpgradePowerNote); levelPanel.iconupgradeattack.removeEventListener(MouseEvent.MOUSE_OUT, stopUpgradeAttackNote); levelPanel.iconupgradedefense.removeEventListener(MouseEvent.MOUSE_OUT, stopUpgradeDefenseNote); levelPanel.iconupgrademana.removeEventListener(MouseEvent.MOUSE_OUT, stopUpgradeManaNote); levelPanel.iconrepair.removeEventListener(MouseEvent.MOUSE_OUT, stopRepairerNote); levelPanel.iconheal.removeEventListener(MouseEvent.MOUSE_OUT, stopHealerNote); levelPanel.iconspecialattack.removeEventListener(MouseEvent.MOUSE_OUT, stopSpecialAttackNote); } private function startUpgradePowerNote(_arg1=null){ showNote(11); } private function setTurretTimer(){ var _local1:*; _local1 = 0; while (_local1 < 4) { if (turretBuildTimer[_local1] > 0){ if (turretBuildTimerInit[_local1] == 0){ turretBuildTimerInit[_local1] = turretBuildTimer[_local1]; }; var _local2 = turretBuildTimer; var _local3 = _local1; var _local4 = (_local2[_local3] - 1); _local2[_local3] = _local4; turretCreateProgress[_local1].gotoAndStop((101 - Math.floor(((turretBuildTimer[_local1] / turretBuildTimerInit[_local1]) * 100)))); if (turretBuildTimer[_local1] == 0){ if (turretArray[_local1]){ turretBuildTimerInit[_local1] = 0; sceneContainer.addChild(turretArray[_local1]); turretArray[_local1].visible = true; }; }; }; _local1++; }; } private function stopFireTurretNote(_arg1=null){ hideNote(); } private function startUpgradeRangeNote(_arg1=null){ showNote(9); } private function showNote(_arg1=1){ panelNote.gotoAndStop(_arg1); switch (_arg1){ case 17: levelPanel.rightnote2.txt1.text = "Cast\nSpecial Attack"; levelPanel.rightnote2.txt2.text = "shortcut [V]\nFull energy needed"; if (gameData.energyCount >= 100){ levelPanel.rightnote2.txt3.text = "Ready to use"; } else { levelPanel.rightnote2.txt3.text = "Recharging..."; }; levelPanel.rightnote2.gotoAndStop(1); break; case 16: levelPanel.rightnote2.txt1.text = "Heal\nPresent Units"; levelPanel.rightnote2.txt2.text = "shortcut [C]"; levelPanel.rightnote2.txt3.text = (Math.ceil((gameData.maxManaCount / 2)) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 15: levelPanel.rightnote2.txt1.text = "Repair Castle"; levelPanel.rightnote2.txt2.text = "shortcut [X]"; levelPanel.rightnote2.txt3.text = "1 mana for 10"; levelPanel.rightnote2.gotoAndStop(2); break; case 14: levelPanel.rightnote2.txt1.text = "Increase\nMax. Manapool"; levelPanel.rightnote2.txt2.text = "shortcut [Z]"; levelPanel.rightnote2.txt3.text = (Math.ceil((gameData.maxManaCount / 2)) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 13: levelPanel.rightnote2.txt1.text = "Increase\nUnits Defense"; levelPanel.rightnote2.txt2.text = "shortcut [G]"; levelPanel.rightnote2.txt3.text = (Math.ceil((15 * Math.pow((gameData.unitsLevelFactor[4] + 1), 3))) + " mana"); levelPanel.rightnote2.gotoAndStop(2); break; case 12: levelPanel.rightnote2.txt1.text = "Increase\nUnits Attack"; levelPanel.rightnote2.txt2.text = "shortcut [F]"; levelPanel.rightnote2.txt3.text = (Math.ceil((15 * Math.pow((gameData.unitsLevelFactor[3] + 1), 3))) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 11: levelPanel.rightnote2.txt1.text = "Increase\nUnits Level"; levelPanel.rightnote2.txt2.text = "shortcut [D]"; levelPanel.rightnote2.txt3.text = (Math.ceil((20 * Math.pow((gameData.unitsLevelFactor[2] + 1), 3))) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 10: levelPanel.rightnote2.txt1.text = "Increase\nUnits Health"; levelPanel.rightnote2.txt2.text = "shortcut [S]"; levelPanel.rightnote2.txt3.text = (Math.ceil((20 * Math.pow((gameData.unitsLevelFactor[1] + 1), 3))) + " mana"); levelPanel.rightnote2.gotoAndStop(2); break; case 9: levelPanel.rightnote2.txt1.text = "Increase\nUnits Range"; levelPanel.rightnote2.txt2.text = "shortcut [A]"; levelPanel.rightnote2.txt3.text = (Math.ceil((10 * Math.pow((gameData.unitsLevelFactor[0] + 1), 3))) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 8: levelPanel.rightnote2.txt1.text = "Create\n Thunder Turret"; levelPanel.rightnote2.txt2.text = ((((("shortcut [E]\nlevel:" + gameData.turretsPower[2]) + "\nattack:") + gameData.turretsAttack[2]) + "\ndefense:") + gameData.turretsDefense[2]); levelPanel.rightnote2.txt3.text = (Math.ceil(gameData.turretsCost[2]) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 7: levelPanel.rightnote2.txt1.text = "Create\n Fire Turret"; levelPanel.rightnote2.txt2.text = ((((("shortcut [W]\nlevel:" + gameData.turretsPower[1]) + "\nattack:") + gameData.turretsAttack[1]) + "\ndefense:") + gameData.turretsDefense[1]); levelPanel.rightnote2.txt3.text = (Math.ceil(gameData.turretsCost[1]) + " mana"); levelPanel.rightnote2.gotoAndStop(2); break; case 6: levelPanel.rightnote2.txt1.text = "Create\n Ice Turret"; levelPanel.rightnote2.txt2.text = ((((("shortcut [Q]\nlevel:" + gameData.turretsPower[0]) + "\nattack:") + gameData.turretsAttack[0]) + "\ndefense:") + gameData.turretsDefense[0]); levelPanel.rightnote2.txt3.text = (Math.ceil(gameData.turretsCost[0]) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 5: levelPanel.rightnote2.txt1.text = "Create Dragon"; levelPanel.rightnote2.txt2.text = ((((("shortcut [5]\nlevel:" + gameData.unitsPower[4]) + "\nattack:") + gameData.unitsAttack[4]) + "\ndefense:") + gameData.unitsDefense[4]); levelPanel.rightnote2.txt3.text = (Math.ceil(gameData.unitsCost[4]) + " mana"); levelPanel.rightnote2.gotoAndStop(2); break; case 4: levelPanel.rightnote2.txt1.text = "Create Panzer"; levelPanel.rightnote2.txt2.text = ((((("shortcut [4]\nlevel:" + gameData.unitsPower[3]) + "\nattack:") + gameData.unitsAttack[3]) + "\ndefense:") + gameData.unitsDefense[3]); levelPanel.rightnote2.txt3.text = (Math.ceil(gameData.unitsCost[3]) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 3: levelPanel.rightnote2.txt1.text = "Create Eagle"; levelPanel.rightnote2.txt2.text = ((((("shortcut [3]\nlevel:" + gameData.unitsPower[2]) + "\nattack:") + gameData.unitsAttack[2]) + "\ndefense:") + gameData.unitsDefense[2]); levelPanel.rightnote2.txt3.text = (Math.ceil(gameData.unitsCost[2]) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; case 2: levelPanel.rightnote2.txt1.text = "Create Copter"; levelPanel.rightnote2.txt2.text = ((((("shortcut [2]\nlevel:" + gameData.unitsPower[1]) + "\nattack:") + gameData.unitsAttack[1]) + "\ndefense:") + gameData.unitsDefense[1]); levelPanel.rightnote2.txt3.text = (Math.ceil(gameData.unitsCost[1]) + " mana"); levelPanel.rightnote2.gotoAndStop(2); break; case 1: default: levelPanel.rightnote2.txt1.text = "Create Rider"; levelPanel.rightnote2.txt2.text = ((((("shortcut [1]\nlevel:" + gameData.unitsPower[0]) + "\nattack:") + gameData.unitsAttack[0]) + "\ndefense:") + gameData.unitsDefense[0]); levelPanel.rightnote2.txt3.text = (Math.ceil(gameData.unitsCost[0]) + " mana"); levelPanel.rightnote2.gotoAndStop(1); break; }; levelPanel.rightnote.visible = false; levelPanel.rightnote2.visible = true; } private function startUpgradeDefenseNote(_arg1=null){ showNote(13); } private function setEnemyTimer(){ var _local1:*; var _local2:*; _local2 = 1; if (gameData.gameCompleted > gameData.selectedLevel){ if (gameData.selectedLevel > 4){ if (unitArray.length > 10){ _local2 = 3; } else { if (unitArray.length > 6){ _local2 = 2; } else { _local2 = 1; }; }; } else { if (unitArray.length > 8){ _local2 = 2; } else { _local2 = 1; }; }; } else { if ((((enemyArray.length < 4)) && ((unitArray.length > 11)))){ enemyTimer[0] = (enemyTimer[0] + gameData.enemyCreationTimer[0]); }; }; _local1 = 0; while (_local1 < 7) { if (enemyArray.length <= (11 + gameData.selectedLevel)){ enemyTimer[_local1] = (enemyTimer[_local1] + _local2); }; _local1++; }; if (((gameData.unlockedEnemy[0]) && ((enemyTimer[0] > gameData.enemyCreationTimer[0])))){ enemyTimer[0] = 0; createEnemy("smallbat"); gameData.enemyCreationTimer[0] = (gameData.enemyCreationTimer[0] * (1 - (gameData.selectedLevel / 1000))); }; if (((gameData.unlockedEnemy[1]) && ((enemyTimer[1] > gameData.enemyCreationTimer[1])))){ enemyTimer[1] = 0; createEnemy("evilcopter"); gameData.enemyCreationTimer[1] = (gameData.enemyCreationTimer[1] * (1 - (gameData.selectedLevel / 1000))); }; if (((gameData.unlockedEnemy[2]) && ((enemyTimer[2] > gameData.enemyCreationTimer[2])))){ enemyTimer[2] = 0; createEnemy("bigbat"); gameData.enemyCreationTimer[2] = (gameData.enemyCreationTimer[2] * (1 - (gameData.selectedLevel / 1000))); }; if (((gameData.unlockedEnemy[3]) && ((enemyTimer[3] > gameData.enemyCreationTimer[3])))){ enemyTimer[3] = 0; createEnemy("evilpanzer"); gameData.enemyCreationTimer[3] = (gameData.enemyCreationTimer[3] * (1 - (gameData.selectedLevel / 1000))); }; if (((gameData.unlockedEnemy[4]) && ((enemyTimer[4] > gameData.enemyCreationTimer[4])))){ enemyTimer[4] = 0; createEnemy("evilknight"); gameData.enemyCreationTimer[4] = (gameData.enemyCreationTimer[4] * (1 - (gameData.selectedLevel / 1000))); }; if (((gameData.unlockedEnemy[5]) && ((enemyTimer[5] > gameData.enemyCreationTimer[5])))){ enemyTimer[5] = 0; createEnemy("evildragon"); gameData.enemyCreationTimer[5] = (gameData.enemyCreationTimer[5] * (1 - (gameData.selectedLevel / 1000))); }; if (((gameData.unlockedEnemy[6]) && ((enemyTimer[6] > gameData.enemyCreationTimer[6])))){ enemyTimer[6] = 0; createEnemy("evilultimate"); gameData.enemyCreationTimer[6] = (gameData.enemyCreationTimer[6] * (1 - (gameData.selectedLevel / 1000))); }; } private function createUnit(){ var _local1:*; switch (unitCreator.currentFrame){ case 5: _local1 = "dragon"; break; case 4: _local1 = "panzer"; break; case 3: _local1 = "eagle"; break; case 2: _local1 = "copter"; break; case 1: default: _local1 = "rider"; break; }; switch (creatorPos){ case 1: queueUnit(_local1, scroller.btcreateunitright.x, scroller.btcreateunitright.y); break; case 0: default: queueUnit(_local1, scroller.btcreateunitleft.x, scroller.btcreateunitleft.y); break; }; stopUnitCreator(); } private function resetScrollingUp(_arg1=null){ scrollingUp = false; } private function showEnergyMeter(){ if (gameData.energyCount < 100){ gameData.energyCount = (gameData.energyCount + gameData.energyRegeneration); levelPanel.iconspecialattack.powermeter.gotoAndStop(Math.floor((gameData.energyCount + 1))); if (gameData.energyCount > 100){ gameData.energyCount = 100; }; }; } private function createTurret1(_arg1){ var _local2:*; switch (turretCreator.currentFrame){ case 3: _local2 = "thunderturret"; break; case 2: _local2 = "fireturret"; break; case 1: default: _local2 = "iceturret"; break; }; buildTurret(0, _local2, createContainer.btcreateturret1.x, createContainer.btcreateturret1.y); stopTurretCreator(); } private function createTurret2(_arg1){ var _local2:*; switch (turretCreator.currentFrame){ case 3: _local2 = "thunderturret"; break; case 2: _local2 = "fireturret"; break; case 1: default: _local2 = "iceturret"; break; }; buildTurret(1, _local2, createContainer.btcreateturret2.x, createContainer.btcreateturret2.y); stopTurretCreator(); } private function createTurret3(_arg1){ var _local2:*; switch (turretCreator.currentFrame){ case 3: _local2 = "thunderturret"; break; case 2: _local2 = "fireturret"; break; case 1: default: _local2 = "iceturret"; break; }; buildTurret(2, _local2, createContainer.btcreateturret3.x, createContainer.btcreateturret3.y); stopTurretCreator(); } private function createTurret4(_arg1){ var _local2:*; switch (turretCreator.currentFrame){ case 3: _local2 = "thunderturret"; break; case 2: _local2 = "fireturret"; break; case 1: default: _local2 = "iceturret"; break; }; buildTurret(3, _local2, createContainer.btcreateturret4.x, createContainer.btcreateturret4.y); stopTurretCreator(); } private function startIceTurretNote(_arg1=null){ showNote(6); } private function startDragonNote(_arg1=null){ showNote(5); } private function startPanzerCreator(_arg1=null){ if ((((levelPanel.iconpanzer.currentFrame == 1)) && (unitCreatorEnable[3]))){ startUnitCreator(4); }; } private function stopUpgradeManaNote(_arg1=null){ hideNote(); } private function stopUnitCreator(){ if (((unitCreator) && (unitCreator.visible))){ unitCreator.visible = false; scroller.btcreateunitleft.visible = false; scroller.btcreateunitright.visible = false; scroller.btcreateunitleft.removeEventListener(MouseEvent.CLICK, createUnitLeft); scroller.btcreateunitright.removeEventListener(MouseEvent.CLICK, createUnitRight); stageRoot.removeEventListener(MouseEvent.MOUSE_MOVE, moveUnitCreator); }; } private function moveClip(){ var _local1:*; leftEnemyPower = 0; rightEnemyPower = 0; leftPower = 0; rightPower = 0; fxContainer.moveClip(); if (castle){ castle.moveClip(); }; _local1 = (turretArray.length - 1); while (_local1 >= 0) { if (turretArray[_local1]){ if (turretArray[_local1].visible){ turretArray[_local1].moveClip(); }; if (turretArray[_local1].currentFrame == turretArray[_local1].totalFrames){ sceneContainer.removeChild(turretArray[_local1]); gameData.addTurretsLost(turretArray[_local1].typeInt); turretArray[_local1].destroy(); turretArray[_local1] = null; }; }; _local1--; }; _local1 = (bulletArray.length - 1); while (_local1 >= 0) { if (bulletArray[_local1].visible){ bulletArray[_local1].moveClip(); }; if (bulletArray[_local1].currentFrame == bulletArray[_local1].totalFrames){ sceneContainer.removeChild(bulletArray[_local1]); bulletArray[_local1].destroy(); bulletArray.splice(_local1, 1); }; _local1--; }; _local1 = (unitArray.length - 1); while (_local1 >= 0) { if (unitArray[_local1].visible){ unitArray[_local1].moveClip(); if (unitArray[_local1].x < 275){ leftPower = (leftPower + unitArray[_local1].power); } else { rightPower = (rightPower + unitArray[_local1].power); }; }; if (unitArray[_local1].currentFrame == unitArray[_local1].totalFrames){ sceneContainer.removeChild(unitArray[_local1]); gameData.addUnitsLost(unitArray[_local1].typeInt); unitArray[_local1].destroy(); unitArray.splice(_local1, 1); }; _local1--; }; _local1 = (enemyArray.length - 1); while (_local1 >= 0) { if (enemyArray[_local1].visible){ enemyArray[_local1].moveClip(); if (enemyArray[_local1].x < 275){ leftEnemyPower = (leftEnemyPower + enemyArray[_local1].power); } else { rightEnemyPower = (rightEnemyPower + enemyArray[_local1].power); }; }; if (enemyArray[_local1].currentFrame == enemyArray[_local1].totalFrames){ increaseMana((enemyArray[_local1].cost / 2)); sceneContainer.removeChild(enemyArray[_local1]); gameData.addEnemyKilled(enemyArray[_local1].typeInt); enemyArray[_local1].destroy(); enemyArray.splice(_local1, 1); }; _local1--; }; if ((leftEnemyPower + rightEnemyPower) <= 25){ levelPanel.leftbalancelevel.gotoAndStop(Math.floor((101 - ((leftEnemyPower / 25) * 100)))); levelPanel.rightbalancelevel.gotoAndStop(Math.floor((101 - ((rightEnemyPower / 25) * 100)))); } else { if ((leftEnemyPower + rightEnemyPower) <= 100){ levelPanel.leftbalancelevel.gotoAndStop(Math.floor((101 - ((leftEnemyPower / 100) * 100)))); levelPanel.rightbalancelevel.gotoAndStop(Math.floor((101 - ((rightEnemyPower / 100) * 100)))); } else { if ((leftEnemyPower + rightEnemyPower) <= 300){ levelPanel.leftbalancelevel.gotoAndStop(Math.floor((101 - ((leftEnemyPower / 300) * 100)))); levelPanel.rightbalancelevel.gotoAndStop(Math.floor((101 - ((rightEnemyPower / 300) * 100)))); } else { levelPanel.leftbalancelevel.gotoAndStop(Math.floor((101 - (leftEnemyPower / 500)))); levelPanel.rightbalancelevel.gotoAndStop(Math.floor((101 - (rightEnemyPower / 500)))); }; }; }; } private function createUnitLeft(_arg1){ var _local2:*; switch (unitCreator.currentFrame){ case 5: _local2 = "dragon"; break; case 4: _local2 = "panzer"; break; case 3: _local2 = "eagle"; break; case 2: _local2 = "copter"; break; case 1: default: _local2 = "rider"; break; }; queueUnit(_local2, scroller.btcreateunitleft.x, scroller.btcreateunitleft.y); stopUnitCreator(); } private function moveTurretCreator(_arg1){ if (turretCreator){ turretCreator.x = _arg1.stageX; turretCreator.y = _arg1.stageY; if (createContainer.btcreateturret1.visible){ if (getDistance(createContainer.btcreateturret1, turretCreator) < 50){ turretCreator.x = createContainer.btcreateturret1.x; turretCreator.y = createContainer.btcreateturret1.y; }; } else { if (createContainer.btcreateturret2.visible){ if (getDistance(createContainer.btcreateturret2, turretCreator) < 50){ turretCreator.x = createContainer.btcreateturret2.x; turretCreator.y = createContainer.btcreateturret2.y; }; } else { if (createContainer.btcreateturret3.visible){ if (getDistance(createContainer.btcreateturret3, turretCreator) < 50){ turretCreator.x = createContainer.btcreateturret3.x; turretCreator.y = createContainer.btcreateturret3.y; }; } else { if (createContainer.btcreateturret4.visible){ if (getDistance(createContainer.btcreateturret4, turretCreator) < 50){ turretCreator.x = createContainer.btcreateturret4.x; turretCreator.y = createContainer.btcreateturret4.y; }; }; }; }; }; }; } private function destroyEnemies(){ var _local1:*; var _local2:*; _local1 = (enemyArray.length - 1); while (_local1 >= 0) { _local2 = enemyArray[_local1]; if (sceneContainer.contains(_local2)){ sceneContainer.removeChild(_local2); }; _local2.destroy(); enemyArray.splice(_local1, 1); _local2 = null; _local1--; }; } private function startUpgradeMana(_arg1=null){ if (gameData.manaCount >= (gameData.maxManaCount / 3)){ gameData.increaseManaBank(); increaseMana(0); }; showNote(14); } private function startIceTurretCreator(_arg1=null){ if ((((levelPanel.iconiceturret.currentFrame == 1)) && (turretCreatorEnable[0]))){ startTurretCreator(1); }; } private function showConfirmPanel(_arg1=null){ if (!panelConfirm.panelShow){ panelConfirm.Show(); panelConfirm.btyes.addEventListener(MouseEvent.CLICK, endCurrentLevel); panelConfirm.btcancel.addEventListener(MouseEvent.CLICK, hideConfirmPanel); }; } private function startFireTurretNote(_arg1=null){ showNote(7); } private function startThunderTurretNote(_arg1=null){ showNote(8); } private function setScrollingDown(_arg1=null){ if (((turretCreator.visible) || (unitCreator.visible))){ scrollingUp = false; scrollingDown = false; } else { scrollingUp = false; scrollingDown = true; }; } private function buildTurret(_arg1, _arg2, _arg3, _arg4){ var _local5:*; var _local6:*; switch (_arg2){ case "thunderturret": _local5 = new mc_thunderturret(); _local6 = 2; break; case "fireturret": _local5 = new mc_fireturret(); _local6 = 1; break; case "iceturret": default: _local5 = new mc_iceturret(); _local6 = 0; break; }; if (gameData.isTurretsCreatable(_local6)){ _local5.x = _arg3; _local5.y = _arg4; _local5.visible = false; _local5.initType(this, _arg2, gameData); turretArray[_arg1] = _local5; turretBuildTimer[_arg1] = gameData.turretsCreationTimer; decreaseMana(gameData.turretsCost[_local6]); gameData.addTurretsBuilt(_local6); }; } private function startEagleCreator(_arg1=null){ if ((((levelPanel.iconeagle.currentFrame == 1)) && (unitCreatorEnable[2]))){ startUnitCreator(3); }; } private function stopIceTurretNote(_arg1=null){ hideNote(); } private function createTurret(){ var _local1:*; switch (turretCreator.currentFrame){ case 3: _local1 = "thunderturret"; break; case 2: _local1 = "fireturret"; break; case 1: default: _local1 = "iceturret"; break; }; switch (creatorPos){ case 3: buildTurret(3, _local1, createContainer.btcreateturret4.x, createContainer.btcreateturret4.y); break; case 2: buildTurret(2, _local1, createContainer.btcreateturret3.x, createContainer.btcreateturret3.y); break; case 1: buildTurret(1, _local1, createContainer.btcreateturret2.x, createContainer.btcreateturret2.y); break; case 0: default: buildTurret(0, _local1, createContainer.btcreateturret1.x, createContainer.btcreateturret1.y); break; }; stopTurretCreator(); } public function regenerateMana(){ increaseMana(gameData.manaRegeneration); } public function stopGame(){ stopListeners(); destroyCastle(); destroyTurrets(); destroyBullets(); destroyEnemies(); destroyUnits(); stageRoot.removeChild(bgContainer); stageRoot.removeChild(sceneContainer); stageRoot.removeChild(fxContainer); stageRoot.removeChild(scrollerContainer); stageRoot.removeChild(menuContainer); stageRoot.removeChild(coverContainer); if (gameState == "stopbyrequest"){ gameData.resetLevelExperience(); gameData.commitLevelData(); stageRoot.gotoAndPlay("playerquit"); } else { if (gameState == "stopplayerloose"){ gameData.resetLevelExperience(); gameData.commitLevelData(); stageRoot.gotoAndPlay("playerloose"); } else { if (gameState == "stopplayerwin"){ gameData.commitLevelData(); gameData.unlockedLevel[gameData.selectedLevel] = true; stageRoot.gotoAndPlay("playerwin"); }; }; }; gameState = "stop"; } public function createBullet(_arg1, _arg2, _arg3, _arg4, _arg5){ var _local6:*; var _local7:*; switch (_arg4){ case "frozenbullet": soundMgr.playSFX("cannonshoot"); _local6 = new mc_frozenbullet(); _local7 = getDistance(_arg1, _arg2); break; case "cannonbullet": soundMgr.playSFX("cannonshoot"); _local6 = new mc_cannonbullet(); _local7 = getDistance(_arg1, _arg2); break; case "firebullet": soundMgr.playSFX("plasmashoot"); _local6 = new mc_firebullet(); _local7 = 0; break; case "icebullet": default: soundMgr.playSFX("plasmashoot"); _local6 = new mc_icebullet(); _local7 = 0; break; }; _local6.x = _arg1.x; _local6.y = _arg1.y; _local6.rotation = getAngle(_arg1, _arg2); sceneContainer.addChild(_local6); _local6.initType(this, _arg3, _arg4, _arg5, _local7); bulletArray.push(_local6); } private function startSpecialAttack(_arg1=null){ if (gameData.isSpecialAttackEnable()){ specialAttackTimer = 15; gameData.energyCount = 0; fxContainer.createParticle(castle.x, castle.y, "specialattack"); soundMgr.playSFX("specialattack"); setDistortTimer(10); showNote(17); }; } private function moveCreator(_arg1=false){ if (unitCreator.visible){ switch (creatorPos){ case 1: creatorPos = 0; unitCreator.x = scroller.btcreateunitleft.x; unitCreator.y = scroller.btcreateunitleft.y; break; case 0: default: creatorPos = 1; unitCreator.x = scroller.btcreateunitright.x; unitCreator.y = scroller.btcreateunitright.y; break; }; } else { if (turretCreator.visible){ if (_arg1){ switch (creatorPos){ case 3: if (createContainer.btcreateturret1.visible){ creatorPos = 0; turretCreator.x = createContainer.btcreateturret1.x; turretCreator.y = createContainer.btcreateturret1.y; } else { if (createContainer.btcreateturret2.visible){ creatorPos = 1; turretCreator.x = createContainer.btcreateturret2.x; turretCreator.y = createContainer.btcreateturret2.y; } else { if (createContainer.btcreateturret3.visible){ creatorPos = 2; turretCreator.x = createContainer.btcreateturret3.x; turretCreator.y = createContainer.btcreateturret3.y; }; }; }; break; case 2: if (createContainer.btcreateturret3.visible){ creatorPos = 3; turretCreator.x = createContainer.btcreateturret4.x; turretCreator.y = createContainer.btcreateturret4.y; } else { if (createContainer.btcreateturret1.visible){ creatorPos = 0; turretCreator.x = createContainer.btcreateturret1.x; turretCreator.y = createContainer.btcreateturret1.y; } else { if (createContainer.btcreateturret2.visible){ creatorPos = 1; turretCreator.x = createContainer.btcreateturret2.x; turretCreator.y = createContainer.btcreateturret2.y; }; }; }; break; case 1: if (createContainer.btcreateturret2.visible){ creatorPos = 2; turretCreator.x = createContainer.btcreateturret3.x; turretCreator.y = createContainer.btcreateturret3.y; } else { if (createContainer.btcreateturret3.visible){ creatorPos = 3; turretCreator.x = createContainer.btcreateturret4.x; turretCreator.y = createContainer.btcreateturret4.y; } else { if (createContainer.btcreateturret1.visible){ creatorPos = 0; turretCreator.x = createContainer.btcreateturret1.x; turretCreator.y = createContainer.btcreateturret1.y; }; }; }; break; case 0: default: if (createContainer.btcreateturret1.visible){ creatorPos = 1; turretCreator.x = createContainer.btcreateturret2.x; turretCreator.y = createContainer.btcreateturret2.y; } else { if (createContainer.btcreateturret2.visible){ creatorPos = 2; turretCreator.x = createContainer.btcreateturret3.x; turretCreator.y = createContainer.btcreateturret3.y; } else { if (createContainer.btcreateturret3.visible){ creatorPos = 3; turretCreator.x = createContainer.btcreateturret4.x; turretCreator.y = createContainer.btcreateturret4.y; }; }; }; break; }; } else { switch (creatorPos){ case 3: if (createContainer.btcreateturret3.visible){ creatorPos = 2; turretCreator.x = createContainer.btcreateturret3.x; turretCreator.y = createContainer.btcreateturret3.y; } else { if (createContainer.btcreateturret2.visible){ creatorPos = 1; turretCreator.x = createContainer.btcreateturret2.x; turretCreator.y = createContainer.btcreateturret2.y; } else { if (createContainer.btcreateturret1.visible){ creatorPos = 0; turretCreator.x = createContainer.btcreateturret1.x; turretCreator.y = createContainer.btcreateturret1.y; }; }; }; break; case 2: if (createContainer.btcreateturret2.visible){ creatorPos = 1; turretCreator.x = createContainer.btcreateturret2.x; turretCreator.y = createContainer.btcreateturret2.y; } else { if (createContainer.btcreateturret1.visible){ creatorPos = 0; turretCreator.x = createContainer.btcreateturret1.x; turretCreator.y = createContainer.btcreateturret1.y; } else { if (createContainer.btcreateturret4.visible){ creatorPos = 3; turretCreator.x = createContainer.btcreateturret4.x; turretCreator.y = createContainer.btcreateturret4.y; }; }; }; break; case 1: if (createContainer.btcreateturret1.visible){ creatorPos = 0; turretCreator.x = createContainer.btcreateturret1.x; turretCreator.y = createContainer.btcreateturret1.y; } else { if (createContainer.btcreateturret4.visible){ creatorPos = 3; turretCreator.x = createContainer.btcreateturret4.x; turretCreator.y = createContainer.btcreateturret4.y; } else { if (createContainer.btcreateturret3.visible){ creatorPos = 2; turretCreator.x = createContainer.btcreateturret3.x; turretCreator.y = createContainer.btcreateturret3.y; }; }; }; break; case 0: default: if (createContainer.btcreateturret4.visible){ creatorPos = 3; turretCreator.x = createContainer.btcreateturret4.x; turretCreator.y = createContainer.btcreateturret4.y; } else { if (createContainer.btcreateturret3.visible){ creatorPos = 2; turretCreator.x = createContainer.btcreateturret3.x; turretCreator.y = createContainer.btcreateturret3.y; } else { if (createContainer.btcreateturret2.visible){ creatorPos = 1; turretCreator.x = createContainer.btcreateturret2.x; turretCreator.y = createContainer.btcreateturret2.y; }; }; }; break; }; }; }; }; } private function createCastle(_arg1=1){ if (!castle){ castle = new mc_castle(); castle.x = 275; castle.y = 200; castle.initType(this, "castle", gameData); castle.level = _arg1; sceneContainer.addChild(castle); castle.repairer.visible = false; showHealth(); }; switch (_arg1){ case 3: castle.gotoAndStop(3); break; case 2: castle.gotoAndStop(2); break; case 1: default: castle.gotoAndStop(1); break; }; } private function stopThunderTurretNote(_arg1=null){ hideNote(); } private function resetScrollingDown(_arg1=null){ scrollingDown = false; } public function getAngle(_arg1, _arg2):Number{ var _local3:*; var _local4:*; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg2.y - _arg1.y); return (((Math.atan2(_local4, _local3) * 180) / Math.PI)); } private function stopRepairerNote(_arg1=null){ hideNote(); } private function createBackground(_arg1=1){ switch (_arg1){ case 1: default: if (!bg1){ bg1 = new background1(); bg1.x = 0; bg1.y = 0; bgContainer.addChild(bg1); }; break; }; } private function createProgress(){ unitCreateProgress.x = levelPanel.queue1.x; unitCreateProgress.y = levelPanel.queue1.y; unitCreateProgress.gotoAndStop(unitCreateProgress.totalFrames); menuContainer.addChild(unitCreateProgress); turretCreateProgress[0].x = createContainer.btcreateturret1.x; turretCreateProgress[0].y = createContainer.btcreateturret1.y; turretCreateProgress[0].gotoAndStop(turretCreateProgress[0].totalFrames); createContainer.addChild(turretCreateProgress[0]); turretCreateProgress[1].x = createContainer.btcreateturret2.x; turretCreateProgress[1].y = createContainer.btcreateturret2.y; turretCreateProgress[1].gotoAndStop(turretCreateProgress[1].totalFrames); createContainer.addChild(turretCreateProgress[1]); turretCreateProgress[2].x = createContainer.btcreateturret3.x; turretCreateProgress[2].y = createContainer.btcreateturret3.y; turretCreateProgress[2].gotoAndStop(turretCreateProgress[2].totalFrames); createContainer.addChild(turretCreateProgress[2]); turretCreateProgress[3].x = createContainer.btcreateturret4.x; turretCreateProgress[3].y = createContainer.btcreateturret4.y; turretCreateProgress[3].gotoAndStop(turretCreateProgress[3].totalFrames); createContainer.addChild(turretCreateProgress[3]); } private function startRiderNote(_arg1=null){ showNote(1); } private function showOptionPanel(_arg1=null){ if (!panelOption.panelShow){ levelPanel.gameshadow.visible = true; panelOption.Show(); getVolumeLevel(); panelOption.btresumegame.addEventListener(MouseEvent.CLICK, toggleGamePause); panelOption.btplaymore.addEventListener(MouseEvent.CLICK, playMoreGames); panelOption.btquitlevel.addEventListener(MouseEvent.CLICK, showConfirmPanel); panelOption.bgmvol.addEventListener(MouseEvent.MOUSE_UP, SetBGMVolumeLevel); panelOption.sfxvol.addEventListener(MouseEvent.MOUSE_UP, SetSFXVolumeLevel); panelOption.bgmvol.addEventListener(MouseEvent.CLICK, SetBGMVolumeLevel); panelOption.sfxvol.addEventListener(MouseEvent.CLICK, SetSFXVolumeLevel); }; } private function getVolumeLevel(){ panelOption.bgmvol.value = Math.floor((soundMgr.bgmVolume * 10)); panelOption.sfxvol.value = Math.floor((soundMgr.sfxVolume * 10)); } private function startDragonCreator(_arg1=null){ if ((((levelPanel.icondragon.currentFrame == 1)) && (unitCreatorEnable[4]))){ startUnitCreator(5); }; } private function startUpgradeAttackNote(_arg1=null){ showNote(12); } private function createUnitRight(_arg1){ var _local2:*; switch (unitCreator.currentFrame){ case 5: _local2 = "dragon"; break; case 4: _local2 = "panzer"; break; case 3: _local2 = "eagle"; break; case 2: _local2 = "copter"; break; case 1: default: _local2 = "rider"; break; }; queueUnit(_local2, scroller.btcreateunitright.x, scroller.btcreateunitright.y); stopUnitCreator(); } private function createScroller(){ if (!scroller){ scroller = new mc_scroller(); scrollerContainer.addChild(scroller); scroller.btcreateunitleft.visible = false; scroller.btcreateunitright.visible = false; createContainer.btcreateturret1.visible = false; createContainer.btcreateturret2.visible = false; createContainer.btcreateturret3.visible = false; createContainer.btcreateturret4.visible = false; }; } private function frameEnterHandler(_arg1){ if (gameState == "play"){ calculateFrameCount(); regenerateMana(); if (repairingCastle){ setCastleTimer(); } else { if (castle.repairer.visible){ castle.repairer.visible = false; }; }; if (creatingEnemy){ setEnemyTimer(); } else { if (enemyArray.length == 0){ gameState = "stopplayerwin"; stopGame(); }; }; if (distortingValue > 0){ setDistortTimer(); }; setUnitTimer(); setTurretTimer(); setSpecialAttackTimer(); moveClip(); detectBulletHit(); setPanels(); showTimeRemaining(); showEnergyMeter(); } else { if (gameState == "gameover"){ moveClip(); regenerateMana(); }; }; showObjectStatus(); scrollScene(); } private function stopCopterNote(_arg1=null){ hideNote(); } public function setSpecialAttackTimer(){ var _local1:*; if (specialAttackTimer > 0){ specialAttackTimer--; if (specialAttackTimer == 0){ _local1 = 0; while (_local1 < enemyArray.length) { if (getDistance(castle, enemyArray[_local1]) <= (castle.range * 3)){ enemyArray[_local1].reduceHealth(gameData.getSpecialAttackDamage()); } else { enemyArray[_local1].reduceHealth((gameData.getSpecialAttackDamage() / 2)); }; _local1++; }; }; }; } private function startUpgradeHealthNote(_arg1=null){ showNote(10); } private function setCastleTimer(){ if (gameData.isRepairable(castle.health, castle.maxhealth)){ if (!castle.repairer.visible){ castle.repairer.visible = true; }; if (repairingTimer >= gameData.castleRepairTimer){ castle.health = (castle.health + 10); showHealth(); decreaseMana(1); repairingTimer = 0; } else { repairingTimer++; }; } else { repairingCastle = false; if (castle.repairer.visible){ castle.repairer.visible = false; }; }; } private function createUnitCreator(){ if (!unitCreator){ unitCreator = new mc_creator(); unitCreator.visible = false; unitCreator.x = 275; unitCreator.y = 275; scrollerContainer.addChild(unitCreator); }; } public function getDistance(_arg1, _arg2):Number{ var _local3:*; var _local4:*; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg2.y - _arg1.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } public function setEnemyTarget(_arg1){ var _local2:*; castle.setTarget(_arg1); _local2 = (turretArray.length - 1); while (_local2 >= 0) { if (((turretArray[_local2]) && (!((turretArray[_local2].status == "destroyed"))))){ turretArray[_local2].setTarget(_arg1); }; _local2--; }; _local2 = (unitArray.length - 1); while (_local2 >= 0) { if (unitArray[_local2].status != "destroyed"){ unitArray[_local2].setTarget(_arg1); }; _local2--; }; } public function startGame(){ var _local1:*; gameState = "play"; createCastle(gameData.castleLevel); startListeners(); setPanels(); levelPanel.rightnote2.visible = false; levelPanel.rightnote.visible = true; _local1 = 0; while (_local1 < 7) { enemyTimer[_local1] = -(gameData.enemyStartTimerScenario[(gameData.selectedLevel - 1)][_local1]); _local1++; }; repairingCastle = false; creatingEnemy = true; gameStartTime = getTimer(); gamePausedTime = 0; } private function startRepairer(_arg1=null){ if (!repairingCastle){ repairingCastle = gameData.isRepairable; } else { repairingCastle = false; }; showNote(15); } private function createTurretCreator(){ if (!turretCreator){ turretCreator = new mc_turretcreator(); turretCreator.visible = false; turretCreator.x = 275; turretCreator.y = 275; scrollerContainer.addChild(turretCreator); }; } private function SetBGMVolumeLevel(_arg1=null){ soundMgr.adjustBGM((panelOption.bgmvol.value / 10)); } private function keyPressHandler(_arg1){ switch (_arg1.keyCode){ case Keyboard.UP: scrollingUp = true; break; case Keyboard.DOWN: scrollingDown = true; break; }; } private function keyReleaseHandler(_arg1){ if (gameState == "play"){ switch (_arg1.keyCode){ case 49: if (unitCreatorEnable[0]){ startRiderCreator(); }; break; case 50: if (unitCreatorEnable[1]){ startCopterCreator(); }; break; case 51: if (unitCreatorEnable[2]){ startEagleCreator(); }; break; case 52: if (unitCreatorEnable[3]){ startPanzerCreator(); }; break; case 53: if (unitCreatorEnable[4]){ startDragonCreator(); }; break; case 81: if (turretCreatorEnable[0]){ startIceTurretCreator(); }; break; case 87: if (turretCreatorEnable[1]){ startFireTurretCreator(); }; break; case 69: if (turretCreatorEnable[2]){ startThunderTurretCreator(); }; break; case Keyboard.ESCAPE: stopUnitCreator(); stopTurretCreator(); if (gameState == "pause"){ toggleGamePause(); }; break; case 80: stopUnitCreator(); stopTurretCreator(); toggleGamePause(); break; case 65: startUpgradeRange(); break; case 83: startUpgradeHealth(); break; case 68: startUpgradePower(); break; case 70: startUpgradeAttack(); break; case 71: startUpgradeDefense(); break; case 90: startUpgradeMana(); break; case 88: startRepairer(); break; case 67: startHealer(); break; case 86: startSpecialAttack(); break; case Keyboard.UP: scrollingUp = false; break; case Keyboard.DOWN: scrollingDown = false; break; case Keyboard.LEFT: if (((unitCreator) && (unitCreator.visible))){ moveCreator(false); } else { if (((turretCreator) && (turretCreator.visible))){ moveCreator(false); }; }; break; case Keyboard.RIGHT: if (((unitCreator) && (unitCreator.visible))){ moveCreator(true); } else { if (((turretCreator) && (turretCreator.visible))){ moveCreator(true); }; }; break; case Keyboard.SPACE: if (((unitCreator) && (unitCreator.visible))){ createUnit(); } else { if (((turretCreator) && (turretCreator.visible))){ createTurret(); }; }; break; }; } else { switch (_arg1.keyCode){ case Keyboard.ESCAPE: stopUnitCreator(); stopTurretCreator(); if (gameState == "pause"){ toggleGamePause(); }; break; case 80: stopUnitCreator(); stopTurretCreator(); toggleGamePause(); break; }; }; } private function startUpgradeDefense(_arg1=null){ if (gameData.isDefenseUpgradable()){ gameData.increaseUnitsDefenseFactor(); }; showNote(13); } private function startRepairerNote(_arg1=null){ showNote(15); } private function moveUnitCreator(_arg1){ if (unitCreator){ unitCreator.x = _arg1.stageX; unitCreator.y = _arg1.stageY; if (getDistance(unitCreator, scroller.btcreateunitleft) < 50){ unitCreator.x = scroller.btcreateunitleft.x; unitCreator.y = scroller.btcreateunitleft.y; } else { if (getDistance(unitCreator, scroller.btcreateunitright) < 50){ unitCreator.x = scroller.btcreateunitright.x; unitCreator.y = scroller.btcreateunitright.y; }; }; }; } private function destroyCastle(){ if (castle){ if (sceneContainer.contains(castle)){ sceneContainer.removeChild(castle); }; castle.destroy(); castle = null; }; } private function destroyUnits(){ var _local1:*; var _local2:*; unitQueueArray.splice(0); unitQueueTimer.splice(0); _local1 = (unitArray.length - 1); while (_local1 >= 0) { _local2 = unitArray[_local1]; if (sceneContainer.contains(_local2)){ sceneContainer.removeChild(_local2); }; _local2.destroy(); unitArray.splice(_local1, 1); _local2 = null; _local1--; }; } private function startHealer(_arg1=null){ var _local2:*; if (gameData.manaCount >= (gameData.maxManaCount / 2)){ gameData.manaCount = (gameData.manaCount - (gameData.maxManaCount / 2)); _local2 = 0; while (_local2 < unitArray.length) { unitArray[_local2].splashSign.play(); unitArray[_local2].resetHealth(); _local2++; }; showNote(16); }; } private function playMoreGames(_arg1=null){ navigateToURL(moreGameURL, "_blank"); } private function stopPanzerNote(_arg1=null){ hideNote(); } private function SetSFXVolumeLevel(_arg1=null){ soundMgr.adjustSFX((panelOption.sfxvol.value / 10)); } private function calculateFrameCount(){ var _local1:*; _local1 = Math.floor(((getTimer() - gameStartTime) / 1000)); if (_local1 != timecount){ if (enemyArray.length > 0){ levelPanel.note.text = ((("Enemy Wave | count: " + enemyArray.length) + " | ") + tparser.Parse(((getTimer() - gameStartTime) - gamePausedTime))); }; timecount = _local1; framecount = 0; } else { framecount++; }; } public function increaseMana(_arg1){ gameData.increaseMana(_arg1); levelPanel.manalevel.gotoAndStop(Math.floor(((gameData.manaCount / gameData.maxManaCount) * 100))); levelPanel.manapoint.text = ((Math.floor(gameData.manaCount) + "/") + Math.floor(gameData.maxManaCount)); } private function stopRiderNote(_arg1=null){ hideNote(); } private function showTimeRemaining(){ levelPanel.progresslevel.gotoAndStop((Math.floor(((((getTimer() - gameStartTime) - gamePausedTime) / gameData.gameLengthScenario[(gameData.selectedLevel - 1)]) * 100)) + 1)); if (((getTimer() - gameStartTime) - gamePausedTime) >= gameData.gameLengthScenario[(gameData.selectedLevel - 1)]){ creatingEnemy = false; }; } public function showObjectStatus(_arg1=null){ if (_arg1){ if (((selectedObject) && (!((selectedObject == _arg1))))){ selectedObject.selectedSign.visible = false; }; selectedObject = _arg1; selectedObject.selectedSign.visible = true; selectedObject.selectedSign.gotoAndPlay(1); }; if (selectedObject){ levelPanel.rightnote.txt1.text = selectedObject.type; levelPanel.rightnote.txt2.text = ((("level : " + Math.floor(selectedObject.power)) + "\nhealth : ") + Math.floor(selectedObject.health)); switch (selectedObject.status){ case "closing": if ((((selectedObject.type == "castle")) || ((selectedObject.type == "turret")))){ levelPanel.rightnote.txt3.text = "Waiting"; } else { levelPanel.rightnote.txt3.text = "Closing enemy"; }; break; case "idle": levelPanel.rightnote.txt3.text = "Waiting"; break; case "attacking": case "attackmove": levelPanel.rightnote.txt3.text = "Attacking enemy"; break; default: levelPanel.rightnote.txt3.text = ""; break; }; if (selectedObject.status == "destroyed"){ selectedObject = null; levelPanel.rightnote.txt1.text = ("Day #0" + gameData.selectedLevel); levelPanel.rightnote.txt2.text = ""; levelPanel.rightnote.txt3.text = ""; levelPanel.rightnote.gotoAndStop(2); } else { if (selectedObject.side == "enemy"){ levelPanel.rightnote.gotoAndStop(1); } else { levelPanel.rightnote.gotoAndStop(2); }; }; } else { selectedObject = null; levelPanel.rightnote.txt1.text = ("Day #0" + gameData.selectedLevel); levelPanel.rightnote.txt2.text = ""; levelPanel.rightnote.txt3.text = ""; levelPanel.rightnote.gotoAndStop(2); }; } private function hideConfirmPanel(_arg1=null){ if (panelConfirm.panelShow){ panelConfirm.Hide(); panelConfirm.btyes.removeEventListener(MouseEvent.CLICK, endCurrentLevel); panelConfirm.btcancel.removeEventListener(MouseEvent.CLICK, hideConfirmPanel); }; } private function stopUpgradeAttackNote(_arg1=null){ hideNote(); } private function setScrollingUp(_arg1=null){ if (((turretCreator.visible) || (unitCreator.visible))){ scrollingUp = false; scrollingDown = false; } else { scrollingUp = true; scrollingDown = false; }; } private function startCopterNote(_arg1=null){ showNote(2); } public function showHealth(){ levelPanel.healthlevel.gotoAndStop(Math.floor(((castle.health / castle.maxhealth) * 100))); } private function stopUpgradeHealthNote(_arg1=null){ hideNote(); } private function startSpecialAttackNote(_arg1=null){ showNote(17); } private function startUpgradePower(_arg1=null){ if (gameData.isPowerUpgradable()){ gameData.increaseUnitsPowerFactor(); }; showNote(11); } private function detectBulletHit(){ var _local1:*; var _local2:*; _local1 = 0; while (_local1 < bulletArray.length) { _local2 = detectHit(bulletArray[_local1], bulletArray[_local1].side); if (((((_local2) && (_local2.visible))) && (!((_local2.status == "destroyed"))))){ if (bulletArray[_local1].destroyable){ fxContainer.createParticle(bulletArray[_local1].x, bulletArray[_local1].y, bulletArray[_local1].subtype); bulletArray[_local1].gotoAndPlay("destroyed"); switch (bulletArray[_local1].subtype){ case "frozenbullet": case "cannonbullet": soundMgr.playSFX("cannonhit"); break; case "icebullet": case "firebullet": soundMgr.playSFX("plasmahit"); break; }; }; _local2.reduceHealth(bulletArray[_local1].damage); }; _local1++; }; } private function stopHealerNote(_arg1=null){ hideNote(); } private function startRiderCreator(_arg1=null){ if ((((levelPanel.iconrider.currentFrame == 1)) && (unitCreatorEnable[0]))){ startUnitCreator(1); }; } private function scrollScene(){ if (scrollingUp){ if (sceneContainer.y < 0){ sceneContainer.y = (sceneContainer.y + 5); } else { scrollingUp = false; }; bgContainer.y = sceneContainer.y; fxContainer.y = sceneContainer.y; createContainer.y = sceneContainer.y; } else { if (scrollingDown){ if (sceneContainer.y > -200){ sceneContainer.y = (sceneContainer.y - 5); } else { scrollingDown = false; }; bgContainer.y = sceneContainer.y; fxContainer.y = sceneContainer.y; createContainer.y = sceneContainer.y; }; }; } private function startEagleNote(_arg1=null){ showNote(3); } private function setUnitTimer(){ var _local1:*; if (unitQueueTimer.length > 0){ if (unitQueueTimer[0] > 0){ if (unitQueueTimerInit == 0){ unitQueueTimerInit = unitQueueTimer[0]; }; if (unitArray.length <= 12){ var _local2 = unitQueueTimer; var _local3:int; var _local4 = (_local2[_local3] - 1); _local2[_local3] = _local4; }; unitCreateProgress.gotoAndStop((101 - Math.floor(((unitQueueTimer[0] / unitQueueTimerInit) * 100)))); if (unitQueueTimer[0] == 0){ _local1 = unitQueueArray[0]; unitQueueArray.splice(0, 1); unitQueueTimer.splice(0, 1); sceneContainer.addChild(_local1); unitArray.push(_local1); unitQueueTimerInit = unitQueueArray[0]; }; } else { unitQueueTimer[0] = 1; }; }; } private function startTurretCreator(_arg1=1){ if (((turretCreator) && (((((((!(turretArray[0])) || (!(turretArray[1])))) || (!(turretArray[2])))) || (!(turretArray[3])))))){ sceneContainer.y = 0; bgContainer.y = sceneContainer.y; fxContainer.y = sceneContainer.y; createContainer.y = sceneContainer.y; turretCreator.visible = true; turretCreator.gotoAndStop(_arg1); if (!turretArray[0]){ creatorPos = 0; turretCreator.x = createContainer.btcreateturret1.x; turretCreator.y = createContainer.btcreateturret1.y; } else { if (!turretArray[1]){ creatorPos = 1; turretCreator.x = createContainer.btcreateturret2.x; turretCreator.y = createContainer.btcreateturret2.y; } else { if (!turretArray[2]){ creatorPos = 2; turretCreator.x = createContainer.btcreateturret3.x; turretCreator.y = createContainer.btcreateturret3.y; } else { if (!turretArray[3]){ creatorPos = 3; turretCreator.x = createContainer.btcreateturret4.x; turretCreator.y = createContainer.btcreateturret4.y; }; }; }; }; if (!turretArray[0]){ createContainer.btcreateturret1.visible = true; createContainer.btcreateturret1.addEventListener(MouseEvent.CLICK, createTurret1); }; if (!turretArray[1]){ createContainer.btcreateturret2.visible = true; createContainer.btcreateturret2.addEventListener(MouseEvent.CLICK, createTurret2); }; if (!turretArray[2]){ createContainer.btcreateturret3.visible = true; createContainer.btcreateturret3.addEventListener(MouseEvent.CLICK, createTurret3); }; if (!turretArray[3]){ createContainer.btcreateturret4.visible = true; createContainer.btcreateturret4.addEventListener(MouseEvent.CLICK, createTurret4); }; stageRoot.addEventListener(MouseEvent.MOUSE_MOVE, moveTurretCreator); }; if (unitCreator.visible){ stopUnitCreator(); }; } private function createEnemy(_arg1){ var _local2:*; switch (_arg1){ case "evilultimate": _local2 = new mc_evilultimate(); _local2.initType(this, "evilultimate", gameData); sceneContainer.addChild(_local2); enemyArray.push(_local2); break; case "evildragon": _local2 = new mc_evildragon(); _local2.initType(this, "evildragon", gameData); sceneContainer.addChild(_local2); enemyArray.push(_local2); break; case "evilknight": _local2 = new mc_blackknight(); _local2.initType(this, "evilknight", gameData); sceneContainer.addChild(_local2); enemyArray.push(_local2); break; case "evilpanzer": _local2 = new mc_evilpanzer(); _local2.initType(this, "evilpanzer", gameData); sceneContainer.addChild(_local2); enemyArray.push(_local2); break; case "bigbat": _local2 = new mc_bigbat(); _local2.initType(this, "bigbat", gameData); sceneContainer.addChild(_local2); enemyArray.push(_local2); break; case "evilcopter": _local2 = new mc_evilcopter(); _local2.initType(this, "evilcopter", gameData); sceneContainer.addChild(_local2); enemyArray.push(_local2); break; case "smallbat": default: _local2 = new mc_smallbat(); _local2.initType(this, "smallbat", gameData); sceneContainer.addChild(_local2); enemyArray.push(_local2); break; }; _local2.y = (800 + (Math.random() * 50)); if (Math.random() >= 0.5){ _local2.x = (25 + (Math.random() * 25)); } else { _local2.x = (525 - (Math.random() * 25)); }; } private function setPanels(){ if (levelPanel.gameshadow.visible){ levelPanel.gameshadow.visible = false; }; if (unitQueueArray.length >= 1){ levelPanel.queue1.gotoAndStop((unitQueueArray[0].typeInt + 2)); } else { levelPanel.queue1.gotoAndStop(1); }; if (unitQueueArray.length >= 2){ levelPanel.queue2.gotoAndStop((unitQueueArray[1].typeInt + 2)); } else { levelPanel.queue2.gotoAndStop(1); }; if (unitQueueArray.length >= 3){ levelPanel.queue3.gotoAndStop((unitQueueArray[2].typeInt + 2)); } else { levelPanel.queue3.gotoAndStop(1); }; if (unitQueueArray.length >= 4){ levelPanel.queue4.gotoAndStop((unitQueueArray[3].typeInt + 2)); } else { levelPanel.queue4.gotoAndStop(1); }; if (unitQueueArray.length >= 5){ levelPanel.queue5.gotoAndStop((unitQueueArray[4].typeInt + 2)); } else { levelPanel.queue5.gotoAndStop(1); }; if (unitQueueArray.length >= 6){ levelPanel.queue6.gotoAndStop((unitQueueArray[5].typeInt + 2)); } else { levelPanel.queue6.gotoAndStop(1); }; if (gameData.unlockedUnits[0]){ if (gameData.isRiderCreatable()){ levelPanel.iconrider.gotoAndStop(1); } else { levelPanel.iconrider.gotoAndStop(2); }; } else { levelPanel.iconrider.visible = false; }; if (gameData.unlockedUnits[1]){ if (gameData.isCopterCreatable()){ levelPanel.iconcopter.gotoAndStop(1); } else { levelPanel.iconcopter.gotoAndStop(2); }; } else { levelPanel.iconcopter.visible = false; }; if (gameData.unlockedUnits[2]){ if (gameData.isEagleCreatable()){ levelPanel.iconeagle.gotoAndStop(1); } else { levelPanel.iconeagle.gotoAndStop(2); }; } else { levelPanel.iconeagle.visible = false; }; if (gameData.unlockedUnits[3]){ if (gameData.isPanzerCreatable()){ levelPanel.iconpanzer.gotoAndStop(1); } else { levelPanel.iconpanzer.gotoAndStop(2); }; } else { levelPanel.iconpanzer.visible = false; }; if (gameData.unlockedUnits[4]){ if (gameData.isDragonCreatable()){ levelPanel.icondragon.gotoAndStop(1); } else { levelPanel.icondragon.gotoAndStop(2); }; } else { levelPanel.icondragon.visible = false; }; if (gameData.unlockedTurrets[0]){ if (gameData.isIceTurretsCreatable()){ levelPanel.iconiceturret.gotoAndStop(1); } else { levelPanel.iconiceturret.gotoAndStop(2); }; } else { levelPanel.iconiceturret.visible = false; }; if (gameData.unlockedTurrets[1]){ if (gameData.isFireTurretsCreatable()){ levelPanel.iconfireturret.gotoAndStop(1); } else { levelPanel.iconfireturret.gotoAndStop(2); }; } else { levelPanel.iconfireturret.visible = false; }; if (gameData.unlockedTurrets[2]){ if (gameData.isThunderTurretsCreatable()){ levelPanel.iconthunderturret.gotoAndStop(1); } else { levelPanel.iconthunderturret.gotoAndStop(2); }; } else { levelPanel.iconthunderturret.visible = false; }; if (gameData.isRangeUpgradable()){ levelPanel.iconupgraderange.gotoAndStop(1); } else { levelPanel.iconupgraderange.gotoAndStop(2); }; if (gameData.isHealthUpgradable()){ levelPanel.iconupgradehealth.gotoAndStop(1); } else { levelPanel.iconupgradehealth.gotoAndStop(2); }; if (gameData.isPowerUpgradable()){ levelPanel.iconupgradepower.gotoAndStop(1); } else { levelPanel.iconupgradepower.gotoAndStop(2); }; if (gameData.isAttackUpgradable()){ levelPanel.iconupgradeattack.gotoAndStop(1); } else { levelPanel.iconupgradeattack.gotoAndStop(2); }; if (gameData.isDefenseUpgradable()){ levelPanel.iconupgradedefense.gotoAndStop(1); } else { levelPanel.iconupgradedefense.gotoAndStop(2); }; if (gameData.isManaBankUpgradable()){ levelPanel.iconupgrademana.gotoAndStop(1); } else { levelPanel.iconupgrademana.gotoAndStop(2); }; if (((castle) && (gameData.isRepairable(castle.health, castle.maxhealth)))){ levelPanel.iconrepair.gotoAndStop(1); } else { levelPanel.iconrepair.gotoAndStop(2); }; if (gameData.isHealingEnable()){ levelPanel.iconheal.gotoAndStop(1); } else { levelPanel.iconheal.gotoAndStop(2); }; if (gameData.isSpecialAttackEnable()){ levelPanel.iconspecialattack.gotoAndStop(1); } else { levelPanel.iconspecialattack.gotoAndStop(2); }; } private function hideOptionPanel(_arg1=null){ if (panelOption.panelShow){ if (panelConfirm.panelShow){ hideConfirmPanel(); }; levelPanel.gameshadow.visible = false; panelOption.Hide(); panelOption.btresumegame.removeEventListener(MouseEvent.CLICK, toggleGamePause); panelOption.btplaymore.removeEventListener(MouseEvent.CLICK, playMoreGames); panelOption.btquitlevel.removeEventListener(MouseEvent.CLICK, endCurrentLevel); panelOption.bgmvol.removeEventListener(MouseEvent.MOUSE_UP, SetBGMVolumeLevel); panelOption.sfxvol.removeEventListener(MouseEvent.MOUSE_UP, SetSFXVolumeLevel); panelOption.bgmvol.removeEventListener(MouseEvent.CLICK, SetBGMVolumeLevel); panelOption.sfxvol.removeEventListener(MouseEvent.CLICK, SetSFXVolumeLevel); }; } private function detectHit(_arg1, _arg2):MovieClip{ var _local3:*; var _local4:*; _local4 = null; if (_arg2 == "player"){ _local3 = 0; while (((!(_local4)) && ((_local3 < enemyArray.length)))) { if (_arg1.hitTestObject(enemyArray[_local3])){ _local4 = enemyArray[_local3]; }; _local3++; }; } else { _local3 = 0; while (((!(_local4)) && ((_local3 < unitArray.length)))) { if (_arg1.hitTestObject(unitArray[_local3])){ _local4 = unitArray[_local3]; }; _local3++; }; _local3 = 0; while (((!(_local4)) && ((_local3 < turretArray.length)))) { if (turretArray[_local3]){ if (_arg1.hitTestObject(turretArray[_local3])){ _local4 = turretArray[_local3]; }; }; _local3++; }; if (!_local4){ if (_arg1.hitTestObject(castle.d1)){ _local4 = castle; }; }; }; return (_local4); } public function setDistortTimer(_arg1=0){ if (_arg1 > 0){ if (_arg1 > distortingValue){ distortingValue = _arg1; }; }; if (distortingValue > 0){ distortingValue--; if (distortingValue < 0){ distortingValue = 0; }; sceneContainer.x = (0 + (distortingValue * Math.sin(((distortingValue * Math.PI) / maxDistort)))); }; } private function startListeners(){ stageRoot.root.addEventListener(Event.ENTER_FRAME, frameEnterHandler); stageRoot.root.addEventListener(KeyboardEvent.KEY_DOWN, keyPressHandler); stageRoot.root.addEventListener(KeyboardEvent.KEY_UP, keyReleaseHandler); scroller.upscroller.addEventListener(MouseEvent.MOUSE_OVER, setScrollingUp); scroller.upscroller.addEventListener(MouseEvent.MOUSE_OUT, resetScrollingUp); scroller.downscroller.addEventListener(MouseEvent.MOUSE_OVER, setScrollingDown); scroller.downscroller.addEventListener(MouseEvent.MOUSE_OUT, resetScrollingDown); levelPanel.btquitlevel.addEventListener(MouseEvent.CLICK, showConfirmPanel); levelPanel.btplaymore.addEventListener(MouseEvent.CLICK, playMoreGames); levelPanel.btoption.addEventListener(MouseEvent.CLICK, toggleGamePause); levelPanel.iconrider.addEventListener(MouseEvent.CLICK, startRiderCreator); levelPanel.iconcopter.addEventListener(MouseEvent.CLICK, startCopterCreator); levelPanel.iconeagle.addEventListener(MouseEvent.CLICK, startEagleCreator); levelPanel.iconpanzer.addEventListener(MouseEvent.CLICK, startPanzerCreator); levelPanel.icondragon.addEventListener(MouseEvent.CLICK, startDragonCreator); levelPanel.iconiceturret.addEventListener(MouseEvent.CLICK, startIceTurretCreator); levelPanel.iconfireturret.addEventListener(MouseEvent.CLICK, startFireTurretCreator); levelPanel.iconthunderturret.addEventListener(MouseEvent.CLICK, startThunderTurretCreator); levelPanel.iconupgraderange.addEventListener(MouseEvent.CLICK, startUpgradeRange); levelPanel.iconupgradehealth.addEventListener(MouseEvent.CLICK, startUpgradeHealth); levelPanel.iconupgradepower.addEventListener(MouseEvent.CLICK, startUpgradePower); levelPanel.iconupgradeattack.addEventListener(MouseEvent.CLICK, startUpgradeAttack); levelPanel.iconupgradedefense.addEventListener(MouseEvent.CLICK, startUpgradeDefense); levelPanel.iconupgrademana.addEventListener(MouseEvent.CLICK, startUpgradeMana); levelPanel.iconrepair.addEventListener(MouseEvent.CLICK, startRepairer); levelPanel.iconheal.addEventListener(MouseEvent.CLICK, startHealer); levelPanel.iconspecialattack.addEventListener(MouseEvent.CLICK, startSpecialAttack); levelPanel.iconrider.addEventListener(MouseEvent.MOUSE_OVER, startRiderNote); levelPanel.iconcopter.addEventListener(MouseEvent.MOUSE_OVER, startCopterNote); levelPanel.iconeagle.addEventListener(MouseEvent.MOUSE_OVER, startEagleNote); levelPanel.iconpanzer.addEventListener(MouseEvent.MOUSE_OVER, startPanzerNote); levelPanel.icondragon.addEventListener(MouseEvent.MOUSE_OVER, startDragonNote); levelPanel.iconiceturret.addEventListener(MouseEvent.MOUSE_OVER, startIceTurretNote); levelPanel.iconfireturret.addEventListener(MouseEvent.MOUSE_OVER, startFireTurretNote); levelPanel.iconthunderturret.addEventListener(MouseEvent.MOUSE_OVER, startThunderTurretNote); levelPanel.iconupgraderange.addEventListener(MouseEvent.MOUSE_OVER, startUpgradeRangeNote); levelPanel.iconupgradehealth.addEventListener(MouseEvent.MOUSE_OVER, startUpgradeHealthNote); levelPanel.iconupgradepower.addEventListener(MouseEvent.MOUSE_OVER, startUpgradePowerNote); levelPanel.iconupgradeattack.addEventListener(MouseEvent.MOUSE_OVER, startUpgradeAttackNote); levelPanel.iconupgradedefense.addEventListener(MouseEvent.MOUSE_OVER, startUpgradeDefenseNote); levelPanel.iconupgrademana.addEventListener(MouseEvent.MOUSE_OVER, startUpgradeManaNote); levelPanel.iconrepair.addEventListener(MouseEvent.MOUSE_OVER, startRepairerNote); levelPanel.iconheal.addEventListener(MouseEvent.MOUSE_OVER, startHealerNote); levelPanel.iconspecialattack.addEventListener(MouseEvent.MOUSE_OVER, startSpecialAttackNote); levelPanel.iconrider.addEventListener(MouseEvent.MOUSE_OUT, stopRiderNote); levelPanel.iconcopter.addEventListener(MouseEvent.MOUSE_OUT, stopCopterNote); levelPanel.iconeagle.addEventListener(MouseEvent.MOUSE_OUT, stopEagleNote); levelPanel.iconpanzer.addEventListener(MouseEvent.MOUSE_OUT, stopPanzerNote); levelPanel.icondragon.addEventListener(MouseEvent.MOUSE_OUT, stopDragonNote); levelPanel.iconiceturret.addEventListener(MouseEvent.MOUSE_OUT, stopIceTurretNote); levelPanel.iconfireturret.addEventListener(MouseEvent.MOUSE_OUT, stopFireTurretNote); levelPanel.iconthunderturret.addEventListener(MouseEvent.MOUSE_OUT, stopThunderTurretNote); levelPanel.iconupgraderange.addEventListener(MouseEvent.MOUSE_OUT, stopUpgradeRangeNote); levelPanel.iconupgradehealth.addEventListener(MouseEvent.MOUSE_OUT, stopUpgradeHealthNote); levelPanel.iconupgradepower.addEventListener(MouseEvent.MOUSE_OUT, stopUpgradePowerNote); levelPanel.iconupgradeattack.addEventListener(MouseEvent.MOUSE_OUT, stopUpgradeAttackNote); levelPanel.iconupgradedefense.addEventListener(MouseEvent.MOUSE_OUT, stopUpgradeDefenseNote); levelPanel.iconupgrademana.addEventListener(MouseEvent.MOUSE_OUT, stopUpgradeManaNote); levelPanel.iconrepair.addEventListener(MouseEvent.MOUSE_OUT, stopRepairerNote); levelPanel.iconheal.addEventListener(MouseEvent.MOUSE_OUT, stopHealerNote); levelPanel.iconspecialattack.addEventListener(MouseEvent.MOUSE_OUT, stopSpecialAttackNote); } private function startPanzerNote(_arg1=null){ showNote(4); } } }//package
Section 75
//mc_bigbat (mc_bigbat) package { public dynamic class mc_bigbat extends BaseAIClip { public function mc_bigbat(){ addFrameScript(15, frame16, 16, frame17); } function frame17(){ stop(); } function frame16(){ gotoAndPlay(1); } } }//package
Section 76
//mc_blackknight (mc_blackknight) package { public dynamic class mc_blackknight extends BaseAIClip { public function mc_blackknight(){ addFrameScript(15, frame16, 31, frame32, 32, frame33); } function frame16(){ gotoAndPlay(1); } function frame33(){ stop(); } function frame32(){ gotoAndPlay(1); } } }//package
Section 77
//mc_bluesplashfx (mc_bluesplashfx) package { import flash.display.*; public dynamic class mc_bluesplashfx extends MovieClip { public function mc_bluesplashfx(){ addFrameScript(9, frame10); } function frame10(){ gotoAndStop(1); } } }//package
Section 78
//mc_cannonblow1 (mc_cannonblow1) package { import flash.display.*; public dynamic class mc_cannonblow1 extends MovieClip { } }//package
Section 79
//mc_cannonblow2 (mc_cannonblow2) package { import flash.display.*; public dynamic class mc_cannonblow2 extends MovieClip { } }//package
Section 80
//mc_cannonblow3 (mc_cannonblow3) package { import flash.display.*; public dynamic class mc_cannonblow3 extends MovieClip { } }//package
Section 81
//mc_cannonbullet (mc_cannonbullet) package { public dynamic class mc_cannonbullet extends BaseBulletClip { public function mc_cannonbullet(){ addFrameScript(60, frame61); } function frame61(){ stop(); } } }//package
Section 82
//mc_castle (mc_castle) package { public dynamic class mc_castle extends BaseAIClip { public function mc_castle(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6); } function frame3(){ stop(); } function frame1(){ stop(); } function frame5(){ stop(); } function frame6(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package
Section 83
//mc_copter (mc_copter) package { public dynamic class mc_copter extends BaseAIClip { public function mc_copter(){ addFrameScript(7, frame8, 15, frame16, 16, frame17); } function frame8(){ gotoAndPlay(1); } function frame17(){ stop(); } function frame16(){ gotoAndPlay(9); } } }//package
Section 84
//mc_cover (mc_cover) package { import flash.display.*; public dynamic class mc_cover extends MovieClip { } }//package
Section 85
//mc_creator (mc_creator) package { import flash.display.*; public dynamic class mc_creator extends MovieClip { } }//package
Section 86
//mc_dragon (mc_dragon) package { public dynamic class mc_dragon extends BaseAIClip { public function mc_dragon(){ addFrameScript(15, frame16, 31, frame32, 32, frame33); } function frame16(){ gotoAndPlay(1); } function frame33(){ stop(); } function frame32(){ gotoAndPlay(17); } } }//package
Section 87
//mc_eagle (mc_eagle) package { public dynamic class mc_eagle extends BaseAIClip { public function mc_eagle(){ addFrameScript(15, frame16, 31, frame32, 32, frame33); } function frame16(){ gotoAndPlay(1); } function frame33(){ stop(); } function frame32(){ gotoAndPlay(17); } } }//package
Section 88
//mc_electricsplashfx (mc_electricsplashfx) package { import flash.display.*; public dynamic class mc_electricsplashfx extends MovieClip { } }//package
Section 89
//mc_evilcopter (mc_evilcopter) package { public dynamic class mc_evilcopter extends BaseAIClip { public function mc_evilcopter(){ addFrameScript(7, frame8, 15, frame16, 16, frame17); } function frame8(){ gotoAndPlay(1); } function frame17(){ stop(); } function frame16(){ gotoAndPlay(9); } } }//package
Section 90
//mc_evildragon (mc_evildragon) package { public dynamic class mc_evildragon extends BaseAIClip { public function mc_evildragon(){ addFrameScript(15, frame16, 31, frame32, 32, frame33); } function frame16(){ gotoAndPlay(1); } function frame33(){ stop(); } function frame32(){ gotoAndPlay(17); } } }//package
Section 91
//mc_evilpanzer (mc_evilpanzer) package { public dynamic class mc_evilpanzer extends BaseAIClip { public function mc_evilpanzer(){ addFrameScript(7, frame8, 15, frame16, 16, frame17); } function frame8(){ gotoAndPlay(1); } function frame17(){ stop(); } function frame16(){ gotoAndPlay(9); } } }//package
Section 92
//mc_evilultimate (mc_evilultimate) package { public dynamic class mc_evilultimate extends BaseAIClip { public function mc_evilultimate(){ addFrameScript(15, frame16, 31, frame32, 32, frame33); } function frame16(){ gotoAndPlay(1); } function frame33(){ stop(); } function frame32(){ gotoAndPlay(17); } } }//package
Section 93
//mc_firebullet (mc_firebullet) package { public dynamic class mc_firebullet extends BaseBulletClip { public function mc_firebullet(){ addFrameScript(60, frame61); } function frame61(){ stop(); } } }//package
Section 94
//mc_fireturret (mc_fireturret) package { public dynamic class mc_fireturret extends BaseAIClip { public function mc_fireturret(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 95
//mc_frozenbullet (mc_frozenbullet) package { public dynamic class mc_frozenbullet extends BaseBulletClip { public function mc_frozenbullet(){ addFrameScript(60, frame61); } function frame61(){ stop(); } } }//package
Section 96
//mc_healthbar (mc_healthbar) package { import flash.display.*; public dynamic class mc_healthbar extends MovieClip { } }//package
Section 97
//mc_icebullet (mc_icebullet) package { public dynamic class mc_icebullet extends BaseBulletClip { public function mc_icebullet(){ addFrameScript(60, frame61); } function frame61(){ stop(); } } }//package
Section 98
//mc_iceturret (mc_iceturret) package { public dynamic class mc_iceturret extends BaseAIClip { public function mc_iceturret(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 99
//mc_levelnote (mc_levelnote) package { public dynamic class mc_levelnote extends PanelMover { } }//package
Section 100
//mc_levelpanel (mc_levelpanel) package { import flash.display.*; import flash.text.*; public dynamic class mc_levelpanel extends MovieClip { public var rightnote2:MovieClip; public var rightnote:MovieClip; public var iconeagle:MovieClip; public var queue4:MovieClip; public var queue5:MovieClip; public var queue6:MovieClip; public var queue2:MovieClip; public var iconupgradedefense:MovieClip; public var btoption:SimpleButton; public var rightbalancelevel:MovieClip; public var iconupgradepower:MovieClip; public var queue1:MovieClip; public var iconspecialattack:MovieClip; public var queue3:MovieClip; public var iconrepair:MovieClip; public var btquitlevel:SimpleButton; public var iconupgrademana:MovieClip; public var gameshadow:MovieClip; public var iconupgraderange:MovieClip; public var iconupgradehealth:MovieClip; public var iconrider:MovieClip; public var healthlevel:MovieClip; public var manapoint:TextField; public var iconupgradeattack:MovieClip; public var leftbalancelevel:MovieClip; public var progresslevel:MovieClip; public var iconpanzer:MovieClip; public var icondragon:MovieClip; public var iconthunderturret:MovieClip; public var iconcopter:MovieClip; public var btplaymore:SimpleButton; public var iconheal:MovieClip; public var iconfireturret:MovieClip; public var iconiceturret:MovieClip; public var manalevel:MovieClip; public var note:TextField; } }//package
Section 101
//mc_panzer (mc_panzer) package { public dynamic class mc_panzer extends BaseAIClip { public function mc_panzer(){ addFrameScript(7, frame8, 15, frame16, 16, frame17); } function frame8(){ gotoAndPlay(1); } function frame17(){ stop(); } function frame16(){ gotoAndPlay(9); } } }//package
Section 102
//mc_progress (mc_progress) package { import flash.display.*; public dynamic class mc_progress extends MovieClip { public function mc_progress(){ addFrameScript(100, frame101); } function frame101(){ stop(); } } }//package
Section 103
//mc_redsplashfx (mc_redsplashfx) package { import flash.display.*; public dynamic class mc_redsplashfx extends MovieClip { public function mc_redsplashfx(){ addFrameScript(9, frame10); } function frame10(){ gotoAndStop(1); } } }//package
Section 104
//mc_rider (mc_rider) package { public dynamic class mc_rider extends BaseAIClip { public function mc_rider(){ addFrameScript(7, frame8, 15, frame16, 16, frame17); } function frame8(){ gotoAndPlay(1); } function frame17(){ stop(); } function frame16(){ gotoAndPlay(9); } } }//package
Section 105
//mc_scroller (mc_scroller) package { import flash.display.*; public dynamic class mc_scroller extends MovieClip { public var downscroller:SimpleButton; public var btcreateunitright:SimpleButton; public var btcreateunitleft:SimpleButton; public var upscroller:SimpleButton; } }//package
Section 106
//mc_selected (mc_selected) package { import flash.display.*; public dynamic class mc_selected extends MovieClip { } }//package
Section 107
//mc_smallbat (mc_smallbat) package { public dynamic class mc_smallbat extends BaseAIClip { public function mc_smallbat(){ addFrameScript(15, frame16, 16, frame17); } function frame17(){ stop(); } function frame16(){ gotoAndPlay(1); } } }//package
Section 108
//mc_specialfx (mc_specialfx) package { import flash.display.*; public dynamic class mc_specialfx extends MovieClip { public function mc_specialfx(){ addFrameScript(25, frame26); } function frame26(){ stop(); stop(); } } }//package
Section 109
//mc_splashfx (mc_splashfx) package { import flash.display.*; public dynamic class mc_splashfx extends MovieClip { public function mc_splashfx(){ addFrameScript(0, frame1, 15, frame16); } function frame16(){ gotoAndStop(1); } function frame1(){ stop(); } } }//package
Section 110
//mc_thunder (mc_thunder) package { import flash.display.*; public dynamic class mc_thunder extends MovieClip { } }//package
Section 111
//mc_thunderturret (mc_thunderturret) package { public dynamic class mc_thunderturret extends BaseAIClip { public function mc_thunderturret(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 112
//mc_turretcreator (mc_turretcreator) package { import flash.display.*; public dynamic class mc_turretcreator extends MovieClip { } }//package
Section 113
//mc_turretlayer (mc_turretlayer) package { import flash.display.*; public dynamic class mc_turretlayer extends MovieClip { public var btcreateturret1:SimpleButton; public var btcreateturret3:SimpleButton; public var btcreateturret2:SimpleButton; public var btcreateturret4:SimpleButton; } }//package
Section 114
//mc_tutorial (mc_tutorial) package { import flash.display.*; public dynamic class mc_tutorial extends MovieClip { public function mc_tutorial(){ addFrameScript(0, frame1, 481, frame482); } function frame1(){ stop(); } function frame482(){ stop(); } } }//package
Section 115
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 116
//panelconfirm (panelconfirm) package { public dynamic class panelconfirm extends PanelMover { } }//package
Section 117
//PanelMover (PanelMover) package { import flash.events.*; import flash.display.*; import fl.controls.*; import flash.text.*; public class PanelMover extends MovieClip { private var presentX:int; public var bgmvol:Slider; private var presentY:int; private var distanceX:int; private var distanceY:int; private var showY:int; private var factorX:int;// = 0 public var sfxvol:Slider; public var panelShow:Boolean;// = false public var btcancel:btno; private var hideY:int; private var hideX:int; public var mana:TextField; private var moving:Boolean;// = false public var btyes:SimpleButton; public var btresumegame:MovieClip; private var showX:int; public var btquitlevel:MovieClip; private var substrX:int;// = 0 private var substrY:int;// = 0 public var btplaymore:MovieClip; private var factorY:int;// = 0 public var quality:Slider; public function PanelMover(){ factorX = 0; factorY = 0; substrX = 0; substrY = 0; moving = false; panelShow = false; super(); } public function Show(){ if (!panelShow){ panelShow = true; if (!moving){ this.addEventListener(Event.ENTER_FRAME, FrameEnterHandler); moving = true; }; }; } public function Init(_arg1=0, _arg2=0, _arg3=0, _arg4=0){ hideX = _arg3; hideY = _arg4; showX = _arg1; showY = _arg2; factorX = ((showX)>hideX) ? 1 : -1; factorY = ((showY)>hideY) ? 1 : -1; substrX = (Math.abs((_arg1 - _arg3)) / 12); substrY = (Math.abs((_arg2 - _arg4)) / 12); panelShow = false; presentX = hideX; presentY = hideY; this.x = hideX; this.y = hideY; } public function Hide(){ if (panelShow){ panelShow = false; if (!moving){ this.addEventListener(Event.ENTER_FRAME, FrameEnterHandler); moving = true; }; }; } private function FrameEnterHandler(_arg1:Event){ if (panelShow){ if (presentX != showX){ distanceX = Math.abs((presentX - showX)); if (distanceX <= 5){ presentX = showX; } else { presentX = (presentX + ((distanceX * 0.5) * factorX)); }; this.x = presentX; }; if (presentY != showY){ distanceY = Math.abs((presentY - showY)); if (distanceY <= 5){ presentY = showY; } else { presentY = (presentY + ((distanceY * 0.5) * factorY)); }; this.y = presentY; }; if ((((presentX == showX)) && ((presentY == showY)))){ this.removeEventListener(Event.ENTER_FRAME, FrameEnterHandler); moving = false; }; } else { if (presentX != hideX){ distanceX = Math.abs((presentX - hideX)); if (distanceX <= 5){ presentX = hideX; } else { presentX = (presentX - (substrX * factorX)); }; this.x = presentX; }; if (presentY != hideY){ distanceY = Math.abs((presentY - hideY)); if (distanceY <= 5){ presentY = hideY; } else { presentY = (presentY - (substrY * factorY)); }; this.y = presentY; }; if ((((presentX == hideX)) && ((presentY == hideY)))){ this.removeEventListener(Event.ENTER_FRAME, FrameEnterHandler); moving = false; }; }; } public function Destroy(){ } } }//package
Section 118
//paneloption (paneloption) package { public dynamic class paneloption extends PanelMover { public function paneloption(){ __setProp_quality_paneloption_Layer4_1(); __setProp_bgmvol_paneloption_Layer4_1(); __setProp_sfxvol_paneloption_Layer4_1(); } function __setProp_sfxvol_paneloption_Layer4_1(){ try { sfxvol["componentInspectorSetting"] = true; } catch(e:Error) { }; sfxvol.direction = "horizontal"; sfxvol.enabled = true; sfxvol.liveDragging = false; sfxvol.maximum = 10; sfxvol.minimum = 0; sfxvol.snapInterval = 1; sfxvol.tickInterval = 1; sfxvol.value = 5; sfxvol.visible = true; try { sfxvol["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_quality_paneloption_Layer4_1(){ try { quality["componentInspectorSetting"] = true; } catch(e:Error) { }; quality.direction = "horizontal"; quality.enabled = true; quality.liveDragging = false; quality.maximum = 3; quality.minimum = 1; quality.snapInterval = 1; quality.tickInterval = 1; quality.value = 2; quality.visible = true; try { quality["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_bgmvol_paneloption_Layer4_1(){ try { bgmvol["componentInspectorSetting"] = true; } catch(e:Error) { }; bgmvol.direction = "horizontal"; bgmvol.enabled = true; bgmvol.liveDragging = false; bgmvol.maximum = 10; bgmvol.minimum = 0; bgmvol.snapInterval = 1; bgmvol.tickInterval = 1; bgmvol.value = 5; bgmvol.visible = true; try { bgmvol["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 119
//sfxambient (sfxambient) package { public dynamic class sfxambient extends BaseSound { } }//package
Section 120
//sfxcannonhit1 (sfxcannonhit1) package { public dynamic class sfxcannonhit1 extends BaseSound { } }//package
Section 121
//sfxcannonhit2 (sfxcannonhit2) package { public dynamic class sfxcannonhit2 extends BaseSound { } }//package
Section 122
//sfxcannonhit3 (sfxcannonhit3) package { public dynamic class sfxcannonhit3 extends BaseSound { } }//package
Section 123
//sfxcannonshoot (sfxcannonshoot) package { public dynamic class sfxcannonshoot extends BaseSound { } }//package
Section 124
//sfxplasmahit (sfxplasmahit) package { public dynamic class sfxplasmahit extends BaseSound { } }//package
Section 125
//sfxplasmashoot (sfxplasmashoot) package { public dynamic class sfxplasmashoot extends BaseSound { } }//package
Section 126
//sfxspecialattack (sfxspecialattack) package { public dynamic class sfxspecialattack extends BaseSound { } }//package
Section 127
//sfxtest (sfxtest) package { public dynamic class sfxtest extends BaseSound { } }//package
Section 128
//shadow (shadow) package { import flash.display.*; public dynamic class shadow extends MovieClip { } }//package
Section 129
//SiteLock (SiteLock) package { public class SiteLock { private var stageRoot; private var allowedDomain:Array; public function SiteLock(_arg1){ allowedDomain = new Array(); super(); stageRoot = _arg1; addSite("www.artlogicgames.com"); addSite("artlogicgames.com"); } public function checkSite():Boolean{ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = stageRoot.loaderInfo.loaderURL.split("://"); _local2 = _local1[1].split("/"); _local3 = _local2[0]; _local4 = false; _local5 = 0; while (_local5 < allowedDomain.length) { _local4 = ((_local4) || ((_local3 == allowedDomain[_local5]))); _local5++; }; return (_local4); } public function addSite(_arg1){ allowedDomain.push(_arg1); } } }//package
Section 130
//SliderThumb_disabledSkin (SliderThumb_disabledSkin) package { import flash.display.*; public dynamic class SliderThumb_disabledSkin extends MovieClip { } }//package
Section 131
//SliderThumb_downSkin (SliderThumb_downSkin) package { import flash.display.*; public dynamic class SliderThumb_downSkin extends MovieClip { } }//package
Section 132
//SliderThumb_overSkin (SliderThumb_overSkin) package { import flash.display.*; public dynamic class SliderThumb_overSkin extends MovieClip { } }//package
Section 133
//SliderThumb_upSkin (SliderThumb_upSkin) package { import flash.display.*; public dynamic class SliderThumb_upSkin extends MovieClip { } }//package
Section 134
//SliderTick_skin (SliderTick_skin) package { import flash.display.*; public dynamic class SliderTick_skin extends MovieClip { } }//package
Section 135
//SliderTrack_disabledSkin (SliderTrack_disabledSkin) package { import flash.display.*; public dynamic class SliderTrack_disabledSkin extends MovieClip { } }//package
Section 136
//SliderTrack_skin (SliderTrack_skin) package { import flash.display.*; public dynamic class SliderTrack_skin extends MovieClip { } }//package
Section 137
//SoundManager (SoundManager) package { public class SoundManager { private var sfxCannonHit1; public var bgmVolume:Number;// = 0.7 private var sfxCannonHit2; private var sndFxCannonShoot;// = null private var sfxCannonHit3; private var bgmIntro; private var sndFxPlasmaHit;// = null private var sndFx;// = null private var sndBgm;// = null private var myParent; private var sndFxSpecial;// = null private var sfxTest; private var sfxPlasmaShoot; private var bgmCover; private var bgmStage1; private var sfxSpecialAttack; private var sfxCannonShoot; private var sndFxPlasmaShoot;// = null private var sfxPlasmaHit; private var sndFxCannonHit;// = null private var sndFxAmbient; public var sfxVolume:Number;// = 0.5 public function SoundManager(){ bgmVolume = 0.7; sfxVolume = 0.5; sfxCannonShoot = new sfxcannonshoot(); sfxCannonHit1 = new sfxcannonhit1(); sfxCannonHit2 = new sfxcannonhit2(); sfxCannonHit3 = new sfxcannonhit3(); sfxPlasmaShoot = new sfxplasmashoot(); sfxPlasmaHit = new sfxplasmahit(); sfxSpecialAttack = new sfxspecialattack(); sfxTest = new sfxtest(); bgmIntro = new bgmintro(); bgmCover = new bgmcover(); bgmStage1 = new bgmstage(); sndBgm = null; sndFxAmbient = new sfxambient(); sndFxSpecial = null; sndFxPlasmaShoot = null; sndFxPlasmaHit = null; sndFxCannonShoot = null; sndFxCannonHit = null; sndFx = null; super(); sndFxAmbient.playSoundLoop(); sndFxAmbient.volume = (1 * sfxVolume); } public function stopSFX(){ if (sndFxPlasmaShoot){ sndFxPlasmaShoot.stopSound(); }; if (sndFxPlasmaHit){ sndFxPlasmaHit.stopSound(); }; if (sndFxCannonShoot){ sndFxCannonShoot.stopSound(); }; if (sndFxCannonHit){ sndFxCannonHit.stopSound(); }; if (sndFx){ sndFx.stopSound(); }; } public function playSFX(_arg1:String=""){ var _local2:*; _local2 = Math.random(); switch (_arg1){ case "specialattack": if (sndFxSpecial != sfxSpecialAttack){ if (sndFxSpecial){ sndFxSpecial.stopSound(); }; sndFxSpecial = sfxSpecialAttack; sndFxSpecial.playSound(); sndFxSpecial.setVolume((0.8 * sfxVolume)); } else { if (!sndFxSpecial.sndPlaying){ sndFxSpecial.playSound(); sndFxSpecial.setVolume((0.8 * sfxVolume)); }; }; break; case "plasmahit": if (sndFxPlasmaHit != sfxPlasmaHit){ if (sndFxPlasmaHit){ sndFxPlasmaHit.stopSound(); }; sndFxPlasmaHit = sfxPlasmaHit; sndFxPlasmaHit.playSound(); sfxPlasmaHit.setVolume((0.6 * sfxVolume)); } else { if (!sndFxPlasmaHit.sndPlaying){ sndFxPlasmaHit.playSound(); sfxPlasmaHit.setVolume((0.6 * sfxVolume)); }; }; break; case "plasmashoot": if (sndFxPlasmaShoot != sfxPlasmaShoot){ if (sndFxPlasmaShoot){ sndFxPlasmaShoot.stopSound(); }; sndFxPlasmaShoot = sfxPlasmaShoot; sndFxPlasmaShoot.playSound(); sfxPlasmaShoot.setVolume((0.6 * sfxVolume)); } else { if (!sndFxPlasmaShoot.sndPlaying){ sndFxPlasmaShoot.playSound(); sfxPlasmaShoot.setVolume((0.6 * sfxVolume)); }; }; break; case "cannonhit": if (((((!((sndFx == sfxCannonHit1))) && (!((sndFx == sfxCannonHit2))))) && (!((sndFx == sfxCannonHit3))))){ if (sndFxCannonHit){ sndFxCannonHit.stopSound(); }; if (_local2 < 0.4){ sndFxCannonHit = sfxCannonHit1; } else { if (_local2 < 0.7){ sndFxCannonHit = sfxCannonHit2; } else { sndFxCannonHit = sfxCannonHit3; }; }; sndFxCannonHit.playSound(); if (sndFxCannonHit == sfxCannonHit1){ sfxCannonHit1.setVolume((0.6 * sfxVolume)); } else { if (sndFxCannonHit == sfxCannonHit2){ sfxCannonHit2.setVolume((0.6 * sfxVolume)); } else { if (sndFxCannonHit == sfxCannonHit3){ sfxCannonHit3.setVolume((0.6 * sfxVolume)); }; }; }; } else { if (!sndFxCannonHit.sndPlaying){ sndFxCannonHit.playSound(); if (sndFxCannonHit == sfxCannonHit1){ sfxCannonHit1.setVolume((0.6 * sfxVolume)); } else { if (sndFxCannonHit == sfxCannonHit2){ sfxCannonHit2.setVolume((0.6 * sfxVolume)); } else { if (sndFxCannonHit == sfxCannonHit3){ sfxCannonHit3.setVolume((0.6 * sfxVolume)); }; }; }; }; }; break; case "cannonshoot": if (sndFxCannonShoot != sfxCannonShoot){ if (sndFxCannonShoot){ sndFxCannonShoot.stopSound(); }; sndFxCannonShoot = sfxCannonShoot; sndFxCannonShoot.playSound(); sfxCannonShoot.setVolume((0.6 * sfxVolume)); } else { if (!sndFxCannonShoot.sndPlaying){ sndFxCannonShoot.playSound(); sfxCannonShoot.setVolume((0.6 * sfxVolume)); }; }; break; case "test": default: sfxTest.playSound(); sfxTest.setVolume((1 * sfxVolume)); break; }; } public function adjustBGM(_arg1=0.7){ var _local2:*; bgmVolume = _arg1; playBGM("test"); playBGM(); } public function stopBGM(){ if (sndBgm){ sndBgm.stopSound(); sndBgm = null; }; } public function playBGM(_arg1:String=""){ switch (_arg1){ case "stage": if (sndBgm != bgmStage1){ stopBGM(); sndBgm = bgmStage1; sndBgm.playSoundLoop(); sndBgm.setVolume((1 * bgmVolume)); } else { sndBgm.setVolume((1 * bgmVolume)); }; break; case "intro": if (sndBgm != bgmIntro){ stopBGM(); sndBgm = bgmIntro; sndBgm.playSoundLoop(); sndBgm.setVolume((1 * bgmVolume)); } else { sndBgm.setVolume((1 * bgmVolume)); }; break; case "cover": if (sndBgm != bgmCover){ stopBGM(); sndBgm = bgmCover; sndBgm.playSoundLoop(); sndBgm.setVolume((0.8 * bgmVolume)); } else { sndBgm.setVolume((0.8 * bgmVolume)); }; break; case "test": sfxTest.playSound(); sfxTest.setVolume((1 * bgmVolume)); break; default: if (sndBgm){ sndBgm.setVolume((1 * bgmVolume)); }; }; } public function adjustSFX(_arg1=0.5){ sfxVolume = _arg1; playSFX("test"); sndFxAmbient.volume = (1 * sfxVolume); } } }//package
Section 138
//TimeParser (TimeParser) package { import flash.utils.*; public class TimeParser { public var stime:String; public var hour:uint; public var smsecond:String; public var ssecond:String; public var time:uint; public var msecond:uint; public var second:uint; public var minute:uint; public var shour:String; public var sminute:String; public function TimeParser(_arg1=null){ if (_arg1){ time = _arg1; } else { time = getTimer(); }; Parse(time); } public function Parse(_arg1:uint, _arg2:String=":"):String{ time = _arg1; hour = Math.floor((time / 3600000)); minute = (Math.floor((time / 60000)) % 60); second = (Math.floor((time / 1000)) % 60); msecond = (Math.floor((time / 10)) % 100); shour = String(hour); if (minute < 10){ sminute = ("0" + String(minute)); } else { sminute = String(minute); }; if (second < 10){ ssecond = ("0" + String(second)); } else { ssecond = String(second); }; if (msecond < 10){ smsecond = ("0" + String(msecond)); } else { smsecond = String(msecond); }; if (hour > 0){ stime = ((((shour + _arg2) + sminute) + _arg2) + ssecond); } else { stime = ((sminute + _arg2) + ssecond); }; return (stime); } } }//package

Library Items

Symbol 1 BitmapUsed by:2
Symbol 2 GraphicUses:1Used by:9
Symbol 3 BitmapUsed by:4
Symbol 4 GraphicUses:3Used by:5
Symbol 5 ButtonUses:4Used by:9
Symbol 6 BitmapUsed by:7
Symbol 7 GraphicUses:6Used by:8
Symbol 8 Button {btno}Uses:7Used by:9
Symbol 9 MovieClip {panelconfirm}Uses:2 5 8
Symbol 10 BitmapUsed by:11
Symbol 11 GraphicUses:10Used by:20
Symbol 12 BitmapUsed by:13
Symbol 13 GraphicUses:12Used by:20
Symbol 14 BitmapUsed by:15
Symbol 15 GraphicUses:14Used by:20
Symbol 16 BitmapUsed by:17
Symbol 17 GraphicUses:16Used by:20
Symbol 18 BitmapUsed by:19
Symbol 19 GraphicUses:18Used by:20
Symbol 20 MovieClip {mc_creator}Uses:11 13 15 17 19
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:21Used by:27
Symbol 23 BitmapUsed by:24
Symbol 24 GraphicUses:23Used by:27
Symbol 25 BitmapUsed by:26
Symbol 26 GraphicUses:25Used by:27
Symbol 27 MovieClip {mc_turretcreator}Uses:22 24 26
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClip {shadow}Uses:28
Symbol 30 ShapeTweeningUsed by:33
Symbol 31 ShapeTweeningUsed by:33
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClip {mc_selected}Uses:30 31 32
Symbol 34 BitmapUsed by:35
Symbol 35 GraphicUses:34Used by:55
Symbol 36 FontUsed by:37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 528 529 540 553
Symbol 37 TextUses:36Used by:55
Symbol 38 EditableTextUses:36Used by:55
Symbol 39 TextUses:36Used by:55
Symbol 40 TextUses:36Used by:55
Symbol 41 TextUses:36Used by:55
Symbol 42 TextUses:36Used by:55
Symbol 43 TextUses:36Used by:55
Symbol 44 TextUses:36Used by:55
Symbol 45 TextUses:36Used by:55
Symbol 46 TextUses:36Used by:55
Symbol 47 TextUses:36Used by:55
Symbol 48 TextUses:36Used by:55
Symbol 49 TextUses:36Used by:55
Symbol 50 TextUses:36Used by:55
Symbol 51 TextUses:36Used by:55
Symbol 52 TextUses:36Used by:55
Symbol 53 TextUses:36Used by:55
Symbol 54 TextUses:36Used by:55
Symbol 55 MovieClip {mc_levelnote}Uses:35 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Symbol 56 ShapeTweeningUsed by:59
Symbol 57 ShapeTweeningUsed by:59
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClip {mc_splashfx}Uses:56 57 58
Symbol 60 ShapeTweeningUsed by:69
Symbol 61 ShapeTweeningUsed by:69
Symbol 62 ShapeTweeningUsed by:69
Symbol 63 ShapeTweeningUsed by:69
Symbol 64 ShapeTweeningUsed by:69
Symbol 65 GraphicUsed by:69
Symbol 66 GraphicUsed by:69
Symbol 67 ShapeTweeningUsed by:69
Symbol 68 GraphicUsed by:69
Symbol 69 MovieClip {mc_specialfx}Uses:60 61 62 63 64 65 66 67 68
Symbol 70 GraphicUsed by:74
Symbol 71 GraphicUsed by:74
Symbol 72 GraphicUsed by:74
Symbol 73 GraphicUsed by:74
Symbol 74 ButtonUses:70 71 72 73Used by:75 570
Symbol 75 MovieClip {mc_turretlayer}Uses:74
Symbol 76 GraphicUsed by:77
Symbol 77 MovieClipUses:76Used by:95
Symbol 78 MovieClip {fl.core.ComponentShim}Used by:95
Symbol 79 GraphicUsed by:80
Symbol 80 MovieClip {SliderThumb_upSkin}Uses:79Used by:95
Symbol 81 GraphicUsed by:82
Symbol 82 MovieClip {SliderThumb_overSkin}Uses:81Used by:95
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClip {SliderThumb_downSkin}Uses:83Used by:95
Symbol 85 GraphicUsed by:86
Symbol 86 MovieClip {SliderThumb_disabledSkin}Uses:85Used by:95
Symbol 87 GraphicUsed by:88
Symbol 88 MovieClip {SliderTrack_skin}Uses:87Used by:95
Symbol 89 GraphicUsed by:90
Symbol 90 MovieClip {SliderTick_skin}Uses:89Used by:95
Symbol 91 GraphicUsed by:92
Symbol 92 MovieClip {SliderTrack_disabledSkin}Uses:91Used by:95
Symbol 93 GraphicUsed by:94
Symbol 94 MovieClip {focusRectSkin}Uses:93Used by:95
Symbol 95 MovieClip {fl.controls.Slider}Uses:77 78 80 82 84 86 88 90 92 94Used by:596
Symbol 96 MovieClip {com.kongregate.as3.client.KongregateAPI}
Symbol 97 GraphicUsed by:Timeline
Symbol 98 BitmapUsed by:99
Symbol 99 GraphicUses:98Used by:100
Symbol 100 ButtonUses:99Used by:Timeline
Symbol 101 GraphicUsed by:102
Symbol 102 MovieClipUses:101Used by:Timeline
Symbol 103 GraphicUsed by:133
Symbol 104 BitmapUsed by:105
Symbol 105 GraphicUses:104Used by:106
Symbol 106 MovieClipUses:105Used by:133
Symbol 107 FontUsed by:108 109 110 111 112 124
Symbol 108 TextUses:107Used by:129
Symbol 109 TextUses:107Used by:129
Symbol 110 TextUses:107Used by:129
Symbol 111 TextUses:107Used by:129
Symbol 112 TextUses:107Used by:129
Symbol 113 GraphicUsed by:123
Symbol 114 GraphicUsed by:123
Symbol 115 GraphicUsed by:123
Symbol 116 GraphicUsed by:123
Symbol 117 GraphicUsed by:123
Symbol 118 GraphicUsed by:123
Symbol 119 GraphicUsed by:123
Symbol 120 GraphicUsed by:123
Symbol 121 GraphicUsed by:123
Symbol 122 GraphicUsed by:123
Symbol 123 MovieClipUses:113 114 115 116 117 118 119 120 121 122Used by:129
Symbol 124 TextUses:107Used by:129
Symbol 125 GraphicUsed by:129
Symbol 126 GraphicUsed by:127
Symbol 127 MovieClipUses:126Used by:129
Symbol 128 GraphicUsed by:129  Timeline
Symbol 129 MovieClipUses:108 109 110 111 112 123 124 125 127 128Used by:133
Symbol 130 GraphicUsed by:131
Symbol 131 ButtonUses:130Used by:133
Symbol 132 GraphicUsed by:133
Symbol 133 MovieClip {windkingdom_armor_fla.armor_promo_3}Uses:103 106 129 131 132Used by:Timeline
Symbol 134 FontUsed by:135 138 658 692 694 696 702 707 712 717 797 799 800 803 804 893 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 940 976 994 998
Symbol 135 TextUses:134Used by:Timeline
Symbol 136 FontUsed by:137 658 691 693 695 697 702 707 712 717 804 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 998
Symbol 137 TextUses:136Used by:Timeline
Symbol 138 TextUses:134Used by:Timeline
Symbol 139 FontUsed by:140
Symbol 140 TextUses:139Used by:Timeline
Symbol 141 GraphicUsed by:144
Symbol 142 ShapeTweeningUsed by:144
Symbol 143 GraphicUsed by:144
Symbol 144 MovieClip {windkingdom_armor_fla.mcpreloaderBar_9}Uses:141 142 143Used by:Timeline
Symbol 145 FontUsed by:146 552 575 576 577 578 579 580 584 585 586 634 635 638 639 641 642 644 645 647 648 656 667 668 669 671 672 673 675 676 677 679 680 681 683 684 685 687 688 689 725 726 730 751 752 754 755 757 758 760 761 763 764 766 767 769 770 790 791 794 796 798 801 888 890 891 894 895 896 897 898 899 900 901 902 903 904 941 942 995
Symbol 146 TextUses:145Used by:148
Symbol 147 GraphicUsed by:148
Symbol 148 ButtonUses:146 147Used by:Timeline
Symbol 149 GraphicUsed by:612
Symbol 150 GraphicUsed by:612
Symbol 151 BitmapUsed by:152
Symbol 152 GraphicUses:151Used by:157
Symbol 153 BitmapUsed by:154
Symbol 154 GraphicUses:153Used by:157
Symbol 155 BitmapUsed by:156
Symbol 156 GraphicUses:155Used by:157
Symbol 157 MovieClip {mc_bigbat}Uses:152 154 156Used by:612
Symbol 158 BitmapUsed by:159
Symbol 159 GraphicUses:158Used by:174
Symbol 160 BitmapUsed by:161
Symbol 161 GraphicUses:160Used by:174
Symbol 162 BitmapUsed by:163
Symbol 163 GraphicUses:162Used by:174
Symbol 164 BitmapUsed by:165
Symbol 165 GraphicUses:164Used by:174
Symbol 166 BitmapUsed by:167
Symbol 167 GraphicUses:166Used by:174
Symbol 168 BitmapUsed by:169
Symbol 169 GraphicUses:168Used by:174
Symbol 170 BitmapUsed by:171
Symbol 171 GraphicUses:170Used by:174
Symbol 172 BitmapUsed by:173
Symbol 173 GraphicUses:172Used by:174
Symbol 174 MovieClip {mc_blackknight}Uses:159 161 163 165 167 169 171 173Used by:612
Symbol 175 BitmapUsed by:176
Symbol 176 GraphicUses:175Used by:183
Symbol 177 BitmapUsed by:178
Symbol 178 GraphicUses:177Used by:183
Symbol 179 BitmapUsed by:180
Symbol 180 GraphicUses:179Used by:183
Symbol 181 BitmapUsed by:182
Symbol 182 GraphicUses:181Used by:183
Symbol 183 MovieClip {mc_evilcopter}Uses:176 178 180 182Used by:612
Symbol 184 BitmapUsed by:185
Symbol 185 GraphicUses:184Used by:196
Symbol 186 BitmapUsed by:187
Symbol 187 GraphicUses:186Used by:196
Symbol 188 BitmapUsed by:189
Symbol 189 GraphicUses:188Used by:196
Symbol 190 BitmapUsed by:191
Symbol 191 GraphicUses:190Used by:196
Symbol 192 BitmapUsed by:193
Symbol 193 GraphicUses:192Used by:196
Symbol 194 BitmapUsed by:195
Symbol 195 GraphicUses:194Used by:196
Symbol 196 MovieClip {mc_evildragon}Uses:185 187 189 191 193 195Used by:612
Symbol 197 BitmapUsed by:198
Symbol 198 GraphicUses:197Used by:201
Symbol 199 BitmapUsed by:200
Symbol 200 GraphicUses:199Used by:201
Symbol 201 MovieClip {mc_evilpanzer}Uses:198 200Used by:612
Symbol 202 BitmapUsed by:203
Symbol 203 GraphicUses:202Used by:214
Symbol 204 BitmapUsed by:205
Symbol 205 GraphicUses:204Used by:214
Symbol 206 BitmapUsed by:207
Symbol 207 GraphicUses:206Used by:214
Symbol 208 BitmapUsed by:209
Symbol 209 GraphicUses:208Used by:214
Symbol 210 BitmapUsed by:211
Symbol 211 GraphicUses:210Used by:214
Symbol 212 BitmapUsed by:213
Symbol 213 GraphicUses:212Used by:214
Symbol 214 MovieClip {mc_evilultimate}Uses:203 205 207 209 211 213Used by:612
Symbol 215 BitmapUsed by:216
Symbol 216 GraphicUses:215Used by:221
Symbol 217 BitmapUsed by:218
Symbol 218 GraphicUses:217Used by:221
Symbol 219 BitmapUsed by:220
Symbol 220 GraphicUses:219Used by:221
Symbol 221 MovieClip {mc_smallbat}Uses:216 218 220Used by:612
Symbol 222 BitmapUsed by:223
Symbol 223 GraphicUses:222Used by:224
Symbol 224 MovieClipUses:223Used by:272
Symbol 225 BitmapUsed by:226
Symbol 226 GraphicUses:225Used by:236 251
Symbol 227 GraphicUsed by:228 331
Symbol 228 MovieClipUses:227Used by:229
Symbol 229 MovieClipUses:228Used by:251 262 268
Symbol 230 GraphicUsed by:233
Symbol 231 GraphicUsed by:233
Symbol 232 GraphicUsed by:233
Symbol 233 MovieClipUses:230 231 232Used by:251 262 268 269 270 271
Symbol 234 BitmapUsed by:235
Symbol 235 GraphicUses:234Used by:236
Symbol 236 MovieClipUses:226 235Used by:251 269
Symbol 237 ShapeTweeningUsed by:250
Symbol 238 BitmapUsed by:239
Symbol 239 GraphicUses:238Used by:250 427
Symbol 240 BitmapUsed by:241
Symbol 241 GraphicUses:240Used by:250 427
Symbol 242 BitmapUsed by:243
Symbol 243 GraphicUses:242Used by:250 427
Symbol 244 ShapeTweeningUsed by:250
Symbol 245 BitmapUsed by:246
Symbol 246 GraphicUses:245Used by:250 427
Symbol 247 BitmapUsed by:248
Symbol 248 GraphicUses:247Used by:250 427
Symbol 249 GraphicUsed by:250 427
Symbol 250 MovieClip {windkingdom_armor_fla.mc_redsplashfxcopy_26}Uses:237 239 241 243 244 246 248 249Used by:251 262 268 269 270 271
Symbol 251 MovieClip {windkingdom_armor_fla.lv1_21}Uses:226 229 233 236 250Used by:272
Symbol 252 GraphicUsed by:253
Symbol 253 MovieClipUses:252Used by:272
Symbol 254 GraphicUsed by:255
Symbol 255 MovieClipUses:254Used by:256
Symbol 256 MovieClipUses:255Used by:272
Symbol 257 BitmapUsed by:258
Symbol 258 GraphicUses:257Used by:261 262
Symbol 259 BitmapUsed by:260
Symbol 260 GraphicUses:259Used by:261
Symbol 261 MovieClipUses:258 260Used by:262 270
Symbol 262 MovieClip {windkingdom_armor_fla.lv2_30}Uses:258 229 233 261 250Used by:272
Symbol 263 BitmapUsed by:264
Symbol 264 GraphicUses:263Used by:267 268
Symbol 265 BitmapUsed by:266
Symbol 266 GraphicUses:265Used by:267
Symbol 267 MovieClipUses:264 266Used by:268 271
Symbol 268 MovieClip {windkingdom_armor_fla.lv3_32}Uses:264 229 233 267 250Used by:272
Symbol 269 MovieClipUses:233 236 250Used by:272
Symbol 270 MovieClipUses:233 261 250Used by:272
Symbol 271 MovieClipUses:233 267 250Used by:272
Symbol 272 MovieClip {mc_castle}Uses:224 251 253 256 262 268 269 270 271Used by:612
Symbol 273 BitmapUsed by:274
Symbol 274 GraphicUses:273Used by:275
Symbol 275 MovieClipUses:274Used by:292 298 304
Symbol 276 ShapeTweeningUsed by:292
Symbol 277 BitmapUsed by:278
Symbol 278 GraphicUses:277Used by:292 298 304
Symbol 279 BitmapUsed by:280 294 300
Symbol 280 GraphicUses:279Used by:292
Symbol 281 BitmapUsed by:282
Symbol 282 GraphicUses:281Used by:292 298 304
Symbol 283 ShapeTweeningUsed by:292
Symbol 284 ShapeTweeningUsed by:292
Symbol 285 BitmapUsed by:286
Symbol 286 GraphicUses:285Used by:292 298 304
Symbol 287 BitmapUsed by:288
Symbol 288 GraphicUses:287Used by:292 298 304
Symbol 289 ShapeTweeningUsed by:292
Symbol 290 GraphicUsed by:292 298 304
Symbol 291 GraphicUsed by:292 298 304
Symbol 292 MovieClip {mc_cannonblow1}Uses:275 276 278 280 282 283 284 286 288 289 290 291Used by:612
Symbol 293 ShapeTweeningUsed by:298
Symbol 294 GraphicUses:279Used by:298
Symbol 295 ShapeTweeningUsed by:298
Symbol 296 ShapeTweeningUsed by:298
Symbol 297 ShapeTweeningUsed by:298
Symbol 298 MovieClip {mc_cannonblow2}Uses:275 293 278 294 282 295 296 286 288 297 290 291Used by:612
Symbol 299 ShapeTweeningUsed by:304
Symbol 300 GraphicUses:279Used by:304
Symbol 301 ShapeTweeningUsed by:304
Symbol 302 ShapeTweeningUsed by:304
Symbol 303 ShapeTweeningUsed by:304
Symbol 304 MovieClip {mc_cannonblow3}Uses:275 299 278 300 282 301 302 286 288 303 290 291Used by:612
Symbol 305 BitmapUsed by:306 309
Symbol 306 GraphicUses:305Used by:311
Symbol 307 BitmapUsed by:308 310
Symbol 308 GraphicUses:307Used by:311
Symbol 309 GraphicUses:305Used by:311
Symbol 310 GraphicUses:307Used by:311
Symbol 311 MovieClipUses:306 308 309 310Used by:312
Symbol 312 MovieClip {mc_cannonbullet}Uses:311Used by:612
Symbol 313 BitmapUsed by:314
Symbol 314 GraphicUses:313Used by:315
Symbol 315 MovieClip {mc_firebullet}Uses:314Used by:612
Symbol 316 BitmapUsed by:317
Symbol 317 GraphicUses:316Used by:318
Symbol 318 MovieClip {mc_frozenbullet}Uses:317Used by:612
Symbol 319 BitmapUsed by:320
Symbol 320 GraphicUses:319Used by:321
Symbol 321 MovieClip {mc_icebullet}Uses:320Used by:612
Symbol 322 BitmapUsed by:323
Symbol 323 GraphicUses:322Used by:328
Symbol 324 BitmapUsed by:325
Symbol 325 GraphicUses:324Used by:328
Symbol 326 BitmapUsed by:327
Symbol 327 GraphicUses:326Used by:328
Symbol 328 MovieClip {mc_thunder}Uses:323 325 327Used by:612
Symbol 329 BitmapUsed by:330
Symbol 330 GraphicUses:329Used by:333
Symbol 331 MovieClipUses:227Used by:332 336 340
Symbol 332 MovieClipUses:331Used by:333
Symbol 333 MovieClip {mc_fireturret}Uses:330 332Used by:612
Symbol 334 BitmapUsed by:335
Symbol 335 GraphicUses:334Used by:337
Symbol 336 MovieClipUses:331Used by:337
Symbol 337 MovieClip {mc_iceturret}Uses:335 336Used by:612
Symbol 338 BitmapUsed by:339
Symbol 339 GraphicUses:338Used by:341
Symbol 340 MovieClipUses:331Used by:341
Symbol 341 MovieClip {mc_thunderturret}Uses:339 340Used by:612
Symbol 342 BitmapUsed by:343 824 842
Symbol 343 GraphicUses:342Used by:350
Symbol 344 BitmapUsed by:345
Symbol 345 GraphicUses:344Used by:350
Symbol 346 BitmapUsed by:347
Symbol 347 GraphicUses:346Used by:350
Symbol 348 BitmapUsed by:349
Symbol 349 GraphicUses:348Used by:350
Symbol 350 MovieClip {mc_copter}Uses:343 345 347 349Used by:612
Symbol 351 BitmapUsed by:352
Symbol 352 GraphicUses:351Used by:363
Symbol 353 BitmapUsed by:354 831
Symbol 354 GraphicUses:353Used by:363
Symbol 355 BitmapUsed by:356
Symbol 356 GraphicUses:355Used by:363
Symbol 357 BitmapUsed by:358
Symbol 358 GraphicUses:357Used by:363
Symbol 359 BitmapUsed by:360
Symbol 360 GraphicUses:359Used by:363
Symbol 361 BitmapUsed by:362
Symbol 362 GraphicUses:361Used by:363
Symbol 363 MovieClip {mc_dragon}Uses:352 354 356 358 360 362Used by:612
Symbol 364 BitmapUsed by:365
Symbol 365 GraphicUses:364Used by:376 827
Symbol 366 BitmapUsed by:367
Symbol 367 GraphicUses:366Used by:376
Symbol 368 BitmapUsed by:369
Symbol 369 GraphicUses:368Used by:376
Symbol 370 BitmapUsed by:371
Symbol 371 GraphicUses:370Used by:376
Symbol 372 BitmapUsed by:373
Symbol 373 GraphicUses:372Used by:376
Symbol 374 BitmapUsed by:375
Symbol 375 GraphicUses:374Used by:376
Symbol 376 MovieClip {mc_eagle}Uses:365 367 369 371 373 375Used by:612
Symbol 377 BitmapUsed by:378
Symbol 378 GraphicUses:377Used by:381
Symbol 379 BitmapUsed by:380
Symbol 380 GraphicUses:379Used by:381
Symbol 381 MovieClip {mc_panzer}Uses:378 380Used by:612
Symbol 382 BitmapUsed by:383 822
Symbol 383 GraphicUses:382Used by:386
Symbol 384 BitmapUsed by:385
Symbol 385 GraphicUses:384Used by:386
Symbol 386 MovieClip {mc_rider}Uses:383 385Used by:612
Symbol 387 ShapeTweeningUsed by:400
Symbol 388 BitmapUsed by:389
Symbol 389 GraphicUses:388Used by:400
Symbol 390 BitmapUsed by:391
Symbol 391 GraphicUses:390Used by:400
Symbol 392 BitmapUsed by:393
Symbol 393 GraphicUses:392Used by:400
Symbol 394 ShapeTweeningUsed by:400
Symbol 395 BitmapUsed by:396
Symbol 396 GraphicUses:395Used by:400
Symbol 397 BitmapUsed by:398
Symbol 398 GraphicUses:397Used by:400
Symbol 399 GraphicUsed by:400
Symbol 400 MovieClip {mc_bluesplashfx}Uses:387 389 391 393 394 396 398 399Used by:612
Symbol 401 ShapeTweeningUsed by:410
Symbol 402 BitmapUsed by:403
Symbol 403 GraphicUses:402Used by:410
Symbol 404 BitmapUsed by:405
Symbol 405 GraphicUses:404Used by:410
Symbol 406 ShapeTweeningUsed by:410
Symbol 407 BitmapUsed by:408
Symbol 408 GraphicUses:407Used by:410
Symbol 409 GraphicUsed by:410
Symbol 410 MovieClip {mc_electricsplashfx}Uses:401 403 405 406 408 409Used by:612
Symbol 411 ShapeTweeningUsed by:416
Symbol 412 ShapeTweeningUsed by:416
Symbol 413 ShapeTweeningUsed by:416
Symbol 414 ShapeTweeningUsed by:416
Symbol 415 GraphicUsed by:416
Symbol 416 MovieClip {mc_healthbar}Uses:411 412 413 414 415Used by:612
Symbol 417 GraphicUsed by:424
Symbol 418 GraphicUsed by:424
Symbol 419 GraphicUsed by:424
Symbol 420 GraphicUsed by:424
Symbol 421 GraphicUsed by:424
Symbol 422 GraphicUsed by:424
Symbol 423 GraphicUsed by:424
Symbol 424 MovieClip {mc_progress}Uses:417 418 419 420 421 422 423Used by:612
Symbol 425 ShapeTweeningUsed by:427
Symbol 426 ShapeTweeningUsed by:427
Symbol 427 MovieClip {mc_redsplashfx}Uses:425 239 241 243 426 246 248 249Used by:612
Symbol 428 BitmapUsed by:429
Symbol 429 GraphicUses:428Used by:430
Symbol 430 MovieClip {background1}Uses:429Used by:612
Symbol 431 GraphicUsed by:432
Symbol 432 MovieClip {mc_cover}Uses:431Used by:612
Symbol 433 BitmapUsed by:434
Symbol 434 GraphicUses:433Used by:560
Symbol 435 BitmapUsed by:436
Symbol 436 GraphicUses:435Used by:449
Symbol 437 GraphicUsed by:448
Symbol 438 GraphicUsed by:448
Symbol 439 GraphicUsed by:448
Symbol 440 GraphicUsed by:448
Symbol 441 GraphicUsed by:448
Symbol 442 GraphicUsed by:448
Symbol 443 GraphicUsed by:448
Symbol 444 GraphicUsed by:448
Symbol 445 GraphicUsed by:448
Symbol 446 GraphicUsed by:448
Symbol 447 GraphicUsed by:448
Symbol 448 MovieClipUses:437 438 439 440 441 442 443 444 445 446 447Used by:449
Symbol 449 MovieClip {windkingdom_armor_fla.iconspecialattack_67}Uses:436 448Used by:560
Symbol 450 BitmapUsed by:451
Symbol 451 GraphicUses:450Used by:454
Symbol 452 BitmapUsed by:453
Symbol 453 GraphicUses:452Used by:454
Symbol 454 MovieClipUses:451 453Used by:560
Symbol 455 BitmapUsed by:456
Symbol 456 GraphicUses:455Used by:459
Symbol 457 BitmapUsed by:458
Symbol 458 GraphicUses:457Used by:459
Symbol 459 MovieClipUses:456 458Used by:560
Symbol 460 BitmapUsed by:461
Symbol 461 GraphicUses:460Used by:464
Symbol 462 BitmapUsed by:463
Symbol 463 GraphicUses:462Used by:464
Symbol 464 MovieClipUses:461 463Used by:560
Symbol 465 BitmapUsed by:466
Symbol 466 GraphicUses:465Used by:469
Symbol 467 BitmapUsed by:468
Symbol 468 GraphicUses:467Used by:469
Symbol 469 MovieClipUses:466 468Used by:560
Symbol 470 BitmapUsed by:471
Symbol 471 GraphicUses:470Used by:474
Symbol 472 BitmapUsed by:473
Symbol 473 GraphicUses:472Used by:474
Symbol 474 MovieClipUses:471 473Used by:560
Symbol 475 BitmapUsed by:476
Symbol 476 GraphicUses:475Used by:479
Symbol 477 BitmapUsed by:478
Symbol 478 GraphicUses:477Used by:479
Symbol 479 MovieClipUses:476 478Used by:560
Symbol 480 BitmapUsed by:481
Symbol 481 GraphicUses:480Used by:484
Symbol 482 BitmapUsed by:483
Symbol 483 GraphicUses:482Used by:484
Symbol 484 MovieClipUses:481 483Used by:560
Symbol 485 BitmapUsed by:486
Symbol 486 GraphicUses:485Used by:489
Symbol 487 BitmapUsed by:488
Symbol 488 GraphicUses:487Used by:489
Symbol 489 MovieClipUses:486 488Used by:560
Symbol 490 BitmapUsed by:491
Symbol 491 GraphicUses:490Used by:494 497 500 503 506 509 512 515
Symbol 492 GraphicUsed by:494
Symbol 493 GraphicUsed by:494
Symbol 494 MovieClipUses:491 492 493Used by:560
Symbol 495 GraphicUsed by:497
Symbol 496 GraphicUsed by:497
Symbol 497 MovieClipUses:491 495 496Used by:560
Symbol 498 GraphicUsed by:500
Symbol 499 GraphicUsed by:500
Symbol 500 MovieClipUses:491 498 499Used by:560
Symbol 501 GraphicUsed by:503
Symbol 502 GraphicUsed by:503
Symbol 503 MovieClipUses:491 501 502Used by:560
Symbol 504 GraphicUsed by:506
Symbol 505 GraphicUsed by:506
Symbol 506 MovieClipUses:491 504 505Used by:560
Symbol 507 GraphicUsed by:509
Symbol 508 GraphicUsed by:509
Symbol 509 MovieClipUses:491 507 508Used by:560
Symbol 510 GraphicUsed by:512
Symbol 511 GraphicUsed by:512
Symbol 512 MovieClipUses:491 510 511Used by:560
Symbol 513 GraphicUsed by:515
Symbol 514 GraphicUsed by:515
Symbol 515 MovieClipUses:491 513 514Used by:560
Symbol 516 BitmapUsed by:517
Symbol 517 GraphicUses:516Used by:518
Symbol 518 ButtonUses:517Used by:560
Symbol 519 BitmapUsed by:520
Symbol 520 GraphicUses:519Used by:521
Symbol 521 ButtonUses:520Used by:560
Symbol 522 BitmapUsed by:523
Symbol 523 GraphicUses:522Used by:524
Symbol 524 ButtonUses:523Used by:560
Symbol 525 GraphicUsed by:531
Symbol 526 FontUsed by:527
Symbol 527 EditableTextUses:526Used by:531
Symbol 528 EditableTextUses:36Used by:531
Symbol 529 EditableTextUses:36Used by:531
Symbol 530 GraphicUsed by:531
Symbol 531 MovieClip {windkingdom_armor_fla.rightnote_88}Uses:525 527 528 529 530Used by:560
Symbol 532 GraphicUsed by:534
Symbol 533 ShapeTweeningUsed by:534
Symbol 534 MovieClip {windkingdom_armor_fla.health_89}Uses:532 533Used by:560
Symbol 535 ShapeTweeningUsed by:537
Symbol 536 GraphicUsed by:537
Symbol 537 MovieClipUses:535 536Used by:560
Symbol 538 BitmapUsed by:539
Symbol 539 GraphicUses:538Used by:560
Symbol 540 EditableTextUses:36Used by:560
Symbol 541 BitmapUsed by:542
Symbol 542 GraphicUses:541Used by:551
Symbol 543 BitmapUsed by:544
Symbol 544 GraphicUses:543Used by:551
Symbol 545 BitmapUsed by:546
Symbol 546 GraphicUses:545Used by:551
Symbol 547 BitmapUsed by:548
Symbol 548 GraphicUses:547Used by:551
Symbol 549 BitmapUsed by:550
Symbol 550 GraphicUses:549Used by:551
Symbol 551 MovieClipUses:542 544 546 548 550Used by:560
Symbol 552 EditableTextUses:145Used by:560
Symbol 553 EditableTextUses:36Used by:560
Symbol 554 BitmapUsed by:557
Symbol 555 BitmapUsed by:557
Symbol 556 BitmapUsed by:557
Symbol 557 GraphicUses:554 555 556Used by:560
Symbol 558 GraphicUsed by:559
Symbol 559 MovieClipUses:558Used by:560
Symbol 560 MovieClip {mc_levelpanel}Uses:434 449 454 459 464 469 474 479 484 489 494 497 500 503 506 509 512 515 518 521 524 531 534 537 539 540 551 552 553 557 559Used by:612
Symbol 561 GraphicUsed by:570
Symbol 562 GraphicUsed by:565
Symbol 563 GraphicUsed by:565
Symbol 564 GraphicUsed by:565
Symbol 565 ButtonUses:562 563 564Used by:570
Symbol 566 GraphicUsed by:569
Symbol 567 GraphicUsed by:569
Symbol 568 GraphicUsed by:569
Symbol 569 ButtonUses:566 567 568Used by:570
Symbol 570 MovieClip {mc_scroller}Uses:561 565 74 569Used by:612
Symbol 571 GraphicUsed by:572
Symbol 572 MovieClipUses:571Used by:581
Symbol 573 GraphicUsed by:574
Symbol 574 MovieClipUses:573Used by:581 795
Symbol 575 TextUses:145Used by:581
Symbol 576 TextUses:145Used by:581
Symbol 577 TextUses:145Used by:581
Symbol 578 TextUses:145Used by:581
Symbol 579 TextUses:145Used by:581
Symbol 580 TextUses:145Used by:581
Symbol 581 MovieClip {mc_tutorial}Uses:572 574 575 576 577 578 579 580Used by:612
Symbol 582 BitmapUsed by:583
Symbol 583 GraphicUses:582Used by:596
Symbol 584 TextUses:145Used by:596
Symbol 585 TextUses:145Used by:596
Symbol 586 TextUses:145Used by:596
Symbol 587 BitmapUsed by:588
Symbol 588 GraphicUses:587Used by:589
Symbol 589 MovieClipUses:588Used by:596
Symbol 590 BitmapUsed by:591
Symbol 591 GraphicUses:590Used by:592
Symbol 592 MovieClipUses:591Used by:596
Symbol 593 BitmapUsed by:594
Symbol 594 GraphicUses:593Used by:595
Symbol 595 MovieClipUses:594Used by:596
Symbol 596 MovieClip {paneloption}Uses:583 584 585 586 589 592 595 95Used by:612
Symbol 597 Sound {bgmintro}Used by:612
Symbol 598 Sound {bgmcover}Used by:612
Symbol 599 Sound {bgmstage}Used by:612
Symbol 600 SoundUsed by:612 637 640 643 646 649 727 753 756 759 762 765 768 771 792 892 943
Symbol 601 SoundUsed by:612 637 640 643 646 649 727 753 756 759 762 765 768 771 792 892 943
Symbol 602 Sound {sfxambient}Used by:612
Symbol 603 Sound {sfxcannonhit1}Used by:612
Symbol 604 Sound {sfxcannonhit2}Used by:612
Symbol 605 Sound {sfxcannonhit3}Used by:612
Symbol 606 Sound {sfxcannonshoot}Used by:612
Symbol 607 Sound {sfxplasmahit}Used by:612
Symbol 608 Sound {sfxplasmashoot}Used by:612
Symbol 609 Sound {sfxspecialattack}Used by:612
Symbol 610 Sound {sfxtest}Used by:612
Symbol 611 SoundUsed by:612 670 674 678 682 686 690 736 738 740 742 744 746 748 750
Symbol 612 MovieClip {windkingdom_armor_fla.mc_preload_dumper_11}Uses:149 150 157 174 183 196 201 214 221 272 292 298 304 312 315 318 321 328 333 337 341 350 363 376 381 386 400 410 416 424 427 430 432 560 570 581 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611Used by:Timeline
Symbol 613 GraphicUsed by:628
Symbol 614 GraphicUsed by:628
Symbol 615 GraphicUsed by:628
Symbol 616 SoundUsed by:628
Symbol 617 SoundUsed by:628
Symbol 618 GraphicUsed by:628
Symbol 619 GraphicUsed by:620
Symbol 620 MovieClipUses:619Used by:628
Symbol 621 SoundUsed by:628
Symbol 622 SoundUsed by:628
Symbol 623 SoundUsed by:628
Symbol 624 GraphicUsed by:625
Symbol 625 ButtonUses:624Used by:628
Symbol 626 SoundUsed by:628
Symbol 627 SoundUsed by:628
Symbol 628 MovieClip {windkingdom_armor_fla.ag_intro_mc_114}Uses:613 614 615 616 617 618 620 621 622 623 625 626 627Used by:Timeline
Symbol 629 BitmapUsed by:630
Symbol 630 GraphicUses:629Used by:631
Symbol 631 MovieClipUses:630Used by:Timeline
Symbol 632 BitmapUsed by:633
Symbol 633 GraphicUses:632Used by:637 640 643 646 649
Symbol 634 TextUses:145Used by:637
Symbol 635 TextUses:145Used by:637
Symbol 636 GraphicUsed by:637 640 643 646 649
Symbol 637 ButtonUses:633 634 635 636 600 601Used by:Timeline
Symbol 638 TextUses:145Used by:640
Symbol 639 TextUses:145Used by:640
Symbol 640 ButtonUses:633 638 639 636 600 601Used by:Timeline
Symbol 641 TextUses:145Used by:643
Symbol 642 TextUses:145Used by:643
Symbol 643 ButtonUses:633 641 642 636 600 601Used by:Timeline
Symbol 644 TextUses:145Used by:646
Symbol 645 TextUses:145Used by:646
Symbol 646 ButtonUses:633 644 645 636 600 601Used by:Timeline
Symbol 647 TextUses:145Used by:649
Symbol 648 TextUses:145Used by:649
Symbol 649 ButtonUses:633 647 648 636 600 601Used by:Timeline
Symbol 650 BitmapUsed by:651
Symbol 651 GraphicUses:650Used by:652
Symbol 652 ButtonUses:651Used by:Timeline
Symbol 653 BitmapUsed by:654
Symbol 654 GraphicUses:653Used by:655
Symbol 655 MovieClipUses:654Used by:Timeline
Symbol 656 TextUses:145Used by:Timeline
Symbol 657 GraphicUsed by:Timeline
Symbol 658 TextUses:136 134Used by:722
Symbol 659 BitmapUsed by:661 666 698 703 708 713 718
Symbol 660 BitmapUsed by:661 698 703 708 713 718
Symbol 661 GraphicUses:659 660Used by:722
Symbol 662 FontUsed by:663 665 699 704 709 714 719
Symbol 663 TextUses:662Used by:665
Symbol 664 TextUsed by:665
Symbol 665 MovieClipUses:662 663 664Used by:722
Symbol 666 GraphicUses:659Used by:670 674 678 682 686 690
Symbol 667 TextUses:145Used by:670
Symbol 668 TextUses:145Used by:670
Symbol 669 TextUses:145Used by:670
Symbol 670 ButtonUses:666 667 668 669 611Used by:722
Symbol 671 TextUses:145Used by:674
Symbol 672 TextUses:145Used by:674
Symbol 673 TextUses:145Used by:674
Symbol 674 ButtonUses:666 671 672 673 611Used by:722
Symbol 675 TextUses:145Used by:678
Symbol 676 TextUses:145Used by:678
Symbol 677 TextUses:145Used by:678
Symbol 678 ButtonUses:666 675 676 677 611Used by:722
Symbol 679 TextUses:145Used by:682
Symbol 680 TextUses:145Used by:682
Symbol 681 TextUses:145Used by:682
Symbol 682 ButtonUses:666 679 680 681 611Used by:722
Symbol 683 TextUses:145Used by:686
Symbol 684 TextUses:145Used by:686
Symbol 685 TextUses:145Used by:686
Symbol 686 ButtonUses:666 683 684 685 611Used by:722
Symbol 687 TextUses:145Used by:690
Symbol 688 TextUses:145Used by:690
Symbol 689 TextUses:145Used by:690
Symbol 690 ButtonUses:666 687 688 689 611Used by:722
Symbol 691 TextUses:136Used by:722
Symbol 692 TextUses:134Used by:722
Symbol 693 TextUses:136Used by:722
Symbol 694 TextUses:134Used by:722
Symbol 695 TextUses:136Used by:722
Symbol 696 TextUses:134Used by:722
Symbol 697 TextUses:136Used by:722
Symbol 698 GraphicUses:659 660Used by:722
Symbol 699 TextUses:662Used by:701
Symbol 700 TextUsed by:701
Symbol 701 MovieClipUses:699 700Used by:722
Symbol 702 TextUses:136 134Used by:722
Symbol 703 GraphicUses:659 660Used by:722
Symbol 704 TextUses:662Used by:706
Symbol 705 TextUsed by:706
Symbol 706 MovieClipUses:704 705Used by:722
Symbol 707 TextUses:136 134Used by:722
Symbol 708 GraphicUses:659 660Used by:722
Symbol 709 TextUses:662Used by:711
Symbol 710 TextUsed by:711
Symbol 711 MovieClipUses:709 710Used by:722
Symbol 712 TextUses:136 134Used by:722
Symbol 713 GraphicUses:659 660Used by:722
Symbol 714 TextUses:662Used by:716
Symbol 715 TextUsed by:716
Symbol 716 MovieClipUses:714 715Used by:722
Symbol 717 TextUses:136 134Used by:722
Symbol 718 GraphicUses:659 660Used by:722
Symbol 719 TextUses:662Used by:721
Symbol 720 TextUsed by:721
Symbol 721 MovieClipUses:719 720Used by:722
Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125}Uses:658 661 665 670 674 678 682 686 690 691 692 693 694 695 696 697 698 701 702 703 706 707 708 711 712 713 716 717 718 721Used by:Timeline
Symbol 723 BitmapUsed by:724
Symbol 724 GraphicUses:723Used by:727 753 756 759 762 765 768 771 792 892 943
Symbol 725 TextUses:145Used by:727
Symbol 726 TextUses:145Used by:727
Symbol 727 ButtonUses:724 725 726 600 601Used by:Timeline
Symbol 728 BitmapUsed by:729 772 997
Symbol 729 GraphicUses:728Used by:Timeline
Symbol 730 TextUses:145Used by:Timeline
Symbol 731 BitmapUsed by:732
Symbol 732 GraphicUses:731Used by:736 738 740 742 744 746 748 750
Symbol 733 FontUsed by:734 737 739 741 743 745 747 749 774 775 776 777 778 779 780 781 782 783 785 787
Symbol 734 TextUses:733Used by:736
Symbol 735 GraphicUsed by:736 738 740 742 744 746 748 750
Symbol 736 ButtonUses:732 734 735 611Used by:Timeline
Symbol 737 TextUses:733Used by:738
Symbol 738 ButtonUses:732 737 735 611Used by:Timeline
Symbol 739 TextUses:733Used by:740
Symbol 740 ButtonUses:732 739 735 611Used by:Timeline
Symbol 741 TextUses:733Used by:742
Symbol 742 ButtonUses:732 741 735 611Used by:Timeline
Symbol 743 TextUses:733Used by:744
Symbol 744 ButtonUses:732 743 735 611Used by:Timeline
Symbol 745 TextUses:733Used by:746
Symbol 746 ButtonUses:732 745 735 611Used by:Timeline
Symbol 747 TextUses:733Used by:748
Symbol 748 ButtonUses:732 747 735 611Used by:Timeline
Symbol 749 TextUses:733Used by:750
Symbol 750 ButtonUses:732 749 735 611Used by:Timeline
Symbol 751 TextUses:145Used by:753
Symbol 752 TextUses:145Used by:753
Symbol 753 ButtonUses:724 751 752 600 601Used by:Timeline
Symbol 754 TextUses:145Used by:756
Symbol 755 TextUses:145Used by:756
Symbol 756 ButtonUses:724 754 755 600 601Used by:Timeline
Symbol 757 TextUses:145Used by:759
Symbol 758 TextUses:145Used by:759
Symbol 759 ButtonUses:724 757 758 600 601Used by:Timeline
Symbol 760 TextUses:145Used by:762
Symbol 761 TextUses:145Used by:762
Symbol 762 ButtonUses:724 760 761 600 601Used by:Timeline
Symbol 763 TextUses:145Used by:765
Symbol 764 TextUses:145Used by:765
Symbol 765 ButtonUses:724 763 764 600 601Used by:Timeline
Symbol 766 TextUses:145Used by:768
Symbol 767 TextUses:145Used by:768
Symbol 768 ButtonUses:724 766 767 600 601Used by:Timeline
Symbol 769 TextUses:145Used by:771
Symbol 770 TextUses:145Used by:771
Symbol 771 ButtonUses:724 769 770 600 601Used by:Timeline
Symbol 772 GraphicUses:728Used by:789
Symbol 773 FontUsed by:774 776 778 780 782 784 786 788
Symbol 774 TextUses:733 773Used by:789
Symbol 775 TextUses:733Used by:789
Symbol 776 TextUses:773 733Used by:789
Symbol 777 TextUses:733Used by:789
Symbol 778 TextUses:773 733Used by:789
Symbol 779 TextUses:733Used by:789
Symbol 780 TextUses:773 733Used by:789
Symbol 781 TextUses:733Used by:789
Symbol 782 TextUses:773 733Used by:789
Symbol 783 TextUses:733Used by:789
Symbol 784 TextUses:773Used by:789
Symbol 785 TextUses:733Used by:789
Symbol 786 TextUses:773Used by:789
Symbol 787 TextUses:733Used by:789
Symbol 788 TextUses:773Used by:789
Symbol 789 MovieClipUses:772 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788Used by:Timeline
Symbol 790 TextUses:145Used by:792
Symbol 791 TextUses:145Used by:792
Symbol 792 ButtonUses:724 790 791 600 601Used by:Timeline
Symbol 793 GraphicUsed by:795
Symbol 794 TextUses:145Used by:795
Symbol 795 MovieClip {windkingdom_armor_fla.mc_tutorialskills_150}Uses:793 574 794Used by:Timeline
Symbol 796 TextUses:145Used by:Timeline
Symbol 797 TextUses:134Used by:Timeline
Symbol 798 TextUses:145Used by:Timeline
Symbol 799 TextUses:134Used by:Timeline
Symbol 800 TextUses:134Used by:Timeline
Symbol 801 TextUses:145Used by:Timeline
Symbol 802 GraphicUsed by:Timeline
Symbol 803 TextUses:134Used by:Timeline
Symbol 804 EditableTextUses:134 136Used by:Timeline
Symbol 805 FontUsed by:806 808 906
Symbol 806 TextUses:805Used by:807
Symbol 807 MovieClipUses:806Used by:810
Symbol 808 TextUses:805Used by:809
Symbol 809 MovieClipUses:808Used by:810
Symbol 810 MovieClip {windkingdom_armor_fla.upgradewarning_151}Uses:807 809Used by:Timeline
Symbol 811 GraphicUsed by:821 827 830 832 835 838 841
Symbol 812 BitmapUsed by:813
Symbol 813 GraphicUses:812Used by:821
Symbol 814 GraphicUsed by:815
Symbol 815 MovieClipUses:814Used by:821 823 825 827 830 832 835 838 841 848 850 853 855
Symbol 816 GraphicUsed by:821 823 825 827 830 832 835 838 841
Symbol 817 GraphicUsed by:821 823 825 827 830 832 835 838 841
Symbol 818 GraphicUsed by:821 823 825 827 830 832 835 838 841
Symbol 819 GraphicUsed by:821 823 825 827 830 832 835 838 841
Symbol 820 GraphicUsed by:821 823 825 827 830 832 835 838 841
Symbol 821 MovieClip {windkingdom_armor_fla.btupgradecastle_154}Uses:811 813 815 816 817 818 819 820Used by:Timeline
Symbol 822 GraphicUses:382Used by:823
Symbol 823 MovieClip {windkingdom_armor_fla.btupgraderider_156}Uses:822 815 816 817 818 819 820Used by:Timeline
Symbol 824 GraphicUses:342Used by:825
Symbol 825 MovieClip {windkingdom_armor_fla.btupgradecopter_157}Uses:824 815 816 817 818 819 820Used by:Timeline
Symbol 826 GraphicUsed by:827 830 832 835 838 841 853 855
Symbol 827 MovieClip {windkingdom_armor_fla.btupgradeeagle_158}Uses:826 811 365 815 816 817 818 819 820Used by:Timeline
Symbol 828 BitmapUsed by:829
Symbol 829 GraphicUses:828Used by:830
Symbol 830 MovieClip {windkingdom_armor_fla.btupgradepanzer_159}Uses:826 811 829 815 816 817 818 819 820Used by:Timeline
Symbol 831 GraphicUses:353Used by:832
Symbol 832 MovieClip {windkingdom_armor_fla.btupgradedragon_160}Uses:826 811 831 815 816 817 818 819 820Used by:Timeline
Symbol 833 BitmapUsed by:834
Symbol 834 GraphicUses:833Used by:835
Symbol 835 MovieClip {windkingdom_armor_fla.btupgradeiceturret_161}Uses:826 811 834 815 816 817 818 819 820Used by:Timeline
Symbol 836 BitmapUsed by:837 849
Symbol 837 GraphicUses:836Used by:838
Symbol 838 MovieClip {windkingdom_armor_fla.btupgradefireturret_162}Uses:826 811 837 815 816 817 818 819 820Used by:Timeline
Symbol 839 BitmapUsed by:840
Symbol 840 GraphicUses:839Used by:841
Symbol 841 MovieClip {windkingdom_armor_fla.btupgradethunderturret_163}Uses:826 811 840 815 816 817 818 819 820Used by:Timeline
Symbol 842 GraphicUses:342Used by:848
Symbol 843 GraphicUsed by:848 850 853 855
Symbol 844 GraphicUsed by:848 850 853 855
Symbol 845 GraphicUsed by:848 850 853 855
Symbol 846 GraphicUsed by:848 850 853 855
Symbol 847 GraphicUsed by:848 850 853 855
Symbol 848 MovieClip {windkingdom_armor_fla.btupgradeunitcreatetime_164}Uses:842 815 843 844 845 846 847Used by:Timeline
Symbol 849 GraphicUses:836Used by:850
Symbol 850 MovieClip {windkingdom_armor_fla.btupgradeturretcreatetime_165}Uses:849 815 843 844 845 846 847Used by:Timeline
Symbol 851 GraphicUsed by:853 855
Symbol 852 GraphicUsed by:853
Symbol 853 MovieClip {windkingdom_armor_fla.btupgrademanaregeneratetime_166}Uses:826 851 852 815 843 844 845 846 847Used by:Timeline
Symbol 854 GraphicUsed by:855
Symbol 855 MovieClip {windkingdom_armor_fla.btupgradeinitialmanabank_167}Uses:826 851 854 815 843 844 845 846 847Used by:Timeline
Symbol 856 BitmapUsed by:857
Symbol 857 GraphicUses:856Used by:887
Symbol 858 FontUsed by:859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974
Symbol 859 EditableTextUses:858Used by:887
Symbol 860 TextUses:858Used by:887
Symbol 861 TextUses:858Used by:887
Symbol 862 TextUses:858Used by:887
Symbol 863 TextUses:858Used by:887
Symbol 864 TextUses:858Used by:887
Symbol 865 TextUses:858Used by:887
Symbol 866 TextUses:858Used by:887
Symbol 867 TextUses:858Used by:887
Symbol 868 TextUses:858Used by:887
Symbol 869 TextUses:858Used by:887
Symbol 870 TextUses:858Used by:887
Symbol 871 TextUses:858Used by:887
Symbol 872 TextUses:858Used by:887
Symbol 873 TextUses:858Used by:887
Symbol 874 TextUses:858Used by:887
Symbol 875 TextUses:858Used by:887
Symbol 876 TextUses:858Used by:887
Symbol 877 TextUses:858Used by:887
Symbol 878 TextUses:858Used by:887
Symbol 879 TextUses:858Used by:887
Symbol 880 TextUses:858Used by:887
Symbol 881 TextUses:858Used by:887
Symbol 882 TextUses:858Used by:887
Symbol 883 TextUses:858Used by:887
Symbol 884 TextUses:858Used by:887
Symbol 885 TextUses:858Used by:887
Symbol 886 TextUses:858Used by:887
Symbol 887 MovieClip {windkingdom_armor_fla.panelnote_168}Uses:857 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886Used by:Timeline
Symbol 888 TextUses:145Used by:Timeline
Symbol 889 GraphicUsed by:Timeline
Symbol 890 TextUses:145Used by:892
Symbol 891 TextUses:145Used by:892
Symbol 892 ButtonUses:724 890 891 600 601Used by:Timeline
Symbol 893 TextUses:134Used by:Timeline
Symbol 894 EditableTextUses:145Used by:Timeline
Symbol 895 EditableTextUses:145Used by:Timeline
Symbol 896 EditableTextUses:145Used by:Timeline
Symbol 897 EditableTextUses:145Used by:Timeline
Symbol 898 EditableTextUses:145Used by:Timeline
Symbol 899 EditableTextUses:145Used by:Timeline
Symbol 900 EditableTextUses:145Used by:Timeline
Symbol 901 EditableTextUses:145Used by:Timeline
Symbol 902 EditableTextUses:145Used by:Timeline
Symbol 903 TextUses:145Used by:Timeline
Symbol 904 TextUses:145Used by:Timeline
Symbol 905 GraphicUsed by:939 975 993
Symbol 906 TextUses:805Used by:939 975 993
Symbol 907 TextUses:134Used by:939 975 993
Symbol 908 TextUses:134Used by:939 975 993
Symbol 909 TextUses:134Used by:939 975 993
Symbol 910 TextUses:134Used by:939 975 993
Symbol 911 TextUses:134Used by:939 975 993
Symbol 912 TextUses:134Used by:939 975 993
Symbol 913 TextUses:134Used by:939 975 993
Symbol 914 TextUses:134Used by:939 975 993
Symbol 915 TextUses:134Used by:939 975 993
Symbol 916 TextUses:134Used by:939 975 993
Symbol 917 TextUses:134Used by:939 975 993
Symbol 918 TextUses:134Used by:939 975 993
Symbol 919 TextUses:134Used by:939 975 993
Symbol 920 TextUses:134Used by:939 975 993
Symbol 921 TextUses:134Used by:939 975 993
Symbol 922 EditableTextUses:136Used by:939
Symbol 923 EditableTextUses:136Used by:939
Symbol 924 EditableTextUses:136Used by:939
Symbol 925 EditableTextUses:136Used by:939
Symbol 926 EditableTextUses:136Used by:939
Symbol 927 EditableTextUses:136Used by:939
Symbol 928 EditableTextUses:136Used by:939
Symbol 929 EditableTextUses:136Used by:939
Symbol 930 EditableTextUses:136Used by:939
Symbol 931 EditableTextUses:136Used by:939
Symbol 932 EditableTextUses:136Used by:939
Symbol 933 EditableTextUses:136Used by:939
Symbol 934 EditableTextUses:136Used by:939
Symbol 935 EditableTextUses:136Used by:939
Symbol 936 EditableTextUses:136Used by:939
Symbol 937 TextUses:136Used by:939 975 993
Symbol 938 EditableTextUses:136Used by:939
Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170}Uses:905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938Used by:Timeline
Symbol 940 TextUses:134Used by:Timeline
Symbol 941 TextUses:145Used by:943
Symbol 942 TextUses:145Used by:943
Symbol 943 ButtonUses:724 941 942 600 601Used by:Timeline
Symbol 944 EditableTextUses:136Used by:975
Symbol 945 EditableTextUses:136Used by:975
Symbol 946 EditableTextUses:136Used by:975
Symbol 947 EditableTextUses:136Used by:975
Symbol 948 EditableTextUses:136Used by:975
Symbol 949 EditableTextUses:136Used by:975
Symbol 950 EditableTextUses:136Used by:975
Symbol 951 EditableTextUses:136Used by:975
Symbol 952 EditableTextUses:136Used by:975
Symbol 953 EditableTextUses:136Used by:975
Symbol 954 EditableTextUses:136Used by:975
Symbol 955 EditableTextUses:136Used by:975
Symbol 956 EditableTextUses:136Used by:975
Symbol 957 EditableTextUses:136Used by:975
Symbol 958 EditableTextUses:136Used by:975
Symbol 959 EditableTextUses:136Used by:975
Symbol 960 TextUses:858Used by:975 993
Symbol 961 TextUses:858Used by:975 993
Symbol 962 TextUses:858Used by:975 993
Symbol 963 TextUses:858Used by:975 993
Symbol 964 TextUses:858Used by:975 993
Symbol 965 TextUses:858Used by:975 993
Symbol 966 TextUses:858Used by:975 993
Symbol 967 TextUses:858Used by:975 993
Symbol 968 TextUses:858Used by:975 993
Symbol 969 TextUses:858Used by:975 993
Symbol 970 TextUses:858Used by:975 993
Symbol 971 TextUses:858Used by:975 993
Symbol 972 TextUses:858Used by:975 993
Symbol 973 TextUses:858Used by:975 993
Symbol 974 TextUses:858Used by:975
Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172}Uses:905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 937 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974Used by:Timeline
Symbol 976 TextUses:134Used by:Timeline
Symbol 977 EditableTextUses:136Used by:993
Symbol 978 EditableTextUses:136Used by:993
Symbol 979 EditableTextUses:136Used by:993
Symbol 980 EditableTextUses:136Used by:993
Symbol 981 EditableTextUses:136Used by:993
Symbol 982 EditableTextUses:136Used by:993
Symbol 983 EditableTextUses:136Used by:993
Symbol 984 EditableTextUses:136Used by:993
Symbol 985 EditableTextUses:136Used by:993
Symbol 986 EditableTextUses:136Used by:993
Symbol 987 EditableTextUses:136Used by:993
Symbol 988 EditableTextUses:136Used by:993
Symbol 989 EditableTextUses:136Used by:993
Symbol 990 EditableTextUses:136Used by:993
Symbol 991 EditableTextUses:136Used by:993
Symbol 992 EditableTextUses:136Used by:993
Symbol 993 MovieClip {windkingdom_armor_fla.result_173}Uses:905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 937 992 960 961 962 963 964 965 966 967 968 969 970 971 972 973Used by:Timeline
Symbol 994 TextUses:134Used by:Timeline
Symbol 995 TextUses:145Used by:Timeline
Symbol 996 GraphicUsed by:Timeline
Symbol 997 GraphicUses:728Used by:Timeline
Symbol 998 TextUses:136 134Used by:Timeline

Instance Names

"armorbtn"Frame 1Symbol 100 Button
"artbtn"Frame 1Symbol 102 MovieClip
"adsbtn"Frame 1Symbol 133 MovieClip {windkingdom_armor_fla.armor_promo_3}
"mcpreloader"Frame 1Symbol 144 MovieClip {windkingdom_armor_fla.mcpreloaderBar_9}
"playbtn"Frame 2Symbol 148 Button
"mc_armor"Frame 3Symbol 628 MovieClip {windkingdom_armor_fla.ag_intro_mc_114}
"btloadgame"Frame 6Symbol 637 Button
"btplay"Frame 6Symbol 640 Button
"btaddgame"Frame 6Symbol 643 Button
"btplaymore"Frame 6Symbol 646 Button
"btcredit"Frame 6Symbol 649 Button
"btarmor"Frame 6Symbol 652 Button
"instructionnote"Frame 14Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125}
"btcancel"Frame 14Symbol 727 Button
"btday1"Frame 24Symbol 736 Button
"btday2"Frame 24Symbol 738 Button
"btday3"Frame 24Symbol 740 Button
"btday4"Frame 24Symbol 742 Button
"btday5"Frame 24Symbol 744 Button
"btday6"Frame 24Symbol 746 Button
"btday7"Frame 24Symbol 748 Button
"btday8"Frame 24Symbol 750 Button
"btplay"Frame 24Symbol 753 Button
"btloadgame"Frame 24Symbol 756 Button
"btsavegame"Frame 24Symbol 759 Button
"btplaymore"Frame 24Symbol 762 Button
"btupgrade"Frame 24Symbol 765 Button
"btstatistics"Frame 24Symbol 768 Button
"btinstructions"Frame 24Symbol 771 Button
"levelnote"Frame 24Symbol 789 MovieClip
"btmainmenu"Frame 24Symbol 792 Button
"tutorial_mc"Frame 24Symbol 795 MovieClip {windkingdom_armor_fla.mc_tutorialskills_150}
"btcancel"Frame 34Symbol 727 Button
"ep"Frame 64Symbol 804 EditableText
"upgradewarning"Frame 64Symbol 810 MovieClip {windkingdom_armor_fla.upgradewarning_151}
"btupgradecastle"Frame 64Symbol 821 MovieClip {windkingdom_armor_fla.btupgradecastle_154}
"btupgraderider"Frame 64Symbol 823 MovieClip {windkingdom_armor_fla.btupgraderider_156}
"btupgradecopter"Frame 64Symbol 825 MovieClip {windkingdom_armor_fla.btupgradecopter_157}
"btupgradeeagle"Frame 64Symbol 827 MovieClip {windkingdom_armor_fla.btupgradeeagle_158}
"btupgradepanzer"Frame 64Symbol 830 MovieClip {windkingdom_armor_fla.btupgradepanzer_159}
"btupgradedragon"Frame 64Symbol 832 MovieClip {windkingdom_armor_fla.btupgradedragon_160}
"btupgradeiceturret"Frame 64Symbol 835 MovieClip {windkingdom_armor_fla.btupgradeiceturret_161}
"btupgradefireturret"Frame 64Symbol 838 MovieClip {windkingdom_armor_fla.btupgradefireturret_162}
"btupgradethunderturret"Frame 64Symbol 841 MovieClip {windkingdom_armor_fla.btupgradethunderturret_163}
"btupgradeunitcreatetime"Frame 64Symbol 848 MovieClip {windkingdom_armor_fla.btupgradeunitcreatetime_164}
"btupgradeturretcreatetime"Frame 64Symbol 850 MovieClip {windkingdom_armor_fla.btupgradeturretcreatetime_165}
"btupgrademanaregeneratetime"Frame 64Symbol 853 MovieClip {windkingdom_armor_fla.btupgrademanaregeneratetime_166}
"btupgradeinitialmanabank"Frame 64Symbol 855 MovieClip {windkingdom_armor_fla.btupgradeinitialmanabank_167}
"panelnote"Frame 64Symbol 887 MovieClip {windkingdom_armor_fla.panelnote_168}
"btcancel"Frame 74Symbol 892 Button
"txt1"Frame 74Symbol 894 EditableText
"txt2"Frame 74Symbol 895 EditableText
"txt3"Frame 74Symbol 896 EditableText
"txt4"Frame 74Symbol 897 EditableText
"txt5"Frame 74Symbol 898 EditableText
"txt6"Frame 74Symbol 899 EditableText
"txt7"Frame 74Symbol 900 EditableText
"txt8"Frame 74Symbol 901 EditableText
"txt9"Frame 74Symbol 902 EditableText
"btcancel"Frame 94Symbol 727 Button
"result"Frame 94Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170}
"btcancel"Frame 104Symbol 943 Button
"result"Frame 104Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172}
"result"Frame 114Symbol 993 MovieClip {windkingdom_armor_fla.result_173}
"btcancel"Frame 114Symbol 727 Button
"btyes"Symbol 9 MovieClip {panelconfirm} Frame 1Symbol 5 Button
"btcancel"Symbol 9 MovieClip {panelconfirm} Frame 1Symbol 8 Button {btno}
"mana"Symbol 55 MovieClip {mc_levelnote} Frame 1Symbol 38 EditableText
"btcreateturret2"Symbol 75 MovieClip {mc_turretlayer} Frame 1Symbol 74 Button
"btcreateturret1"Symbol 75 MovieClip {mc_turretlayer} Frame 1Symbol 74 Button
"btcreateturret4"Symbol 75 MovieClip {mc_turretlayer} Frame 1Symbol 74 Button
"btcreateturret3"Symbol 75 MovieClip {mc_turretlayer} Frame 1Symbol 74 Button
"c1"Symbol 251 MovieClip {windkingdom_armor_fla.lv1_21} Frame 1Symbol 229 MovieClip
"c2"Symbol 251 MovieClip {windkingdom_armor_fla.lv1_21} Frame 1Symbol 229 MovieClip
"c1"Symbol 262 MovieClip {windkingdom_armor_fla.lv2_30} Frame 1Symbol 229 MovieClip
"c2"Symbol 262 MovieClip {windkingdom_armor_fla.lv2_30} Frame 1Symbol 229 MovieClip
"c3"Symbol 262 MovieClip {windkingdom_armor_fla.lv2_30} Frame 1Symbol 229 MovieClip
"c1"Symbol 268 MovieClip {windkingdom_armor_fla.lv3_32} Frame 1Symbol 229 MovieClip
"c2"Symbol 268 MovieClip {windkingdom_armor_fla.lv3_32} Frame 1Symbol 229 MovieClip
"c3"Symbol 268 MovieClip {windkingdom_armor_fla.lv3_32} Frame 1Symbol 229 MovieClip
"c4"Symbol 268 MovieClip {windkingdom_armor_fla.lv3_32} Frame 1Symbol 229 MovieClip
"c5"Symbol 268 MovieClip {windkingdom_armor_fla.lv3_32} Frame 1Symbol 229 MovieClip
"castle"Symbol 272 MovieClip {mc_castle} Frame 1Symbol 251 MovieClip {windkingdom_armor_fla.lv1_21}
"d1"Symbol 272 MovieClip {mc_castle} Frame 1Symbol 253 MovieClip
"repairer"Symbol 272 MovieClip {mc_castle} Frame 1Symbol 256 MovieClip
"castle"Symbol 272 MovieClip {mc_castle} Frame 2Symbol 262 MovieClip {windkingdom_armor_fla.lv2_30}
"castle"Symbol 272 MovieClip {mc_castle} Frame 3Symbol 268 MovieClip {windkingdom_armor_fla.lv3_32}
"powermeter"Symbol 449 MovieClip {windkingdom_armor_fla.iconspecialattack_67} Frame 1Symbol 448 MovieClip
"txt1"Symbol 531 MovieClip {windkingdom_armor_fla.rightnote_88} Frame 1Symbol 527 EditableText
"txt2"Symbol 531 MovieClip {windkingdom_armor_fla.rightnote_88} Frame 1Symbol 528 EditableText
"txt3"Symbol 531 MovieClip {windkingdom_armor_fla.rightnote_88} Frame 1Symbol 529 EditableText
"iconspecialattack"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 449 MovieClip {windkingdom_armor_fla.iconspecialattack_67}
"iconrider"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 454 MovieClip
"iconcopter"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 459 MovieClip
"iconeagle"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 464 MovieClip
"iconpanzer"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 469 MovieClip
"icondragon"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 474 MovieClip
"iconiceturret"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 479 MovieClip
"iconfireturret"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 484 MovieClip
"iconthunderturret"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 489 MovieClip
"iconupgraderange"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 494 MovieClip
"iconupgradehealth"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 497 MovieClip
"iconupgradepower"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 500 MovieClip
"iconupgradeattack"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 503 MovieClip
"iconupgradedefense"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 506 MovieClip
"iconrepair"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 509 MovieClip
"iconheal"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 512 MovieClip
"iconupgrademana"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 515 MovieClip
"btquitlevel"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 518 Button
"btplaymore"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 521 Button
"btoption"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 524 Button
"rightnote"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 531 MovieClip {windkingdom_armor_fla.rightnote_88}
"rightnote2"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 531 MovieClip {windkingdom_armor_fla.rightnote_88}
"manalevel"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 534 MovieClip {windkingdom_armor_fla.health_89}
"healthlevel"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 534 MovieClip {windkingdom_armor_fla.health_89}
"progresslevel"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 534 MovieClip {windkingdom_armor_fla.health_89}
"leftbalancelevel"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 537 MovieClip
"rightbalancelevel"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 537 MovieClip
"note"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 540 EditableText
"queue1"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 551 MovieClip
"queue2"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 551 MovieClip
"queue3"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 551 MovieClip
"queue4"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 551 MovieClip
"queue5"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 551 MovieClip
"queue6"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 551 MovieClip
"manapoint"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 553 EditableText
"gameshadow"Symbol 560 MovieClip {mc_levelpanel} Frame 1Symbol 559 MovieClip
"upscroller"Symbol 570 MovieClip {mc_scroller} Frame 1Symbol 565 Button
"btcreateunitright"Symbol 570 MovieClip {mc_scroller} Frame 1Symbol 74 Button
"btcreateunitleft"Symbol 570 MovieClip {mc_scroller} Frame 1Symbol 74 Button
"downscroller"Symbol 570 MovieClip {mc_scroller} Frame 1Symbol 569 Button
"btplaymore"Symbol 596 MovieClip {paneloption} Frame 1Symbol 589 MovieClip
"btquitlevel"Symbol 596 MovieClip {paneloption} Frame 1Symbol 592 MovieClip
"btresumegame"Symbol 596 MovieClip {paneloption} Frame 1Symbol 595 MovieClip
"sfxvol"Symbol 596 MovieClip {paneloption} Frame 1Symbol 95 MovieClip {fl.controls.Slider}
"bgmvol"Symbol 596 MovieClip {paneloption} Frame 1Symbol 95 MovieClip {fl.controls.Slider}
"quality"Symbol 596 MovieClip {paneloption} Frame 1Symbol 95 MovieClip {fl.controls.Slider}
"btshortcuts"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 1Symbol 670 Button
"btunits"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 1Symbol 674 Button
"btexp"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 1Symbol 678 Button
"btbattle"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 1Symbol 682 Button
"btupgrade"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 1Symbol 686 Button
"btgameplay"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 1Symbol 690 Button
"locker"Symbol 821 MovieClip {windkingdom_armor_fla.btupgradecastle_154} Frame 1Symbol 815 MovieClip
"locker"Symbol 823 MovieClip {windkingdom_armor_fla.btupgraderider_156} Frame 1Symbol 815 MovieClip
"locker"Symbol 825 MovieClip {windkingdom_armor_fla.btupgradecopter_157} Frame 1Symbol 815 MovieClip
"locker"Symbol 827 MovieClip {windkingdom_armor_fla.btupgradeeagle_158} Frame 1Symbol 815 MovieClip
"locker"Symbol 830 MovieClip {windkingdom_armor_fla.btupgradepanzer_159} Frame 1Symbol 815 MovieClip
"locker"Symbol 832 MovieClip {windkingdom_armor_fla.btupgradedragon_160} Frame 1Symbol 815 MovieClip
"locker"Symbol 835 MovieClip {windkingdom_armor_fla.btupgradeiceturret_161} Frame 1Symbol 815 MovieClip
"locker"Symbol 838 MovieClip {windkingdom_armor_fla.btupgradefireturret_162} Frame 1Symbol 815 MovieClip
"locker"Symbol 841 MovieClip {windkingdom_armor_fla.btupgradethunderturret_163} Frame 1Symbol 815 MovieClip
"locker"Symbol 848 MovieClip {windkingdom_armor_fla.btupgradeunitcreatetime_164} Frame 1Symbol 815 MovieClip
"locker"Symbol 850 MovieClip {windkingdom_armor_fla.btupgradeturretcreatetime_165} Frame 1Symbol 815 MovieClip
"locker"Symbol 853 MovieClip {windkingdom_armor_fla.btupgrademanaregeneratetime_166} Frame 1Symbol 815 MovieClip
"locker"Symbol 855 MovieClip {windkingdom_armor_fla.btupgradeinitialmanabank_167} Frame 1Symbol 815 MovieClip
"ep"Symbol 887 MovieClip {windkingdom_armor_fla.panelnote_168} Frame 1Symbol 859 EditableText
"txt1"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 922 EditableText
"txt2"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 923 EditableText
"txt3"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 924 EditableText
"txt4"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 925 EditableText
"txt6"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 926 EditableText
"txt5"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 927 EditableText
"txt7"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 928 EditableText
"txt8"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 929 EditableText
"txt9"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 930 EditableText
"txt10"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 931 EditableText
"txt11"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 932 EditableText
"txt12"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 933 EditableText
"txt14"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 934 EditableText
"txt13"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 935 EditableText
"txt15"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 936 EditableText
"txt16"Symbol 939 MovieClip {windkingdom_armor_fla.result_quit_170} Frame 1Symbol 938 EditableText
"txt1"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 944 EditableText
"txt2"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 945 EditableText
"txt3"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 946 EditableText
"txt4"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 947 EditableText
"txt6"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 948 EditableText
"txt5"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 949 EditableText
"txt7"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 950 EditableText
"txt8"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 951 EditableText
"txt9"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 952 EditableText
"txt10"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 953 EditableText
"txt11"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 954 EditableText
"txt12"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 955 EditableText
"txt14"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 956 EditableText
"txt13"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 957 EditableText
"txt15"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 958 EditableText
"txt16"Symbol 975 MovieClip {windkingdom_armor_fla.result_loose_172} Frame 1Symbol 959 EditableText
"txt1"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 977 EditableText
"txt2"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 978 EditableText
"txt3"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 979 EditableText
"txt4"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 980 EditableText
"txt6"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 981 EditableText
"txt5"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 982 EditableText
"txt7"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 983 EditableText
"txt8"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 984 EditableText
"txt9"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 985 EditableText
"txt10"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 986 EditableText
"txt11"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 987 EditableText
"txt12"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 988 EditableText
"txt14"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 989 EditableText
"txt13"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 990 EditableText
"txt15"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 991 EditableText
"txt16"Symbol 993 MovieClip {windkingdom_armor_fla.result_173} Frame 1Symbol 992 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.

Labels

"locked"Frame 4
"leveljumper"Frame 8
"menuselect"Frame 10
"instructions"Frame 14
"levelselect"Frame 24
"savegame"Frame 34
"loadgame"Frame 44
"unloadgame"Frame 54
"upgrade"Frame 64
"statistics"Frame 74
"gameplay"Frame 84
"playerquit"Frame 94
"playerloose"Frame 104
"playerwin"Frame 114
"ultimatewin"Frame 124
"credits"Frame 135
"destroyed"Symbol 157 MovieClip {mc_bigbat} Frame 17
"attack"Symbol 174 MovieClip {mc_blackknight} Frame 17
"destroyed"Symbol 174 MovieClip {mc_blackknight} Frame 33
"facedown"Symbol 183 MovieClip {mc_evilcopter} Frame 1
"faceup"Symbol 183 MovieClip {mc_evilcopter} Frame 9
"destroyed"Symbol 183 MovieClip {mc_evilcopter} Frame 17
"facedown"Symbol 196 MovieClip {mc_evildragon} Frame 1
"faceup"Symbol 196 MovieClip {mc_evildragon} Frame 17
"destroyed"Symbol 196 MovieClip {mc_evildragon} Frame 33
"facedown"Symbol 201 MovieClip {mc_evilpanzer} Frame 1
"faceup"Symbol 201 MovieClip {mc_evilpanzer} Frame 9
"destroyed"Symbol 201 MovieClip {mc_evilpanzer} Frame 17
"facedown"Symbol 214 MovieClip {mc_evilultimate} Frame 1
"faceup"Symbol 214 MovieClip {mc_evilultimate} Frame 17
"destroyed"Symbol 214 MovieClip {mc_evilultimate} Frame 33
"destroyed"Symbol 221 MovieClip {mc_smallbat} Frame 17
"destroy"Symbol 251 MovieClip {windkingdom_armor_fla.lv1_21} Frame 2
"destroy"Symbol 262 MovieClip {windkingdom_armor_fla.lv2_30} Frame 2
"destroy"Symbol 268 MovieClip {windkingdom_armor_fla.lv3_32} Frame 2
"destroy"Symbol 269 MovieClip Frame 1
"destroy"Symbol 270 MovieClip Frame 1
"destroy"Symbol 271 MovieClip Frame 1
"destroyed"Symbol 312 MovieClip {mc_cannonbullet} Frame 61
"destroyed"Symbol 315 MovieClip {mc_firebullet} Frame 61
"destroyed"Symbol 318 MovieClip {mc_frozenbullet} Frame 61
"destroyed"Symbol 321 MovieClip {mc_icebullet} Frame 61
"destroyed"Symbol 333 MovieClip {mc_fireturret} Frame 2
"destroyed"Symbol 337 MovieClip {mc_iceturret} Frame 2
"destroyed"Symbol 341 MovieClip {mc_thunderturret} Frame 2
"facedown"Symbol 350 MovieClip {mc_copter} Frame 1
"faceup"Symbol 350 MovieClip {mc_copter} Frame 9
"destroyed"Symbol 350 MovieClip {mc_copter} Frame 17
"facedown"Symbol 363 MovieClip {mc_dragon} Frame 1
"faceup"Symbol 363 MovieClip {mc_dragon} Frame 17
"destroyed"Symbol 363 MovieClip {mc_dragon} Frame 33
"facedown"Symbol 376 MovieClip {mc_eagle} Frame 1
"faceup"Symbol 376 MovieClip {mc_eagle} Frame 17
"destroyed"Symbol 376 MovieClip {mc_eagle} Frame 33
"facedown"Symbol 381 MovieClip {mc_panzer} Frame 1
"faceup"Symbol 381 MovieClip {mc_panzer} Frame 9
"destroyed"Symbol 381 MovieClip {mc_panzer} Frame 17
"facedown"Symbol 386 MovieClip {mc_rider} Frame 1
"faceup"Symbol 386 MovieClip {mc_rider} Frame 9
"destroyed"Symbol 386 MovieClip {mc_rider} Frame 17
"gameplay"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 1
"shortcuts"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 11
"units"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 21
"exp"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 31
"battle"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 41
"upgrade"Symbol 722 MovieClip {windkingdom_armor_fla.instructionnotes_125} Frame 51
"insufficient"Symbol 810 MovieClip {windkingdom_armor_fla.upgradewarning_151} Frame 2
"maximum"Symbol 810 MovieClip {windkingdom_armor_fla.upgradewarning_151} Frame 31




http://swfchan.com/23/114683/info.shtml
Created: 10/3 -2019 14:15:07 Last modified: 10/3 -2019 14:15:07 Server time: 09/05 -2024 12:30:48